px-fwlib 0.10.0
Cross-platform embedded library and documentation for 8/16/32-bit microcontrollers generated with Doxygen 1.9.2
px_sysclk_cfg_template.h
1#ifndef __PX_SYSCLK_CFG_H__
2#define __PX_SYSCLK_CFG_H__
3/* =============================================================================
4 ____ ___ ____ ___ _ _ ___ __ __ ___ __ __ TM
5 | _ \ |_ _| / ___| / _ \ | \ | | / _ \ | \/ | |_ _| \ \/ /
6 | |_) | | | | | | | | | | \| | | | | | | |\/| | | | \ /
7 | __/ | | | |___ | |_| | | |\ | | |_| | | | | | | | / \
8 |_| |___| \____| \___/ |_| \_| \___/ |_| |_| |___| /_/\_\
9
10 Copyright (c) 2014 Pieter Conradie <https://piconomix.com>
11
12 License: MIT
13 https://github.com/piconomix/px-fwlib/blob/master/LICENSE.md
14
15 Title: px_sysclk_cfg.h : System Clock using a TMRx peripheral configuration
16 Author(s): Pieter Conradie
17 Creation Date: 2014-01-16
18
19============================================================================= */
20
21/**
22 * @addtogroup AVR_SYSCLK
23 *
24 * @{
25 */
26
27/* _____STANDARD INCLUDES____________________________________________________ */
28
29/* _____PROJECT INCLUDES_____________________________________________________ */
30#include "px_defs.h"
31//#include "px_rtc_util.h"
32
33/* _____DEFINITIONS__________________________________________________________ */
34/// The number of system clock ticks per second
35#define PX_SYSCLK_CFG_TICKS_PER_SEC 100ul
36
37/// Specify which TMR peripheral must be used
38#define PX_SYSCLK_CFG_USE_TMRX 2
39
40/// Specify TMR Prescaler
41#define PX_SYSCLK_CFG_TMR_PRESCALER 1024
42
43/// Specify periodic timeout (in sysclk ticks)
44#define PX_SYSCLK_CFG_TIMEOUT_PERIOD_TICKS PX_SYSCLK_CFG_TICKS_PER_SEC
45
46/// Specify function to call on periodic timeout
47//#define PX_SYSCLK_CFG_ON_PERIODIC_TIMEOUT() px_rtc_util_on_tick()
48
49/// @}
50#endif