ATxmega128A1 chip-specific timer/counter definitions. More...
#include <assert.h>#include <stdbool.h>#include <stdint.h>#include <clk/sys.h>#include <regs/xmega_tc.h>Go to the source code of this file.
Functions | |
| static uint8_t | tc_get_sysclk_port (uint8_t tc_id) |
| Get the SYSCLK port for a specified tc_id. | |
| static uint8_t | tc_get_sysclk_id (uint8_t tc_id) |
| Get the SYSCLK ID for a specified tc_id. | |
| static void | tc_enable_pclk (uint8_t tc_id) |
| Enable the peripheral clock for a specified tc_id. | |
| static void | tc_disable_pclk (uint8_t tc_id) |
| Disable the peripheral clock for a specified tc_id. | |
| static bool | tc_pclk_is_enabled (uint8_t tc_id) |
| Return whether peripheral clock is enabled for a specified tc_id. | |
| static uint32_t | tc_get_pclk_hz (uint8_t tc_id) |
| Get the clock frequency for a specified tc_id. | |
ATxmega128A1 chip-specific timer/counter definitions.
Copyright (C) 2010 Atmel Corporation. All rights reserved.
Definition in file tc.h.
| static void tc_disable_pclk | ( | uint8_t | tc_id | ) | [inline, static] |
Disable the peripheral clock for a specified tc_id.
Definition at line 118 of file tc.h.
References sysclk_disable_module(), tc_get_sysclk_id(), and tc_get_sysclk_port().
| static void tc_enable_pclk | ( | uint8_t | tc_id | ) | [inline, static] |
Enable the peripheral clock for a specified tc_id.
Definition at line 109 of file tc.h.
References sysclk_enable_module(), tc_get_sysclk_id(), and tc_get_sysclk_port().
Get the clock frequency for a specified tc_id.
All TCs in this chip are connected to CLKper, which is the same frequency as CLKcpu. tc_id is therefore only defined as a parameter for code consistency across devices.
Get the SYSCLK ID for a specified tc_id.
Definition at line 85 of file tc.h.
References SYSCLK_TC0, SYSCLK_TC1, and unhandled_case.
Referenced by tc_disable_pclk(), tc_enable_pclk(), and tc_pclk_is_enabled().
Get the SYSCLK port for a specified tc_id.
Definition at line 57 of file tc.h.
References SYSCLK_PORT_C, SYSCLK_PORT_D, SYSCLK_PORT_E, SYSCLK_PORT_F, and unhandled_case.
Referenced by tc_disable_pclk(), tc_enable_pclk(), and tc_pclk_is_enabled().
| static bool tc_pclk_is_enabled | ( | uint8_t | tc_id | ) | [inline, static] |
Return whether peripheral clock is enabled for a specified tc_id.
Definition at line 127 of file tc.h.
References sysclk_module_is_enabled(), tc_get_sysclk_id(), and tc_get_sysclk_port().
1.6.3