summaryrefslogtreecommitdiff
path: root/gm_platform/fw/serial.c
diff options
context:
space:
mode:
authorjaseg <git@jaseg.net>2020-01-30 17:45:53 +0100
committerjaseg <git@jaseg.net>2020-01-30 17:45:53 +0100
commita6f75b2ce5f4a6d7d625d1753b97c075fc069705 (patch)
treecb3a3a713bb30b199901abb6f9121d1c701bf1f2 /gm_platform/fw/serial.c
parentda3a2835935173173da8843ecc4800961856ca44 (diff)
downloadmaster-thesis-a6f75b2ce5f4a6d7d625d1753b97c075fc069705.tar.gz
master-thesis-a6f75b2ce5f4a6d7d625d1753b97c075fc069705.tar.bz2
master-thesis-a6f75b2ce5f4a6d7d625d1753b97c075fc069705.zip
Finally fixed LED driving code
Diffstat (limited to 'gm_platform/fw/serial.c')
-rw-r--r--gm_platform/fw/serial.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gm_platform/fw/serial.c b/gm_platform/fw/serial.c
index 2c80674..6b3ba00 100644
--- a/gm_platform/fw/serial.c
+++ b/gm_platform/fw/serial.c
@@ -206,6 +206,7 @@ void usart_schedule_dma() {
xfr_len = sizeof(buf->data) - xfr_start;
}
+ leds.error = 250;
}
buf->xfr_start = xfr_start;
@@ -264,6 +265,8 @@ int usart_send_packet_nonblocking(struct ll_pkt *pkt, size_t pkt_len) {
usart_tx_buf.packet_end[usart_tx_buf.wr_idx] = usart_tx_buf.wr_pos;
usart_tx_buf.wr_idx = (usart_tx_buf.wr_idx + 1) % ARRAY_LEN(usart_tx_buf.packet_end);
+ leds.usb = 100;
+
if (!(DMA1_Channel2->CCR & DMA_CCR_EN))
usart_schedule_dma();
return 0;