/* A (inefficient) ring buffer can be emulated in interrupt mode using the uart_get_line() with a buffer size of 1. Read 16 bytes into the ring buffer and then exit.*/ indexIn = 0; while (indexIn < 16) { |
/* Transmit the message for byte/character part of the example */ putLineUART("\r\nData in ring buffer: "); putLineUART(recv_buf); /* Need to delay a bit here to allow UART to finish sending current bytes */ SomeTypeOfDelayHere(); NVIC_DisableIRQ(UART0_IRQn); /* Disable UART interrupt */ Chip_UART_DeInit(LPC_USART0); /* Shutdown UART and clocking */ |