From 966f104597275b29f41c06c4574d1bbe9ecde401 Mon Sep 17 00:00:00 2001 From: jaseg Date: Sat, 25 Jan 2020 11:53:44 +0100 Subject: serial wip --- gm_platform/fw/serial.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gm_platform/fw/serial.h') diff --git a/gm_platform/fw/serial.h b/gm_platform/fw/serial.h index 55eac9e..c10393a 100644 --- a/gm_platform/fw/serial.h +++ b/gm_platform/fw/serial.h @@ -31,14 +31,15 @@ struct dma_tx_buf { size_t xfr_start; /* Start index of running DMA transfer */ size_t xfr_end; /* End index of running DMA transfer plus one */ size_t wr_pos; /* Next index to be written */ - uint8_t data[256]; + uint8_t data[512]; + size_t packet_starts[5]; }; extern volatile struct dma_tx_buf usart_tx_buf; void usart_dma_init(void); int usart_dma_fifo_push(volatile struct dma_tx_buf *buf, char c); -void usart_putc(char c); void usart_send_packet(const uint8_t *data, size_t len); +int usart_send_packet_nonblocking(const uint8_t *data, size_t len); #endif // __SERIAL_H__ -- cgit