added minimal ibis driver example

This commit is contained in:
2022-09-15 13:15:42 +02:00
parent 1a09a57a40
commit c853f2301d
9 changed files with 507 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
/*
* Copyright 2022 Oleg Borodin <borodin@unix7.org>
*/
#ifndef IBUS_H_QWERTY
#define IBUS_H_QWERTY
#define IBUS_FRAMESIZE 32
#define IBUS_CHANNELS 14
#define WRONG_RCVAL -1
typedef struct {
uint8_t iframe[IBUS_FRAMESIZE];
uint16_t rcvalue[IBUS_CHANNELS];
int findex;
} ibus_t;
void ibus_init(ibus_t* bus);
bool ibus_recv(ibus_t* bus, uint8_t ibyte);
int ibus_chcount(ibus_t* bus);
int16_t ibus_getch(ibus_t* bus, int num);
#endif