ESL Tag core#

Implements the ESL Tag role of the Bluetooth Electronic Shelf Label Profile. It contains the mandatory ESL Tag characteristics, only. Optional features has to be added to the project as separate components, if needed. This component implements all the core functionalities, while also declares the interface of the optional features (and provides the WEAK implementations for them). This is a No-Code component, any additional feature can be added as a component.

Typedefs#

typedef uint8_t

ESL Display Info Display Type.

typedef struct esl_display_info_t *

ESL Display Info first class abstract data pointer type.

typedef uint8_t
typedef uint8_t

ESL Service Specification d09r18, Section 3.7.2.4: 48 bit Image Object ID.

typedef uint8_t

ESL LED type.

typedef uint8_t

ESL LED color gamut control type.

typedef uint16_t

ESL LED repeats type.

typedef uint8_t
typedef uint8_t
typedef uint8_t

Functions#

sl_status_t
sl_status_t
void *
esl_core_encrypt_message(void *msg, uint8_t *len)
void *
esl_core_decrypt_message(void *msg, uint8_t *len)
sl_status_t
esl_display_refresh(uint8_t display_index, uint8_t *image_index)
sl_status_t
esl_display_update(uint8_t display_index, uint8_t image_index)
esl_error_t
void
esl_core_set_last_error(esl_error_t error_code)
void
sl_status_t
esl_image_get_data(uint8_t image_index, uint16_t *offset, uint16_t buf_size, uint8_t *target_buf)
uint8_t
sl_status_t
esl_image_unpack_chunk(const void *code, const size_t chunk_size, void *data, size_t data_offset, size_t data_length, size_t *decompressed_length)
typedef(struct { uint8_t data[5];uint8_t bit_off_period;uint8_t bit_on_period;}) esl_led_flashing_pattern_t

ESL LED flashing pattern ESL Service Spec. d09r18, Section 3.10.2.10.2.2.

typedef(struct { uint8_t index;esl_led_gamut_control_t gamut;esl_led_flashing_pattern_t pattern;esl_led_repeats_type_t repeats;}) esl_led_control_t

ESL LED Control parameter, ESL Service Spec. d09r18, Section 3.10.2.10.1.

void
sl_status_t
esl_led_control(esl_led_control_t *control_param)
bool
esl_led_is_srgb(uint8_t led_index)
sl_status_t
esl_core_build_response(tlv_t tlv, const void *input_data)
uint8_t
esl_core_get_responses(uint8_t remaining_length, uint8_t *buf_p)
void
sl_status_t
esl_sensor_read(uint8_t index)
sl_status_t
esl_display_create(uint16_t width, uint16_t height, esl_display_type_t type, esl_display_info_p *info)
sl_status_t
esl_display_add(esl_display_info_p info, esl_va_method_p init_func, esl_va_method_p write_func)
void
esl_display_bt_on_event(sl_bt_msg_t *evt)
sl_status_t
esl_display_set_image(uint8_t display_index, uint8_t image_index)
sl_status_t
esl_display_get_width(uint8_t display_index, uint16_t *width)
sl_status_t
esl_display_get_height(uint8_t display_index, uint16_t *height)
sl_status_t
esl_display_get_type(uint8_t display_index, esl_display_type_t *type)
sl_status_t
esl_led_add(esl_led_type_t type, uint8_t red_value, uint8_t green_value, uint8_t blue_value)
sl_status_t
esl_led_on(uint8_t led_index, esl_led_gamut_control_t gamut)
sl_status_t
esl_led_off(uint8_t led_index)
esl_led_create_color(uint8_t red_value, uint8_t green_value, uint8_t blue_value, uint8_t brightness)
void
esl_led_bt_on_event(sl_bt_msg_t *evt)

Macros#

#define
ESL_TAG_MAX_SYNC_LOST_COUNT 3
#define
ESL_TAG_VENDOR_OPCODES_ENABLED 1
#define
ESL_TAG_ADVERTISING_INTERVAL_MIN 750
#define
ESL_TAG_ADVERTISING_INTERVAL_MAX 1500
#define
ESL_TAG_INTERMITTENT_ADVERTISING 0
#define
ESL_TAG_SECONDARY_ADVERTISING_DELAY 225
#define
ESL_TAG_BUILTIN_BATTERY_MEASURE_ENABLE 1
#define
ESL_TAG_BATTERY_LEVEL_FULL_MILLIVOLTS 3200
#define
ESL_TAG_BATTERY_LEVEL_LOW_MILLIVOLTS 2400
#define
ESL_TAG_BATTERY_MEASUREMENT_INTERVAL_MIN 10
#define
ESL_TAG_POWER_DOWN_ENABLE 1
#define
ESL_TAG_POWER_DOWN_TIMEOUT_MIN 60
#define
ESL_TAG_SYNC_SCAN_ENABLE 0
#define
ESL_TAG_SCAN_TIMEOUT_SEC 11
#define
ESL_TAG_SCAN_COUNT_LIMIT 3
#define
ESL_TAG_SCAN_SWEEEP_COEFF 5
#define
ESL_TAG_SCAN_WINDOW_MS 30
#define
ESL_TAG_BATTERY_MEASUREMENT_INTERVAL_MS (ESL_TAG_BATTERY_MEASUREMENT_INTERVAL_MIN * 60 * 1000)
#define
ESL_TAG_POWER_DOWN_TIMEOUT_MS (ESL_TAG_POWER_DOWN_TIMEOUT_MIN * 60 * 1000)
#define
ESL_TAG_ADVERTISERS_COUNT 1
#define
ESL_TAG_BATTERY_LEVEL_UNKNOWN 0

Definition for unknown battery voltage level (an implausible value)

#define
ESL_CORE_CRYPTO_AP_SYNC_KEY_ID ((psa_key_id_t)0xACC)

Custom psa_key_id_t for ESL AP Sync Key permanent storage (for AES key only)

#define
ESL_CORE_CRYPTO_RESPONSE_KEY_ID ((psa_key_id_t)0xE51)

Custom psa_key_id_t for ESL Response Key permanent storage.

#define
ESL_DISPLAY_TYPE_BLACK_WHITE 0x01

ESL Display Type Assigned Numbers.

#define
ESL_DISPLAY_TYPE_3_GRAY_SCALE 0x02

3 gray scale displays

#define
ESL_DISPLAY_TYPE_4_GRAY_SCALE 0x03

4 gray scale displays

#define
ESL_DISPLAY_TYPE_8_GRAY_SCALE 0x04

8 gray scale displays

#define
ESL_DISPLAY_TYPE_16_GRAY_SCALE 0x05

16 gray scale displays

#define
ESL_DISPLAY_TYPE_RED_BLACK_WHITE 0x06

Red, black, white displays.

#define
ESL_DISPLAY_TYPE_YELLOW_BLACK_WHITE 0x07

Yellow, black, white displays.

#define
ESL_DISPLAY_TYPE_RED_YELLOW_BLACK_WHITE 0x08

Red, yellow, black, white displays.

#define
ESL_DISPLAY_TYPE_7_COLOR 0x09

7 color displays

#define
ESL_DISPLAY_TYPE_16_COLOR 0x0A

16 color displays

#define
ESL_DISPLAY_TYPE_FULL_RGB 0x0B

Full RGB color space displays.

#define
ESL_ERROR_UNSPECIFIED ((esl_error_t)0x01)
#define
ESL_ERROR_INVALID_OPCODE ((esl_error_t)0x02)

Invalid Opcode: The opcode was not recognized.

#define
ESL_ERROR_INVALID_STATE ((esl_error_t)0x03)

Invalid State: The request was not valid for the present ESL state.

#define
ESL_ERROR_INVALID_IMAGE_INDEX ((esl_error_t)0x04)

Invalid Image Index: The Image_Index value was out of range.

#define
ESL_ERROR_IMAGE_NOT_AVAILABLE ((esl_error_t)0x05)

Image Not Available: The requested image contained no image data.

#define
ESL_ERROR_INVALID_PARAMETER ((esl_error_t)0x06)
#define
ESL_ERROR_CAPACITY_LIMIT ((esl_error_t)0x07)
#define
ESL_ERROR_INSUFFICIENT_BATTERY ((esl_error_t)0x08)
#define
ESL_ERROR_INSUFFICIENT_RESOURCES ((esl_error_t)0x09)
#define
ESL_ERROR_RETRY ((esl_error_t)0x0A)
#define
ESL_ERROR_QUEUE_FULL ((esl_error_t)0x0B)
#define
ESL_ERROR_IMPLAUSIBLE_TIME ((esl_error_t)0x0C)
#define
ESL_ERROR_VENDOR_NOERROR ((esl_error_t)0xFF)
#define
ESL_ERROR_VENDOR_NOREPORT ((esl_error_t)0xFE)
#define
esl_core_clear_last_error ()
#define
esl_core_has_no_error ()
#define
ESL_IMAGE_OBJECT_BASE 0x100u

ESL Service Specification d09r18, Section 3.7.2.4: 48 bit Image Object ID.

#define
ESL_LED_TYPE_SHIFT ((esl_led_type_t)6)
#define
ESL_LED_BRIGHTNESS_SHIFT ((esl_led_gamut_control_t)6)
#define
ESL_LED_RED_GAMUT_SHIFT ((esl_led_gamut_control_t)0)
#define
ESL_LED_GREEN_GAMUT_SHIFT ((esl_led_gamut_control_t)2)
#define
ESL_LED_BLUE_GAMUT_SHIFT ((esl_led_gamut_control_t)4)
#define
ESL_LED_REPEATS_TYPE_MASK ((esl_led_repeats_type_t)0x0001)
#define
ESL_LED_REPEATS_TYPE_COUNT ((esl_led_repeats_type_t)0x0000)
#define
ESL_LED_REPEATS_TYPE_TIME ((esl_led_repeats_type_t)0x0001)
#define
ESL_LED_REPEATS_DURATION_SHIFT ((esl_led_repeats_type_t)0x0001)
#define
ESL_LED_TYPE_SRGB ((esl_led_type_t)(0x00 << ESL_LED_TYPE_SHIFT))

ESL LED type definition: sRGB.

#define
ESL_LED_TYPE_MONOCHROME ((esl_led_type_t)(0x01 << ESL_LED_TYPE_SHIFT))

ESL LED type definition: Monochrome.

#define
ESL_LED_TYPE_MASK ((esl_led_type_t)0xC0)
#define
ESL_LED_GENERIC_2BIT_MASK ((esl_led_type_t)0x03)
#define
ESL_LED_LEVEL_0 (0x00)

ESL LED color gamut / brightness values.

#define
ESL_LED_LEVEL_1 (0x01)
#define
ESL_LED_LEVEL_2 (0x02)
#define
ESL_LED_LEVEL_3 (0x03)
#define
ESL_LED_LEVEL_STEP_PERCENTAGE 25

ESL LED color gamut / brightness step percentage.

#define
esl_led_get_brightness (_gamut)
#define
esl_led_get_red_value (_gamut)
#define
esl_led_get_green_value (_gamut)
#define
esl_led_get_blue_value (_gamut)
#define
ESL_TLV_RESPONSE_ERROR ((tlv_t)0x00)

The command could not be processed successfully.

#define
ESL_TLV_RESPONSE_LED_STATE ((tlv_t)0x01)

Acknowledgment of a request to control an LED.

#define
ESL_TLV_RESPONSE_BASIC_STATE ((tlv_t)0x10)

General acknowledgment containing ESL status data.

#define
ESL_TLV_RESPONSE_DISPLAY_STATE ((tlv_t)0x11)

Acknowledgment of a request to display an image.

#define
ESL_TLV_RESPONSE_SENSOR_VALUE ((tlv_t)0x0E)

Sensor report.

#define
ESL_TLV_RESPONSE_VENDOR_VALUE ((tlv_t)0x0F)

Response data as specified by the vendor of the ESL.

#define
ESL_TLV_TAG_MASK ((tlv_t)0x0F)

Mask for getting the Tag value from an ESL TLV.

#define
ESL_TLV_LEN_MASK ((tlv_t)0xF0)

Mask for getting the Length value from an ESL TLV.

#define
esl_core_get_tlv_tag (tlv_byte)
#define
esl_core_get_tlv_len (tlv_byte)
#define
esl_core_set_tlv_tag (_tlv, _tag)
#define
esl_core_set_tlv_len (_tlv, _len)
#define
ESL_DISPLAY_INIT_FUNC_PARAMETERS_COUNT (1)

ESL Display extra parameters count for init_func esl_va_method function.

#define
ESL_DISPLAY_WRITE_FUNC_PARAMETERS_COUNT (2)

ESL Display extra parameters count for write_func esl_va_method function.

Typedef Documentation#

esl_display_type_t#

typedef uint8_t esl_display_type_t

ESL Display Info Display Type.


Definition at line 55 of file common/esl_tag_core/inc/esl_tag_display_core.h

esl_display_info_p#

typedef struct esl_display_info_t* esl_display_info_p

ESL Display Info first class abstract data pointer type.


Definition at line 58 of file common/esl_tag_core/inc/esl_tag_display_core.h

esl_error_t#

typedef uint8_t esl_error_t

Definition at line 41 of file common/esl_tag_core/inc/esl_tag_errors.h

esl_image_object_id_t#

typedef uint8_t esl_image_object_id_t[6] [6]

ESL Service Specification d09r18, Section 3.7.2.4: 48 bit Image Object ID.


Definition at line 42 of file common/esl_tag_core/inc/esl_tag_image_core.h

esl_led_type_t#

typedef uint8_t esl_led_type_t

ESL LED type.


Definition at line 43 of file common/esl_tag_core/inc/esl_tag_led_core.h

esl_led_gamut_control_t#

typedef uint8_t esl_led_gamut_control_t

ESL LED color gamut control type.


Definition at line 46 of file common/esl_tag_core/inc/esl_tag_led_core.h

esl_led_repeats_type_t#

typedef uint16_t esl_led_repeats_type_t

ESL LED repeats type.


Definition at line 49 of file common/esl_tag_core/inc/esl_tag_led_core.h

tlv_t#

typedef uint8_t tlv_t

Definition at line 40 of file common/esl_tag_core/inc/esl_tag_tlv.h

tlv_tag_t#

typedef uint8_t tlv_tag_t

Definition at line 43 of file common/esl_tag_core/inc/esl_tag_tlv.h

tlv_length_t#

typedef uint8_t tlv_length_t

Definition at line 46 of file common/esl_tag_core/inc/esl_tag_tlv.h

Function Documentation#

esl_sensor_battery_init#

sl_status_t esl_sensor_battery_init (void )
Parameters
N/A

Definition at line 53 of file common/esl_tag_core/inc/esl_tag_battery_internal.h

esl_sensor_battery_read#

sl_status_t esl_sensor_battery_read (void )
Parameters
N/A

Definition at line 59 of file common/esl_tag_core/inc/esl_tag_battery_internal.h

esl_sensor_get_battery_voltage_mv#

uint32_t esl_sensor_get_battery_voltage_mv (void )
Parameters
N/A

Definition at line 67 of file common/esl_tag_core/inc/esl_tag_battery_internal.h

esl_sensor_core_check_battery_level#

void esl_sensor_core_check_battery_level (void )
Parameters
N/A

Definition at line 74 of file common/esl_tag_core/inc/esl_tag_battery_internal.h

esl_core_encrypt_message#

void * esl_core_encrypt_message (void * msg, uint8_t * len)
Parameters
[in]msg

Pointer to the message to be encrypted

N/Alen

len Pointer to a variable containing the length of the message to be encrypted [in bytes]

Message encryption function Returns

  • void* Pointer to the encrypted message on success, NULL otherwise.

Note

  • Also changes the value of *len to the resulting length on successful operation.


Definition at line 55 of file common/esl_tag_core/inc/esl_tag_crypto.h

esl_core_decrypt_message#

void * esl_core_decrypt_message (void * msg, uint8_t * len)
Parameters
[in]msg

Pointer to the message to be decrypted

N/Alen

len Pointer to a variable containing the length of the message to be decrypted [in bytes]

Message decryption function Returns

  • void* Pointer to the decrypted message on success, NULL otherwise.

Note

  • Also changes the value of *len to the resulting length on successful operation.


Definition at line 66 of file common/esl_tag_core/inc/esl_tag_crypto.h

esl_display_init#

void esl_display_init (void )
Parameters
N/A

ESL Tag display component init function. ESL Core component will call this during the initialization of application. This call is hidden and happens automatically.


Definition at line 65 of file common/esl_tag_core/inc/esl_tag_display_core.h

esl_display_refresh#

sl_status_t esl_display_refresh (uint8_t display_index, uint8_t * image_index)
Parameters
[in]display_index

Selects the display to show the image on.

[out]image_index

Returns last image set on the refreshed display.

Refresh the content of the ESL Tag Display. Re-displays the image which was previously set on the given screen. Returns

  • sl_status_t


Definition at line 74 of file common/esl_tag_core/inc/esl_tag_display_core.h

esl_display_update#

sl_status_t esl_display_update (uint8_t display_index, uint8_t image_index)
Parameters
[in]display_index

Selects the display to show the image on.

[in]image_index

Selects the image to be shown on the display.

Update image data on ESL Tag Display. Returns

  • sl_status_t


Definition at line 82 of file common/esl_tag_core/inc/esl_tag_display_core.h

esl_display_get_count#

uint8_t esl_display_get_count ()

ESL Display: display count getter Returns

  • Number of available displays


Definition at line 88 of file common/esl_tag_core/inc/esl_tag_display_core.h

esl_core_get_last_error#

esl_error_t esl_core_get_last_error (void )
Parameters
N/A

Gets the last error code Returns

  • esl_error_t_t


Definition at line 112 of file common/esl_tag_core/inc/esl_tag_errors.h

esl_core_set_last_error#

void esl_core_set_last_error (esl_error_t error_code)
Parameters
[in]error_code

error code

Sets the last error code


Definition at line 118 of file common/esl_tag_core/inc/esl_tag_errors.h

esl_image_init#

void esl_image_init (void )
Parameters
N/A

ESL Tag image init function. ESL Core component will call this during the initialization of application. This call is hidden and happens automatically.


Definition at line 51 of file common/esl_tag_core/inc/esl_tag_image_core.h

esl_image_characteristic_update#

void esl_image_characteristic_update (void )
Parameters
N/A

ESL Tag image characteristic update. ESL Core component will call this automatically on the bluetooth stack boot event. The real implementation in the ESL Tag Image component will get the display info and write it to the ESL Image Information Characteristic value for the lifecycle of the tag.


Definition at line 59 of file common/esl_tag_core/inc/esl_tag_image_core.h

esl_image_get_data#

sl_status_t esl_image_get_data (uint8_t image_index, uint16_t * offset, uint16_t buf_size, uint8_t * target_buf)
Parameters
[in]image_index

image_index Index of the image to get raw data chunk of

[out]offset

*offset Size of data already read out

[in]buf_size

buf_size Actual size of the target buffer

[out]target_buf

*target_buf Buffer address to copy the image chunk into

Getter for an ESL Tag image raw data chunk

Note

  • To get full image data this function needs to be called repeatedly until the offset value increases - offset in caller has to be persistent during the process, and usually its value must be set to 0, initially

Returns

  • sl_status_t


Definition at line 74 of file common/esl_tag_core/inc/esl_tag_image_core.h

esl_image_get_count#

uint8_t esl_image_get_count (void )
Parameters
N/A

ESL Tag maximum image count getter Returns

  • Number of available images

Note

  • : To be implemented with each custom image storage implementation!


Definition at line 82 of file common/esl_tag_core/inc/esl_tag_image_core.h

esl_image_reset_storage#

void esl_image_reset_storage (void )
Parameters
N/A

Reset image storage objects Note

  • : To be implemented with each custom image storage implementation!


Definition at line 88 of file common/esl_tag_core/inc/esl_tag_image_core.h

esl_image_unpack_init#

void esl_image_unpack_init (void )
Parameters
N/A

Reinit image compression algorithm if it is used


Definition at line 93 of file common/esl_tag_core/inc/esl_tag_image_core.h

esl_image_unpack_chunk#

sl_status_t esl_image_unpack_chunk (const void * code, const size_t chunk_size, void * data, size_t data_offset, size_t data_length, size_t * decompressed_length)
Parameters
N/Acode

Pointer to the current incoming data chunk

N/Achunk_size

Size of the incoming data in bytes

N/Adata

Pointer to the target area of unpacking

N/Adata_offset

Current write offset from the start of the unpacking area

N/Adata_length

Maximum size of the unpacking area

N/Adecompressed_length

Size of the last chunk written to target area

Unpack single chunk of received image data if compression is used

Returns

  • Returns SL_STATUS_OK on success, SL_STATUS_FAIL if decompression fails or SL_STATUS_WOULD_OVERFLOW if an uncompressed data chunk is too big to write to the target area.

Unpacks data slices if the otf_decompressor component is used or copy uncompressed data to the target area, otherwise.


Definition at line 111 of file common/esl_tag_core/inc/esl_tag_image_core.h

typedef#

typedef (struct { uint8_t data[5];uint8_t bit_off_period;uint8_t bit_on_period;} )

ESL LED flashing pattern ESL Service Spec. d09r18, Section 3.10.2.10.2.2.

Parameters
N/A

Definition at line 52 of file common/esl_tag_core/inc/esl_tag_led_core.h

typedef#

typedef (struct { uint8_t index;esl_led_gamut_control_t gamut;esl_led_flashing_pattern_t pattern;esl_led_repeats_type_t repeats;} )

ESL LED Control parameter, ESL Service Spec. d09r18, Section 3.10.2.10.1.

Parameters
N/A

Definition at line 59 of file common/esl_tag_core/inc/esl_tag_led_core.h

esl_led_init#

void esl_led_init (void )
Parameters
N/A

ESL Tag LED init function. ESL Core component will call this during the initialization of application. This call is hidden and happens automatically.


Definition at line 147 of file common/esl_tag_core/inc/esl_tag_led_core.h

esl_led_control#

sl_status_t esl_led_control (esl_led_control_t * control_param)
Parameters
[in]control_param

ESL LED control parameters defined by the ESL standard - excluding the ESL ID.

ESL Tag LED control function Note

  • updates the active LED bit in ESL basic state register according to the actual status of all LEDs

Returns

  • sl_status_t


Definition at line 157 of file common/esl_tag_core/inc/esl_tag_led_core.h

esl_led_get_count#

uint8_t esl_led_get_count ()

Get ESL Tag LED count Returns

  • Number of available LEDs


Definition at line 163 of file common/esl_tag_core/inc/esl_tag_led_core.h

esl_led_is_srgb#

bool esl_led_is_srgb (uint8_t led_index)
Parameters
N/Aled_index

Get ESL Tag LED count Returns

  • Number of available LEDs


Definition at line 169 of file common/esl_tag_core/inc/esl_tag_led_core.h

esl_core_respones_init#

void esl_core_respones_init ()

Init ESL Tag responses queue. ESL Core component will call this during the initialization of application. This call is hidden and happens automatically.


Definition at line 62 of file common/esl_tag_core/inc/esl_tag_response.h

esl_core_build_response#

sl_status_t esl_core_build_response (tlv_t tlv, const void * input_data)
Parameters
[in]tlv

The TLV to create the response stream for

[in]input_data

can be a pointer to the basic status, led status etc.

Create response byte stream for single TLV based on input data and error status (if any) then puts the response stream into a circular buffer. The resulting output length of a single TLV will be the length encoded in that particular TLV + 1 byte as per ESL specification. Multiple response streams will be then concatenated on consecutive calls up to the maximum length limit of 48 bytes for multiple response data. Note

  • the actual length of the input data length MUST be in correspondence with the TLV passed as the first parameter!

Returns

  • sl_tatus_t


Definition at line 78 of file common/esl_tag_core/inc/esl_tag_response.h

esl_core_get_responses#

uint8_t esl_core_get_responses (uint8_t remaining_length, uint8_t * buf_p)
Parameters
[in]remaining_length

size of data out buffer

[out]buf_p

pointer to data buffer to copy the responses into

Copy all possible responses from internal circular buffer to a temporary linear buffer. Circular buffer drops the successfully read out data, while it might keep remaining responses which doesn't fit into the target buffer. Consistency of any response will be kept, that is, it might copy less data than the allowed maximum length passed as the first parameter, if there are responses left still in the internal circular buffer which otherwise wont fit into the target buffer. Returns

  • overall length of responses, might be 0 if there's no response


Definition at line 94 of file common/esl_tag_core/inc/esl_tag_response.h

esl_sensor_init#

void esl_sensor_init (void )
Parameters
N/A

ESL Tag sensor init function. ESL Core component will call this during the initialization of application. This call is hidden and happens automatically.


Definition at line 44 of file common/esl_tag_core/inc/esl_tag_sensor_core.h

esl_sensor_read#

sl_status_t esl_sensor_read (uint8_t index)
Parameters
N/Aindex

Read interface (only) for ESL Sensor. Returns

  • sl_status_t SL_NOT_SUPPORTED if the ESL Sensor component is missing.


Definition at line 50 of file common/esl_tag_core/inc/esl_tag_sensor_core.h

esl_sensor_get_count#

uint8_t esl_sensor_get_count (void )
Parameters
N/A

Get ESL Tag Sensor count Returns

  • Number of available sensors


Definition at line 56 of file common/esl_tag_core/inc/esl_tag_sensor_core.h

esl_display_create#

sl_status_t esl_display_create (uint16_t width, uint16_t height, esl_display_type_t type, esl_display_info_p * info)
Parameters
[in]width

Display horizontal pixel count.

[in]height

Display vertical pixel count.

[in]type

Display type defined in BT SIG Assigned Numbers.

[out]info

esl_display_info_p type pointer to the newly created display info data. This value needs to pass to esl_display_add call, which has to follow the invocation of esl_display_create for any new display to be created, fully and properly.

Create an ESL Tag display. Any display which a Tag wants to implement needs to becreated properly in the first place.

Returns

  • sl_status_t


Definition at line 62 of file common/esl_tag_display/inc/esl_tag_display.h

esl_display_add#

sl_status_t esl_display_add (esl_display_info_p info, esl_va_method_p init_func, esl_va_method_p write_func)
Parameters
[in]info

esl_display_info_p type pointer, can be get by calling esl_display_create previously.

[in]init_func

esl_va_method_p type pointer to the low-level init function of the display driver. Driver implementation, however, it's up to the user to implement it properly - the only rule is to follow the interface specification defined by the esl_va_method_p type. If the 'init' method is not necessary for the given display, then a NULL pointer can be passed.

[in]write_func

esl_va_method_p type pointer to the low-level write function of the display driver. Has to be implemented by the users, and it's mandatory (can't be NULL).

Add an ESL Tag display to the list of available displays after creation. Any display on a Tag can be only used after adding it to the list.

Returns

  • sl_status_t


Definition at line 85 of file common/esl_tag_display/inc/esl_tag_display.h

esl_display_bt_on_event#

void esl_display_bt_on_event (sl_bt_msg_t * evt)
Parameters
[in]evt

Event coming from the Bluetooth stack.

ESL display's bluetooth stack event handler. This one runs by the user implementation (usually in app.c) in parallel.


Definition at line 95 of file common/esl_tag_display/inc/esl_tag_display.h

esl_display_set_image#

sl_status_t esl_display_set_image (uint8_t display_index, uint8_t image_index)
Parameters
[in]display_index

Selects the display to show the image on.

[in]image_index

Selects the image to be shown on the display.

ESL Display: chose an image to show. Invokes the users write_func passed to esl_display_add as its 3rd parameter. Returns

  • sl_status_t


Definition at line 104 of file common/esl_tag_display/inc/esl_tag_display.h

esl_display_get_width#

sl_status_t esl_display_get_width (uint8_t display_index, uint16_t * width)
Parameters
[in]display_index

Selects the display to get the width of.

[out]width

Horizontal pixel count of the selected display.

Display width getter. Returns

  • sl_status_t


Definition at line 113 of file common/esl_tag_display/inc/esl_tag_display.h

esl_display_get_height#

sl_status_t esl_display_get_height (uint8_t display_index, uint16_t * height)
Parameters
[in]display_index

Selects the display to get the height of.

[out]height

Vertical pixel count of the selected display.

Display height getter Returns

  • sl_status_t


Definition at line 121 of file common/esl_tag_display/inc/esl_tag_display.h

esl_display_get_type#

sl_status_t esl_display_get_type (uint8_t display_index, esl_display_type_t * type)
Parameters
[in]display_index

Selects the display to get the type of.

[out]type

esl_display_type_t Display type defined in BT SIG.

Display type getter. Returns

  • sl_status_t


Definition at line 129 of file common/esl_tag_display/inc/esl_tag_display.h

esl_led_add#

sl_status_t esl_led_add (esl_led_type_t type, uint8_t red_value, uint8_t green_value, uint8_t blue_value)
Parameters
[in]type

Possible ESL LED type defined by ESL standard

[in]red_value

ESL LED (initial, in case of sRGB type) red color value.

[in]green_value

ESL LED (initial, if sRGB) green color value.

[in]blue_value

ESL LED (initial, if sRGB) blue color value.

Add an ESL Tag LED to the list of available LEDs after creation. Any LED on a Tag can be only used after adding it to the internal LED registry.

Returns

  • sl_status_t


Definition at line 53 of file common/esl_tag_led/inc/esl_tag_led.h

esl_led_on#

sl_status_t esl_led_on (uint8_t led_index, esl_led_gamut_control_t gamut)
Parameters
N/Aled_index
N/Agamut

ESL Tag LED on function. Simple turn on function with given brightness and color values, to be implemented by end users. It's the users responsibility to actually turn given LED on with the given brightness and color parameters (if applicable) and the function shall return SL_STATUS_OK in case of success. Return SL_STATUS_FAIL on any other case (e.g. index out of bound, detectable HW error etc. Returns

  • sl_status_t


Definition at line 69 of file common/esl_tag_led/inc/esl_tag_led.h

esl_led_off#

sl_status_t esl_led_off (uint8_t led_index)
Parameters
N/Aled_index

ESL Tag LED off function. Simple turn off function, similar to sl_esl_led_on method except it omits the gamut parameter entirely. To be implemented by end users. It's the users responsibility to actually turn given LED off and the function shall return SL_STATUS_OK in case of success. Return SL_STATUS_FAIL on any other case (e.g. index out of bound, detectable HW error etc. Returns

  • sl_status_t


Definition at line 81 of file common/esl_tag_led/inc/esl_tag_led.h

esl_led_create_color#

esl_led_gamut_control_t esl_led_create_color (uint8_t red_value, uint8_t green_value, uint8_t blue_value, uint8_t brightness)
Parameters
[in]red_value

ESL LED red color level

[in]green_value

ESL LED red color level

[in]blue_value

ESL LED red color level

[in]brightness

ESL LED red color level

Assembly ESL Tag LED gamut value from input parameters for esl_led_gamut_control_t type Returns

  • esl_led_gamut_control_t Resulting ESL LED gamut value


Definition at line 92 of file common/esl_tag_led/inc/esl_tag_led.h

esl_led_bt_on_event#

void esl_led_bt_on_event (sl_bt_msg_t * evt)
Parameters
[in]evt

Event coming from the Bluetooth stack.

ESL LED's bluetooth stack event handler. This one runs by the user implementation (usually in app.c) in parallel.


Definition at line 103 of file common/esl_tag_led/inc/esl_tag_led.h