Paparazzi UAS  v5.15_devel-112-g521f3cf
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
max7456.c File Reference

Maxim MAX7456 single-channel monochrome on-screen display driver. More...

#include "std.h"
#include "mcu_periph/sys_time.h"
#include "mcu_periph/gpio.h"
#include "mcu_periph/spi.h"
#include "generated/flight_plan.h"
#include "generated/airframe.h"
#include "autopilot.h"
#include "subsystems/electrical.h"
#include "state.h"
#include "firmwares/rotorcraft/navigation.h"
#include "modules/display/max7456.h"
#include "modules/display/max7456_regs.h"
+ Include dependency graph for max7456.c:

Go to the source code of this file.

Macros

#define OSD_STRING_SIZE   31
 
#define osd_sprintf   _osd_sprintf
 

Enumerations

enum  max7456_osd_status_codes {
  OSD_UNINIT, OSD_INIT1, OSD_INIT2, OSD_INIT3,
  OSD_INIT4, OSD_READ_STATUS, OSD_IDLE, OSD_S_STEP1,
  OSD_S_STEP2, OSD_S_STEP3, OSD_FINISHED
}
 
enum  osd_attributes { BLINK = OSD_BLINK_CHAR, INVERT = OSD_INVERT_PIXELS }
 

Functions

static char ascii_to_osd_c (char c)
 
static void osd_put_s (char *string, uint8_t attributes, uint8_t char_nb, uint8_t row, uint8_t column)
 
static bool _osd_sprintf (char *buffer, char *string, float value)
 
void max7456_init (void)
 
void max7456_periodic (void)
 
void max7456_event (void)
 

Variables

struct spi_transaction max7456_trans
 
uint8_t osd_spi_tx_buffer [2]
 
uint8_t osd_spi_rx_buffer [2]
 
char osd_string [OSD_STRING_SIZE]
 
char osd_str_buf [OSD_STRING_SIZE]
 
char osd_char = ' '
 
uint8_t step = 0
 
uint16_t osd_char_address = 0
 
uint8_t osd_attr = false
 
uint8_t max7456_osd_status = OSD_UNINIT
 
uint8_t osd_enable = true
 
uint8_t osd_enable_val = OSD_IMAGE_ENABLE
 
uint8_t osd_stat_reg = 0
 
bool osd_stat_reg_valid = false
 

Detailed Description

Maxim MAX7456 single-channel monochrome on-screen display driver.

Definition in file max7456.c.

Macro Definition Documentation

#define osd_sprintf   _osd_sprintf

Definition at line 53 of file max7456.c.

Referenced by max7456_periodic().

#define OSD_STRING_SIZE   31

Definition at line 52 of file max7456.c.

Referenced by osd_put_s().

Enumeration Type Documentation

Enumerator
OSD_UNINIT 
OSD_INIT1 
OSD_INIT2 
OSD_INIT3 
OSD_INIT4 
OSD_READ_STATUS 
OSD_IDLE 
OSD_S_STEP1 
OSD_S_STEP2 
OSD_S_STEP3 
OSD_FINISHED 

Definition at line 70 of file max7456.c.

Enumerator
BLINK 
INVERT 

Definition at line 84 of file max7456.c.

Function Documentation

static bool _osd_sprintf ( char *  buffer,
char *  string,
float  value 
)
static

Definition at line 368 of file max7456.c.

References osd_string.

static char ascii_to_osd_c ( char  c)
static

Definition at line 276 of file max7456.c.

Referenced by osd_put_s().

+ Here is the caller graph for this function:

static void osd_put_s ( char *  string,
uint8_t  attributes,
uint8_t  char_nb,
uint8_t  row,
uint8_t  column 
)
static

Definition at line 317 of file max7456.c.

References ascii_to_osd_c(), max7456_osd_status, max7456_trans, osd_attr, osd_char_address, OSD_DMAH_REG, OSD_IDLE, OSD_S_STEP1, osd_string, OSD_STRING_SIZE, spi_transaction::output_buf, spi_transaction::output_length, and spi_submit().

Referenced by max7456_periodic().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

uint8_t max7456_osd_status = OSD_UNINIT

Definition at line 89 of file max7456.c.

Referenced by max7456_event(), max7456_init(), max7456_periodic(), and osd_put_s().

struct spi_transaction max7456_trans

Definition at line 59 of file max7456.c.

Referenced by max7456_event(), max7456_init(), max7456_periodic(), and osd_put_s().

uint8_t osd_attr = false

Definition at line 68 of file max7456.c.

Referenced by max7456_event(), and osd_put_s().

char osd_char = ' '

Definition at line 65 of file max7456.c.

uint16_t osd_char_address = 0

Definition at line 67 of file max7456.c.

Referenced by max7456_event(), and osd_put_s().

uint8_t osd_enable = true

Definition at line 90 of file max7456.c.

Referenced by max7456_init(), and max7456_periodic().

uint8_t osd_enable_val = OSD_IMAGE_ENABLE

Definition at line 91 of file max7456.c.

Referenced by max7456_event(), max7456_init(), and max7456_periodic().

uint8_t osd_spi_rx_buffer[2]

Definition at line 62 of file max7456.c.

Referenced by max7456_init().

uint8_t osd_spi_tx_buffer[2]

Definition at line 61 of file max7456.c.

Referenced by max7456_init().

uint8_t osd_stat_reg = 0

Definition at line 92 of file max7456.c.

Referenced by max7456_event().

bool osd_stat_reg_valid = false

Definition at line 93 of file max7456.c.

Referenced by max7456_event().

char osd_str_buf[OSD_STRING_SIZE]

Definition at line 64 of file max7456.c.

char osd_string[OSD_STRING_SIZE]

Definition at line 63 of file max7456.c.

Referenced by _osd_sprintf(), max7456_event(), max7456_periodic(), and osd_put_s().

uint8_t step = 0

Definition at line 66 of file max7456.c.

Referenced by max7456_periodic().