Nordic Thingy:52
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
User interface

User interface module API. More...

Modules

 User interface flash configuration
 User interface module flash configuration.
 

Data Structures

struct  m_ui_init_t
 TWI configuraion. More...
 

Macros

#define DEFAULT_LED_FADE_IN_TIME   2000
 LED fade in time [ms].
 
#define DEFAULT_LED_FADE_OUT_TIME   500
 LED fade out time [ms].
 
#define DEFAULT_LED_INTENSITY_PERCENT   20
 Default LED intensity [percent].
 
#define DEFAULT_LED_OFF_TIME_MS   3500
 Time LED is off between cycles [ms].
 
#define DEFAULT_LED_ON_TIME_MS   35
 LED on duration [ms].
 
#define SEQUENCE_DEFAULT_VALUES
 Default LED sequence values.
 
#define UI_CONFIG_DEFAULT_CONNECTED
 Default LED configuration upon BLE connection.
 
#define UI_CONFIG_DEFAULT_DISCONNECTED
 Default LED configuration upon BLE disconnect.
 
#define UI_CONFIG_DEFAULT_ERROR
 Default LED configuration when an error occurs.
 

Enumerations

enum  { M_IU_STATUS_CODE_SUCCESS = NRF_SUCCESS, M_IU_STATUS_CODE_INVALID_PARAM }
 m_ui status return codes. More...
 
enum  ui_led_events
 Predefined events linked to corresponding LED configurations.
 

Functions

ret_code_t m_ui_init (m_ble_service_handle_t *p_handle, m_ui_init_t *p_params)
 Function for initializing all UI components (Buttons and LEDs). More...
 
ret_code_t m_ui_led_set (uint8_t r, uint8_t g, uint8_t b)
 Function for setting the RGB value of a led. More...
 
ret_code_t m_ui_led_set_event (ui_led_events event_code)
 Function for setting LED color according to predefined events. More...
 

Detailed Description

User interface module API.

Enumeration Type Documentation

anonymous enum

m_ui status return codes.

Enumerator
M_IU_STATUS_CODE_SUCCESS 

Successful.

M_IU_STATUS_CODE_INVALID_PARAM 

Invalid parameters supplied.

Function Documentation

ret_code_t m_ui_init ( m_ble_service_handle_t p_handle,
m_ui_init_t p_params 
)

Function for initializing all UI components (Buttons and LEDs).

Return values
NRF_SUCCESSOperation was successful.
NRF_ERROR_NULLNULL pointer supplied.
Othercodes from the underlying drivers.
ret_code_t m_ui_led_set ( uint8_t  r,
uint8_t  g,
uint8_t  b 
)

Function for setting the RGB value of a led.

Parameters
[in]rRed intensity (0 to 255).
[in]gGreen intensity (0 to 255).
[in]bBlue intensity (0 to 255).
Note
in Breathe or One-shot mode the intensity will be set via a separate intensity variable. The values entered in these two modes will be treated as binary (boolean) for each color.
Return values
NRF_SUCCESSOperation was successful.
Othercodes from the underlying drivers.
ret_code_t m_ui_led_set_event ( ui_led_events  event_code)

Function for setting LED color according to predefined events.

Parameters
[in]event_codePredefined event code
Return values
NRF_SUCCESSIf initialization was successful.
Othercodes from the underlying drivers.