ports: Reformat more C and Python source code.
These files that are reformatted only now fall under the list of files to apply uncrustify/black formatting to. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -30,8 +30,7 @@ static struct k_sem uart_sem;
|
||||
static uint8_t uart_ringbuf[UART_BUFSIZE];
|
||||
static uint8_t i_get, i_put;
|
||||
|
||||
static int console_irq_input_hook(uint8_t ch)
|
||||
{
|
||||
static int console_irq_input_hook(uint8_t ch) {
|
||||
int i_next = (i_put + 1) & (UART_BUFSIZE - 1);
|
||||
if (i_next == i_get) {
|
||||
printk("UART buffer overflow - char dropped\n");
|
||||
@@ -45,7 +44,7 @@ static int console_irq_input_hook(uint8_t ch)
|
||||
uart_ringbuf[i_put] = ch;
|
||||
i_put = i_next;
|
||||
}
|
||||
//printk("%x\n", ch);
|
||||
// printk("%x\n", ch);
|
||||
k_sem_give(&uart_sem);
|
||||
k_yield();
|
||||
return 1;
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
int real_main(void);
|
||||
|
||||
void main(void) {
|
||||
#ifdef CONFIG_CONSOLE_SUBSYS
|
||||
#ifdef CONFIG_CONSOLE_SUBSYS
|
||||
console_init();
|
||||
#else
|
||||
#else
|
||||
zephyr_getchar_init();
|
||||
#endif
|
||||
#endif
|
||||
real_main();
|
||||
|
||||
// This is needed so the linker includes k_timer_init, z_impl_k_timer_start
|
||||
|
||||
Reference in New Issue
Block a user