I'm working with an nRF52840-MDK from MakerDiary in the nRF SDK for Thread and Zigbee. I would like to power on an LED when the chip is powered on. Here's a snippet of my code
/**@brief Function for initializing GPIO pins
*
*/
static void nrf_gpio_init(void)
{
nrf_gpio_cfg_input(sensorPin, NRF_GPIO_PIN_NOPULL);
nrf_gpio_cfg_output(22);
nrf_gpio_pin_set(22);
nrf_gpio_pin_write(22, 1);
//bsp_board_led_on(BSP_LED_0);
}
static void leds_init(void)
{
bsp_board_init(BSP_INIT_LEDS);
}
static void nrf_bsp_init(void){
uint32_t err_code = bsp_init(BSP_INIT_LEDS, NULL);
APP_ERROR_CHECK(err_code);
}
This does not seem to work. I tried two methods I found with the bsp_board_led_on function and I tried just using the GPIO driver - neither worked. Please advise.