diff options
Diffstat (limited to 'gm_platform/fw/serial.h')
-rw-r--r-- | gm_platform/fw/serial.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gm_platform/fw/serial.h b/gm_platform/fw/serial.h index 61ac4eb..8cec089 100644 --- a/gm_platform/fw/serial.h +++ b/gm_platform/fw/serial.h @@ -26,6 +26,7 @@ #include <stdint.h>
#include <stdarg.h>
#include <errno.h>
+#include <stdbool.h>
#include "global.h"
@@ -33,9 +34,10 @@ struct dma_tx_buf { /* The following fields are accessed only from DMA ISR */
ssize_t xfr_start; /* Start index of running DMA transfer */
ssize_t xfr_end; /* End index of running DMA transfer plus one */
- ssize_t cur_packet;
- int retransmit_rq;
- int wraparound;
+ bool wraparound;
+ ssize_t xfr_next;
+ bool ack;
+
/* The following fields are written only from non-interrupt code */
ssize_t wr_pos; /* Next index to be written */
@@ -57,7 +59,6 @@ struct __attribute__((__packed__)) ll_pkt { enum ctrl_pkt_type {
CTRL_PKT_RESET = 1,
CTRL_PKT_ACK = 2,
- CTRL_PKT_RETRANSMIT = 3,
};
struct __attribute__((__packed__)) ctrl_pkt {
@@ -68,7 +69,6 @@ struct __attribute__((__packed__)) ctrl_pkt { 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, uint8_t c);
int usart_send_packet_nonblocking(struct ll_pkt *pkt, size_t pkt_len);
int usart_ack_packet(uint8_t idx);
|