Go to the documentation of this file.
34 #ifndef __NHD_C12832A1Z_H__
35 #define __NHD_C12832A1Z_H__
49 #define NHD_C12832A1Z_RST_ON 0U
50 #define NHD_C12832A1Z_RST_OFF 1U
51 #define NHD_C12832A1Z_DC_DATA 1U
52 #define NHD_C12832A1Z_DC_CMD 0U
53 #define NHD_C12832A1Z_DISP_ON 0xAFU
54 #define NHD_C12832A1Z_DISP_OFF 0xAEU
55 #define NDH_C12832A1Z_ADC_NORMAL 0xA0U
56 #define NDH_C12832A1Z_ADC_REVERSE 0xA1U
57 #define NDH_C12832A1Z_COM_NORMAL 0xC0U
58 #define NDH_C12832A1Z_COM_REVERSE 0xC8U
59 #define NDH_C12832A1Z_LCD_BIAS 0xA2U
60 #define NDH_C12832A1Z_PWR_CTRL 0x2FU
61 #define NDH_C12832A1Z_RES_RATIO 0x21U
62 #define NDH_C12832A1Z_ELECTRIC_VOL 0x81U
63 #define NDH_C12832A1Z_ELECTRIC_VAL 0x20U
65 #define NHD_C12832A1Z_REVERSE 0x1
66 #define NHD_C12832A1Z_BLINK 0x2
68 #define NHD_C12832A1Z_BLINK_INTERVAL 500
70 #define FB_FLUSH_DELAY 30
72 #define NR_COLUMNS 128
75 #define PAGE_START_ADDR 0xB0
76 #define DISPLAY_START_OFFSET 0x40
131 #endif //__NHD_C12832A1Z_H__
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
#define NHD_C12832A1Z_DC_CMD
Definition: nhd_c12832a1z.h:52
#define NDH_C12832A1Z_PWR_CTRL
Definition: nhd_c12832a1z.h:60
#define NHD_C12832A1Z_RST_ON
Definition: nhd_c12832a1z.h:49
struct no_os_gpio_desc * reset_pin
Definition: nhd_c12832a1z.h:90
int32_t no_os_spi_write_and_read(struct no_os_spi_desc *desc, uint8_t *data, uint16_t bytes_number)
Write and read data to/from SPI.
Definition: no_os_spi.c:159
nhd_c12832a1z Initialization parameters.
Definition: nhd_c12832a1z.h:99
Header file of SPI Interface.
Header file of nhd_c12832a1z.
int nhd_c12832a1z_write_data(struct nhd_c12832a1z_dev *dev, uint8_t data)
nhd_c12832a1z write data.
Definition: nhd_c12832a1z.c:338
#define NHD_C12832A1Z_DISP_OFF
Definition: nhd_c12832a1z.h:54
#define NR_COLUMNS
Definition: nhd_c12832a1z.h:72
#define NHD_C12832A1Z_DC_DATA
Definition: nhd_c12832a1z.h:51
#define NDH_C12832A1Z_COM_REVERSE
Definition: nhd_c12832a1z.h:58
Header file of Delay functions.
#define NHD_C12832A1Z_DISP_ON
Definition: nhd_c12832a1z.h:53
Definition: ad9361_util.h:69
#define NDH_C12832A1Z_ELECTRIC_VAL
Definition: nhd_c12832a1z.h:63
#define NR_PAGES
Definition: nhd_c12832a1z.h:73
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
#define NDH_C12832A1Z_RES_RATIO
Definition: nhd_c12832a1z.h:61
#define NHD_C12832A1Z_RST_OFF
Definition: nhd_c12832a1z.h:50
#define DISPLAY_START_OFFSET
Definition: nhd_c12832a1z.h:76
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:467
struct no_os_spi_init_param * spi_ip
Definition: nhd_c12832a1z.h:105
#define NDH_C12832A1Z_ADC_NORMAL
Definition: nhd_c12832a1z.h:55
int nhd_c12832a1z_print_string(struct nhd_c12832a1z_dev *dev, char *msg)
nhd_c12832a1z print string on LCD.
Definition: nhd_c12832a1z.c:358
int32_t no_os_gpio_remove(struct no_os_gpio_desc *desc)
Free the resources allocated by no_os_gpio_get().
Definition: no_os_gpio.c:104
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
struct no_os_gpio_init_param * reset_pin_ip
Definition: nhd_c12832a1z.h:103
#define PAGE_START_ADDR
Definition: nhd_c12832a1z.h:75
int nhd_c12832a1z_write_cmd(struct nhd_c12832a1z_dev *dev, uint8_t cmd)
nhd_c12832a1z write command.
Definition: nhd_c12832a1z.c:318
struct no_os_spi_desc * spi_desc
Definition: nhd_c12832a1z.h:92
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
nhd_c12832a1z device structure.
Definition: nhd_c12832a1z.h:86
int nhd_c12832a1z_clear_lcd(struct nhd_c12832a1z_dev *dev)
nhd_c12832a1z clear LCD.
Definition: nhd_c12832a1z.c:422
int32_t no_os_gpio_get(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Obtain the GPIO decriptor.
Definition: no_os_gpio.c:49
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:467
#define NDH_C12832A1Z_ELECTRIC_VOL
Definition: nhd_c12832a1z.h:62
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
int nhd_c12832a1z_print_string(struct nhd_c12832a1z_dev *dev, char *msg)
nhd_c12832a1z print string on LCD.
Definition: nhd_c12832a1z.c:358
int nhd_c12832a1z_write_data(struct nhd_c12832a1z_dev *dev, uint8_t data)
nhd_c12832a1z write data.
Definition: nhd_c12832a1z.c:338
int nhd_c12832a1z_remove(struct nhd_c12832a1z_dev *dev)
nhd_c12832a1z remove allocated resources
Definition: nhd_c12832a1z.c:562
void no_os_udelay(uint32_t usecs)
Wait until usecs microseconds passed.
Definition: aducm3029_delay.c:114
int32_t no_os_gpio_set_value(struct no_os_gpio_desc *desc, uint8_t value)
Set the value of the specified GPIO.
Definition: no_os_gpio.c:197
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
int nhd_c12832a1z_write_cmd(struct nhd_c12832a1z_dev *dev, uint8_t cmd)
nhd_c12832a1z write command.
Definition: nhd_c12832a1z.c:318
int32_t no_os_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by no_os_spi_init().
Definition: no_os_spi.c:116
struct no_os_gpio_init_param * dc_pin_ip
Definition: nhd_c12832a1z.h:101
Header file of GPIO Interface.
#define NR_CHAR
Definition: nhd_c12832a1z.h:74
int nhd_c12832a1z_clear_lcd(struct nhd_c12832a1z_dev *dev)
nhd_c12832a1z clear LCD.
Definition: nhd_c12832a1z.c:422
#define NDH_C12832A1Z_LCD_BIAS
Definition: nhd_c12832a1z.h:59
int32_t no_os_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI communication peripheral.
Definition: no_os_spi.c:52
struct no_os_gpio_desc * dc_pin
Definition: nhd_c12832a1z.h:88
int32_t no_os_gpio_direction_output(struct no_os_gpio_desc *desc, uint8_t value)
Enable the output direction of the specified GPIO.
Definition: no_os_gpio.c:147
int nhd_c12832a1z_remove(struct nhd_c12832a1z_dev *dev)
nhd_c12832a1z remove allocated resources
Definition: nhd_c12832a1z.c:562
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
int32_t no_os_gpio_get_optional(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Get the value of an optional GPIO.
Definition: no_os_gpio.c:75