Microchip® Advanced Software Framework

qs_rtc_count_basic.c File Reference

SAM RTC Basic Usage Example.

Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.

#include <asf.h>

Functions

void configure_rtc_count (void)
 [rtc_module_instance] More...
 
int main (void)
 [initiate] More...
 

Variables

struct rtc_module rtc_instance
 [rtc_module_instance] More...
 

void configure_rtc_count ( void  )

[rtc_module_instance]

rtc for event generator

[callback]

[setup_event_resource]

[initiate]

[setup_rtc]

[initialize_rtc]

set rtc clock prescaler and mode to generate overflow events

[set_conf]

[set_conf]

[get_default]

[get_default]

[set_config]

[set_config] [init_rtc]

[init_rtc]

[enable]

[enable]

References rtc_count_config::compare_values, rtc_count_config::mode, rtc_count_config::prescaler, rtc_count_enable(), rtc_count_get_config_defaults(), rtc_count_init(), RTC_COUNT_MODE_16BIT, RTC_COUNT_PRESCALER_DIV_1, and rtc_instance.

Referenced by main(), and run_dac_event_control_test().

int main ( void  )

[initiate]

[system]

[system]

[add_main]

[add_main]

[implementation_code] [period]

[period]

[main_loop]

[main_loop] [check_match]

[check_match] [compare_match_action]

[compare_match_action]

[clear_compare_match]

[clear_compare_match]

[implementation_code]

References configure_rtc_count(), port_pin_toggle_output_level(), rtc_count_clear_compare_match(), RTC_COUNT_COMPARE_0, rtc_count_is_compare_match(), rtc_count_set_period(), rtc_instance, and system_init().

struct rtc_module rtc_instance

[rtc_module_instance]