/* * This callback is invoked when a transmission buffer has been completely * read by the driver. */ static void txend1(UARTDriver *uartp) { its++; chSysLockFromISR(); uartStartSendI(uartp, STORM_BUF_LEN, txbuf); chSysUnlockFromISR(); }
static void restart(void *p) { (void)p; chSysLockFromIsr(); uartStartSendI(&UARTD1, 14, "Hello World!\r\n"); chSysUnlockFromIsr(); }
void uart_printf_i(const char *format, ...) { va_list ap; va_start (ap, format); chSemWait(&uart_sem); /* * Build string to send to the buffer. */ vsnprintf(uart_print_buf, PRINTF_BUF_SIZE, format, ap); /* * Print stuff UART */ uartStartSendI(&UARTD3, strlen(uart_print_buf), uart_print_buf); }
static void restart(void *p) { (void)p; uartStartSendI(&UARTD1, 14, "Hello World!\r\n"); }