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

Pass additional data when sending to UART?

I know the things like the TWI allow you to send additional data when you instantiate a transacation. Is there any way to do a similar thing with UART?

I'd like to pass a pointer to a struct which would then enable me to read the UART data response that was received in main.c UART interrupt handler from within the other source file where the UART transaction originated.

Is there a way of doing this? I've tried by using an extern instead but not had much luck so far.

Parents
  • FormerMember
    0 FormerMember

    One way to make main.c receive the data from the UART interrupt handler is to make the UART interrupt handler pass UART events to another event handler in main.c, similar to what the peer manager module does: main.c receives relevant peer manager events in pm_evt_handler, see the example ble_app_gls.

Reply
  • FormerMember
    0 FormerMember

    One way to make main.c receive the data from the UART interrupt handler is to make the UART interrupt handler pass UART events to another event handler in main.c, similar to what the peer manager module does: main.c receives relevant peer manager events in pm_evt_handler, see the example ble_app_gls.

Children
No Data
Related