You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

31 lines
934 B

#ifndef __EVENT_H__
#define __EVENT_H__
/* *********************************************************************** */
struct event_entry
{
uint8_t type;
uint8_t num;
uint16_t value;
};
#define EVENT_TYPE_EMPTY 0x00
#define EVENT_TYPE_GENERIC 0x01
#define EVENT_TYPE_INPUT_SWITCH 0x10
#define EVENT_TYPE_INPUT_BUTTON 0x11
#define EVENT_TYPE_INPUT_INCDEC 0x12
#define EVENT_TYPE_PWM_COMMAND 0x18
#define EVENT_TYPE_PWM_VALUE 0x19
#define EVENT_TYPE_TIMER_SET 0xF0
#define EVENT_TYPE_TIMER_ELAPSED 0xF1
/* *********************************************************************** */
void event_queue (uint8_t type, uint8_t num, uint16_t value);
struct event_entry * event_get (void);
void event_clear (void);
/* *********************************************************************** */
#endif /* __EVENT_H__ */