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

Clarification about nrf-calaendar example

Hello,

I'm trying to integrate the nrf Calendar example here with Current Time Service client implementation on a nRF52840 DK.

I'm trying to understand the logic of the Calendar example.

Can someone explain the nrf_cal_set_callback function in nrf_calendar.c and what it does?

Thanks,

Parents
  • Hi

    All it does is allow you to get a callback at regular intervals, what to do in the callback is entirely up to you. 

    It's convenient if you want to do something with the time information at a regular rate (such as display it somewhere, or store it to flash), but you could also use the app_timer library for the same purpose. 

    Best regards
    Torbjørn

Reply
  • Hi

    All it does is allow you to get a callback at regular intervals, what to do in the callback is entirely up to you. 

    It's convenient if you want to do something with the time information at a regular rate (such as display it somewhere, or store it to flash), but you could also use the app_timer library for the same purpose. 

    Best regards
    Torbjørn

Children
Related