Commit 38aa54ba authored by Jake Read's avatar Jake Read

port handling works on multiple hops, returns

parent 9b8a8aae
......@@ -55,7 +55,4 @@ void apa_return_packet(uint8_t *packet, uint8_t length){
uart_sendchars_buffered(ups[ackpack[1]], ackpack, length);
// NOW: test this
// then, also: can we avoid packing ups into apaports, use hardware.h instead?
\ No newline at end of file
......@@ -6,6 +6,7 @@
#include "uartport.h"
#include "hardware.h"
void uart_build(uartport_t *uart, Uart *com, Pio *port, uint32_t pinrx, uint32_t pintx, ringbuffer_t *rbrx, ringbuffer_t *rbtx, pin_t *stlr, pin_t *stlb){
uart->com = com;
......@@ -82,7 +83,9 @@ void uart_handler(uartport_t *uart){
void uart_rxhandler(uartport_t *uart){
pin_clear(uart->stlr); // set with whatever reads it (apa)
//uint8_t data = uart->com->UART_RHR;
rb_putchar(uart->rbrx, uart->com->UART_RHR);
//uart_sendchar_buffered(ups[0], data);
void uart_txhandler(uartport_t *uart){
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment