This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ble_uart example

i am using customized board for nRF52832. i am using ble_uart example code. in that example LED1 on nRF52_DK board is used for indication for ble connectivity.

in my customized board i am using only LED which is connected to P000 . i am not using any button . how to configure new port pin for ble indication LED.

Parents
  • FormerMember
    0 FormerMember

    The easiest way to control the LED is to use the nrf_gpio interface directly:

    1) Configure pin as output: nrf_gpio_cfg_output(pin_number)

    2) Turn on/off the LED:

    • nrf_gpio_pin_set(pin_number)
    • nrf_gpio_pin_clear(pin_number)
  • Yeah Tht is all right . but i am using example ble_app_uart from SDK11->examples->ble-peripheral . in this example their is one function named buttons_leds_init(&erase_bonds); for initializing buttons and leds. in this function bsp_init(BSP_INIT_LED | BSP_INIT_BUTTONS) used . where BSP_INIT_LED is defined as (1 << 0) and BSP_INIT_BUTTONS defined as (1 << 1). LED1 on NRF52_DK is connected to P017 , how to initialize same function with different port pin. how can i use same bsp_init function for another port pin . also i dont want to use any button.

Reply
  • Yeah Tht is all right . but i am using example ble_app_uart from SDK11->examples->ble-peripheral . in this example their is one function named buttons_leds_init(&erase_bonds); for initializing buttons and leds. in this function bsp_init(BSP_INIT_LED | BSP_INIT_BUTTONS) used . where BSP_INIT_LED is defined as (1 << 0) and BSP_INIT_BUTTONS defined as (1 << 1). LED1 on NRF52_DK is connected to P017 , how to initialize same function with different port pin. how can i use same bsp_init function for another port pin . also i dont want to use any button.

Children
No Data
Related