DMP UI Demo#
API and Callbacks for the DMP UI Demo Component.
DMP UI uses the underlying DMD interface and the GLIB and exposes several wrapper functions to the application. These functions are used to display different bitmaps for the demo.
API#
Initialize the GLIB and DMD interfaces.
Update the display to light off bitmap.
Update the display to light on bitmap.
Update the display to show which interface toggled the light.
Update the display to show if the Bluetooth is connected to the mobile device.
Update the display with flashing PAN ID sequence to indicate that the pjoin is active.
Update the display with PAN ID, after the device joins or leaves the network.
Update the display with Help menu.
Clear the LCD screen and display the main screen.
Set the BLE device name to be displayed on the LCD.
Update the number of lights discovered in the network.
Return number of lights discovered in the network.
Update the status of both lights on the LCD.
Enumerations#
Macros#
API Documentation#
sl_dmp_ui_init#
void sl_dmp_ui_init (uint8_t init_level)
Initialize the GLIB and DMD interfaces.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t | [in] | init_level | init_level |
Returns
void
sl_dmp_ui_light_off#
void sl_dmp_ui_light_off (void )
Update the display to light off bitmap.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | [in] |
This function clears the display area and re-renders the LCD with the light off bitmap with other bitmaps.
Returns
void
sl_dmp_ui_light_on#
void sl_dmp_ui_light_on (void )
Update the display to light on bitmap.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | [in] |
This function clears the display area and re-renders the LCD with the light on bitmap with other bitmaps.
Returns
void
sl_dmp_ui_update_direction#
void sl_dmp_ui_update_direction (DmpUiLightDirection_t direction)
Update the display to show which interface toggled the light.
Type | Direction | Argument Name | Description |
---|---|---|---|
DmpUiLightDirection_t | [in] | direction | or DMP_UI_DIRECTION_ZIGBEE |
Returns
void
sl_dmp_ui_bluetooth_connected#
void sl_dmp_ui_bluetooth_connected (bool connectionState)
Update the display to show if the Bluetooth is connected to the mobile device.
Type | Direction | Argument Name | Description |
---|---|---|---|
bool | [in] | connectionState | if the Light is connected to mobile device, false otherwise. |
Returns
void
sl_dmp_ui_zigbee_permit_join#
void sl_dmp_ui_zigbee_permit_join (bool enable)
Update the display with flashing PAN ID sequence to indicate that the pjoin is active.
Type | Direction | Argument Name | Description |
---|---|---|---|
bool | [in] | enable | whether pjoin is being enabled. |
The flashing sequence is stopped automatically after the pjoin is disabled.
Returns
void
sl_dmp_ui_display_zigbee_state#
void sl_dmp_ui_display_zigbee_state (DmpUiZigBeeNetworkState_t nwState)
Update the display with PAN ID, after the device joins or leaves the network.
Type | Direction | Argument Name | Description |
---|---|---|---|
DmpUiZigBeeNetworkState_t | [in] | nwState | on the network state provided this function will display the corresponding nwk state on LCD. If DMP_UI_STATE_UNKNOWN is passed, it will determine the network state internally and update the display accordingly. |
Returns
void
sl_dmp_ui_display_help#
void sl_dmp_ui_display_help (void )
Update the display with Help menu.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | [in] |
Returns
void
dmpUiClrLcdDisplayMainScreen#
void dmpUiClrLcdDisplayMainScreen (void )
Clear the LCD screen and display the main screen.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | [in] |
Returns
void
sl_dmp_ui_set_ble_device_name#
void sl_dmp_ui_set_ble_device_name (char * devName)
Set the BLE device name to be displayed on the LCD.
Type | Direction | Argument Name | Description |
---|---|---|---|
char * | [in] | devName | device name. |
Returns
void
dmpUiSetNumLightsDiscovered#
void dmpUiSetNumLightsDiscovered (uint8_t numberOfLights)
Update the number of lights discovered in the network.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t | [in] | numberOfLights | of lights discovered in the network. |
Returns
void
dmpUiGetNumLightsDiscovered#
uint8_t dmpUiGetNumLightsDiscovered (void )
Return number of lights discovered in the network.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | [in] |
Returns
uint8_t, number of lights discovered in the network.
dmpUiLightUpdateLight#
void dmpUiLightUpdateLight (sl_dmp_ui_light_state_t updateLight1, sl_dmp_ui_light_state_t updateLight2)
Update the status of both lights on the LCD.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_dmp_ui_light_state_t | [in] | updateLight1 | of both the lights. If DMP_UI_LIGHT_UNCHANGED is passed, previous light state is updated. |
sl_dmp_ui_light_state_t | N/A | updateLight2 |
If status has not changed, the application can pass DMP_UI_LIGHT_UNCHANGED as the state. Returns
void
Enumeration Documentation#
sl_dmp_ui_light_state_t#
sl_dmp_ui_light_state_t
Enumerator | |
---|---|
DMP_UI_LIGHT_ON | |
DMP_UI_LIGHT_OFF | |
DMP_UI_LIGHT_UNCHANGED |
DmpUiLightDirection_t#
DmpUiLightDirection_t
Enumerator | |
---|---|
DMP_UI_DIRECTION_BLUETOOTH | |
DMP_UI_DIRECTION_ZIGBEE | |
DMP_UI_DIRECTION_SWITCH | |
DMP_UI_DIRECTION_INVALID |
DmpUiZigBeeNetworkState_t#
DmpUiZigBeeNetworkState_t
Enumerator | |
---|---|
DMP_UI_NO_NETWORK | |
DMP_UI_SCANNING | |
DMP_UI_JOINING | |
DMP_UI_FORMING | |
DMP_UI_NETWORK_UP | |
DMP_UI_LOST_NETWORK | |
DMP_UI_DISCOVERING | |
DMP_UI_STATE_UNKNOWN |
DmpUiDeviceType_t#
DmpUiDeviceType_t
Enumerator | |
---|---|
DMP_UI_DEVICE_TYPE_LIGHT | |
DMP_UI_DEVICE_TYPE_SWITCH | |
DMP_UI_DEVICE_TYPE_LIGHT_SED | |
DMP_UI_DEVICE_TYPE_UNKNOWN |