dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pios_max7456.h File Reference
#include <stdint.h>
#include <stdio.h>
#include <pios_spi.h>

Go to the source code of this file.

Macros

#define MAX7456_MODE_PAL   0
 
#define MAX7456_MODE_NTSC   1
 
#define MAX7456_ATTR_NONE   0
 
#define MAX7456_ATTR_INVERT   1
 
#define MAX7456_ATTR_BLINK   2
 
#define MAX7456_ATTR_LBC   4
 
#define MAX7456_PAL_COLUMNS   30
 
#define MAX7456_PAL_ROWS   16
 
#define MAX7456_PAL_HCENTER   (MAX7456_PAL_COLUMNS / 2)
 
#define MAX7456_PAL_VCENTER   (MAX7456_PAL_ROWS / 2)
 
#define MAX7456_NTSC_COLUMNS   30
 
#define MAX7456_NTSC_ROWS   13
 
#define MAX7456_NTSC_HCENTER   (MAX7456_NTSC_COLUMNS / 2)
 
#define MAX7456_NTSC_VCENTER   (MAX7456_NTSC_ROWS / 2)
 
#define MAX7456_COLUMNS   MAX7456_NTSC_COLUMNS
 
#define MAX7456_HCENTER   MAX7456_NTSC_HCENTER
 
#define MAX7456_FMT_H_CENTER   31
 

Typedefs

typedef struct max7456_dev_s * max7456_dev_t
 

Functions

void PIOS_MAX7456_wait_vsync ()
 
int PIOS_MAX7456_init (max7456_dev_t *dev_out, pios_spi_t spi_handle, uint32_t slave_idx)
 Allocate and initialise MAX7456 device. More...
 
void PIOS_MAX7456_clear (max7456_dev_t dev)
 Clear the screen. More...
 
void PIOS_MAX7456_upload_char (max7456_dev_t dev, uint8_t char_index, const uint8_t *data)
 Upload a character to the device. More...
 
void PIOS_MAX7456_download_char (max7456_dev_t dev, uint8_t char_index, uint8_t *data)
 Download a character from the device. More...
 
void PIOS_MAX7456_put (max7456_dev_t dev, uint8_t col, uint8_t row, uint8_t chr, uint8_t attr)
 Sets a position of character memory. More...
 
void PIOS_MAX7456_puts (max7456_dev_t dev, uint8_t col, uint8_t row, const char *s, uint8_t attr)
 Sets a string into character memory. More...
 
void PIOS_MAX7456_get_extents (max7456_dev_t dev, uint8_t *mode, uint8_t *right, uint8_t *bottom, uint8_t *hcenter, uint8_t *vcenter)
 Gets the extents of the screen. More...
 
void PIOS_MAX7456_wait_vsync (max7456_dev_t dev)
 Waits for vsync in a configuration-dependant way. More...
 
bool PIOS_MAX7456_stall_detect (max7456_dev_t dev)
 Detects whether the OSD chip has stalled and attempts to restart it. More...
 
void PIOS_MAX7456_set_mode (max7456_dev_t dev, bool force, uint8_t fallback)
 Allows overriding the video mode used by OSD. More...