Paparazzi UAS
v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
|
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"
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 |
Maxim MAX7456 single-channel monochrome on-screen display driver.
Definition in file max7456.c.
#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().
enum osd_attributes |
|
static |
Definition at line 369 of file max7456.c.
References osd_string.
|
static |
Definition at line 277 of file max7456.c.
Referenced by osd_put_s().
void max7456_event | ( | void | ) |
Definition at line 205 of file max7456.c.
References spi_transaction::input_buf, spi_transaction::input_length, max7456_osd_status, max7456_trans, osd_attr, OSD_AUTO_INCREMENT_MODE, osd_char_address, OSD_DMAL_REG, OSD_DMM_REG, osd_enable_val, OSD_FINISHED, OSD_IDLE, OSD_INIT1, OSD_INIT2, OSD_INIT3, OSD_INIT4, OSD_OSDBL_REG, OSD_READ_STATUS, OSD_S_STEP1, OSD_S_STEP2, OSD_S_STEP3, osd_stat_reg, osd_stat_reg_valid, osd_string, OSD_VIDEO_MODE_PAL, OSD_VM0_REG, spi_transaction::output_buf, spi_transaction::output_length, spi_submit(), SPITransDone, SPITransSuccess, and spi_transaction::status.
void max7456_init | ( | void | ) |
Definition at line 95 of file max7456.c.
References spi_transaction::after_cb, spi_transaction::before_cb, spi_transaction::bitorder, spi_transaction::cdiv, spi_transaction::cpha, spi_transaction::cpol, spi_transaction::dss, spi_transaction::input_buf, spi_transaction::input_length, max7456_osd_status, max7456_trans, osd_enable, osd_enable_val, OSD_IMAGE_ENABLE, osd_spi_rx_buffer, osd_spi_tx_buffer, OSD_UNINIT, spi_transaction::output_buf, spi_transaction::output_length, spi_transaction::select, spi_transaction::slave_idx, SPICphaEdge1, SPICpolIdleLow, SPIDiv64, SPIDss8bit, SPIMSBFirst, and SPISelectUnselect.
void max7456_periodic | ( | void | ) |
Definition at line 119 of file max7456.c.
References BLINK, electrical, FALSE, GetPosAlt, State::h_speed_dir_f, State::h_speed_norm_f, spi_transaction::input_length, INVERT, LOW_BAT_LEVEL, max7456_osd_status, max7456_trans, osd_enable, osd_enable_val, OSD_IDLE, OSD_INIT1, OSD_INIT2, OSD_INIT3, OSD_OSDBL_REG_R, osd_put_s(), OSD_RESET, osd_sprintf, osd_string, OSD_UNINIT, OSD_VM0_REG, spi_transaction::output_buf, spi_transaction::output_length, spi_submit(), SPITransDone, state, stateGetSpeedEnu_f(), spi_transaction::status, step, and Electrical::vsupply.
|
static |
Definition at line 318 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().
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().
Definition at line 68 of file max7456.c.
Referenced by max7456_event(), and osd_put_s().
uint16_t osd_char_address = 0 |
Definition at line 67 of file max7456.c.
Referenced by max7456_event(), and osd_put_s().
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] |
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().