Skip to content
Snippets Groups Projects
Commit 38aa54ba authored by Jake Read's avatar Jake Read
Browse files

port handling works on multiple hops, returns

parent 9b8a8aae
Branches
No related tags found
No related merge requests found
No preview for this file type
......@@ -56,6 +56,3 @@ void apa_return_packet(uint8_t *packet, uint8_t length){
uart_sendchars_buffered(ups[ackpack[1]], ackpack, length);
}
}
\ No newline at end of file
// NOW: test this
// then, also: can we avoid packing ups into apaports, use hardware.h instead?
......@@ -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){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment