Device specific display properties. More...
Go to the source code of this file.
Enumerations | |
enum | display_property_type_t { DP_INFORMATION_TYPE = 1, DP_INFORMATION_RANGE = 2, DP_LED_TYPE = 3, DP_BUFFER_SIZE = 4, DP_GROUP_ID = 5 } |
Different display properties TLV types. More... | |
enum | display_information_type_t { INFORMATION_IT_STATION = 0, INFORMATION_IC_STRING = 1 } |
Type of information the display is capable of showing. More... | |
enum | display_led_type_t { LED_TYPE_APA102 = 0, LED_TYPE_WS2811 = 1 } |
Type of LED IC used in the display. More... | |
enum | display_led_color_order_t { LED_ORDER_RGB = 0, LED_ORDER_BRG = 1, LED_ORDER_GBR = 2, LED_ORDER_BGR = 3, LED_ORDER_RBG = 4, LED_ORDER_GRB = 5 } |
Order in which the RGB bytes should be pushed out to the display. | |
Functions | |
void | init_display_properties () |
Initialise the display properties cache. More... | |
uint16_t | get_led_count () |
Return the (cached) number of LEDs present in the display. More... | |
uint8_t | get_led_size () |
enum display_led_color_order_t | get_color_order () |
The order in which the RGB data should be transmitted per LED. | |
const struct dp_tlv_item_t * | get_display_properties_P () |
Get a pointer to the TLV list stored in flash. More... | |
Device specific display properties.
As multiple LED configurations are supported, some definitions and functions need to be provided in order for the firmware to determine how to drive the display. For platform dependent properties, see device_properties.h.
Type of information the display is capable of showing.
enum display_led_type_t |
Different display properties TLV types.
Enumerator | |
---|---|
DP_INFORMATION_TYPE |
Information type, always length 1. See display_information_type_t Allowed only once per metadata report. |
DP_INFORMATION_RANGE |
Information range, always length 2: |
DP_LED_TYPE |
Type of LED used in the display, always length 1. See display_led_type_t. Allowed only once per metadata report. |
DP_BUFFER_SIZE |
Display frame buffer size. Allowed once per metadata report. Depends on the number of LEDs present and the LED type. This information is optional and should only be used to check the buffer size calculated from the LED type, information type, and information ranges. |
DP_GROUP_ID |
Display grouping. Always length 16. The display controller should advertise which group it belongs to. To determine the group identifier the serial number of the controllers should be sorted and concatenated into a single string, delimited by '+' characters: e.g. "ICD-IC-001-0001+ICD-IC-001-0002". The group identifier is then given by the (binary value) of the MD5 hash of the identifier string encoded in UTF-8. This 128 bit value is stored as big-endian 16 byte integer. |
const struct dp_tlv_item_t* get_display_properties_P | ( | ) |
Get a pointer to the TLV list stored in flash.
The list ends with a TLV_TYPE_END field to ensure proper functioning of get_tlv_list_length_P().
uint16_t get_led_count | ( | ) |
Return the (cached) number of LEDs present in the display.
This function will return 0 before the cache is initialised, or -1 (0xFFFF) if the EEPROM has been left unprogrammed.
uint8_t get_led_size | ( | ) |
Return the number of bytes required to store the display information for a single LED.
void init_display_properties | ( | ) |
Initialise the display properties cache.
Some display properties are stored in EEPROM which results in slow responses if this information is requested frequently. Information like the display's number of LEDs is therefore cached in RAM by this function.