Microchip® Advanced Software Framework

freqm_example.c File Reference

Frequency Meter Example for SAM4L.

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

#include "asf.h"

Macros

#define STRING_EOL   "\r"
 
#define STRING_HEADER
 
Example configuration
#define GCLK_ID   0
 Generic clock ID. More...
 
#define GCLK_SOURCE   GENCLK_SRC_CLK_CPU
 Generic clock source. More...
 
#define GCLK_DIV   1
 Generic clock divider. More...
 

Functions

static void configure_console (void)
 Configure UART console. More...
 
int main (void)
 Application entry point for freqm example. More...
 

Variables

struct freqm_config g_freqm_cfg
 FREQM configuration. More...
 
struct freqm_dev_inst g_freqm_inst
 FREQM instance. More...
 

#define GCLK_DIV   1

Generic clock divider.

This is how much the generic clock should divide the frequency of the configured clock source by.

Referenced by main().

#define GCLK_ID   0

Generic clock ID.

GENCLK Configuration Value.

This is the ID of the generic clock to use.

Referenced by main().

#define GCLK_SOURCE   GENCLK_SRC_CLK_CPU

Generic clock source.

This is the clock source to use for the generic clock.

Referenced by main().

#define STRING_EOL   "\r"
#define STRING_HEADER
Value:
"-- Freqm Example --\r\n" \
"-- "BOARD_NAME" --\r\n" \
"-- Compiled: "__DATE__" "__TIME__" --"STRING_EOL
#define BOARD_NAME
Definition: inc/app_init.h:140
#define STRING_EOL
Definition: freqm_example.c:77

Referenced by main().

static void configure_console ( void  )
static

Configure UART console.

References uart_rs232_options::baudrate, and stdio_serial_init().

Referenced by main().

struct freqm_config g_freqm_cfg

FREQM configuration.

struct freqm_dev_inst g_freqm_inst

FREQM instance.