No detailed description...
Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!
These initialization functions are called once on startup.
These event functions are called in each cycle of the module event loop.
These functions are called periodically at the specified frequency from the module periodic loop.
Whenever the specified datalink message is received, the corresponing handler function is called.
<!DOCTYPE module SYSTEM "module.dtd">
<module name="intermcu_uart" dir="intermcu" task="core">
<doc>
<description>
Inter-MCU communication over UART
</description>
<configure name="INTERMCU_PORT" value="UARTx" description="UART used for inter mcu communication (default: UART2 for FBW, UART5 for AP)"/>
<configure name="INTERMCU_BAUD" value="B57600" description="UART baud rate"/>
<configure name="FBW_MODE_LED" value="none|num" description="LED number or 'none'"/>
</doc>
<dep>
<depends>uart,radio_control_intermcu,datalink_common</depends>
<provides>intermcu,commands</provides>
</dep>
<header>
<file name="intermcu.h"/>
<file name="intermcu_ap.h" cond="INTERMCU_AP"/>
<file name="intermcu_fbw.h" cond="INTERMCU_FBW"/>
</header>
<init fun="intermcu_init()"/>
<periodic fun="intermcu_periodic()"/>
<periodic fun="intermcu_send_status()" freq="10." cond="INTERMCU_FBW"/>
<event fun="intermcu_event()"/>
<datalink message="IMCU_FBW_STATUS" fun="intermcu_parse_IMCU_FBW_STATUS(buf)" class="intermcu" cond="INTERMCU_AP"/>
<datalink message="IMCU_COMMANDS" fun="intermcu_parse_IMCU_COMMANDS(buf)" class="intermcu" cond="INTERMCU_FBW"/>
<datalink message="IMCU_SPEKTRUM_SOFT_BIND" fun="intermcu_parse_IMCU_SPEKTRUM_SOFT_BIND(buf)" class="intermcu" cond="INTERMCU_FBW"/>
<datalink message="*" fun="intermcu_forward_uplink(buf)" cond="INTERMCU_FBW"/>
<makefile target="ap|fbw">
<configure name="INTERMCU_PORT" default="UART3" case="upper|lower"/>
<configure name="INTERMCU_BAUD" default="B230400"/>
<define name="INTERMCU_LINK" value="$(INTERMCU_PORT_LOWER)"/>
<define name="USE_$(INTERMCU_PORT_UPPER)"/>
<define name="$(INTERMCU_PORT_UPPER)_BAUD" value="$(INTERMCU_BAUD)"/>
<define name="DOWNLINK_DEVICE" value="$(INTERMCU_LINK)" cond="ifndef MODEM_PORT"/>
<define name="DOWNLINK_TRANSPORT" value="intermcu.transport" cond="ifndef MODEM_PORT"/>
<file name="pprz_transport.c" dir="pprzlink/src"/>
</makefile>
<makefile target="fbw">
<configure name="FBW_MODE_LED" default="none"/>
<define name="FBW_MODE_LED" value="$(FBW_MODE_LED)" cond="ifneq ($(FBW_MODE_LED),none)"/>
<define name="INTERMCU_FBW"/>
<file name="intermcu_fbw.c"/>
<test firmware="fixedwing">
<define name="INTERMCU_LINK" value="uart1"/>
<define name="USE_UART1"/>
</test>
</makefile>
<makefile target="ap">
<define name="INTERMCU_AP"/>
<file name="intermcu_ap.c"/>
<test firmware="fixedwing">
<define name="INTERMCU_LINK" value="uart1"/>
<define name="USE_UART1"/>
</test>
</makefile>
</module>