Robobo
component_efc.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_EFC_COMPONENT_
31 #define _SAM3XA_EFC_COMPONENT_
32 
33 /* ============================================================================= */
35 /* ============================================================================= */
38 
39 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
40 
41 typedef struct {
42  RwReg EEFC_FMR;
43  WoReg EEFC_FCR;
44  RoReg EEFC_FSR;
45  RoReg EEFC_FRR;
46 } Efc;
47 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
48 /* -------- EEFC_FMR : (EFC Offset: 0x00) EEFC Flash Mode Register -------- */
49 #define EEFC_FMR_FRDY (0x1u << 0)
50 #define EEFC_FMR_FWS_Pos 8
51 #define EEFC_FMR_FWS_Msk (0xfu << EEFC_FMR_FWS_Pos)
52 #define EEFC_FMR_FWS(value) ((EEFC_FMR_FWS_Msk & ((value) << EEFC_FMR_FWS_Pos)))
53 #define EEFC_FMR_SCOD (0x1u << 16)
54 #define EEFC_FMR_FAM (0x1u << 24)
55 /* -------- EEFC_FCR : (EFC Offset: 0x04) EEFC Flash Command Register -------- */
56 #define EEFC_FCR_FCMD_Pos 0
57 #define EEFC_FCR_FCMD_Msk (0xffu << EEFC_FCR_FCMD_Pos)
58 #define EEFC_FCR_FCMD(value) ((EEFC_FCR_FCMD_Msk & ((value) << EEFC_FCR_FCMD_Pos)))
59 #define EEFC_FCR_FARG_Pos 8
60 #define EEFC_FCR_FARG_Msk (0xffffu << EEFC_FCR_FARG_Pos)
61 #define EEFC_FCR_FARG(value) ((EEFC_FCR_FARG_Msk & ((value) << EEFC_FCR_FARG_Pos)))
62 #define EEFC_FCR_FKEY_Pos 24
63 #define EEFC_FCR_FKEY_Msk (0xffu << EEFC_FCR_FKEY_Pos)
64 #define EEFC_FCR_FKEY(value) ((EEFC_FCR_FKEY_Msk & ((value) << EEFC_FCR_FKEY_Pos)))
65 /* -------- EEFC_FSR : (EFC Offset: 0x08) EEFC Flash Status Register -------- */
66 #define EEFC_FSR_FRDY (0x1u << 0)
67 #define EEFC_FSR_FCMDE (0x1u << 1)
68 #define EEFC_FSR_FLOCKE (0x1u << 2)
69 /* -------- EEFC_FRR : (EFC Offset: 0x0C) EEFC Flash Result Register -------- */
70 #define EEFC_FRR_FVALUE_Pos 0
71 #define EEFC_FRR_FVALUE_Msk (0xffffffffu << EEFC_FRR_FVALUE_Pos)
74 
75 
76 #endif /* _SAM3XA_EFC_COMPONENT_ */
volatile uint32_t RwReg
Definition: sam3n00a.h:54
volatile uint32_t WoReg
Definition: sam3n00a.h:53
volatile const uint32_t RoReg
Definition: sam3n00a.h:49
Efc hardware registers.
Definition: component_efc.h:41