add more test code for keyboard hid application API
refractor, restructure, rename several thing regarding host, keyboard etc ...
This commit is contained in:
@@ -81,6 +81,7 @@ enum
|
||||
//--------------------------------------------------------------------+
|
||||
typedef uint32_t osal_queue_id_t;
|
||||
|
||||
tusb_error_t osal_queue_create(osal_queue_id_t qid, uint8_t *buffer);
|
||||
tusb_error_t osal_queue_put(osal_queue_id_t qid, uint32_t data, osal_timeout_t msec);
|
||||
tusb_error_t osal_queue_get(osal_queue_id_t qid, uint32_t *data, osal_timeout_t msec);
|
||||
|
||||
|
||||
@@ -60,6 +60,17 @@
|
||||
//--------------------------------------------------------------------+
|
||||
// QUEUE API
|
||||
//--------------------------------------------------------------------+
|
||||
typedef struct{
|
||||
uint8_t *buf ; ///< buffer pointer
|
||||
uint16_t size ; ///< buffer size
|
||||
volatile uint16_t len ; ///< bytes in fifo
|
||||
volatile uint16_t wr_ptr ; ///< write pointer
|
||||
volatile uint16_t rd_ptr ; ///< read pointer
|
||||
} osal_queue_t;
|
||||
|
||||
#define OSAL_DEF_QUEUE(name, size)\
|
||||
osal_queue_t name;\
|
||||
uint8_t buffer_##name[size]
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user