Microchip® Advanced Software Framework

events_example1.c File Reference

SAM Peripheral Event Controller (PEVC) example 1.

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

#include <asf.h>
#include <conf_example.h>
#include <events_example1.h>

Functions

static void configure_console (void)
 Configure serial console. More...
 
static void init_ast (void)
 Initialize the AST as event generator. More...
 
static void init_events (void)
 Initialize the PEVC for the example. More...
 
static void init_pdca (void)
 [quick_start_init_events_function] More...
 
int main (void)
 Main entry point for event example. More...
 
static void pdca_tranfer_done (enum pdca_channel_status status)
 PDCA transfer interrupt callback. More...
 

Variables

uint8_t event_string [] = "AST event triggered PDCA!"
 

static void configure_console ( void  )
static

Configure serial console.

References uart_rs232_options::baudrate, and stdio_serial_init().

Referenced by main().

static void init_events ( void  )
static

Initialize the PEVC for the example.

[quick_start_init_events_function]

Referenced by main().

static void init_pdca ( void  )
static

[quick_start_init_events_function]

Initialize the PDCA transfer for the example.

References pdca_channel_config_t::addr, event_string, pdca_channel_enable(), pdca_channel_set_callback(), pdca_channel_set_config(), pdca_enable(), pdca_tranfer_done(), and pdca_tx_configs.

Referenced by main().

int main ( void  )

Main entry point for event example.

[quick_start_init_all_basic_use]

[quick_start_init_ast_basic_use]

[quick_start_init_ast_basic_use]

[quick_start_init_events_basic_use]

[quick_start_init_events_basic_use]

[quick_start_init_pdca_basic_use]

[quick_start_init_pdca_basic_use] [quick_start_init_all_basic_use]

References board_init(), BOARD_NAME, configure_console(), delay_ms, init_ast(), init_events(), init_pdca(), and sysclk_init().

static void pdca_tranfer_done ( enum pdca_channel_status  status)
static

PDCA transfer interrupt callback.

References event_string, PDCA_CH_TRANSFER_COMPLETED, and pdca_channel_write_reload().

Referenced by init_pdca().

uint8_t event_string[] = "AST event triggered PDCA!"

Referenced by init_pdca(), and pdca_tranfer_done().