no-OS
Loading...
Searching...
No Matches
nhd_c12832a1z.h File Reference

Header file of nhd_c12832a1z. More...

#include <stdint.h>
#include <stdlib.h>
#include "no_os_gpio.h"
Include dependency graph for nhd_c12832a1z.h:

Classes

struct  nhd_c12832a1z_dev
 nhd_c12832a1z device structure. More...
 
struct  nhd_c12832a1z_init_param
 nhd_c12832a1z Initialization parameters. More...
 

Macros

#define NHD_C12832A1Z_RST_ON   0U
 
#define NHD_C12832A1Z_RST_OFF   1U
 
#define NHD_C12832A1Z_DC_DATA   1U
 
#define NHD_C12832A1Z_DC_CMD   0U
 
#define NHD_C12832A1Z_DISP_ON   0xAFU
 
#define NHD_C12832A1Z_DISP_OFF   0xAEU
 
#define NDH_C12832A1Z_ADC_NORMAL   0xA0U
 
#define NDH_C12832A1Z_ADC_REVERSE   0xA1U
 
#define NDH_C12832A1Z_COM_NORMAL   0xC0U
 
#define NDH_C12832A1Z_COM_REVERSE   0xC8U
 
#define NDH_C12832A1Z_LCD_BIAS   0xA2U
 
#define NDH_C12832A1Z_PWR_CTRL   0x2FU
 
#define NDH_C12832A1Z_RES_RATIO   0x21U
 
#define NDH_C12832A1Z_ELECTRIC_VOL   0x81U
 
#define NDH_C12832A1Z_ELECTRIC_VAL   0x20U
 
#define NHD_C12832A1Z_REVERSE   0x1
 
#define NHD_C12832A1Z_BLINK   0x2
 
#define NHD_C12832A1Z_BLINK_INTERVAL   500
 
#define FB_FLUSH_DELAY   30
 
#define NR_COLUMNS   128
 
#define NR_PAGES   4
 
#define NR_CHAR   64
 
#define PAGE_START_ADDR   0xB0
 
#define DISPLAY_START_OFFSET   0x40
 

Functions

int nhd_c12832a1z_write_cmd (struct nhd_c12832a1z_dev *dev, uint8_t cmd)
 nhd_c12832a1z write command.
 
int nhd_c12832a1z_write_data (struct nhd_c12832a1z_dev *dev, uint8_t data)
 nhd_c12832a1z write data.
 
int nhd_c12832a1z_print_string (struct nhd_c12832a1z_dev *dev, char *msg)
 nhd_c12832a1z print string on LCD.
 
int nhd_c12832a1z_clear_lcd (struct nhd_c12832a1z_dev *dev)
 nhd_c12832a1z clear LCD.
 
int nhd_c12832a1z_init (struct nhd_c12832a1z_dev **device, struct nhd_c12832a1z_init_param init_param)
 Initializes nhd_c12832a1z for display screening.
 
int nhd_c12832a1z_remove (struct nhd_c12832a1z_dev *dev)
 nhd_c12832a1z remove allocated resources
 

Detailed Description

Header file of nhd_c12832a1z.

Author
Antoniu Miclaus (anton.nosp@m.iu.m.nosp@m.iclau.nosp@m.s@an.nosp@m.alog..nosp@m.com)

Copyright 2023(c) Analog Devices, Inc.

SPDX-License-Identifier: BSD-3-Clause

Macro Definition Documentation

◆ DISPLAY_START_OFFSET

#define DISPLAY_START_OFFSET   0x40

◆ FB_FLUSH_DELAY

#define FB_FLUSH_DELAY   30

◆ NDH_C12832A1Z_ADC_NORMAL

#define NDH_C12832A1Z_ADC_NORMAL   0xA0U

◆ NDH_C12832A1Z_ADC_REVERSE

#define NDH_C12832A1Z_ADC_REVERSE   0xA1U

◆ NDH_C12832A1Z_COM_NORMAL

#define NDH_C12832A1Z_COM_NORMAL   0xC0U

◆ NDH_C12832A1Z_COM_REVERSE

#define NDH_C12832A1Z_COM_REVERSE   0xC8U

◆ NDH_C12832A1Z_ELECTRIC_VAL

#define NDH_C12832A1Z_ELECTRIC_VAL   0x20U

◆ NDH_C12832A1Z_ELECTRIC_VOL

#define NDH_C12832A1Z_ELECTRIC_VOL   0x81U

◆ NDH_C12832A1Z_LCD_BIAS

#define NDH_C12832A1Z_LCD_BIAS   0xA2U

◆ NDH_C12832A1Z_PWR_CTRL

#define NDH_C12832A1Z_PWR_CTRL   0x2FU

◆ NDH_C12832A1Z_RES_RATIO

#define NDH_C12832A1Z_RES_RATIO   0x21U

◆ NHD_C12832A1Z_BLINK

#define NHD_C12832A1Z_BLINK   0x2

◆ NHD_C12832A1Z_BLINK_INTERVAL

#define NHD_C12832A1Z_BLINK_INTERVAL   500

◆ NHD_C12832A1Z_DC_CMD

#define NHD_C12832A1Z_DC_CMD   0U

◆ NHD_C12832A1Z_DC_DATA

#define NHD_C12832A1Z_DC_DATA   1U

◆ NHD_C12832A1Z_DISP_OFF

#define NHD_C12832A1Z_DISP_OFF   0xAEU

◆ NHD_C12832A1Z_DISP_ON

#define NHD_C12832A1Z_DISP_ON   0xAFU

◆ NHD_C12832A1Z_REVERSE

#define NHD_C12832A1Z_REVERSE   0x1

◆ NHD_C12832A1Z_RST_OFF

#define NHD_C12832A1Z_RST_OFF   1U

◆ NHD_C12832A1Z_RST_ON

#define NHD_C12832A1Z_RST_ON   0U

◆ NR_CHAR

#define NR_CHAR   64

◆ NR_COLUMNS

#define NR_COLUMNS   128

◆ NR_PAGES

#define NR_PAGES   4

◆ PAGE_START_ADDR

#define PAGE_START_ADDR   0xB0

Function Documentation

◆ nhd_c12832a1z_clear_lcd()

int nhd_c12832a1z_clear_lcd ( struct nhd_c12832a1z_dev * dev)

nhd_c12832a1z clear LCD.

Parameters
dev- The device structure.
Returns
Returns 0 in case of success or negative error code otherwise.

◆ nhd_c12832a1z_init()

int nhd_c12832a1z_init ( struct nhd_c12832a1z_dev ** device,
struct nhd_c12832a1z_init_param init_param )

Initializes nhd_c12832a1z for display screening.

Initialize the nhd_c12832a1z peripheral for display operation.

Parameters
device- The device structure.
init_param- Initialization parameters.
Returns
Returns 0 in case of success or negative error code otherwise.

◆ nhd_c12832a1z_print_string()

int nhd_c12832a1z_print_string ( struct nhd_c12832a1z_dev * dev,
char * msg )

nhd_c12832a1z print string on LCD.

Parameters
dev- The device structure.
msg- Message to be printed.
Returns
Returns 0 in case of success or negative error code otherwise.

◆ nhd_c12832a1z_remove()

int nhd_c12832a1z_remove ( struct nhd_c12832a1z_dev * dev)

nhd_c12832a1z remove allocated resources

Removes resources allocated by device.

Parameters
dev- The device structure
Returns
Returns 0 in case of success or negative error code otherwise.

◆ nhd_c12832a1z_write_cmd()

int nhd_c12832a1z_write_cmd ( struct nhd_c12832a1z_dev * dev,
uint8_t cmd )

nhd_c12832a1z write command.

Parameters
dev- The device structure.
cmd- Command to be written.
Returns
Returns 0 in case of success or negative error code otherwise.

◆ nhd_c12832a1z_write_data()

int nhd_c12832a1z_write_data ( struct nhd_c12832a1z_dev * dev,
uint8_t data )

nhd_c12832a1z write data.

Parameters
dev- The device structure.
data- Data to be written.
Returns
Returns 0 in case of success or negative error code otherwise.