![]() |
NTURT Zephyr v0.0.1
NTURT common library for Zephyr RTOS
|
Dashboard and display system. More...
Data Structures | |
| struct | dashboard_mode_info |
| Information about a dashboard mode. More... | |
Macros | |
| #define | NUM_LED DT_CHILD_NUM_STATUS_OKAY(DT_CHOSEN(nturt_leds)) |
| Number of LEDs in the dashboard. | |
| #define | LED_STRIP_LEN DT_PROP(DT_CHOSEN(nturt_accel_display), chain_length) |
| Length of the LED strips. | |
| #define | LED_BLINK_PERIOD K_MSEC(250) |
| Period for a blinking LED to switch state. | |
| #define | HOLD_MODIFY_INTERVAL K_MSEC(100) |
| Interval between two modifications when holding. | |
Typedefs | |
| typedef void(* | dashboard_mode_trans_t) () |
Enumerations | |
| enum | dashboard_component { DASHBOARD_SPEED , DASHBOARD_BATTERY , DASHBOARD_ACCEL , DASHBOARD_BRAKE , NUM_DASHBOARD_DISPLAY } |
| Components of the dashboard. More... | |
| enum | dashboard_mode { DASHBOARD_NORMAL , DASHBOARD_SETTING , DASHBOARD_TEST , NUM_DASHBOARD_MODE } |
| Dashboard modes. More... | |
Functions | |
| int | dashboard_brightness_get () |
| Get the current brightness of the dashboard. | |
| void | dashboard_brightness_set (int brightness) |
| Set the brightness of the dashboard. | |
| void | dashboard_led_set (int led, bool set) |
| Set the LED state. | |
| void | dashboard_clear (enum dashboard_component display) |
| Clear the display for a component. | |
| void | dashboard_set_level (enum dashboard_component display, int level) |
| Set the level for a component. | |
| void | dashboard_set_error (enum dashboard_component display) |
| Set error state for a component. | |
| void | dashboard_apply_selected (enum dashboard_component display) |
| Apply the selected state for a component. | |
| enum dashboard_mode | dashboard_mode_get () |
| Get the current dashboard mode. | |
| void | dashboard_mode_set (enum dashboard_mode mode) |
| Set the dashboard mode. | |
| const struct dashboard_mode_info * | dashboard_mode_info (enum dashboard_mode mode) |
| Get the information about a dashboard mode. | |
| int | dashboard_settings_save () |
| Save the current dashboard settings. | |
Dashboard and display system.
| #define HOLD_MODIFY_INTERVAL K_MSEC(100) |
#include <vcu/dashboard.h>
Interval between two modifications when holding.
| #define LED_BLINK_PERIOD K_MSEC(250) |
#include <vcu/dashboard.h>
Period for a blinking LED to switch state.
| #define LED_STRIP_LEN DT_PROP(DT_CHOSEN(nturt_accel_display), chain_length) |
#include <vcu/dashboard.h>
Length of the LED strips.
| #define NUM_LED DT_CHILD_NUM_STATUS_OKAY(DT_CHOSEN(nturt_leds)) |
#include <vcu/dashboard.h>
Number of LEDs in the dashboard.
| typedef void(* dashboard_mode_trans_t) () |
#include <vcu/dashboard.h>
| enum dashboard_component |
#include <vcu/dashboard.h>
Components of the dashboard.
| Enumerator | |
|---|---|
| DASHBOARD_SPEED | |
| DASHBOARD_BATTERY | |
| DASHBOARD_ACCEL | |
| DASHBOARD_BRAKE | |
| NUM_DASHBOARD_DISPLAY | |
| enum dashboard_mode |
#include <vcu/dashboard.h>
Dashboard modes.
| Enumerator | |
|---|---|
| DASHBOARD_NORMAL | |
| DASHBOARD_SETTING | |
| DASHBOARD_TEST | |
| NUM_DASHBOARD_MODE | |
| void dashboard_apply_selected | ( | enum dashboard_component | display | ) |
#include <vcu/dashboard.h>
Apply the selected state for a component.
| display | The component to apply the selected state for. |
| int dashboard_brightness_get | ( | ) |
#include <vcu/dashboard.h>
Get the current brightness of the dashboard.
| void dashboard_brightness_set | ( | int | brightness | ) |
#include <vcu/dashboard.h>
Set the brightness of the dashboard.
| brightness | The brightness level to set in [0, 100]. If the value is outside this range, it will be clamped. |
| void dashboard_clear | ( | enum dashboard_component | display | ) |
#include <vcu/dashboard.h>
Clear the display for a component.
| display | The component to clear. |
| void dashboard_led_set | ( | int | led, |
| bool | set ) |
#include <vcu/dashboard.h>
Set the LED state.
| led | The LED number to set. |
| set | True to turn on the LED, false to turn it off. |
| enum dashboard_mode dashboard_mode_get | ( | ) |
#include <vcu/dashboard.h>
Get the current dashboard mode.
| const struct dashboard_mode_info * dashboard_mode_info | ( | enum dashboard_mode | mode | ) |
#include <vcu/dashboard.h>
Get the information about a dashboard mode.
| mode | The mode to get information for. |
| void dashboard_mode_set | ( | enum dashboard_mode | mode | ) |
| void dashboard_set_error | ( | enum dashboard_component | display | ) |
#include <vcu/dashboard.h>
Set error state for a component.
| display | The component to set the error for. |
| void dashboard_set_level | ( | enum dashboard_component | display, |
| int | level ) |
#include <vcu/dashboard.h>
Set the level for a component.
| display | The component to set. |
| level | The level to set, clamped to the range of the component. |
| int dashboard_settings_save | ( | ) |
#include <vcu/dashboard.h>
Save the current dashboard settings.