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