source file that has LCD display drivers - ST7291
More...
#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <linux/gpio.h>
#include <fcntl.h>
#include <linux/spi/spidev.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <pthread.h>
#include <sys/eventfd.h>
#include <sys/epoll.h>
#include <stdint.h>
#include <time.h>
#include <getopt.h>
#include <sys/time.h>
#include <linux/types.h>
|
int | GPIO_pin_SetValue (int GPIONUM, int Value) |
| Gpio set value high or low.
|
|
int | LCD_SPI_DATAWRITE (uint8_t data) |
|
int | LCD_SPI_CMDWRITE (uint8_t cmd) |
|
int | LCD_SPI_BUFFDATAWRITE (uint8_t *data, uint16_t datalen) |
|
int | LCD_SPI_BUFFWRITE (uint8_t *data, uint16_t datalen) |
|
void | lcd_init (void) |
| Function to perform LCD functionality.
|
|
void | LCD_RST (void) |
| LCD reset.
|
|
uint8_t | ST7291_setScreenColor (uint16_t screenBasecolor, uint32_t pixcelNum) |
| function to fill the screen color
|
|
uint8_t | ST7291_fillScreenColor (uint16_t screenBasecolor) |
| Function to fill the screen colour pixel by pixel.
|
|
uint8_t | ST7291_setScreenWindow (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2) |
| function to setting the window color
|
|
int | ST7291_init (void) |
| Initialization of the LCD ST7291_chip.
|
|
int | LCD_SET_DATACMD (char mode) |
| Sets the data/cmd line to receive the data nased on the modes.
|
|
void | lcd_refresh (lv_color_t *framebuf) |
| Refreshes the screen.
|
|
void | lcd_send_data (uint16_t x_start, uint16_t y_start, uint16_t x_end, uint16_t y_end, uint8_t *p) |
| Send data pixelwise.
|
|
void | lcd_refreshbuf (lv_color_t *framebuf) |
| Refreshes the screen.
|
|
source file that has LCD display drivers - ST7291
◆ DRAW_BUFFER_NUM_LINESS
#define DRAW_BUFFER_NUM_LINESS 10 |
◆ LCD_AMBER
◆ LCD_BLACK
◆ LCD_BLUE
◆ LCD_DATACMD_GPIO
#define LCD_DATACMD_GPIO 383 |
◆ LCD_GREEN
◆ LCD_IO_CONTROL_PIN
#define LCD_IO_CONTROL_PIN 467 |
◆ LCD_RED
◆ LCD_RST_GPIO
◆ LCD_SPICS_GPIO
#define LCD_SPICS_GPIO 379 |
◆ LCD_WHITE
◆ MAX_BUFFER_SIZE
◆ MAX_CHUCK_SIZE
#define MAX_CHUCK_SIZE 1024 |
◆ MY_DISP_HOR_RESS
#define MY_DISP_HOR_RESS 132 |
◆ MY_DISP_VER_RESS
#define MY_DISP_VER_RESS 132 |
◆ ST7291_CASET
#define ST7291_CASET 0x2A |
◆ ST7291_COLMOD
#define ST7291_COLMOD 0x3A |
◆ ST7291_DISPOFF
#define ST7291_DISPOFF 0x28 |
◆ ST7291_DISPON
#define ST7291_DISPON 0x29 |
◆ ST7291_FRMCTR1
#define ST7291_FRMCTR1 0xB1 |
◆ ST7291_FRMCTR2
#define ST7291_FRMCTR2 0xB2 |
◆ ST7291_FRMCTR3
#define ST7291_FRMCTR3 0xB3 |
◆ ST7291_GMCTRN1
#define ST7291_GMCTRN1 0xE1 |
◆ ST7291_GMCTRP1
#define ST7291_GMCTRP1 0xE0 |
◆ ST7291_GMSET
#define ST7291_GMSET 0xF2 /* Gammas Adjustment. */ |
◆ ST7291_INVCTR
#define ST7291_INVCTR 0xB4 |
◆ ST7291_MADCTL
#define ST7291_MADCTL 0x36 /* Memory Data Access Control */ |
◆ ST7291_NORON
#define ST7291_NORON 0x13 |
◆ ST7291_PWCTR1
#define ST7291_PWCTR1 0xC0 |
◆ ST7291_PWCTR2
#define ST7291_PWCTR2 0xC1 |
◆ ST7291_PWCTR3
#define ST7291_PWCTR3 0xC2 |
◆ ST7291_PWCTR4
#define ST7291_PWCTR4 0xC3 |
◆ ST7291_PWCTR5
#define ST7291_PWCTR5 0xC4 |
◆ ST7291_RAMWR
#define ST7291_RAMWR 0x2C |
◆ ST7291_RASET
#define ST7291_RASET 0x2B |
◆ ST7291_SLPOUT
#define ST7291_SLPOUT 0x11 |
◆ ST7291_SW_RESET
#define ST7291_SW_RESET 0x01 |
◆ ST7291_VMCTR1
#define ST7291_VMCTR1 0xC5 |
◆ ST7735_SCREEN_HEIGHT [1/2]
#define ST7735_SCREEN_HEIGHT 132 |
◆ ST7735_SCREEN_HEIGHT [2/2]
#define ST7735_SCREEN_HEIGHT 132 |
◆ ST7735_SCREEN_WIDTH
#define ST7735_SCREEN_WIDTH 160 |
◆ GPIO_pin_SetValue()
int GPIO_pin_SetValue |
( |
int | GPIONUM, |
|
|
int | Value ) |
|
extern |
Gpio set value high or low.
- Parameters
-
GPIONUM | gpio pin number |
Value | [1- high] [0- low] |
- Returns
- API_SUCCESSS_test on success or AP_FAILURE_test on failure
◆ lcd_init()
Function to perform LCD functionality.
- Parameters
-
- Returns
- API_SUCCESSS_test on success or API_FAILURE_test on failure
◆ lcd_refresh()
Refreshes the screen.
- Parameters
-
*framebuf | pointer to the buffer value |
◆ lcd_refreshbuf()
Refreshes the screen.
- Parameters
-
*framebuf | pointer to the buffer value |
◆ LCD_RST()
◆ lcd_send_data()
void lcd_send_data |
( |
uint16_t | x_start, |
|
|
uint16_t | y_start, |
|
|
uint16_t | x_end, |
|
|
uint16_t | y_end, |
|
|
uint8_t * | p ) |
Send data pixelwise.
- Parameters
-
x_start | starting address of x axis |
y_start | starting address of y axis |
x_end | ending address of the x axis |
y_end | ending address of the y axis |
*p | pixel |
◆ LCD_SET_DATACMD()
int LCD_SET_DATACMD |
( |
char | mode | ) |
|
Sets the data/cmd line to receive the data nased on the modes.
- Parameters
-
mode | [0- command], [1- data] |
- Returns
- API_SUCCESSS_test on success or AP_FAILURE_test on failure
◆ LCD_SPI_BUFFDATAWRITE()
int LCD_SPI_BUFFDATAWRITE |
( |
uint8_t * | data, |
|
|
uint16_t | datalen ) |
|
extern |
◆ LCD_SPI_BUFFWRITE()
int LCD_SPI_BUFFWRITE |
( |
uint8_t * | data, |
|
|
uint16_t | datalen ) |
|
extern |
◆ LCD_SPI_CMDWRITE()
int LCD_SPI_CMDWRITE |
( |
uint8_t | cmd | ) |
|
|
extern |
◆ LCD_SPI_DATAWRITE()
int LCD_SPI_DATAWRITE |
( |
uint8_t | data | ) |
|
|
extern |
◆ ST7291_fillScreenColor()
uint8_t ST7291_fillScreenColor |
( |
uint16_t | screenBasecolor | ) |
|
Function to fill the screen colour pixel by pixel.
- Parameters
-
screenBasecolor | RGB value of the colour to be filled |
pixcelNum | Total number of pixcel on the LCD screen |
- Returns
- 1 on completion
◆ ST7291_init()
Initialization of the LCD ST7291_chip.
- Parameters
-
- Returns
- 0 on completion
◆ ST7291_setScreenColor()
uint8_t ST7291_setScreenColor |
( |
uint16_t | screenBasecolor, |
|
|
uint32_t | pixcelNum ) |
function to fill the screen color
- Parameters
-
screenBasecolor | - hex value of the color |
pixcelNum | - pixel number |
◆ ST7291_setScreenWindow()
uint8_t ST7291_setScreenWindow |
( |
uint16_t | x1, |
|
|
uint16_t | y1, |
|
|
uint16_t | x2, |
|
|
uint16_t | y2 ) |
function to setting the window color
- Parameters
-
x1 | - start x position |
y1 | - start y position |
x2 | - end x position |
y2 | - end y position |
◆ colours
◆ errbuf
◆ lcd_status