Microchip® Advanced Software Framework

ast_example2.c File Reference

SAM Asynchronous Timer (AST) example 2 alarm wakeup.

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

#include <asf.h>
#include "ast_example2.h"

Functions

static void ast_alarm_callback (void)
 Callback handler for AST alarm Interrupt. More...
 
static void config_ast (void)
 Configure timer. More...
 
static void config_wakeup (void)
 Configure the wake-up. More...
 
static void configure_console (void)
 Configure serial console. More...
 
static void display_menu (void)
 Display the user menu on the terminal. More...
 
int main (void)
 main function : do init and loop. More...
 

Variables

volatile bool flag = false
 

static void ast_alarm_callback ( void  )
static

Callback handler for AST alarm Interrupt.

References ast_disable_interrupt(), AST_INTERRUPT_ALARM, and flag.

Referenced by config_ast().

static void config_wakeup ( void  )
static

Configure the wake-up.

References bpm_enable_wakeup_source().

Referenced by main().

static void configure_console ( void  )
static

Configure serial console.

References uart_rs232_options::baudrate, and stdio_serial_init().

Referenced by main().

static void display_menu ( void  )
static

Display the user menu on the terminal.

Referenced by main().