IceCube display
LED display to show IceCube event data
All Data Structures Files Functions Variables Enumerations Enumerator Macros Modules Pages
display_properties.h File Reference

Device specific display properties. More...

Include dependency graph for display_properties.h:
This graph shows which files directly or indirectly include this file:

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 }
 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_tget_display_properties_P ()
 Get a pointer to the TLV list stored in flash. More...
 

Detailed Description

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.

Author
Sander Vanheule (Universiteit Gent)

Enumeration Type Documentation

◆ display_information_type_t

Type of information the display is capable of showing.

Enumerator
INFORMATION_IT_STATION 

IceTop stations. Pulses from all 4 DOMs in the two tanks should be merged. The frame buffer should contain the required LED data per station, in increasing order as determined by the DP_INFORMATION_RANGE field of the display metadata: e.g. {[station 1], [station 2], ...}.

INFORMATION_IC_STRING 

Full IceCube strings. 1:1 mapping of in-ice DOMs to LEDs. The frame buffer should contain all DOMs per string: e.g. {[dom 1 of string 1], [dom 2 of string 1], ... , [dom 1 of string 2], ...}.

◆ display_led_type_t

Type of LED IC used in the display.

Enumerator
LED_TYPE_APA102 

APA102 compatible. Data for each LED consists of 4 bytes: brightness + RGB.

LED_TYPE_WS2811 

WS2811/WS2812 compatible. Data for each LED consists of 3 bytes: RGB.

◆ display_property_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: {start, end}. If multiple ranges are supplies in a single report, they should be sorted and the buffer data concatenated to form a single display buffer.

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

Function Documentation

◆ get_display_properties_P()

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

◆ get_led_count()

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.

Returns
The number of LEDs present in the display, or 0 if init_display_properties() has not been called yet.

◆ get_led_size()

uint8_t get_led_size ( )

Return the number of bytes required to store the display information for a single LED.

See also
display_led_type_t

◆ init_display_properties()

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.