randomskk / followingrobot

C/ASM code for an ARM-based robot with a vision system to follow the user

This URL has Read+Write access

followingrobot / ui.h
100644 34 lines (26 sloc) 0.949 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/************************************************
* FollowingRobot - ui.h
* Functions to provide a user interface
* Header file.
* See README for more details.
***********************************************/
 
//OLED functions. Also includes the STM32 library
#include "oled.h"
 
//provided by main.c
void flash_eyes( int n );
void Delay( unsigned long delay );
 
//tracking_enabled is defined in main.c
extern volatile u8 turning_enabled;
extern volatile u8 driving_enabled;
extern volatile u8 lights_enabled;
 
//keep track of what menu option is selected
extern volatile u8 ui_menu_selection;
 
//The different menu options that might be selected
#define UI_SELECT_TURNING 1
#define UI_SELECT_DRIVING 2
#define UI_SELECT_LIGHTS 3
 
//ui_menu: display the menu, highlighting the selected choice
void ui_menu();
 
//ui_check: check inputs, reaction appropriately either changing
// menu selection or doing whatever was selected
void ui_check();