Zephyr API Documentation 3.7.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Text Display Interface

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)
 

Detailed Description

Auxiliary (Text) Display Interface .

Since
3.4
Version
0.1.0

Macro Definition Documentation

◆ AUXDISPLAY_LIGHT_NOT_SUPPORTED

#define AUXDISPLAY_LIGHT_NOT_SUPPORTED   0

#include <zephyr/drivers/auxdisplay.h>

Used for minimum and maximum brightness/backlight values if not supported.

Typedef Documentation

◆ auxdisplay_mode_t

#include <zephyr/drivers/auxdisplay.h>

Used to describe the mode of an auxiliary (text) display.

Enumeration Type Documentation

◆ auxdisplay_direction

#include <zephyr/drivers/auxdisplay.h>

Used for setting character append position.

Enumerator
AUXDISPLAY_DIRECTION_RIGHT 

Each character will be placed to the right of existing characters.

AUXDISPLAY_DIRECTION_LEFT 

Each character will be placed to the left of existing characters.

AUXDISPLAY_DIRECTION_COUNT 

◆ auxdisplay_position

#include <zephyr/drivers/auxdisplay.h>

Used for moving the cursor or display position.

Enumerator
AUXDISPLAY_POSITION_ABSOLUTE 

Moves to specified X,Y position.

AUXDISPLAY_POSITION_RELATIVE 

Shifts current position by +/- X,Y position, does not take display direction into consideration.

AUXDISPLAY_POSITION_RELATIVE_DIRECTION 

Shifts current position by +/- X,Y position, takes display direction into consideration.

AUXDISPLAY_POSITION_COUNT 

Function Documentation

◆ auxdisplay_backlight_get()

int auxdisplay_backlight_get ( const struct device * dev,
uint8_t * backlight )

#include <zephyr/drivers/auxdisplay.h>

Get the backlight level details of an auxiliary display.

Parameters
devAuxiliary display device instance
backlightWill be updated with the current backlight level
Return values
0on success.
-ENOSYSif not supported/implemented.
-errnoNegative errno code on other failure.

◆ auxdisplay_backlight_set()

int auxdisplay_backlight_set ( const struct device * dev,
uint8_t backlight )

#include <zephyr/drivers/auxdisplay.h>

Update the backlight level of an auxiliary display.

Parameters
devAuxiliary display device instance
backlightThe backlight level to set
Return values
0on success.
-ENOSYSif not supported/implemented.
-EINVALif provided argument is invalid.
-errnoNegative errno code on other failure.

◆ auxdisplay_brightness_get()

int auxdisplay_brightness_get ( const struct device * dev,
uint8_t * brightness )

#include <zephyr/drivers/auxdisplay.h>

Get the current brightness level of an auxiliary display.

Parameters
devAuxiliary display device instance
brightnessWill be updated with the current brightness
Return values
0on success.
-ENOSYSif not supported/implemented.
-errnoNegative errno code on other failure.

◆ auxdisplay_brightness_set()

int auxdisplay_brightness_set ( const struct device * dev,
uint8_t brightness )

#include <zephyr/drivers/auxdisplay.h>

Update the brightness level of an auxiliary display.

Parameters
devAuxiliary display device instance
brightnessThe brightness level to set
Return values
0on success.
-ENOSYSif not supported/implemented.
-EINVALif provided argument is invalid.
-errnoNegative errno code on other failure.

◆ auxdisplay_capabilities_get()

int auxdisplay_capabilities_get ( const struct device * dev,
struct auxdisplay_capabilities * capabilities )

#include <zephyr/drivers/auxdisplay.h>

Fetch capabilities (and details) of auxiliary display.

Parameters
devAuxiliary display device instance
capabilitiesWill be updated with the details of the auxiliary display
Return values
0on success.
-errnoNegative errno code on other failure.

◆ auxdisplay_clear()

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).

Parameters
devAuxiliary display device instance
Return values
0on success.
-errnoNegative errno code on other failure.

◆ auxdisplay_cursor_position_get()

int auxdisplay_cursor_position_get ( const struct device * dev,
int16_t * x,
int16_t * y )

#include <zephyr/drivers/auxdisplay.h>

Get current cursor on an auxiliary display.

Parameters
devAuxiliary display device instance
xWill be updated with the exact X position
yWill be updated with the exact Y position
Return values
0on success.
-ENOSYSif not supported/implemented.
-EINVALif provided argument is invalid.
-errnoNegative errno code on other failure.

◆ auxdisplay_cursor_position_set()

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.

Parameters
devAuxiliary display device instance
typeType of move, absolute or offset
xExact or offset X position
yExact or offset Y position
Return values
0on success.
-ENOSYSif not supported/implemented.
-EINVALif provided argument is invalid.
-errnoNegative errno code on other failure.

◆ auxdisplay_cursor_set_enabled()

int auxdisplay_cursor_set_enabled ( const struct device * dev,
bool enabled )

#include <zephyr/drivers/auxdisplay.h>

Set cursor enabled status on an auxiliary display.

Parameters
devAuxiliary display device instance
enabledTrue to enable cursor, false to disable
Return values
0on success.
-ENOSYSif not supported/implemented.
-errnoNegative errno code on other failure.

◆ auxdisplay_cursor_shift_set()

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.

Parameters
devAuxiliary display device instance
directionSets the direction of the display when characters are written
display_shiftIf true, will shift the display when characters are written (which makes it look like the display is moving, not the cursor)
Return values
0on success.
-ENOSYSif not supported/implemented.
-EINVALif provided argument is invalid.
-errnoNegative errno code on other failure.

◆ auxdisplay_custom_character_set()

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).

Parameters
devAuxiliary display device instance
characterPointer to custom character structure
Return values
0on success.
-ENOSYSif not supported/implemented.
-EINVALif provided argument is invalid.
-errnoNegative errno code on other failure.

◆ auxdisplay_custom_command()

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)

Parameters
devAuxiliary display device instance
dataCustom command structure (this may be extended by specific drivers)
Return values
0on success.
-ENOSYSif not supported/implemented.
-EINVALif provided argument is invalid.
-errnoNegative errno code on other failure.

◆ auxdisplay_display_off()

int auxdisplay_display_off ( const struct device * dev)

#include <zephyr/drivers/auxdisplay.h>

Turn display off.

Parameters
devAuxiliary display device instance
Return values
0on success.
-ENOSYSif not supported/implemented.
-errnoNegative errno code on other failure.

◆ auxdisplay_display_on()

int auxdisplay_display_on ( const struct device * dev)

#include <zephyr/drivers/auxdisplay.h>

Turn display on.

Parameters
devAuxiliary display device instance
Return values
0on success.
-ENOSYSif not supported/implemented.
-errnoNegative errno code on other failure.

◆ auxdisplay_display_position_get()

int auxdisplay_display_position_get ( const struct device * dev,
int16_t * x,
int16_t * y )

#include <zephyr/drivers/auxdisplay.h>

Get current display position on an auxiliary display.

Parameters
devAuxiliary display device instance
xWill be updated with the exact X position
yWill be updated with the exact Y position
Return values
0on success.
-ENOSYSif not supported/implemented.
-EINVALif provided argument is invalid.
-errnoNegative errno code on other failure.

◆ auxdisplay_display_position_set()

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.

Parameters
devAuxiliary display device instance
typeType of move, absolute or offset
xExact or offset X position
yExact or offset Y position
Return values
0on success.
-ENOSYSif not supported/implemented.
-EINVALif provided argument is invalid.
-errnoNegative errno code on other failure.

◆ auxdisplay_is_busy()

int auxdisplay_is_busy ( const struct device * dev)

#include <zephyr/drivers/auxdisplay.h>

Check if an auxiliary display driver is busy.

Parameters
devAuxiliary display device instance
Return values
1on success and display busy.
0on success and display not busy.
-ENOSYSif not supported/implemented.
-errnoNegative errno code on other failure.

◆ auxdisplay_position_blinking_set_enabled()

int auxdisplay_position_blinking_set_enabled ( const struct device * dev,
bool enabled )

#include <zephyr/drivers/auxdisplay.h>

Set cursor blinking status on an auxiliary display.

Parameters
devAuxiliary display device instance
enabledSet to true to enable blinking position, false to disable
Return values
0on success.
-ENOSYSif not supported/implemented.
-errnoNegative errno code on other failure.

◆ auxdisplay_write()

int auxdisplay_write ( const struct device * dev,
const uint8_t * data,
uint16_t len )

#include <zephyr/drivers/auxdisplay.h>

Write data to auxiliary display screen at current position.

Parameters
devAuxiliary display device instance
dataText data to write
lenLength of text data to write
Return values
0on success.
-EINVALif provided argument is invalid.
-errnoNegative errno code on other failure.