STM32 USB-serial example.
Example of USB-serial module on STM32 architecture, using libopencm3 library. This example tests the capability of USB-serial port by sending a lots of data. To be used with Lisa M/MX 2.1
Example for airframe file
Add to your firmware section:
<module name="usb_serial_stm32_example2"/>
Module functions
Init Functions
These initialization functions are called once on startup.
Event Functions
These event functions are called in each cycle of the module event loop.
Periodic Functions
These functions are called periodically at the specified frequency from the module periodic loop.
- periodic_usb_serial()
- Frequency in Hz: 10.
- Autorun: TRUE
Periodic function automatically starts after init.
Files
Header Files
The following headers are automatically included in modules.h
Source Files
Raw usb_serial_stm32_example2.xml file:
<!DOCTYPE module SYSTEM "module.dtd">
<module name="usb_serial_stm32_example2" dir="com">
<doc>
<description>
STM32 USB-serial example.
Example of USB-serial module on STM32 architecture, using libopencm3 library.
This example tests the capability of USB-serial port by sending a lots of data.
To be used with Lisa M/MX 2.1
</description>
</doc>
<header>
<file name="usb_serial_stm32.h"/>
</header>
<init fun="init_usb_serial()"/>
<periodic fun="periodic_usb_serial()" freq="10." autorun="TRUE"/>
<event fun="event_usb_serial()"/>
<makefile target="!nps|sim">
<file_arch name="usb_ser_hw.c" dir=""/>
<define name="USE_USB_SERIAL"/>
<file name="usb_serial_stm32_example2.c"/>
</makefile>
</module>