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.
 
 

33 lines
953 B

#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 */