NRF51822 Timer use

Source: Internet
Author: User

1, Timers_init ();

  void  Timers_init (void  ) {uint32_t err_        Code  //  Initialize timer module  app_ Timer_init (App_timer_prescaler, App_timer_max_timers, app_timer_op_queue_size,         False  );  //  Create timers  Err_code = App_ Timer_create (&m_battery_timer_id, App_timer_mode_repeat  ED, battery_level_meas_timeout_handler ); 
App_error_check (err_code);  
Err_code = App_timer_start (m_battery_timer_id, battery_level_meas_interval, NULL);

App_error_check (Err_code);

    App_error_check (Err_code);  }  
Battery_level_meas_timeout_handler for timer processing functions
Battery_level_meas_interval for timing interval  (macro definition)

Static void Battery_level_meas_timeout_handler (void * p_context)  {      (void  ) P_context;     // User Code }  

NRF51822 Timer use

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.