how to generate app_uart_evt customly?

Hi Nordic Team,

Working Environment:

nRF52832 DK, nRF17.1.0 SDK, Keil uVision 5 IDE, Windowns10 pro PC.

I am working on ble_app_uart.c Peripheral example.

According to my understanding => Here when we press a keyboard button , the  'app_uart_evt' generated, so 'uart_evt_handler()'  function activated ,

collects  keyboard characters in 'data_array()'  and send to BLE connected device through NUS .

now, my requirement is , need to send characters by configuring development kit buttons . how can i acheive this.?

the 'bsp_event_t' configuration will not trigger uart_evt_handler().

any suggestions?

kind regards,

Deepthi

Parents
  • Hello Deepthi,

    now, my requirement is , need to send characters by configuring development kit buttons . how can i acheive this.?

    the 'bsp_event_t' configuration will not trigger uart_evt_handler().

    any suggestions?

    You can expand the functionality of the BSP module already in use in the application by using the bsp_event_to_button_action_assign to add events to different button actions as part of the buttons_leds_init function, and then adding specific handling of those events to the bsp_event_hander function that will be called when these events are generated.
    Here you can add the 'send characters' functionality, which will happen each time the specified button action happens.

    Best regards,
    Karl

Reply
  • Hello Deepthi,

    now, my requirement is , need to send characters by configuring development kit buttons . how can i acheive this.?

    the 'bsp_event_t' configuration will not trigger uart_evt_handler().

    any suggestions?

    You can expand the functionality of the BSP module already in use in the application by using the bsp_event_to_button_action_assign to add events to different button actions as part of the buttons_leds_init function, and then adding specific handling of those events to the bsp_event_hander function that will be called when these events are generated.
    Here you can add the 'send characters' functionality, which will happen each time the specified button action happens.

    Best regards,
    Karl

Children
Related