Ultibo API
C/C++ API for Ultibo Core
Loading...
Searching...
No Matches
lcda35.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  _LCDA35LCD

Macros

#define LCDA35_FRAMEBUFFER_DESCRIPTION   "Waveshare RPi LCD(A) 3.5\""
#define LCDA35_SIGNATURE   0xAF000A35
#define LCDA35_SCREEN_WIDTH   320
#define LCDA35_SCREEN_HEIGHT   480
#define LCDA35_LCD_DC   GPIO_PIN_24
#define LCDA35_LCD_RST   GPIO_PIN_25
#define LCDA35_LCD_BL   GPIO_PIN_UNKNOWN
 Not supported on this screen.
#define LCDA35_TOUCH_IRQ   GPIO_PIN_17

Typedefs

typedef struct _LCDA35LCD LCDA35LCD

Functions

HANDLE STDCALL lcda35_start (uint32_t rotation, char *device, uint16_t displayselect, uint16_t touchselect)
 Start the LCDA35 driver and register the Touch and Framebuffer devices associated with the display.
BOOL STDCALL lcda35_stop (HANDLE handle)
 Stop the LCDA35 driver and deregister the Touch and Framebuffer devices associated with the display.

Macro Definition Documentation

◆ LCDA35_FRAMEBUFFER_DESCRIPTION

#define LCDA35_FRAMEBUFFER_DESCRIPTION   "Waveshare RPi LCD(A) 3.5\""

LCDA35 specific constants

◆ LCDA35_SIGNATURE

#define LCDA35_SIGNATURE   0xAF000A35

◆ LCDA35_SCREEN_WIDTH

#define LCDA35_SCREEN_WIDTH   320

◆ LCDA35_SCREEN_HEIGHT

#define LCDA35_SCREEN_HEIGHT   480

◆ LCDA35_LCD_DC

#define LCDA35_LCD_DC   GPIO_PIN_24

LCDA35 GPIO constants

◆ LCDA35_LCD_RST

#define LCDA35_LCD_RST   GPIO_PIN_25

◆ LCDA35_LCD_BL

#define LCDA35_LCD_BL   GPIO_PIN_UNKNOWN

Not supported on this screen.

◆ LCDA35_TOUCH_IRQ

#define LCDA35_TOUCH_IRQ   GPIO_PIN_17

Typedef Documentation

◆ LCDA35LCD

typedef struct _LCDA35LCD LCDA35LCD

LCDA35 specific types

Function Documentation

◆ lcda35_start()

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

Start the LCDA35 driver and register the Touch and Framebuffer devices associated with the display.

LCDA35 Functions

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

◆ lcda35_stop()

BOOL STDCALL lcda35_stop ( HANDLE handle)

Stop the LCDA35 driver and deregister the Touch and Framebuffer devices associated with the display.

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