Feng Hong / Mbed OS Nucleo_yoda2_v2

eventflags.h

Committer:
hi1000
Date:
2019-07-06
Revision:
17:faa4d4976d22
Parent:
14:2e17a27f56b2

File content as of revision 17:faa4d4976d22:

#define BUTTON1_HOLD_EVENT         0x0001
#define BUTTON1_PRESSED_EVENT       0x0002
#define BUTTON2_HOLD_EVENT         0x0004
#define BUTTON2_PRESSED_EVENT       0x0008
#define BUTTON3_HOLD_EVENT         0x0010
#define BUTTON3_PRESSED_EVENT       0x0020
#define BUTTON4_HOLD_EVENT         0x0040
#define BUTTON4_PRESSED_EVENT       0x0080
#define MENU_HOLD_EVENT          BUTTON4_HOLD_EVENT
#define MENU_PRESSED_EVENT       BUTTON4_PRESSED_EVENT
#define ENTER_HOLD_EVENT         BUTTON3_HOLD_EVENT
#define ENTER_PRESSED_EVENT      BUTTON3_PRESSED_EVENT
#define LEFT_HOLD_EVENT          BUTTON2_HOLD_EVENT
#define LEFT_PRESSED_EVENT       BUTTON2_PRESSED_EVENT
#define RIGHT_HOLD_EVENT         BUTTON1_HOLD_EVENT
#define RIGHT_PRESSED_EVENT      BUTTON1_PRESSED_EVENT
#define LCD_DISPLAY_HOLD_EVENT      0x0001
#define LCD_DISPLAY_RELEASE_EVENT   0x0002

#define COMMAND_INIT  0 // all the devices return to the point 0 and return the current possition or current weight
#define COMMAND_PLUS  1 // for the devices to plus weight return the weight
#define COMMAND_MINUS 2 // for the devices to minus weight return the weight
#define COMMAND_MOVE_ABSOLUTE 3 // for the devices to move to the absolute position return the current absolute position
#define COMMAND_MOVE_RELATIVE 4 // for the devices to move relative distance return the current absolute position
#define COMMAND_REPORT_WEIGHT 5 // for the devices to report the current weight 
#define COMMAND_REPORT_POSITION 6 // for the devices to report the current absolute position
#define COMMAND_CLEAN 7 // for the devices to clean the cups return done or failed
#define COMMAND_TARE 8  // for the devices to tare the scale return done or failed
#define COMMAND_SHAKE_CUP 9 // for the device to shake the cups return done or failed
#define COMMAND_POUR_TEA 10 // for the device to pour the tea return done or failed
#define COMMAND_FINISH 11   // for everything finished return done or failed
#define COMMAND_RESET 12    // for the devices return to the point 0 and clean themselvies