Module XML file: osd_max7456.xml
No detailed description...
Example for airframe file
This example contains all possible configuration options, not all of them are mandatory!
2 <load name="osd_max7456.xml">
3 <configure name="MAX7456_SPI_DEV" value="spiX" />
4 <configure name="MAX7456_SLAVE_IDX" value="SPI_SLAVE0" />
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">
<raw>
MAX7456_SPI_DEV ?= spi2
MAX7456_SPI_DEV_LOWER=$(shell echo $(MAX7456_SPI_DEV) | tr A-Z a-z)
MAX7456_SPI_DEV_UPPER=$(shell echo $(MAX7456_SPI_DEV) | tr a-z A-Z)
MAX7456_SLAVE_IDX ?= spi_slave2
MAX7456_SLAVE_IDX_LOWER=$(shell echo $(MAX7456_SLAVE_IDX) | tr A-Z a-z)
MAX7456_SLAVE_IDX_UPPER=$(shell echo $(MAX7456_SLAVE_IDX) | tr a-z A-Z)
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>