nRF51 SDK - S210 SoftDevice
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
BSP indication states

To abstract from the actual hardware that is used to run an example, some examples use Board Support Package (BSP) states instead of a fast assignment of LEDs to indicate states. In this way, examples can easily be tested on different boards, like the development board and the dongle. States are indicated in different ways depending on the hardware that is used.

The following table lists how the BSP states are indicated on PCA10028 and PCA10031:

BSP state PCA10028 PCA10031
BSP_INDICATE_IDLE All LEDs are off All LEDs are off
BSP_INDICATE_SCANNING LED 1 is blinking (period 2 sec, duty cycle: 10%) Red LED is blinking (period 2 sec, duty cycle: 10%)
BSP_INDICATE_ADVERTISING LED 1 is blinking (period 2 sec, duty cycle: 10%) Red LED is blinking (period 2 sec, duty cycle: 10%)
BSP_INDICATE_ADVERTISING_WHITELIST LED 1 is blinking fast (period 1 sec, duty cycle: 20%) Red LED is blinking fast (period 1 sec, duty cycle: 20%)
BSP_INDICATE_ADVERTISING_SLOW LED 1 is blinking slowly (period 4.4 sec, duty cycle: 10%) Red LED is is blinking slowly (period 4.4 sec, duty cycle: 10%)
BSP_INDICATE_ADVERTISING_DIRECTED LED 1 is blinking very fast (period 0.6 sec, duty cycle: 50%) Red LED is blinking very fast (period 0.6 sec, duty cycle: 50%)
BSP_INDICATE_BONDING LED 1 is blinking (period 200 msec, duty cycle: 50%) Red LED is blinking (period 200 msec, duty cycle: 50%)
BSP_INDICATE_CONNECTED LED 1 is on Red LED is on
BSP_INDICATE_SENT_OK LED 2 is inverted for 100 msec Green LED is inverted for 100 msec
BSP_INDICATE_SEND_ERROR LED 2 is inverted for 500 msec Green LED is inverted for 500 msec
BSP_INDICATE_RCV_OK LED 2 is inverted for 100 msec Green LED is inverted for 100 msec
BSP_INDICATE_RCV_ERROR LED 2 is inverted for 500 msec Green LED is inverted for 500 msec
BSP_INDICATE_FATAL_ERROR All LEDs are on All LEDs are on
BSP_INDICATE_USER_STATE_OFF All LEDs are off All LEDs are off
BSP_INDICATE_USER_STATE_0 LEDs 2, 3, and 4 are off, LED 1 is on Green and blue LEDs are off, red LED is on
BSP_INDICATE_USER_STATE_1 LEDs 1, 3, and 4 are off, LED 2 is on Red and blue LED are off, green LED is on
BSP_INDICATE_USER_STATE_2 LEDs 3 and 4 are off, LEDs 1 and 2 are on Blue LED is off, red and green LEDs are on
BSP_INDICATE_USER_STATE_3 All LEDs are on All LEDs are on
BSP_INDICATE_USER_STATE_ON All LEDs are on All LEDs are on

The following BSP alerts can be indicated on top of the states described in the previous table:

BSP alert PCA10028 PCA10031
BSP_INDICATE_ALERT_0 LED 3 is blinking (period 1200 msec, duty cycle: 50%) Blue LED is blinking (period 1200 msec, duty cycle: 50%)
BSP_INDICATE_ALERT_1 LED 3 is blinking (period 800 msec, duty cycle: 50%) Blue LED is blinking (period 800 msec, duty cycle: 50%)
BSP_INDICATE_ALERT_2 LED 3 is blinking (period 400 msec, duty cycle: 50%) Blue LED is blinking (period 400 msec, duty cycle: 50%)
BSP_INDICATE_ALERT_3 LED 3 is on Blue LED is on
BSP_INDICATE_ALERT_OFF LED 3 is off Blue LED is off

The states are defined in bsp_indication_t.