File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11CONFIG_STDOUT_CONSOLE=y
22CONFIG_CONSOLE_HANDLER=y
3+ CONFIG_UART_CONSOLE_DEBUG_SERVER_HOOKS=y
34CONFIG_NEWLIB_LIBC=y
45CONFIG_FLOAT=y
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ static struct nano_sem uart_sem;
2828static uint8_t uart_ringbuf [UART_BUFSIZE ];
2929static uint8_t i_get , i_put ;
3030
31- static int console_irq_input_hook (struct device * dev , uint8_t ch )
31+ static int console_irq_input_hook (uint8_t ch )
3232{
3333 int i_next = (i_put + 1 ) & (UART_BUFSIZE - 1 );
3434 if (i_next == i_get ) {
@@ -58,8 +58,7 @@ uint8_t zephyr_getchar(void) {
5858
5959void zephyr_getchar_init (void ) {
6060 nano_sem_init (& uart_sem );
61- struct device * uart_console_dev = device_get_binding (CONFIG_UART_CONSOLE_ON_DEV_NAME );
62- uart_irq_input_hook_set (uart_console_dev , console_irq_input_hook );
61+ uart_console_in_debug_hook_install (console_irq_input_hook );
6362 // All NULLs because we're interested only in the callback above
6463 uart_register_input (NULL , NULL , NULL );
6564}
You can’t perform that action at this time.
0 commit comments