zephyr/include
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
..
arch sys_io: don't allow negative bit offsets 2016-03-04 16:26:21 +00:00
bluetooth Bluetooth: BR/EDR: Add HCI SSP exchange IO Capa defines 2016-02-26 13:41:31 +00:00
display c++: Add extern "C" { } block to header files 2016-02-05 20:25:22 -05:00
drivers uart: add ISR callback mechanism for UART drivers 2016-03-05 13:37:57 +00:00
microkernel doc: API doc edits for microkernel event.h 2016-02-11 20:12:31 +00:00
misc docs: fixed API linking 2016-02-16 06:16:48 +00:00
net net: ip: Make sure CONFIG_NETWORKING_WITH_LOGGING is properly handled 2016-02-19 12:33:45 +00:00
toolchain include: Remove UNALIGNED_READ & UNALIGNED_WRITE 2016-03-04 20:11:57 +00:00
adc.h struct packing 2016-02-10 16:21:26 +00:00
aio_comparator.h c++: Add extern "C" { } block to header files 2016-02-05 20:25:22 -05:00
atomic.h Change BSD-3 licenses to Apache 2 2016-02-05 20:24:29 -05:00
cache.h cache: add implementation for cache-less systems 2016-02-05 20:25:24 -05:00
clock_control.h clock: add Quark SE clock control 2016-02-05 20:24:48 -05:00
device.h docs: doxygen: group driver APIs 2016-02-16 06:16:47 +00:00
gpio.h gpio: clarify API doc 2016-02-18 18:25:50 +00:00
i2c.h i2c: clarify API doc 2016-02-18 17:54:03 +00:00
init.h init: add SYS_INIT() 2016-02-05 20:25:25 -05:00
ipm.h doc: Edit the IPM driver APIs 2016-02-11 01:08:24 +00:00
irq_offload.h doc: Fix misuse of @file doxygen tag 2016-02-11 20:11:03 +00:00
irq.h irq: formalize external zephyr interrupt API 2016-02-26 15:53:22 +00:00
kernel_version.h c++: Add extern "C" { } block to header files 2016-02-05 20:25:22 -05:00
linker-defs.h init: Add protection against incorrect levels or priorities 2016-02-05 20:24:54 -05:00
linker-tool-gcc.h Fixed file description and applied doxygen style 2016-02-05 20:24:58 -05:00
linker-tool.h Fixed file description and applied doxygen style 2016-02-05 20:24:58 -05:00
microkernel.h c++: Add extern "C" { } block to header files 2016-02-05 20:25:22 -05:00
nanokernel.h kernel: add fiber_wakeup() 2016-02-25 11:06:09 -05:00
pinmux.h doc: Edit the Pinmux driver APIs 2016-02-11 01:06:53 +00:00
pwm.h doc: Edit the PWM driver APIs 2016-02-11 01:08:41 +00:00
rtc.h c++: Add extern "C" { } block to header files 2016-02-05 20:25:22 -05:00
section_tags.h ARM: ARC: put sw_isr_table in ROM by default 2016-02-05 20:25:21 -05:00
sections.h ARM: ARC: put sw_isr_table in ROM by default 2016-02-05 20:25:21 -05:00
shared_irq.h c++: Add extern "C" { } block to header files 2016-02-05 20:25:22 -05:00
spi.h SPI: Change read/write buffer pointers to void * 2016-03-04 20:13:21 +00:00
sw_isr_table.h irq: fix declared _sw_isr_table size on ARC 2016-02-05 20:25:25 -05:00
sys_clock.h c++: Add extern "C" { } block to header files 2016-02-05 20:25:22 -05:00
sys_io.h sys_io: don't allow negative bit offsets 2016-03-04 16:26:21 +00:00
toolchain.h Fixed file description and applied doxygen style 2016-02-05 20:24:58 -05:00
uart.h uart: add ISR callback mechanism for UART drivers 2016-03-05 13:37:57 +00:00
watchdog.h c++: Add extern "C" { } block to header files 2016-02-05 20:25:22 -05:00
zephyr.h sysgen: generate sysgen.h instead of zephyr.h 2016-02-05 20:24:35 -05:00