-
Notifications
You must be signed in to change notification settings - Fork 0
/
lcd_driver.h
79 lines (65 loc) · 3.6 KB
/
lcd_driver.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/***************************************************************************//**
* @file
* @brief LCD driver header file
*******************************************************************************
* # License
* <b>Copyright 2018 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
* software is governed by the terms of Silicon Labs Master Software License
* Agreement (MSLA) available at
* www.silabs.com/about-us/legal/master-software-license-agreement. This
* software is distributed to you in Source Code format and is governed by the
* sections of the MSLA applicable to Source Code.
*
******************************************************************************/
#ifndef LCD_DRIVER_H
#define LCD_DRIVER_H
#include "hal-config.h"
#if (HAL_SPIDISPLAY_ENABLE == 1)
#include "bg_types.h"
/***********************************************************************************************//**
* \defgroup lcd_driver LCD Driver
* \brief Driver for SPI LCD Display.
**************************************************************************************************/
/***********************************************************************************************//**
* @addtogroup disp_interface
* @{
**************************************************************************************************/
/***********************************************************************************************//**
* @addtogroup lcd_driver
* @{
**************************************************************************************************/
/*******************************************************************************
* LCD content can be updated one row at a time using function LCD_write().
* Row number is passed as parameter, the possible values are defined below.
******************************************************************************/
#define LCD_ROW_NAME 1 /**< 1st row, device name */
#define LCD_ROW_STATUS 2 /**< 2nd row, node status */
#define LCD_ROW_CONNECTION 3 /**< 3rd row, connection status */
#define LCD_ROW_FRIEND 4 /**< 4th row, friendship FRIEND status */
#define LCD_ROW_LPN 4 /**< 4th row, friendship LPN status */
#define LCD_ROW_LIGHTNESS 5 /**< 5th row, lightness level */
#define LCD_ROW_TEMPERATURE 6 /**< 6th row, color temperature */
#define LCD_ROW_HUE 6 /**< 6th row, HSL hue */
#define LCD_ROW_DELTAUV 7 /**< 7th row, delta UV */
#define LCD_ROW_SATURATION 7 /**< 7th row, HSL saturation */
#define LCD_ROW_MAX 7 /**< total number of rows used */
#define LCD_ROW_LEN 32 /**< up to 32 characters per each row */
/***************************************************************************//**
* LCD initialization, called once at startup.
******************************************************************************/
void LCD_init(void);
/***************************************************************************//**
* This function is used to write one line in the LCD.
*
* @param[in] str Pointer to string which is displayed in the specified row.
* @param[in] row Selects which line of LCD display is written,
* possible values are defined as LCD_ROW_xxx.
******************************************************************************/
void LCD_write(char *str, uint8 row);
/** @} (end addtogroup lcd_driver) */
/** @} (end addtogroup disp_interface) */
#endif /* HAL_SPIDISPLAY_ENABLE */
#endif /* LCD_DRIVER_H */