Go to the documentation of this file.
40 #ifndef __NHD_C12832A1Z_H__
41 #define __NHD_C12832A1Z_H__
55 #define NHD_C12832A1Z_RST_ON 0U
56 #define NHD_C12832A1Z_RST_OFF 1U
57 #define NHD_C12832A1Z_DC_DATA 1U
58 #define NHD_C12832A1Z_DC_CMD 0U
59 #define NHD_C12832A1Z_DISP_ON 0xAFU
60 #define NHD_C12832A1Z_DISP_OFF 0xAEU
61 #define NDH_C12832A1Z_ADC_NORMAL 0xA0U
62 #define NDH_C12832A1Z_ADC_REVERSE 0xA1U
63 #define NDH_C12832A1Z_COM_NORMAL 0xC0U
64 #define NDH_C12832A1Z_COM_REVERSE 0xC8U
65 #define NDH_C12832A1Z_LCD_BIAS 0xA2U
66 #define NDH_C12832A1Z_PWR_CTRL 0x2FU
67 #define NDH_C12832A1Z_RES_RATIO 0x21U
68 #define NDH_C12832A1Z_ELECTRIC_VOL 0x81U
69 #define NDH_C12832A1Z_ELECTRIC_VAL 0x20U
71 #define NHD_C12832A1Z_REVERSE 0x1
72 #define NHD_C12832A1Z_BLINK 0x2
74 #define NHD_C12832A1Z_BLINK_INTERVAL 500
76 #define FB_FLUSH_DELAY 30
78 #define NR_COLUMNS 128
81 #define PAGE_START_ADDR 0xB0
82 #define DISPLAY_START_OFFSET 0x40
137 #endif //__NHD_C12832A1Z_H__
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:85
#define NHD_C12832A1Z_DC_CMD
Definition: nhd_c12832a1z.h:58
#define NDH_C12832A1Z_PWR_CTRL
Definition: nhd_c12832a1z.h:66
#define NHD_C12832A1Z_RST_ON
Definition: nhd_c12832a1z.h:55
struct no_os_gpio_desc * reset_pin
Definition: nhd_c12832a1z.h:96
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:165
nhd_c12832a1z Initialization parameters.
Definition: nhd_c12832a1z.h:105
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:344
#define NHD_C12832A1Z_DISP_OFF
Definition: nhd_c12832a1z.h:60
#define NR_COLUMNS
Definition: nhd_c12832a1z.h:78
#define NHD_C12832A1Z_DC_DATA
Definition: nhd_c12832a1z.h:57
#define NDH_C12832A1Z_COM_REVERSE
Definition: nhd_c12832a1z.h:64
Header file of Delay functions.
#define NHD_C12832A1Z_DISP_ON
Definition: nhd_c12832a1z.h:59
Definition: ad9361_util.h:75
#define NDH_C12832A1Z_ELECTRIC_VAL
Definition: nhd_c12832a1z.h:69
#define NR_PAGES
Definition: nhd_c12832a1z.h:79
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:60
#define NDH_C12832A1Z_RES_RATIO
Definition: nhd_c12832a1z.h:67
#define NHD_C12832A1Z_RST_OFF
Definition: nhd_c12832a1z.h:56
#define DISPLAY_START_OFFSET
Definition: nhd_c12832a1z.h:82
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:473
struct no_os_spi_init_param * spi_ip
Definition: nhd_c12832a1z.h:111
#define NDH_C12832A1Z_ADC_NORMAL
Definition: nhd_c12832a1z.h:61
int nhd_c12832a1z_print_string(struct nhd_c12832a1z_dev *dev, char *msg)
nhd_c12832a1z print string on LCD.
Definition: nhd_c12832a1z.c:364
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:110
Structure holding SPI descriptor.
Definition: no_os_spi.h:177
struct no_os_gpio_init_param * reset_pin_ip
Definition: nhd_c12832a1z.h:109
#define PAGE_START_ADDR
Definition: nhd_c12832a1z.h:81
int nhd_c12832a1z_write_cmd(struct nhd_c12832a1z_dev *dev, uint8_t cmd)
nhd_c12832a1z write command.
Definition: nhd_c12832a1z.c:324
struct no_os_spi_desc * spi_desc
Definition: nhd_c12832a1z.h:98
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:102
nhd_c12832a1z device structure.
Definition: nhd_c12832a1z.h:92
int nhd_c12832a1z_clear_lcd(struct nhd_c12832a1z_dev *dev)
nhd_c12832a1z clear LCD.
Definition: nhd_c12832a1z.c:428
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:55
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:473
#define NDH_C12832A1Z_ELECTRIC_VOL
Definition: nhd_c12832a1z.h:68
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:75
int nhd_c12832a1z_print_string(struct nhd_c12832a1z_dev *dev, char *msg)
nhd_c12832a1z print string on LCD.
Definition: nhd_c12832a1z.c:364
int nhd_c12832a1z_write_data(struct nhd_c12832a1z_dev *dev, uint8_t data)
nhd_c12832a1z write data.
Definition: nhd_c12832a1z.c:344
int nhd_c12832a1z_remove(struct nhd_c12832a1z_dev *dev)
nhd_c12832a1z remove allocated resources
Definition: nhd_c12832a1z.c:568
void no_os_udelay(uint32_t usecs)
Wait until usecs microseconds passed.
Definition: aducm3029_delay.c:120
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:203
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:119
int nhd_c12832a1z_write_cmd(struct nhd_c12832a1z_dev *dev, uint8_t cmd)
nhd_c12832a1z write command.
Definition: nhd_c12832a1z.c:324
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:122
struct no_os_gpio_init_param * dc_pin_ip
Definition: nhd_c12832a1z.h:107
Header file of GPIO Interface.
#define NR_CHAR
Definition: nhd_c12832a1z.h:80
int nhd_c12832a1z_clear_lcd(struct nhd_c12832a1z_dev *dev)
nhd_c12832a1z clear LCD.
Definition: nhd_c12832a1z.c:428
#define NDH_C12832A1Z_LCD_BIAS
Definition: nhd_c12832a1z.h:65
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:58
struct no_os_gpio_desc * dc_pin
Definition: nhd_c12832a1z.h:94
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:153
int nhd_c12832a1z_remove(struct nhd_c12832a1z_dev *dev)
nhd_c12832a1z remove allocated resources
Definition: nhd_c12832a1z.c:568
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:131
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:81