Paparazzi UAS  v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
osd_max7456 module

MAX7456 driver (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="osd_max7456">
2  <configure name="MAX7456_SPI_DEV" value="spiX" />
3  <configure name="MAX7456_SLAVE_IDX" value="SPI_SLAVE0" />
4 </module>

Module configuration options

Configure Options

  • name: MAX7456_SPI_DEV value: spiX
    Description: select spi peripheral to use (default spi2)
  • name: MAX7456_SLAVE_IDX value: SPI_SLAVE0
    Description: SPI slave select index

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.

  • max7456_periodic()
    • Frequency in Hz: 20
    • Autorun: TRUE
      Periodic function automatically starts after init.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw osd_max7456.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="max7456" dir="display">
<doc>
<description>MAX7456 driver (SPI)</description>
<configure name="MAX7456_SPI_DEV" value="spiX" description="select spi peripheral to use (default spi2)"/>
<configure name="MAX7456_SLAVE_IDX" value="SPI_SLAVE0" description="SPI slave select index"/>
</doc>
<header>
<file name="max7456.h"/>
</header>
<init fun="max7456_init()"/>
<periodic fun="max7456_periodic()" freq="20" autorun="TRUE"/>
<event fun="max7456_event()"/>
<makefile target="ap">
<configure name="MAX7456_SPI_DEV" default="spi2" case="upper|lower"/>
<configure name="MAX7456_SLAVE_IDX" default="spi_slave2" case="upper|lower"/>
<raw>
include $(CFG_SHARED)/spi_master.makefile
</raw>
<define name="USE_$(MAX7456_SPI_DEV_UPPER)" />
<define name="USE_$(MAX7456_SLAVE_IDX_UPPER)" />
<define name="MAX7456_SPI_DEV" value="$(MAX7456_SPI_DEV_LOWER)" />
<define name="MAX7456_SLAVE_IDX" value="$(MAX7456_SLAVE_IDX_UPPER)" />
<file name="max7456.c" />
<define name="USE_PAL_FOR_OSD_VIDEO" value="1" />
<define name="OSD_USE_EXTERNAL_SPRINTF" value="0" />
</makefile>
</module>