Ultibo API
C/C++ API for Ultibo Core
Loading...
Searching...
No Matches
pitft35.h File Reference
#include "ultibo/gpio.h"
#include "ultibo/spi.h"
#include "ultibo/pwm.h"
#include "ultibo/framebuffer.h"
#include "ultibo/touch.h"

Go to the source code of this file.

Data Structures

struct  _PITFT35LCD

Macros

#define PITFT35_FRAMEBUFFER_DESCRIPTION   "Adafruit PiTFT 3.5\" LCD"
 Description of PiTFT35 device.
#define PITFT35_SIGNATURE   0xAF000035
#define PITFT35_SCREEN_WIDTH   320
#define PITFT35_SCREEN_HEIGHT   480
#define PITFT35_LCD_DC   GPIO_PIN_25
#define PITFT35_TOUCH_IRQ   GPIO_PIN_24
#define PITFT35_LCD_BL   GPIO_PIN_2
 STMPE GPIO.
#define PITFT35_LCD_BL_PWM   GPIO_PIN_18

Typedefs

typedef struct _PITFT35LCD PITFT35LCD

Functions

HANDLE STDCALL pitft35_start (uint32_t rotation, char *device, uint16_t displayselect, uint16_t touchselect)
 Start the PiTFT35 driver and register the Touch, Backlight (GPIO) and Framebuffer devices associated with the display.
BOOL STDCALL pitft35_stop (HANDLE handle)
 Stop the PiTFT35 driver and deregister the Touch, Backlight (GPIO) and Framebuffer devices associated with the display.

Macro Definition Documentation

◆ PITFT35_FRAMEBUFFER_DESCRIPTION

#define PITFT35_FRAMEBUFFER_DESCRIPTION   "Adafruit PiTFT 3.5\" LCD"

Description of PiTFT35 device.

PiTFT35 specific constants

◆ PITFT35_SIGNATURE

#define PITFT35_SIGNATURE   0xAF000035

◆ PITFT35_SCREEN_WIDTH

#define PITFT35_SCREEN_WIDTH   320

◆ PITFT35_SCREEN_HEIGHT

#define PITFT35_SCREEN_HEIGHT   480

◆ PITFT35_LCD_DC

#define PITFT35_LCD_DC   GPIO_PIN_25

PiTFT35 GPIO constants

◆ PITFT35_TOUCH_IRQ

#define PITFT35_TOUCH_IRQ   GPIO_PIN_24

◆ PITFT35_LCD_BL

#define PITFT35_LCD_BL   GPIO_PIN_2

STMPE GPIO.

◆ PITFT35_LCD_BL_PWM

#define PITFT35_LCD_BL_PWM   GPIO_PIN_18

Typedef Documentation

◆ PITFT35LCD

typedef struct _PITFT35LCD PITFT35LCD

PiTFT35 specific types

Function Documentation

◆ pitft35_start()

HANDLE STDCALL pitft35_start ( uint32_t rotation,
char * device,
uint16_t displayselect,
uint16_t touchselect )

Start the PiTFT35 driver and register the Touch, Backlight (GPIO) and Framebuffer devices associated with the display.

PiTFT35 Functions

Parameters
RotationThe rotation of the display (eg FRAMEBUFFER_ROTATION_180)
DeviceThe SPI device that the HX8357D and STMPE610 devices are connected to
DisplaySelectThe SPI chip select of the HX8357D LCD controller
TouchSelectThe SPI chip select of the STMPE610 touch controller
Returns
The handle of the PiTFT35 on success or INVALID_HANDLE_VALUE on failure
Note
This function will be called during startup if the parameter PITFT35_AUTOSTART is True Can be called multiple times to support more than one PiTFT LCD display

◆ pitft35_stop()

BOOL STDCALL pitft35_stop ( HANDLE handle)

Stop the PiTFT35 driver and deregister the Touch, Backlight (GPIO) and Framebuffer devices associated with the display.

Parameters
HandleThe handle of the PiTFT35 or INVALID_HANDLE_VALUE for the default display
Returns
True if completed or False on failure