Prusa MINI Firmware overview
st7789v.h File Reference
#include "display.h"
#include "stm32f4xx_hal.h"

Go to the source code of this file.

Classes

struct  _st7789v_config_t
 

Macros

#define ST7789V_FLG_DMA   0x08
 
#define ST7789V_FLG_MISO   0x10
 
#define ST7789V_FLG_SAFE   0x20
 
#define ST7789V_DEF_COLMOD   0x05
 
#define ST7789V_DEF_MADCTL   0xC0
 

Typedefs

typedef struct _st7789v_config_t st7789v_config_t
 

Functions

void st7789v_inversion_on (void)
 
void st7789v_inversion_off (void)
 
void st7789v_inversion_tgl (void)
 
uint8_t st7789v_inversion_get (void)
 
void st7789v_gamma_next (void)
 
void st7789v_gamma_prev (void)
 
void st7789v_gamma_set (uint8_t gamma)
 
uint8_t st7789v_gamma_get (void)
 
void st7789v_brightness_set (uint8_t brightness)
 
uint8_t st7789v_brightness_get (void)
 
void st7789v_brightness_enable (void)
 
void st7789v_brightness_disable (void)
 
color_t st7789v_get_pixel (point_ui16_t pt)
 
void st7789v_set_pixel_directColor (point_ui16_t pt, uint16_t noClr)
 
uint16_t st7789v_get_pixel_directColor (point_ui16_t pt)
 
void st7789v_enable_safe_mode (void)
 enable safe mode (direct acces + safe delay) More...
 
void st7789v_spi_tx_complete (void)
 

Variables

const display_t st7789v_display
 
st7789v_config_t st7789v_config
 
uint16_t st7789v_reset_delay
 

Macro Definition Documentation

◆ ST7789V_FLG_DMA

#define ST7789V_FLG_DMA   0x08

◆ ST7789V_FLG_MISO

#define ST7789V_FLG_MISO   0x10

◆ ST7789V_FLG_SAFE

#define ST7789V_FLG_SAFE   0x20

◆ ST7789V_DEF_COLMOD

#define ST7789V_DEF_COLMOD   0x05

◆ ST7789V_DEF_MADCTL

#define ST7789V_DEF_MADCTL   0xC0

Typedef Documentation

◆ st7789v_config_t

Function Documentation

◆ st7789v_inversion_on()

void st7789v_inversion_on ( void  )
Here is the caller graph for this function:

◆ st7789v_inversion_off()

void st7789v_inversion_off ( void  )
Here is the caller graph for this function:

◆ st7789v_inversion_tgl()

void st7789v_inversion_tgl ( void  )

◆ st7789v_inversion_get()

uint8_t st7789v_inversion_get ( void  )

◆ st7789v_gamma_next()

void st7789v_gamma_next ( void  )

◆ st7789v_gamma_prev()

void st7789v_gamma_prev ( void  )

◆ st7789v_gamma_set()

void st7789v_gamma_set ( uint8_t  gamma)
Here is the caller graph for this function:

◆ st7789v_gamma_get()

uint8_t st7789v_gamma_get ( void  )
Here is the caller graph for this function:

◆ st7789v_brightness_set()

void st7789v_brightness_set ( uint8_t  brightness)
Here is the caller graph for this function:

◆ st7789v_brightness_get()

uint8_t st7789v_brightness_get ( void  )
Here is the caller graph for this function:

◆ st7789v_brightness_enable()

void st7789v_brightness_enable ( void  )
Here is the caller graph for this function:

◆ st7789v_brightness_disable()

void st7789v_brightness_disable ( void  )
Here is the caller graph for this function:

◆ st7789v_get_pixel()

color_t st7789v_get_pixel ( point_ui16_t  pt)
373  {
375  return 0;
376  uint16_t clr565;
377  st7789v_cmd_caset(pt.x, 1);
378  st7789v_cmd_raset(pt.y, 1);
379  st7789v_cmd_ramrd((uint8_t *)(&clr565), 2);
380  return _565_COLOR(clr565);
381 }
Here is the call graph for this function:

◆ st7789v_set_pixel_directColor()

void st7789v_set_pixel_directColor ( point_ui16_t  pt,
uint16_t  noClr 
)
383  {
385  return;
386  st7789v_cmd_caset(pt.x, 1);
387  st7789v_cmd_raset(pt.y, 1);
388  st7789v_cmd_ramwr((uint8_t *)(&directColor), 2);
389 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ st7789v_get_pixel_directColor()

uint16_t st7789v_get_pixel_directColor ( point_ui16_t  pt)
422  {
424  return 0;
425  enum { buff_sz = 5 };
426  uint8_t buff[buff_sz];
427  st7789v_cmd_caset(pt.x, 1);
428  st7789v_cmd_raset(pt.y, 1);
429  st7789v_cmd_ramrd(buff, buff_sz);
430  uint16_t ret = rd18bit_to_16bit(buff + 2);
431  return ret; //directColor;
432 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ st7789v_enable_safe_mode()

void st7789v_enable_safe_mode ( void  )

enable safe mode (direct acces + safe delay)

923  {
925 }
Here is the caller graph for this function:

◆ st7789v_spi_tx_complete()

void st7789v_spi_tx_complete ( void  )
927  {
928 #ifdef ST7789V_USE_RTOS
929  osSignalSet(st7789v_task_handle, ST7789V_SIG_SPI_TX);
930 #endif //ST7789V_USE_RTOS
931 }

Variable Documentation

◆ st7789v_display

const display_t st7789v_display

◆ st7789v_config

st7789v_config_t st7789v_config

◆ st7789v_reset_delay

uint16_t st7789v_reset_delay
st7789v_clip
rect_ui16_t st7789v_clip
Definition: st7789v.c:84
st7789v_flg
uint8_t st7789v_flg
Definition: st7789v.c:75
_point_ui16_t::x
uint16_t x
Definition: guitypes.h:65
osSignalSet
int32_t osSignalSet(osThreadId thread_id, int32_t signal)
Set the specified Signal Flags of an active thread.
Definition: cmsis_os.c:545
st7789v_cmd_caset
void st7789v_cmd_caset(uint16_t x, uint16_t cx)
Definition: st7789v.c:263
st7789v_cmd_raset
void st7789v_cmd_raset(uint16_t y, uint16_t cy)
Definition: st7789v.c:268
_point_ui16_t::y
uint16_t y
Definition: guitypes.h:66
uint8_t
const uint8_t[]
Definition: 404_html.c:3
_565_COLOR
#define _565_COLOR(clr)
Definition: st7789v.c:68
ST7789V_FLG_SAFE
#define ST7789V_FLG_SAFE
Definition: st7789v.h:11
ST7789V_SIG_SPI_TX
#define ST7789V_SIG_SPI_TX
Definition: guiconfig.h:18
st7789v_cmd_ramrd
void st7789v_cmd_ramrd(uint8_t *pdata, uint16_t size)
Definition: st7789v.c:277
point_in_rect_ui16
static int point_in_rect_ui16(point_ui16_t pt, rect_ui16_t rc)
Definition: guitypes.h:169
rd18bit_to_16bit
static uint16_t rd18bit_to_16bit(uint8_t *buff)
Definition: st7789v.c:418
st7789v_cmd_ramwr
void st7789v_cmd_ramwr(uint8_t *pdata, uint16_t size)
Definition: st7789v.c:273