API Reference

group group_board_libs

APIs for controlling the TFT display on the board.

Functions

cy_rslt_t mtb_st7789v_init8(const mtb_st7789v_pins_t *pins)

Initializes GPIOs for the software i8080 8-bit interface.

Return

CY_RSLT_SUCCESS if successfully initialized, else an error about what went wrong

Parameters
  • [in] pins: Structure providing the pins to use for the display

void mtb_st7789v_write_reset_pin(bool value)

Sets value of the display Reset pin.

Parameters
  • [in] value: The value to set on the pin

void mtb_st7789v_write_command(uint8_t command)

Writes one byte of data to the software i8080 interface with the LCD_DC pin set to 0.

Followed by a low pulse on the NWR line to complete the write.

Parameters
  • [in] command: The command to issue to the display

void mtb_st7789v_write_data(uint8_t data)

Writes one byte of data to the software i8080 interface with the LCD_DC pin set to 1.

Followed by a low pulse on the NWR line to complete the write.

Parameters
  • [in] data: The value to issue to the display

void mtb_st7789v_write_command_stream(uint8_t *data, int num)

Writes multiple command bytes to the software i8080 interface with the LCD_DC pin set to 0.

Parameters
  • [in] data: Pointer to the commands to send to the display

  • [in] num: The number of commands in the data array to send to the display

void mtb_st7789v_write_data_stream(uint8_t *data, int num)

Writes multiple bytes of data to the software i8080 interface with the LCD_DC pin set to 1.

Parameters
  • [in] data: Pointer to the data to send to the display

  • [in] num: The number of bytes in the data array to send to the display

uint8_t mtb_st7789v_read_data(void)

Reads one byte of data from the software i8080 interface with the LCD_DC pin set to 1.

Return

The byte read from the display

void mtb_st7789v_read_data_stream(uint8_t *data, int num)

Reads multiple bytes of data from the software i8080 interface with the LCD_DC pin set to 1.

Parameters
  • [inout] data: Pointer to where to store the bytes read from the display

  • [in] num: The number of bytes to read from the display

void mtb_st7789v_free(void)

Free all resources used for the software i8080 interface.

struct mtb_st7789v_pins_t
#include <mtb_st7789v.h>

Configuration structure defining the pins used to communicate with the TFT display.