no-OS
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
nhd_c12832a1z.h
Go to the documentation of this file.
1/***************************************************************************/
33
34#ifndef __NHD_C12832A1Z_H__
35#define __NHD_C12832A1Z_H__
36
37#include <stdint.h>
38#include <stdlib.h>
39#include "no_os_gpio.h"
40
41#define NHD_C12832A1Z_RST_ON 0U
42#define NHD_C12832A1Z_RST_OFF 1U
43#define NHD_C12832A1Z_DC_DATA 1U
44#define NHD_C12832A1Z_DC_CMD 0U
45#define NHD_C12832A1Z_DISP_ON 0xAFU
46#define NHD_C12832A1Z_DISP_OFF 0xAEU
47#define NDH_C12832A1Z_ADC_NORMAL 0xA0U
48#define NDH_C12832A1Z_ADC_REVERSE 0xA1U
49#define NDH_C12832A1Z_COM_NORMAL 0xC0U
50#define NDH_C12832A1Z_COM_REVERSE 0xC8U
51#define NDH_C12832A1Z_LCD_BIAS 0xA2U
52#define NDH_C12832A1Z_PWR_CTRL 0x2FU
53#define NDH_C12832A1Z_RES_RATIO 0x21U
54#define NDH_C12832A1Z_ELECTRIC_VOL 0x81U
55#define NDH_C12832A1Z_ELECTRIC_VAL 0x20U
56
57#define NHD_C12832A1Z_REVERSE 0x1
58#define NHD_C12832A1Z_BLINK 0x2
59
60#define NHD_C12832A1Z_BLINK_INTERVAL 500
61
62#define FB_FLUSH_DELAY 30
63
64#define NR_COLUMNS 128
65#define NR_PAGES 4
66#define NR_CHAR 64
67#define PAGE_START_ADDR 0xB0
68#define DISPLAY_START_OFFSET 0x40
69
79 /* SPI descriptor*/
81};
82
95
96/* nhd_c12832a1z write command */
97int nhd_c12832a1z_write_cmd(struct nhd_c12832a1z_dev *dev, uint8_t cmd);
98
99/* nhd_c12832a1z write data */
100int nhd_c12832a1z_write_data(struct nhd_c12832a1z_dev *dev, uint8_t data);
101
102/* nhd_c12832a1z print string on LCD */
103int nhd_c12832a1z_print_string(struct nhd_c12832a1z_dev *dev, char *msg);
104
105/* nhd_c12832a1z clear LCD */
107
111
114
115#endif //__NHD_C12832A1Z_H__
struct ad7616_init_param init_param
Definition ad7616_sdz.c:107
int nhd_c12832a1z_init(struct nhd_c12832a1z_dev **device, struct nhd_c12832a1z_init_param init_param)
Initializes nhd_c12832a1z for display screening.
Definition nhd_c12832a1z.c:456
int nhd_c12832a1z_write_cmd(struct nhd_c12832a1z_dev *dev, uint8_t cmd)
nhd_c12832a1z write command.
Definition nhd_c12832a1z.c:307
int nhd_c12832a1z_remove(struct nhd_c12832a1z_dev *dev)
nhd_c12832a1z remove allocated resources
Definition nhd_c12832a1z.c:551
int nhd_c12832a1z_write_data(struct nhd_c12832a1z_dev *dev, uint8_t data)
nhd_c12832a1z write data.
Definition nhd_c12832a1z.c:327
int nhd_c12832a1z_clear_lcd(struct nhd_c12832a1z_dev *dev)
nhd_c12832a1z clear LCD.
Definition nhd_c12832a1z.c:411
int nhd_c12832a1z_print_string(struct nhd_c12832a1z_dev *dev, char *msg)
nhd_c12832a1z print string on LCD.
Definition nhd_c12832a1z.c:347
Header file of GPIO Interface.
Definition ad9361_util.h:63
nhd_c12832a1z device structure.
Definition nhd_c12832a1z.h:74
struct no_os_spi_desc * spi_desc
Definition nhd_c12832a1z.h:80
struct no_os_gpio_desc * dc_pin
Definition nhd_c12832a1z.h:76
struct no_os_gpio_desc * reset_pin
Definition nhd_c12832a1z.h:78
nhd_c12832a1z Initialization parameters.
Definition nhd_c12832a1z.h:87
struct no_os_gpio_init_param * reset_pin_ip
Definition nhd_c12832a1z.h:91
struct no_os_spi_init_param * spi_ip
Definition nhd_c12832a1z.h:93
struct no_os_gpio_init_param * dc_pin_ip
Definition nhd_c12832a1z.h:89
Structure holding the GPIO descriptor.
Definition no_os_gpio.h:84
Structure holding the parameters for GPIO initialization.
Definition no_os_gpio.h:67
Structure holding SPI descriptor.
Definition no_os_spi.h:180
Structure holding the parameters for SPI initialization.
Definition no_os_spi.h:128