SAM Event System Driver Quick Start.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
#include <asf.h>
#include "conf_qs_events_interrupt_hook.h"
Functions | |
static void | configure_event_channel (struct events_resource *resource) |
static void | configure_event_interrupt (struct events_resource *resource, struct events_hook *hook) |
static void | configure_event_user (struct events_resource *resource) |
static void | configure_tc (struct tc_module *tc_instance) |
void | event_counter (struct events_resource *resource) |
[setup_14] More... | |
int | main (void) |
[setup_14] More... | |
Variables | |
static volatile uint32_t | event_count = 0 |
[setup] More... | |
|
static |
[setup_1]
[setup_1]
[setup_2]
[setup_2]
[setup_3]
[setup_3]
[setup_4]
[setup_4]
References events_config::clock_source, events_config::edge_detect, events_allocate(), EVENTS_EDGE_DETECT_RISING, events_get_config_defaults(), EVENTS_PATH_SYNCHRONOUS, GCLK_GENERATOR_0, events_config::generator, and events_config::path.
Referenced by main().
|
static |
[setup_12]
[setup_12]
[setup_13]
[setup_13]
References event_counter(), events_add_hook(), events_create_hook(), events_enable_interrupt_source(), and EVENTS_INTERRUPT_DETECT.
Referenced by main().
|
static |
|
static |
[setup_6]
[setup_6]
[setup_7]
[setup_7]
[setup_8]
[setup_8]
[setup_9]
[setup_9]
[setup_10]
[setup_10]
[setup_11]
[setup_11]
References tc_config::clock_prescaler, tc_config::clock_source, tc_config::counter_size, GCLK_GENERATOR_1, tc_events::generate_event_on_overflow, TC_CLOCK_PRESCALER_DIV64, TC_COUNTER_SIZE_8BIT, tc_enable(), tc_enable_events(), tc_get_config_defaults(), tc_init(), TC_WAVE_GENERATION_NORMAL_FREQ, and tc_config::wave_generation.
Referenced by main().
void event_counter | ( | struct events_resource * | resource | ) |
[setup_14]
References event_count, events_ack_interrupt(), EVENTS_INTERRUPT_DETECT, events_is_interrupt_set(), and port_pin_toggle_output_level().
Referenced by configure_event_interrupt().
int main | ( | void | ) |
[setup_14]
[setup]
[setup_init]
[setup_init]
[main]
[main_1]
[main_1]
[main_2]
[main_2]
[main]
References configure_event_channel(), configure_event_interrupt(), configure_event_user(), configure_tc(), events_is_busy(), system_init(), system_interrupt_enable_global(), and tc_start_counter().
|
static |
[setup]
Referenced by event_counter().