Frequency Meter Example for SAM4L.
Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.
#include "asf.h"
Macros | |
#define | GCLK_DIV 1 |
#define | GCLK_ID 0 |
GENCLK Configuration Value. More... | |
#define | GCLK_SOURCE GENCLK_SRC_CLK_CPU |
#define | STRING_EOL "\r" |
#define | STRING_HEADER |
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 |
Referenced by main().
#define GCLK_ID 0 |
GENCLK Configuration Value.
Referenced by main().
#define GCLK_SOURCE GENCLK_SRC_CLK_CPU |
Referenced by main().
#define STRING_EOL "\r" |
#define STRING_HEADER |
Referenced by main().
|
static |
Configure UART console.
References uart_rs232_options::baudrate, CONF_UART, CONF_UART_BAUDRATE, CONF_UART_CHAR_LENGTH, CONF_UART_PARITY, CONF_UART_STOP_BITS, and stdio_serial_init().
Referenced by main().
int main | ( | void | ) |
Application entry point for freqm example.
References board_init(), BOARD_OSC0_HZ, configure_console(), freqm_config::duration, FREQM_DURATION_DEFAULT, freqm_enable(), freqm_get_config_defaults(), freqm_get_result_blocking(), freqm_init(), freqm_start_measure(), g_freqm_cfg, g_freqm_inst, GCLK_DIV, GCLK_ID, GCLK_SOURCE, genclk_enable_config(), freqm_config::msr_clk, osc_disable(), osc_enable(), OSC_ID_OSC0, OSC_ID_RCSYS, OSC_RC32K_NOMINAL_HZ, OSC_RCSYS_NOMINAL_HZ, osc_wait_ready(), pll_config_init(), pll_enable(), PLL_SRC_OSC0, pll_wait_for_lock(), freqm_config::ref_clk, STATUS_OK, STRING_HEADER, and sysclk_init().
struct freqm_config g_freqm_cfg |
FREQM configuration.
Referenced by main().
struct freqm_dev_inst g_freqm_inst |
FREQM instance.
Referenced by main().