General UART driver
To activate a specific UART peripheral, define flag USE_UARTX where X is your UART peripheral number
Example for airframe file
Add to your firmware section:
Files
Header Files
The following headers are automatically included in modules.h
Source Files
Raw uart.xml file:
<!DOCTYPE module SYSTEM "module.dtd">
<module name="uart" dir="mcu_periph" task="mcu">
<doc>
<description>
General UART driver
To activate a specific UART peripheral, define flag USE_UARTX where X is your UART peripheral number
</description>
</doc>
<dep>
<depends>mcu</depends>
</dep>
<header>
<file name="uart.h" dir="mcu_periph"/>
</header>
<makefile>
<file name="uart.c" dir="mcu_periph"/>
<file_arch name="uart_arch.c" dir="mcu_periph"/>
<file name="serial_port.c" dir="arch/linux" cond="ifeq ($(ARCH), linux)"/>
<file_arch name="usb_ser_hw.c" dir="." cond="ifneq ($(filter $(ARCH),chibios stm32),)"/>
</makefile>
<makefile target="sim|nps">
<include name="arch/linux"/>
<file name="serial_port.c" dir="arch/linux"/>
</makefile>
</module>