34 lines
953 B
C
34 lines
953 B
C
#ifndef EVENT_H_SEEN
|
|
#define EVENT_H_SEEN
|
|
|
|
#include <stdint.h>
|
|
|
|
/* *********************************************************************** */
|
|
|
|
#define EVENT_COUNT 16
|
|
|
|
#define EVENT_TYPE_EMPTY 0x00
|
|
#define EVENT_TYPE_TIMER_SET 0x01
|
|
#define EVENT_TYPE_TIMER_ELAPSED 0x02
|
|
#define EVENT_TYPE_PWM_VALUE 0x03
|
|
#define EVENT_TYPE_LEDFADE_COMMAND 0x04
|
|
#define EVENT_TYPE_LEDFADE_VALUE 0x05
|
|
#define EVENT_TYPE_LEDFADE_STATUS 0x06
|
|
|
|
typedef struct event_entry_s
|
|
{
|
|
uint8_t type;
|
|
uint8_t num;
|
|
uint16_t value;
|
|
} event_entry_t;
|
|
|
|
/* *********************************************************************** */
|
|
|
|
void event_queue (uint8_t type, uint8_t num, uint16_t value);
|
|
event_entry_t * event_get (void);
|
|
void event_clear (event_entry_t * p_event);
|
|
|
|
/* *********************************************************************** */
|
|
|
|
#endif /* EVENT_H_SEEN */
|