diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-12-03 10:35:55 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-12-03 10:35:55 -0700 |
commit | f5e15a5a2d55cf0a6fbdbe04e5c49499a6eac642 (patch) | |
tree | d9f570c228268dfa0ecc31ad15579d412b953a6f /src/spi.c | |
parent | a15656b399689d0c7b12963a718729bea9b6dfcc (diff) | |
download | ch573-f5e15a5a2d55cf0a6fbdbe04e5c49499a6eac642.tar.gz ch573-f5e15a5a2d55cf0a6fbdbe04e5c49499a6eac642.tar.bz2 ch573-f5e15a5a2d55cf0a6fbdbe04e5c49499a6eac642.zip |
Basic Christmas light implementation!
Diffstat (limited to 'src/spi.c')
-rw-r--r-- | src/spi.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -4,6 +4,7 @@ #include "ch573/gpio.h" #include "ch573/spi.h" +#include "sysled.h" #define MAX_SPI_FIFO 8 @@ -79,7 +80,10 @@ void dma_transfer(void* output_buffer, size_t len) void wait_for_dma() { - while (SPI.total_count.get(SPI0) > 0); + while (SPI.total_count.get(SPI0) > 0) { + set_sysled(1); + } + set_sysled(0); } void run_spi(void) |