Add some missign register defines. Reformat.
[bertos.git] / bertos / cpu / cortex-m3 / io / sam3_smc.h
index 7dc977e0bcc7d3132c7d68de3263b0e7254a634a..8998d8364e2801a5376d6f9b25cbed3f4777d912 100644 (file)
 #define NFC_CMD_CMD1           (0xFF <<  2)  ///< Command Register Value for Cycle 1
 #define NFC_CMD_CMD2           (0xFF << 10)  ///< Command Register Value for Cycle 2
 #define NFC_CMD_VCMD2          BV(18)        ///< Valid Cycle 2 Command
+#define NFC_CMD_ACYCLE_SHIFT   19
 #define NFC_CMD_ACYCLE_MASK    (0x7 << 19)   ///< Number of Address required for the current command
 #define NFC_CMD_ACYCLE_NONE    (0x0 << 19)   ///< No address cycle
 #define NFC_CMD_ACYCLE_ONE     (0x1 << 19)   ///< One address cycle
 #define NFC_CMD_ACYCLE_THREE   (0x3 << 19)   ///< Three address cycles
 #define NFC_CMD_ACYCLE_FOUR    (0x4 << 19)   ///< Four address cycles
 #define NFC_CMD_ACYCLE_FIVE    (0x5 << 19)   ///< Five address cycles
-#define NFC_CMD_CSID_MASK      (0x7 << 22)   ///< Chip Select Identifier
-#define NFC_CMD_CSID_0         (0x0 << 22)   ///< CS0
-#define NFC_CMD_CSID_1         (0x1 << 22)   ///< CS1
-#define NFC_CMD_CSID_2         (0x2 << 22)   ///< CS2
-#define NFC_CMD_CSID_3         (0x3 << 22)   ///< CS3
-#define NFC_CMD_CSID_4         (0x4 << 22)   ///< CS4
-#define NFC_CMD_CSID_5         (0x5 << 22)   ///< CS5
-#define NFC_CMD_CSID_6         (0x6 << 22)   ///< CS6
-#define NFC_CMD_CSID_7         (0x7 << 22)   ///< CS7
+#define NFC_CMD_CSID_SHIFT     22            ///< Chip Select shift
+#define NFC_CMD_CSID_MASK      (0x7 << NFC_CMD_CSID_SHIFT)   ///< Chip Select mask
 #define NFC_CMD_NFCEN          BV(25)        ///< NFC Enable
 #define NFC_CMD_NFCWR          BV(26)        ///< NFC Write Enable
 #define NFC_CMD_NFCCMD         BV(27)        ///< NFC Command Enable