Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
|
Auxiliary (Text) Display Interface . More...
Data Structures | |
struct | auxdisplay_light |
Light levels for brightness and/or backlight. More... | |
struct | auxdisplay_capabilities |
Structure holding display capabilities. More... | |
struct | auxdisplay_custom_data |
Structure for a custom command. More... | |
struct | auxdisplay_character |
Structure for a custom character. More... | |
Macros | |
#define | AUXDISPLAY_LIGHT_NOT_SUPPORTED 0 |
Used for minimum and maximum brightness/backlight values if not supported. | |
Typedefs | |
typedef uint32_t | auxdisplay_mode_t |
Used to describe the mode of an auxiliary (text) display. | |
Enumerations | |
enum | auxdisplay_position { AUXDISPLAY_POSITION_ABSOLUTE = 0 , AUXDISPLAY_POSITION_RELATIVE , AUXDISPLAY_POSITION_RELATIVE_DIRECTION , AUXDISPLAY_POSITION_COUNT } |
Used for moving the cursor or display position. More... | |
enum | auxdisplay_direction { AUXDISPLAY_DIRECTION_RIGHT = 0 , AUXDISPLAY_DIRECTION_LEFT , AUXDISPLAY_DIRECTION_COUNT } |
Used for setting character append position. More... | |
Functions | |
int | auxdisplay_display_on (const struct device *dev) |
Turn display on. | |
int | auxdisplay_display_off (const struct device *dev) |
Turn display off. | |
int | auxdisplay_cursor_set_enabled (const struct device *dev, bool enabled) |
Set cursor enabled status on an auxiliary display. | |
int | auxdisplay_position_blinking_set_enabled (const struct device *dev, bool enabled) |
Set cursor blinking status on an auxiliary display. | |
int | auxdisplay_cursor_shift_set (const struct device *dev, uint8_t direction, bool display_shift) |
Set cursor shift after character write and display shift. | |
int | auxdisplay_cursor_position_set (const struct device *dev, enum auxdisplay_position type, int16_t x, int16_t y) |
Set cursor (and write position) on an auxiliary display. | |
int | auxdisplay_cursor_position_get (const struct device *dev, int16_t *x, int16_t *y) |
Get current cursor on an auxiliary display. | |
int | auxdisplay_display_position_set (const struct device *dev, enum auxdisplay_position type, int16_t x, int16_t y) |
Set display position on an auxiliary display. | |
int | auxdisplay_display_position_get (const struct device *dev, int16_t *x, int16_t *y) |
Get current display position on an auxiliary display. | |
int | auxdisplay_capabilities_get (const struct device *dev, struct auxdisplay_capabilities *capabilities) |
Fetch capabilities (and details) of auxiliary display. | |
int | auxdisplay_clear (const struct device *dev) |
Clear display of auxiliary display and return to home position (note that this does not reset the display configuration, e.g. | |
int | auxdisplay_brightness_get (const struct device *dev, uint8_t *brightness) |
Get the current brightness level of an auxiliary display. | |
int | auxdisplay_brightness_set (const struct device *dev, uint8_t brightness) |
Update the brightness level of an auxiliary display. | |
int | auxdisplay_backlight_get (const struct device *dev, uint8_t *backlight) |
Get the backlight level details of an auxiliary display. | |
int | auxdisplay_backlight_set (const struct device *dev, uint8_t backlight) |
Update the backlight level of an auxiliary display. | |
int | auxdisplay_is_busy (const struct device *dev) |
Check if an auxiliary display driver is busy. | |
int | auxdisplay_custom_character_set (const struct device *dev, struct auxdisplay_character *character) |
Sets a custom character in the display, the custom character struct must contain the pixel data for the custom character to add and valid custom character index, if successful then the character_code variable in the struct will be set to the character code that can be used with the auxdisplay_write() function to show it. | |
int | auxdisplay_write (const struct device *dev, const uint8_t *data, uint16_t len) |
Write data to auxiliary display screen at current position. | |
int | auxdisplay_custom_command (const struct device *dev, struct auxdisplay_custom_data *data) |
Send a custom command to the display (if supported by driver) | |
Auxiliary (Text) Display Interface .
#define AUXDISPLAY_LIGHT_NOT_SUPPORTED 0 |
#include <zephyr/drivers/auxdisplay.h>
Used for minimum and maximum brightness/backlight values if not supported.
typedef uint32_t auxdisplay_mode_t |
#include <zephyr/drivers/auxdisplay.h>
Used to describe the mode of an auxiliary (text) display.
enum auxdisplay_direction |
#include <zephyr/drivers/auxdisplay.h>
Used for setting character append position.
enum auxdisplay_position |
#include <zephyr/drivers/auxdisplay.h>
Used for moving the cursor or display position.
#include <zephyr/drivers/auxdisplay.h>
Get the backlight level details of an auxiliary display.
dev | Auxiliary display device instance |
backlight | Will be updated with the current backlight level |
0 | on success. |
-ENOSYS | if not supported/implemented. |
-errno | Negative errno code on other failure. |
#include <zephyr/drivers/auxdisplay.h>
Update the backlight level of an auxiliary display.
dev | Auxiliary display device instance |
backlight | The backlight level to set |
0 | on success. |
-ENOSYS | if not supported/implemented. |
-EINVAL | if provided argument is invalid. |
-errno | Negative errno code on other failure. |
#include <zephyr/drivers/auxdisplay.h>
Get the current brightness level of an auxiliary display.
dev | Auxiliary display device instance |
brightness | Will be updated with the current brightness |
0 | on success. |
-ENOSYS | if not supported/implemented. |
-errno | Negative errno code on other failure. |
#include <zephyr/drivers/auxdisplay.h>
Update the brightness level of an auxiliary display.
dev | Auxiliary display device instance |
brightness | The brightness level to set |
0 | on success. |
-ENOSYS | if not supported/implemented. |
-EINVAL | if provided argument is invalid. |
-errno | Negative errno code on other failure. |
int auxdisplay_capabilities_get | ( | const struct device * | dev, |
struct auxdisplay_capabilities * | capabilities ) |
#include <zephyr/drivers/auxdisplay.h>
Fetch capabilities (and details) of auxiliary display.
dev | Auxiliary display device instance |
capabilities | Will be updated with the details of the auxiliary display |
0 | on success. |
-errno | Negative errno code on other failure. |
int auxdisplay_clear | ( | const struct device * | dev | ) |
#include <zephyr/drivers/auxdisplay.h>
Clear display of auxiliary display and return to home position (note that this does not reset the display configuration, e.g.
custom characters and display mode will persist).
dev | Auxiliary display device instance |
0 | on success. |
-errno | Negative errno code on other failure. |
#include <zephyr/drivers/auxdisplay.h>
Get current cursor on an auxiliary display.
dev | Auxiliary display device instance |
x | Will be updated with the exact X position |
y | Will be updated with the exact Y position |
0 | on success. |
-ENOSYS | if not supported/implemented. |
-EINVAL | if provided argument is invalid. |
-errno | Negative errno code on other failure. |
int auxdisplay_cursor_position_set | ( | const struct device * | dev, |
enum auxdisplay_position | type, | ||
int16_t | x, | ||
int16_t | y ) |
#include <zephyr/drivers/auxdisplay.h>
Set cursor (and write position) on an auxiliary display.
dev | Auxiliary display device instance |
type | Type of move, absolute or offset |
x | Exact or offset X position |
y | Exact or offset Y position |
0 | on success. |
-ENOSYS | if not supported/implemented. |
-EINVAL | if provided argument is invalid. |
-errno | Negative errno code on other failure. |
#include <zephyr/drivers/auxdisplay.h>
Set cursor enabled status on an auxiliary display.
dev | Auxiliary display device instance |
enabled | True to enable cursor, false to disable |
0 | on success. |
-ENOSYS | if not supported/implemented. |
-errno | Negative errno code on other failure. |
int auxdisplay_cursor_shift_set | ( | const struct device * | dev, |
uint8_t | direction, | ||
bool | display_shift ) |
#include <zephyr/drivers/auxdisplay.h>
Set cursor shift after character write and display shift.
dev | Auxiliary display device instance |
direction | Sets the direction of the display when characters are written |
display_shift | If true, will shift the display when characters are written (which makes it look like the display is moving, not the cursor) |
0 | on success. |
-ENOSYS | if not supported/implemented. |
-EINVAL | if provided argument is invalid. |
-errno | Negative errno code on other failure. |
int auxdisplay_custom_character_set | ( | const struct device * | dev, |
struct auxdisplay_character * | character ) |
#include <zephyr/drivers/auxdisplay.h>
Sets a custom character in the display, the custom character struct must contain the pixel data for the custom character to add and valid custom character index, if successful then the character_code variable in the struct will be set to the character code that can be used with the auxdisplay_write() function to show it.
A character must be valid for a display consisting of a uint8 array of size character width by character height, values should be 0x00 for pixel off or 0xff for pixel on, if a display supports shades then values between 0x00 and 0xff may be used (display driver dependent).
dev | Auxiliary display device instance |
character | Pointer to custom character structure |
0 | on success. |
-ENOSYS | if not supported/implemented. |
-EINVAL | if provided argument is invalid. |
-errno | Negative errno code on other failure. |
int auxdisplay_custom_command | ( | const struct device * | dev, |
struct auxdisplay_custom_data * | data ) |
#include <zephyr/drivers/auxdisplay.h>
Send a custom command to the display (if supported by driver)
dev | Auxiliary display device instance |
data | Custom command structure (this may be extended by specific drivers) |
0 | on success. |
-ENOSYS | if not supported/implemented. |
-EINVAL | if provided argument is invalid. |
-errno | Negative errno code on other failure. |
int auxdisplay_display_off | ( | const struct device * | dev | ) |
#include <zephyr/drivers/auxdisplay.h>
Turn display off.
dev | Auxiliary display device instance |
0 | on success. |
-ENOSYS | if not supported/implemented. |
-errno | Negative errno code on other failure. |
int auxdisplay_display_on | ( | const struct device * | dev | ) |
#include <zephyr/drivers/auxdisplay.h>
Turn display on.
dev | Auxiliary display device instance |
0 | on success. |
-ENOSYS | if not supported/implemented. |
-errno | Negative errno code on other failure. |
#include <zephyr/drivers/auxdisplay.h>
Get current display position on an auxiliary display.
dev | Auxiliary display device instance |
x | Will be updated with the exact X position |
y | Will be updated with the exact Y position |
0 | on success. |
-ENOSYS | if not supported/implemented. |
-EINVAL | if provided argument is invalid. |
-errno | Negative errno code on other failure. |
int auxdisplay_display_position_set | ( | const struct device * | dev, |
enum auxdisplay_position | type, | ||
int16_t | x, | ||
int16_t | y ) |
#include <zephyr/drivers/auxdisplay.h>
Set display position on an auxiliary display.
dev | Auxiliary display device instance |
type | Type of move, absolute or offset |
x | Exact or offset X position |
y | Exact or offset Y position |
0 | on success. |
-ENOSYS | if not supported/implemented. |
-EINVAL | if provided argument is invalid. |
-errno | Negative errno code on other failure. |
int auxdisplay_is_busy | ( | const struct device * | dev | ) |
#include <zephyr/drivers/auxdisplay.h>
Check if an auxiliary display driver is busy.
dev | Auxiliary display device instance |
1 | on success and display busy. |
0 | on success and display not busy. |
-ENOSYS | if not supported/implemented. |
-errno | Negative errno code on other failure. |
#include <zephyr/drivers/auxdisplay.h>
Set cursor blinking status on an auxiliary display.
dev | Auxiliary display device instance |
enabled | Set to true to enable blinking position, false to disable |
0 | on success. |
-ENOSYS | if not supported/implemented. |
-errno | Negative errno code on other failure. |
#include <zephyr/drivers/auxdisplay.h>
Write data to auxiliary display screen at current position.
dev | Auxiliary display device instance |
data | Text data to write |
len | Length of text data to write |
0 | on success. |
-EINVAL | if provided argument is invalid. |
-errno | Negative errno code on other failure. |