#include #include #include #define L2CAP_FIXED_CHANNEL_TABLE_SIZE 3 #define FIXED_CHANNEL_FIFO_INVALID_INDEX 0xff typedef struct l2cap_fixed_channel { uint8_t waiting_for_can_send_now; uint8_t next_request; } l2cap_fixed_channel_t; static l2cap_fixed_channel_t fixed_channels[L2CAP_FIXED_CHANNEL_TABLE_SIZE]; static uint8_t fixed_channel_head_index = FIXED_CHANNEL_FIFO_INVALID_INDEX; static uint8_t fixed_channel_tail_index = FIXED_CHANNEL_FIFO_INVALID_INDEX; static void fifo_init(void){ printf("\ninit\n"); memset(fixed_channels, 0, sizeof(fixed_channels)); int i; for (i=0;i