diff options
author | fishsoupisgood <github@madingley.org> | 2020-09-09 11:53:37 +0100 |
---|---|---|
committer | fishsoupisgood <github@madingley.org> | 2020-09-09 11:53:37 +0100 |
commit | 9d87c925a9eaa4fc256be3173c14a20d1469472d (patch) | |
tree | 50d63f87a47a0eac3f5b8058850184bcd4e6ee95 /stm32/app/pic.c | |
parent | dafd8cf2fdcdd637cc06f760d318cf8391b1a294 (diff) | |
download | heating-9d87c925a9eaa4fc256be3173c14a20d1469472d.tar.gz heating-9d87c925a9eaa4fc256be3173c14a20d1469472d.tar.bz2 heating-9d87c925a9eaa4fc256be3173c14a20d1469472d.zip |
everything, mostly, working
Diffstat (limited to 'stm32/app/pic.c')
-rw-r--r-- | stm32/app/pic.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/stm32/app/pic.c b/stm32/app/pic.c deleted file mode 100644 index b478766..0000000 --- a/stm32/app/pic.c +++ /dev/null @@ -1,52 +0,0 @@ -#include "project.h" - -#define PIC_RESET GPIO1 -#define PIC_RESET_PORT GPIOB - - -static void pic_reset (void) -{ - SET (PIC_RESET); - delay_ms (1); - CLEAR (PIC_RESET); -} - - -void pic_passthru (void) -{ - uint8_t c; - - printf ("\r\nPIC MODE\r\n"); - usart1_drain(); - block_stdio = 1; - - while (!ring_read_byte (&rx3_ring, &c)); - - pic_reset(); - - - for (;;) { - if (!ring_read_byte (&rx1_ring, &c)) - usart3_queue (c); - - if (!ring_read_byte (&rx3_ring, &c)) - usart1_queue (c); - - } -} - - - - - - - -void pic_init (void) -{ - MAP_OUTPUT_PP (PIC_RESET); - - pic_reset(); - -} - - |