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 (SLXU_INIT_ARG )
Initialize the GLIB and DMD interfaces.
[in] | init_level |
Returns
void
98
of file app/framework/plugin/dmp-ui-demo/dmp-ui.h
sl_dmp_ui_light_off#
void sl_dmp_ui_light_off (void )
Update the display to light off bitmap.
[in] |
This function clears the display area and re-renders the LCD with the light off bitmap with other bitmaps.
Returns
void
112
of file app/framework/plugin/dmp-ui-demo/dmp-ui.h
sl_dmp_ui_light_on#
void sl_dmp_ui_light_on (void )
Update the display to light on bitmap.
[in] |
This function clears the display area and re-renders the LCD with the light on bitmap with other bitmaps.
Returns
void
126
of file app/framework/plugin/dmp-ui-demo/dmp-ui.h
sl_dmp_ui_update_direction#
void sl_dmp_ui_update_direction (DmpUiLightDirection_t direction)
Update the display to show which interface toggled the light.
[in] | direction | or DMP_UI_DIRECTION_ZIGBEE |
Returns
void
138
of file app/framework/plugin/dmp-ui-demo/dmp-ui.h
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.
[in] | connectionState | if the Light is connected to mobile device, false otherwise. |
Returns
void
150
of file app/framework/plugin/dmp-ui-demo/dmp-ui.h
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.
[in] | enable | whether pjoin is being enabled. |
The flashing sequence is stopped automatically after the pjoin is disabled.
Returns
void
165
of file app/framework/plugin/dmp-ui-demo/dmp-ui.h
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.
[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
180
of file app/framework/plugin/dmp-ui-demo/dmp-ui.h
sl_dmp_ui_display_help#
void sl_dmp_ui_display_help (void )
Update the display with Help menu.
[in] |
Returns
void
191
of file app/framework/plugin/dmp-ui-demo/dmp-ui.h
dmpUiClrLcdDisplayMainScreen#
void dmpUiClrLcdDisplayMainScreen (void )
Clear the LCD screen and display the main screen.
[in] |
Returns
void
202
of file app/framework/plugin/dmp-ui-demo/dmp-ui.h
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.
[in] | devName | device name. |
Returns
void
213
of file app/framework/plugin/dmp-ui-demo/dmp-ui.h
dmpUiSetNumLightsDiscovered#
void dmpUiSetNumLightsDiscovered (uint8_t numberOfLights)
Update the number of lights discovered in the network.
[in] | numberOfLights | of lights discovered in the network. |
Returns
void
224
of file app/framework/plugin/dmp-ui-demo/dmp-ui.h
dmpUiGetNumLightsDiscovered#
uint8_t dmpUiGetNumLightsDiscovered (void )
Return number of lights discovered in the network.
[in] |
Returns
uint8_t, number of lights discovered in the network.
235
of file app/framework/plugin/dmp-ui-demo/dmp-ui.h
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.
[in] | updateLight1 | of both the lights. If DMP_UI_LIGHT_UNCHANGED is passed, previous light state is updated. |
N/A | updateLight2 |
If status has not changed, the application can pass DMP_UI_LIGHT_UNCHANGED as the state. Returns
void
249
of file app/framework/plugin/dmp-ui-demo/dmp-ui.h
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 | |
DMP_UI_LIGHT_OFF | |
DMP_UI_LIGHT_ON | |
DMP_UI_LIGHT_UNCHANGED |
48
of file app/framework/plugin/dmp-ui-demo/dmp-ui.h
DmpUiLightDirection_t#
DmpUiLightDirection_t
Enumerator | |
---|---|
DMP_UI_DIRECTION_BLUETOOTH | |
DMP_UI_DIRECTION_ZIGBEE | |
DMP_UI_DIRECTION_SWITCH | |
DMP_UI_DIRECTION_INVALID |
54
of file app/framework/plugin/dmp-ui-demo/dmp-ui.h
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 |
61
of file app/framework/plugin/dmp-ui-demo/dmp-ui.h
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 |
72
of file app/framework/plugin/dmp-ui-demo/dmp-ui.h