zephyr/drivers/console
Daniel Leung e643cede3a uart: add ISR callback mechanism for UART drivers
The peripherals utilizing UART were required to register their own
ISR rountines. This means that all those peripherals drivers need
to know which IRQ line is attached to a UART controller, and all
the other config values required to register a ISR. This causes
scalibility issue as every board and peripherals have to define
those values.

Another reason for this patch is to support virtual serial ports.
Virtual serial ports do not have physical interrupt lines to
attach, and thus would not work.

This patch adds a simple callback mechanism, which calls a function
when UART interrupts are triggered. The low level plumbing still needs
to be done by the peripheral drivers, as these drivers may need to
access low level capability of UART to function correctly. This simply
moves the interrupt setup into the UART drivers themselves. By doing
this, the peripheral drivers do not need to know all the config values
to properly setup the interrupts and attaching the ISR. One drawback
is that this adds to the interrupt latency.

Note that this patch breaks backward compatibility in terms of
setting up interrupt for UART controller. How to use UART is still
the same.

This also addresses the following issues:

() UART driver for Atmel SAM3 currently does not support interrupts.
   So remove the code from vector table. This will be updated when
   there is interrupt support for the driver.
() Corrected some config options for Stellaris UART driver.

This was tested with samples/shell on Arduino 101, and on QEMU
(Cortex-M3 and x86).

Origin: original code
Change-Id: Ib4593d8ccd711f4e97d388c7293205d213be1aec
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-05 13:37:57 +00:00
..
Kconfig uart: add ISR callback mechanism for UART drivers 2016-03-05 13:37:57 +00:00
Makefile interrupts: new static IRQ API 2016-02-05 20:25:17 -05:00
console_handler_shell.c nano_fifo: Simplify nano_xxx_fifo_get() API family 2016-02-05 20:25:14 -05:00
ipm_console_receiver.c nano_sema: Simplify nano_xxx_sem_take() API family 2016-02-05 20:25:14 -05:00
ipm_console_sender.c ipi: rename to ipm 2016-02-05 20:25:04 -05:00
ram_console.c init: use SYS_INIT() where it makes sense 2016-02-05 20:25:25 -05:00
uart_console.c uart: add ISR callback mechanism for UART drivers 2016-03-05 13:37:57 +00:00
uart_pipe.c uart: add ISR callback mechanism for UART drivers 2016-03-05 13:37:57 +00:00