Zephyr API Documentation 4.0.0-rc3
A Scalable Open Source RTOS
|
Grove display APIs . More...
Macros | |
#define | GLCD_DS_DISPLAY_ON (1 << 2) |
#define | GLCD_DS_DISPLAY_OFF (0 << 2) |
#define | GLCD_DS_CURSOR_ON (1 << 1) |
#define | GLCD_DS_CURSOR_OFF (0 << 1) |
#define | GLCD_DS_BLINK_ON (1 << 0) |
#define | GLCD_DS_BLINK_OFF (0 << 0) |
#define | GLCD_IS_SHIFT_INCREMENT (1 << 1) |
#define | GLCD_IS_SHIFT_DECREMENT (0 << 1) |
#define | GLCD_IS_ENTRY_LEFT (1 << 0) |
#define | GLCD_IS_ENTRY_RIGHT (0 << 0) |
#define | GLCD_FS_8BIT_MODE (1 << 4) |
#define | GLCD_FS_ROWS_2 (1 << 3) |
#define | GLCD_FS_ROWS_1 (0 << 3) |
#define | GLCD_FS_DOT_SIZE_BIG (1 << 2) |
#define | GLCD_FS_DOT_SIZE_LITTLE (0 << 2) |
#define | GROVE_RGB_WHITE 0 |
#define | GROVE_RGB_RED 1 |
#define | GROVE_RGB_GREEN 2 |
#define | GROVE_RGB_BLUE 3 |
Functions | |
void | glcd_print (const struct device *dev, char *data, uint32_t size) |
Send text to the screen. | |
void | glcd_cursor_pos_set (const struct device *dev, uint8_t col, uint8_t row) |
Set text cursor position for next additions. | |
void | glcd_clear (const struct device *dev) |
Clear the current display. | |
void | glcd_display_state_set (const struct device *dev, uint8_t opt) |
Function to change the display state. | |
uint8_t | glcd_display_state_get (const struct device *dev) |
return the display feature set associated with the device | |
void | glcd_input_state_set (const struct device *dev, uint8_t opt) |
Function to change the input state. | |
uint8_t | glcd_input_state_get (const struct device *dev) |
return the input set associated with the device | |
void | glcd_function_set (const struct device *dev, uint8_t opt) |
Function to set the functional state of the display. | |
uint8_t | glcd_function_get (const struct device *dev) |
return the function set associated with the device | |
void | glcd_color_select (const struct device *dev, uint8_t color) |
Set LCD background to a predefined color. | |
void | glcd_color_set (const struct device *dev, uint8_t r, uint8_t g, uint8_t b) |
Set LCD background to custom RGB color value. | |
Grove display APIs .
#define GLCD_DS_BLINK_OFF (0 << 0) |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
#define GLCD_DS_BLINK_ON (1 << 0) |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
#define GLCD_DS_CURSOR_OFF (0 << 1) |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
#define GLCD_DS_CURSOR_ON (1 << 1) |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
#define GLCD_DS_DISPLAY_OFF (0 << 2) |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
#define GLCD_DS_DISPLAY_ON (1 << 2) |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
#define GLCD_FS_8BIT_MODE (1 << 4) |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
#define GLCD_FS_DOT_SIZE_BIG (1 << 2) |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
#define GLCD_FS_DOT_SIZE_LITTLE (0 << 2) |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
#define GLCD_FS_ROWS_1 (0 << 3) |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
#define GLCD_FS_ROWS_2 (1 << 3) |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
#define GLCD_IS_ENTRY_LEFT (1 << 0) |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
#define GLCD_IS_ENTRY_RIGHT (0 << 0) |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
#define GLCD_IS_SHIFT_DECREMENT (0 << 1) |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
#define GLCD_IS_SHIFT_INCREMENT (1 << 1) |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
#define GROVE_RGB_BLUE 3 |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
#define GROVE_RGB_GREEN 2 |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
#define GROVE_RGB_RED 1 |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
#define GROVE_RGB_WHITE 0 |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
void glcd_clear | ( | const struct device * | dev | ) |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
Clear the current display.
dev | Pointer to device structure for driver instance. |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
Set LCD background to a predefined color.
dev | Pointer to device structure for driver instance. |
color | One of the predefined color options |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
Set LCD background to custom RGB color value.
dev | Pointer to device structure for driver instance. |
r | A numeric value for the red color (max is 255) |
g | A numeric value for the green color (max is 255) |
b | A numeric value for the blue color (max is 255) |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
Set text cursor position for next additions.
dev | Pointer to device structure for driver instance. |
col | the column for the cursor to be moved to (0-15) |
row | the row it should be moved to (0 or 1) |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
return the display feature set associated with the device
dev | the Grove LCD to get the display features set |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
Function to change the display state.
This function provides the user the ability to change the state of the display as per needed. Controlling things like powering on or off the screen, the option to display the cursor or not, and the ability to blink the cursor.
dev | Pointer to device structure for driver instance. |
opt | An 8bit bitmask of GLCD_DS_* options. |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
return the function set associated with the device
dev | the Grove LCD to get the functions set |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
Function to set the functional state of the display.
dev | Pointer to device structure for driver instance. |
opt | A bitmask of GLCD_FS_* options |
This function provides the user the ability to change the state of the display as per needed. Controlling things like the number of rows, dot size, and text display quality.
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
return the input set associated with the device
dev | the Grove LCD to get the input features set |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
Function to change the input state.
This function provides the user the ability to change the state of the text input. Controlling things like text entry from the left or right side, and how far to increment on new text
dev | Pointer to device structure for driver instance. |
opt | A bitmask of GLCD_IS_* options |
#include <zephyr/drivers/misc/grove_lcd/grove_lcd.h>
Send text to the screen.
dev | Pointer to device structure for driver instance. |
data | the ASCII text to display |
size | the length of the text in bytes |