Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Stream all IMU data to external High-Speed SD-logger via SPI

Module XML file: logger_spi_link.xml

No detailed description...

Example for airframe file

This example contains all possible configuration options, not all of them are mandatory!

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

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>
<raw>
HS_LOG_SPI_DEV ?= spi1
HS_LOG_SPI_DEV_LOWER=$(shell echo $(HS_LOG_SPI_DEV) | tr A-Z a-z)
HS_LOG_SPI_DEV_UPPER=$(shell echo $(HS_LOG_SPI_DEV) | tr a-z A-Z)
HS_LOG_SPI_SLAVE_IDX ?= spi_slave1
HS_LOG_SPI_SLAVE_IDX_LOWER=$(shell echo $(HS_LOG_SPI_SLAVE_IDX) | tr A-Z a-z)
HS_LOG_SPI_SLAVE_IDX_UPPER=$(shell echo $(HS_LOG_SPI_SLAVE_IDX) | tr a-z A-Z)
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>