UART_CB_BUS_BIND = 1,
UART_CB_INTR,
UART_CB_INTR_EVENT,
+ UART_CB_GIO_EVENT,
};
enum {
PIO_RESET,
PIO_TX,
- PIO_RX,
+ PIO_INTR,
N_PIO
};
-#define RX_BUFFER_SIZE 32
+#define NUM_INTR_CBS 2
+#define INTR_CB_BUF_SIZE 16 // 16550 has a 16-byte fifo
+#define MAX_RX_BUFFER_SIZE 32
typedef struct {
+ udi_init_context_t init_context;
+
udi_cb_t *active_cb;
struct {
udi_index_t pio_index;
udi_pio_handle_t pio_handles[N_PIO];
udi_channel_t interrupt_channel;
- udi_ubit8_t rx_bytes;
udi_buf_t *rx_buffer;
+
+ udi_boolean_t event_cb_used;
+ udi_boolean_t event_pending;
+ udi_gio_event_cb_t *event_cb;
} rdata_t;
// === MACROS ===