Microchip® Advanced Software Framework

clock_example2_sam.c File Reference

Clock system example 2.

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

#include "asf.h"
#include "genclk.h"
#include "conf_board.h"
#include "conf_example2.h"

Macros

#define GCLK_ID   GENCLK_PCK_0
 Programmable Clock ID for the example by default. More...
 

Functions

int main (void)
 Initialize the clock system and output the CPU clock on pin PCK0 (please refer to datasheet for PIN number). More...
 

#define GCLK_ID   GENCLK_PCK_0

Programmable Clock ID for the example by default.

Referenced by main().

int main ( void  )

Initialize the clock system and output the CPU clock on pin PCK0 (please refer to datasheet for PIN number).

Returns
Unused (ANSI-C compatibility).

References board_init(), GCLK_ID, GCLK_PIN, GCLK_PIN_MUX, genclk_config_defaults(), genclk_config_set_divider(), genclk_config_set_source(), genclk_enable(), ioport_disable_pin(), ioport_set_pin_mode(), and sysclk_init().