26 struct timeval timestamp;
41 int init(
const char*, uint8_t = 0, uint32_t = 500000, uint16_t = 0, uint8_t = 8);
void clear_event_queue()
With this the event queue can be cleared but all events are discarded. This can be used if limiting t...
void start_capturing_events()
Infinite loop that reads SPI keyboard. Runs in it's own thread!
void set_kb_testing_inner(bool val)
bool get_kb_testing_inner()
int init(const char *device, uint8_t mode, uint32_t speed, uint16_t delay, uint8_t bits_per_word)
Initializes spi_config and my_spi global variables and starts SPI.
void clean()
Stops event capturing and closes SPI.
int init_from_conf()
Initializes my_spi with config loaded from config file into app_workspace. Starts SPI.
kb_event * poll_event()
Polls event from queue into param event Returns 1 on success because it is inteded to return "true" o...
Structure of SPI keyboard event, Contains pressed scancode, flags and timestamp of event creation.