RTEMS: bsps/arm/atsam/include/libchip/include/same70/component/component_rtt.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
component_rtt.h
1/* ---------------------------------------------------------------------------- */
2/* Atmel Microcontroller Software Support */
3/* SAM Software Package License */
4/* ---------------------------------------------------------------------------- */
5/* Copyright (c) 2015, Atmel Corporation */
6/* */
7/* All rights reserved. */
8/* */
9/* Redistribution and use in source and binary forms, with or without */
10/* modification, are permitted provided that the following condition is met: */
11/* */
12/* - Redistributions of source code must retain the above copyright notice, */
13/* this list of conditions and the disclaimer below. */
14/* */
15/* Atmel's name may not be used to endorse or promote products derived from */
16/* this software without specific prior written permission. */
17/* */
18/* DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR */
19/* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
20/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE */
21/* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, */
22/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
23/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */
24/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
25/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */
26/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, */
27/* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
28/* ---------------------------------------------------------------------------- */
29
30#ifndef _SAME70_RTT_COMPONENT_
31#define _SAME70_RTT_COMPONENT_
32
33/* ============================================================================= */
35/* ============================================================================= */
38
39#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
41 typedef struct {
42 __IO uint32_t RTT_MR;
43 __IO uint32_t RTT_AR;
44 __I uint32_t RTT_VR;
45 __I uint32_t RTT_SR;
46} Rtt;
47#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
48/* -------- RTT_MR : (RTT Offset: 0x00) Mode Register -------- */
49#define RTT_MR_RTPRES_Pos 0
50#define RTT_MR_RTPRES_Msk (0xffffu << RTT_MR_RTPRES_Pos)
51#define RTT_MR_RTPRES(value) ((RTT_MR_RTPRES_Msk & ((value) << RTT_MR_RTPRES_Pos)))
52#define RTT_MR_ALMIEN (0x1u << 16)
53#define RTT_MR_RTTINCIEN (0x1u << 17)
54#define RTT_MR_RTTRST (0x1u << 18)
55#define RTT_MR_RTTDIS (0x1u << 20)
56#define RTT_MR_RTC1HZ (0x1u << 24)
57/* -------- RTT_AR : (RTT Offset: 0x04) Alarm Register -------- */
58#define RTT_AR_ALMV_Pos 0
59#define RTT_AR_ALMV_Msk (0xffffffffu << RTT_AR_ALMV_Pos)
60#define RTT_AR_ALMV(value) ((RTT_AR_ALMV_Msk & ((value) << RTT_AR_ALMV_Pos)))
61/* -------- RTT_VR : (RTT Offset: 0x08) Value Register -------- */
62#define RTT_VR_CRTV_Pos 0
63#define RTT_VR_CRTV_Msk (0xffffffffu << RTT_VR_CRTV_Pos)
64/* -------- RTT_SR : (RTT Offset: 0x0C) Status Register -------- */
65#define RTT_SR_ALMS (0x1u << 0)
66#define RTT_SR_RTTINC (0x1u << 1)
69
70
71#endif /* _SAME70_RTT_COMPONENT_ */
__IO
#define __IO
Definition: core_cm7.h:287
__I
#define __I
Definition: core_cm7.h:284
Rtt
Rtt hardware registers.
Definition: component_rtt.h:41
Rtt::RTT_MR
__IO uint32_t RTT_MR
(Rtt Offset: 0x00) Mode Register
Definition: component_rtt.h:42
Rtt::RTT_SR
__I uint32_t RTT_SR
(Rtt Offset: 0x0C) Status Register
Definition: component_rtt.h:45
Rtt::RTT_VR
__I uint32_t RTT_VR
(Rtt Offset: 0x08) Value Register
Definition: component_rtt.h:44
Rtt::RTT_AR
__IO uint32_t RTT_AR
(Rtt Offset: 0x04) Alarm Register
Definition: component_rtt.h:43