Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
logger_spi_link module

Stream all IMU data to external High-Speed SD-logger via SPI

No detailed description...

Example for airframe file

Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!

1 <module name="logger_spi_link">
2  <configure name="HS_LOG_SPI_DEV" value="SPI1|SPI2|SPI3|SPI4|SPI5|SPI6" />
3  <configure name="HS_LOG_SPI_SLAVE_IDX" value="SPI_SLAVE1|SPI_SLAVE2|SPI_SLAVE3|SPI_SLAVE4|SPI_SLAVE5|SPI_SLAVE6" />
4 </module>

Module configuration options

Configure Options

  • name: HS_LOG_SPI_DEV value: SPI1|SPI2|SPI3|SPI4|SPI5|SPI6
    Description: SPI bus which the logger is connected to (default: spi1)
  • name: HS_LOG_SPI_SLAVE_IDX value: SPI_SLAVE1|SPI_SLAVE2|SPI_SLAVE3|SPI_SLAVE4|SPI_SLAVE5|SPI_SLAVE6
    Description: SPI slave which the logger is connected to (default: SPI_SLAVE1)

Module functions

Init Functions

These initialization functions are called once on startup.

Periodic Functions

These functions are called periodically at the specified frequency from the module periodic loop.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw logger_spi_link.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="logger_spi_link" dir="loggers">
<doc>
<description>Stream all IMU data to external High-Speed SD-logger via SPI</description>
<configure name="HS_LOG_SPI_DEV" value="SPI1|SPI2|SPI3|SPI4|SPI5|SPI6" description="SPI bus which the logger is connected to (default: spi1)"/>
<configure name="HS_LOG_SPI_SLAVE_IDX" value="SPI_SLAVE1|SPI_SLAVE2|SPI_SLAVE3|SPI_SLAVE4|SPI_SLAVE5|SPI_SLAVE6" description="SPI slave which the logger is connected to (default: SPI_SLAVE1)"/>
</doc>
<header>
<file name="high_speed_logger_spi_link.h"/>
</header>
<init fun="high_speed_logger_spi_link_init()"/>
<periodic fun="high_speed_logger_spi_link_periodic()" autorun="TRUE"/>
<makefile target="ap">
<configure name="HS_LOG_SPI_DEV" default="spi1" case="upper|lower"/>
<configure name="HS_LOG_SPI_SLAVE_IDX" default="spi_slave1" case="upper|lower"/>
<raw>
include $(CFG_SHARED)/spi_master.makefile
</raw>
<define name="USE_$(HS_LOG_SPI_DEV_UPPER)" value="1" />
<define name="USE_$(HS_LOG_SPI_SLAVE_IDX_UPPER)" value="1" />
<define name="HIGH_SPEED_LOGGER_SPI_LINK_DEVICE" value="$(HS_LOG_SPI_DEV_LOWER)" />
<define name="HIGH_SPEED_LOGGER_SPI_LINK_SLAVE_NUMBER" value="$(HS_LOG_SPI_SLAVE_IDX_UPPER)" />
<file name="high_speed_logger_spi_link.c"/>
</makefile>
</module>