mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Starting point for the SAMD20 demo.
This commit is contained in:
parent
111283a9b2
commit
013a3ef944
|
@ -0,0 +1,20 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Atmel Studio Solution File, Format Version 11.00
|
||||
Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "RTOSDemo", "RTOSDemo\RTOSDemo.cproj", "{2A475B6A-78B0-4237-8947-341BD379AB5C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|ARM = Debug|ARM
|
||||
Release|ARM = Release|ARM
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{2A475B6A-78B0-4237-8947-341BD379AB5C}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{2A475B6A-78B0-4237-8947-341BD379AB5C}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{2A475B6A-78B0-4237-8947-341BD379AB5C}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{2A475B6A-78B0-4237-8947-341BD379AB5C}.Release|ARM.Build.0 = Release|ARM
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
BIN
FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo.atsuo
Normal file
BIN
FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo.atsuo
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,347 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Standard board header file.
|
||||
*
|
||||
* This file includes the appropriate board header file according to the
|
||||
* defined board (parameter BOARD).
|
||||
*
|
||||
* Copyright (c) 2009-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _BOARD_H_
|
||||
#define _BOARD_H_
|
||||
|
||||
/**
|
||||
* \defgroup group_common_boards Generic board support
|
||||
*
|
||||
* The generic board support module includes board-specific definitions
|
||||
* and function prototypes, such as the board initialization function.
|
||||
*
|
||||
* \{
|
||||
*/
|
||||
|
||||
#include "compiler.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/*! \name Base Boards
|
||||
*/
|
||||
//! @{
|
||||
#define EVK1100 1 //!< AT32UC3A EVK1100 board.
|
||||
#define EVK1101 2 //!< AT32UC3B EVK1101 board.
|
||||
#define UC3C_EK 3 //!< AT32UC3C UC3C_EK board.
|
||||
#define EVK1104 4 //!< AT32UC3A3 EVK1104 board.
|
||||
#define EVK1105 5 //!< AT32UC3A EVK1105 board.
|
||||
#define STK600_RCUC3L0 6 //!< STK600 RCUC3L0 board.
|
||||
#define UC3L_EK 7 //!< AT32UC3L-EK board.
|
||||
#define XPLAIN 8 //!< ATxmega128A1 Xplain board.
|
||||
#define STK600_RC064X 10 //!< ATxmega256A3 STK600 board.
|
||||
#define STK600_RC100X 11 //!< ATxmega128A1 STK600 board.
|
||||
#define UC3_A3_XPLAINED 13 //!< ATUC3A3 UC3-A3 Xplained board.
|
||||
#define UC3_L0_XPLAINED 15 //!< ATUC3L0 UC3-L0 Xplained board.
|
||||
#define STK600_RCUC3D 16 //!< STK600 RCUC3D board.
|
||||
#define STK600_RCUC3C0 17 //!< STK600 RCUC3C board.
|
||||
#define XMEGA_B1_XPLAINED 18 //!< ATxmega128B1 Xplained board.
|
||||
#define XMEGA_A1_XPLAINED 19 //!< ATxmega128A1 Xplain-A1 board.
|
||||
#define STK600_RCUC3L4 21 //!< ATUCL4 STK600 board
|
||||
#define UC3_L0_XPLAINED_BC 22 //!< ATUC3L0 UC3-L0 Xplained board controller board
|
||||
#define MEGA1284P_XPLAINED_BC 23 //!< ATmega1284P-Xplained board controller board
|
||||
#define STK600_RC044X 24 //!< STK600 with RC044X routing card board.
|
||||
#define STK600_RCUC3B0 25 //!< STK600 RCUC3B0 board.
|
||||
#define UC3_L0_QT600 26 //!< QT600 UC3L0 MCU board.
|
||||
#define XMEGA_A3BU_XPLAINED 27 //!< ATxmega256A3BU Xplained board.
|
||||
#define STK600_RC064X_LCDX 28 //!< XMEGAB3 STK600 RC064X LCDX board.
|
||||
#define STK600_RC100X_LCDX 29 //!< XMEGAB1 STK600 RC100X LCDX board.
|
||||
#define UC3B_BOARD_CONTROLLER 30 //!< AT32UC3B1 board controller for Atmel boards
|
||||
#define RZ600 31 //!< AT32UC3A RZ600 MCU board
|
||||
#define SAM3S_EK 32 //!< SAM3S-EK board.
|
||||
#define SAM3U_EK 33 //!< SAM3U-EK board.
|
||||
#define SAM3X_EK 34 //!< SAM3X-EK board.
|
||||
#define SAM3N_EK 35 //!< SAM3N-EK board.
|
||||
#define SAM3S_EK2 36 //!< SAM3S-EK2 board.
|
||||
#define SAM4S_EK 37 //!< SAM4S-EK board.
|
||||
#define STK600_RCUC3A0 38 //!< STK600 RCUC3A0 board.
|
||||
#define STK600_MEGA 39 //!< STK600 MEGA board.
|
||||
#define MEGA_1284P_XPLAINED 40 //!< ATmega1284P Xplained board.
|
||||
#define SAM4S_XPLAINED 41 //!< SAM4S Xplained board.
|
||||
#define ATXMEGA128A1_QT600 42 //!< QT600 ATXMEGA128A1 MCU board.
|
||||
#define ARDUINO_DUE_X 43 //!< Arduino Due/X board.
|
||||
#define STK600_RCUC3L3 44 //!< ATUCL3 STK600 board
|
||||
#define SAM4L_EK 45 //!< SAM4L-EK board.
|
||||
#define STK600_MEGA_RF 46 //!< STK600 MEGA RF EVK board.
|
||||
#define XMEGA_C3_XPLAINED 47 //!< ATxmega384C3 Xplained board.
|
||||
#define STK600_RC032X 48 //!< STK600 with RC032X routing card board.
|
||||
#define SAM4S_EK2 49 //!< SAM4S-EK2 board.
|
||||
#define XMEGA_E5_XPLAINED 50 //!< ATxmega32E5 Xplained board.
|
||||
#define SAM4E_EK 51 //!< SAM4E-EK board.
|
||||
#define ATMEGA256RFR2_XPLAINED_PRO 52 //!< ATmega256RFR2 Xplained Pro board.
|
||||
#define SAM4S_XPLAINED_PRO 53 //!< SAM4S Xplained Pro board.
|
||||
#define SAM4L_XPLAINED_PRO 54 //!< SAM4L Xplained Pro board.
|
||||
#define ATMEGA256RFR2_ZIGBIT 55 //!< ATmega256RFR2 zigbit
|
||||
#define XMEGA_RF233_ZIGBIT 56 //!< ATxmega256A3U with AT86RF233 zigbit
|
||||
#define XMEGA_RF212B_ZIGBIT 57 //!< ATxmega256A3U with AT86RF212B zigbit
|
||||
#define SAM4S_WPIR_RD 58 //!< SAM4S-WPIR-RD board.
|
||||
#define SAMD20_XPLAINED_PRO 59 //!< SAMD20 Xplained PRO board
|
||||
#define SAM4L8_XPLAINED_PRO 60 //!< SAM4L8 Xplained Pro board.
|
||||
#define SAM4N_XPLAINED_PRO 61 //!< SAM4N-XPLAINED-PRO board.
|
||||
#define XMEGA_A3_REB_CBB 62 //!< SAM4L8 Xplained Pro board.
|
||||
#define ATMEGARFX_RCB 63 //!< RFR2 & RFA1 RCB
|
||||
#define SIMULATOR_XMEGA_A1 97 //!< Simulator for XMEGA A1 devices
|
||||
#define AVR_SIMULATOR_UC3 98 //!< AVR SIMULATOR for AVR UC3 device family.
|
||||
#define USER_BOARD 99 //!< User-reserved board (if any).
|
||||
#define DUMMY_BOARD 100 //!< Dummy board to support board-independent applications (e.g. bootloader)
|
||||
//! @}
|
||||
|
||||
/*! \name Extension Boards
|
||||
*/
|
||||
//! @{
|
||||
#define EXT1102 1 //!< AT32UC3B EXT1102 board
|
||||
#define MC300 2 //!< AT32UC3 MC300 board
|
||||
#define SENSORS_XPLAINED_INERTIAL_1 3 //!< Xplained inertial sensor board 1
|
||||
#define SENSORS_XPLAINED_INERTIAL_2 4 //!< Xplained inertial sensor board 2
|
||||
#define SENSORS_XPLAINED_PRESSURE_1 5 //!< Xplained pressure sensor board
|
||||
#define SENSORS_XPLAINED_LIGHTPROX_1 6 //!< Xplained light & proximity sensor board
|
||||
#define SENSORS_XPLAINED_INERTIAL_A1 7 //!< Xplained inertial sensor board "A"
|
||||
#define RZ600_AT86RF231 8 //!< AT86RF231 RF board in RZ600
|
||||
#define RZ600_AT86RF230B 9 //!< AT86RF230B RF board in RZ600
|
||||
#define RZ600_AT86RF212 10 //!< AT86RF212 RF board in RZ600
|
||||
#define SENSORS_XPLAINED_BREADBOARD 11 //!< Xplained sensor development breadboard
|
||||
#define SECURITY_XPLAINED 12 //!< Xplained ATSHA204 board
|
||||
#define USER_EXT_BOARD 99 //!< User-reserved extension board (if any).
|
||||
//! @}
|
||||
|
||||
#if BOARD == EVK1100
|
||||
# include "evk1100/evk1100.h"
|
||||
#elif BOARD == EVK1101
|
||||
# include "evk1101/evk1101.h"
|
||||
#elif BOARD == UC3C_EK
|
||||
# include "uc3c_ek/uc3c_ek.h"
|
||||
#elif BOARD == EVK1104
|
||||
# include "evk1104/evk1104.h"
|
||||
#elif BOARD == EVK1105
|
||||
# include "evk1105/evk1105.h"
|
||||
#elif BOARD == STK600_RCUC3L0
|
||||
# include "stk600/rcuc3l0/stk600_rcuc3l0.h"
|
||||
#elif BOARD == UC3L_EK
|
||||
# include "uc3l_ek/uc3l_ek.h"
|
||||
#elif BOARD == STK600_RCUC3L4
|
||||
# include "stk600/rcuc3l4/stk600_rcuc3l4.h"
|
||||
#elif BOARD == XPLAIN
|
||||
# include "xplain/xplain.h"
|
||||
#elif BOARD == STK600_MEGA
|
||||
/*No header-file to include*/
|
||||
#elif BOARD == STK600_MEGA_RF
|
||||
# include "stk600.h"
|
||||
#elif BOARD == ATMEGA256RFR2_XPLAINED_PRO
|
||||
# include "atmega256rfr2_xplained_pro/atmega256rfr2_xplained_pro.h"
|
||||
#elif BOARD == ATMEGA256RFR2_ZIGBIT
|
||||
# include "atmega256rfr2_zigbit/atmega256rfr2_zigbit.h"
|
||||
#elif BOARD == STK600_RC032X
|
||||
# include "stk600/rc032x/stk600_rc032x.h"
|
||||
#elif BOARD == STK600_RC044X
|
||||
# include "stk600/rc044x/stk600_rc044x.h"
|
||||
#elif BOARD == STK600_RC064X
|
||||
# include "stk600/rc064x/stk600_rc064x.h"
|
||||
#elif BOARD == STK600_RC100X
|
||||
# include "stk600/rc100x/stk600_rc100x.h"
|
||||
#elif BOARD == UC3_A3_XPLAINED
|
||||
# include "uc3_a3_xplained/uc3_a3_xplained.h"
|
||||
#elif BOARD == UC3_L0_XPLAINED
|
||||
# include "uc3_l0_xplained/uc3_l0_xplained.h"
|
||||
#elif BOARD == STK600_RCUC3B0
|
||||
# include "stk600/rcuc3b0/stk600_rcuc3b0.h"
|
||||
#elif BOARD == STK600_RCUC3D
|
||||
# include "stk600/rcuc3d/stk600_rcuc3d.h"
|
||||
#elif BOARD == STK600_RCUC3C0
|
||||
# include "stk600/rcuc3c0/stk600_rcuc3c0.h"
|
||||
#elif BOARD == XMEGA_B1_XPLAINED
|
||||
# include "xmega_b1_xplained/xmega_b1_xplained.h"
|
||||
#elif BOARD == STK600_RC064X_LCDX
|
||||
# include "stk600/rc064x_lcdx/stk600_rc064x_lcdx.h"
|
||||
#elif BOARD == STK600_RC100X_LCDX
|
||||
# include "stk600/rc100x_lcdx/stk600_rc100x_lcdx.h"
|
||||
#elif BOARD == XMEGA_A1_XPLAINED
|
||||
# include "xmega_a1_xplained/xmega_a1_xplained.h"
|
||||
#elif BOARD == UC3_L0_XPLAINED_BC
|
||||
# include "uc3_l0_xplained_bc/uc3_l0_xplained_bc.h"
|
||||
#elif BOARD == SAM3S_EK
|
||||
# include "sam3s_ek/sam3s_ek.h"
|
||||
# include "system_sam3s.h"
|
||||
#elif BOARD == SAM3S_EK2
|
||||
# include "sam3s_ek2/sam3s_ek2.h"
|
||||
# include "system_sam3sd8.h"
|
||||
#elif BOARD == SAM3U_EK
|
||||
# include "sam3u_ek/sam3u_ek.h"
|
||||
# include "system_sam3u.h"
|
||||
#elif BOARD == SAM3X_EK
|
||||
# include "sam3x_ek/sam3x_ek.h"
|
||||
# include "system_sam3x.h"
|
||||
#elif BOARD == SAM3N_EK
|
||||
# include "sam3n_ek/sam3n_ek.h"
|
||||
# include "system_sam3n.h"
|
||||
#elif BOARD == SAM4S_EK
|
||||
# include "sam4s_ek/sam4s_ek.h"
|
||||
# include "system_sam4s.h"
|
||||
#elif BOARD == SAM4S_WPIR_RD
|
||||
# include "sam4s_wpir_rd/sam4s_wpir_rd.h"
|
||||
# include "system_sam4s.h"
|
||||
#elif BOARD == SAM4S_XPLAINED
|
||||
# include "sam4s_xplained/sam4s_xplained.h"
|
||||
# include "system_sam4s.h"
|
||||
#elif BOARD == SAM4S_EK2
|
||||
# include "sam4s_ek2/sam4s_ek2.h"
|
||||
# include "system_sam4s.h"
|
||||
#elif BOARD == MEGA_1284P_XPLAINED
|
||||
/*No header-file to include*/
|
||||
#elif BOARD == ARDUINO_DUE_X
|
||||
# include "arduino_due_x/arduino_due_x.h"
|
||||
# include "system_sam3x.h"
|
||||
#elif BOARD == SAM4L_EK
|
||||
# include "sam4l_ek/sam4l_ek.h"
|
||||
#elif BOARD == SAM4E_EK
|
||||
# include "sam4e_ek/sam4e_ek.h"
|
||||
#elif BOARD == SAMD20_XPLAINED_PRO
|
||||
# include "samd20_xplained_pro/samd20_xplained_pro.h"
|
||||
#elif BOARD == SAM4N_XPLAINED_PRO
|
||||
# include "sam4n_xplained_pro/sam4n_xplained_pro.h"
|
||||
#elif BOARD == MEGA1284P_XPLAINED_BC
|
||||
# include "mega1284p_xplained_bc/mega1284p_xplained_bc.h"
|
||||
#elif BOARD == UC3_L0_QT600
|
||||
# include "uc3_l0_qt600/uc3_l0_qt600.h"
|
||||
#elif BOARD == XMEGA_A3BU_XPLAINED
|
||||
# include "xmega_a3bu_xplained/xmega_a3bu_xplained.h"
|
||||
#elif BOARD == XMEGA_E5_XPLAINED
|
||||
# include "xmega_e5_xplained/xmega_e5_xplained.h"
|
||||
#elif BOARD == UC3B_BOARD_CONTROLLER
|
||||
# include "uc3b_board_controller/uc3b_board_controller.h"
|
||||
#elif BOARD == RZ600
|
||||
# include "rz600/rz600.h"
|
||||
#elif BOARD == STK600_RCUC3A0
|
||||
# include "stk600/rcuc3a0/stk600_rcuc3a0.h"
|
||||
#elif BOARD == ATXMEGA128A1_QT600
|
||||
# include "atxmega128a1_qt600/atxmega128a1_qt600.h"
|
||||
#elif BOARD == STK600_RCUC3L3
|
||||
# include "stk600/rcuc3l3/stk600_rcuc3l3.h"
|
||||
#elif BOARD == SAM4S_XPLAINED_PRO
|
||||
# include "sam4s_xplained_pro/sam4s_xplained_pro.h"
|
||||
#elif BOARD == SAM4L_XPLAINED_PRO
|
||||
# include "sam4l_xplained_pro/sam4l_xplained_pro.h"
|
||||
#elif BOARD == SAM4L8_XPLAINED_PRO
|
||||
# include "sam4l8_xplained_pro/sam4l8_xplained_pro.h"
|
||||
#elif BOARD == SIMULATOR_XMEGA_A1
|
||||
# include "simulator/xmega_a1/simulator_xmega_a1.h"
|
||||
#elif BOARD == XMEGA_C3_XPLAINED
|
||||
# include "xmega_c3_xplained/xmega_c3_xplained.h"
|
||||
#elif BOARD == XMEGA_RF233_ZIGBIT
|
||||
# include "xmega_rf233_zigbit/xmega_rf233_zigbit.h"
|
||||
#elif BOARD == XMEGA_A3_REB_CBB
|
||||
# include "xmega_a3_reb_cbb/xmega_a3_reb_cbb.h"
|
||||
#elif BOARD == ATMEGARFX_RCB
|
||||
# include "atmegarfx_rcb/atmegarfx_rcb.h"
|
||||
#elif BOARD == XMEGA_RF212B_ZIGBIT
|
||||
# include "xmega_rf212b_zigbit/xmega_rf212b_zigbit.h"
|
||||
#elif BOARD == AVR_SIMULATOR_UC3
|
||||
# include "avr_simulator_uc3/avr_simulator_uc3.h"
|
||||
#elif BOARD == USER_BOARD
|
||||
// User-reserved area: #include the header file of your board here (if any).
|
||||
# include "user_board.h"
|
||||
#elif BOARD == DUMMY_BOARD
|
||||
# include "dummy/dummy_board.h"
|
||||
#else
|
||||
# error No known Atmel board defined
|
||||
#endif
|
||||
|
||||
#if (defined EXT_BOARD)
|
||||
# if EXT_BOARD == MC300
|
||||
# include "mc300/mc300.h"
|
||||
# elif (EXT_BOARD == SENSORS_XPLAINED_INERTIAL_1) || \
|
||||
(EXT_BOARD == SENSORS_XPLAINED_INERTIAL_2) || \
|
||||
(EXT_BOARD == SENSORS_XPLAINED_INERTIAL_A1) || \
|
||||
(EXT_BOARD == SENSORS_XPLAINED_PRESSURE_1) || \
|
||||
(EXT_BOARD == SENSORS_XPLAINED_LIGHTPROX_1) || \
|
||||
(EXT_BOARD == SENSORS_XPLAINED_BREADBOARD)
|
||||
# include "sensors_xplained/sensors_xplained.h"
|
||||
# elif EXT_BOARD == RZ600_AT86RF231
|
||||
# include "at86rf231/at86rf231.h"
|
||||
# elif EXT_BOARD == RZ600_AT86RF230B
|
||||
# include "at86rf230b/at86rf230b.h"
|
||||
# elif EXT_BOARD == RZ600_AT86RF212
|
||||
# include "at86rf212/at86rf212.h"
|
||||
# elif EXT_BOARD == SECURITY_XPLAINED
|
||||
# include "security_xplained.h"
|
||||
# elif EXT_BOARD == USER_EXT_BOARD
|
||||
// User-reserved area: #include the header file of your extension board here
|
||||
// (if any).
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
#if (defined(__GNUC__) && defined(__AVR32__)) || (defined(__ICCAVR32__) || defined(__AAVR32__))
|
||||
#ifdef __AVR32_ABI_COMPILER__ // Automatically defined when compiling for AVR32, not when assembling.
|
||||
|
||||
/*! \brief This function initializes the board target resources
|
||||
*
|
||||
* This function should be called to ensure proper initialization of the target
|
||||
* board hardware connected to the part.
|
||||
*/
|
||||
extern void board_init(void);
|
||||
|
||||
#endif // #ifdef __AVR32_ABI_COMPILER__
|
||||
#else
|
||||
/*! \brief This function initializes the board target resources
|
||||
*
|
||||
* This function should be called to ensure proper initialization of the target
|
||||
* board hardware connected to the part.
|
||||
*/
|
||||
extern void board_init(void);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#endif // _BOARD_H_
|
|
@ -0,0 +1,138 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief USART Serial wrapper service for the SAM D20 devices.
|
||||
*
|
||||
* Copyright (c) 2009-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
#ifndef _USART_SERIAL_H_
|
||||
#define _USART_SERIAL_H_
|
||||
|
||||
#include "compiler.h"
|
||||
#ifndef SAMD20
|
||||
# include "sysclk.h"
|
||||
#endif
|
||||
#include "status_codes.h"
|
||||
#include "usart.h"
|
||||
|
||||
/*! \name Serial Management Configuration
|
||||
*/
|
||||
//! @{
|
||||
//#include "conf_usart_serial.h"
|
||||
//! @}
|
||||
|
||||
typedef Sercom * usart_inst_t;
|
||||
|
||||
struct usart_module usart;
|
||||
|
||||
/*! \brief Initializes the Usart in master mode.
|
||||
*
|
||||
* \param usart Base address of the USART instance.
|
||||
* \param options Options needed to set up RS232 communication (see \ref usart_serial_options_t).
|
||||
*
|
||||
* \retval true if the initialization was successful
|
||||
* \retval false if initialization failed (error in baud rate calculation)
|
||||
*/
|
||||
static inline bool usart_serial_init(struct usart_module *const module,
|
||||
usart_inst_t const hw, const struct usart_config *const config)
|
||||
{
|
||||
if (usart_init(module, hw, config) == STATUS_OK) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/*! \brief Sends a character with the USART.
|
||||
*
|
||||
* \param usart Base address of the USART instance.
|
||||
* \param c Character to write.
|
||||
*
|
||||
* \return Status code
|
||||
*/
|
||||
static inline enum status_code usart_serial_putchar(struct usart_module *const module,
|
||||
uint8_t c)
|
||||
{
|
||||
return usart_write_wait(module, c);
|
||||
}
|
||||
/*! \brief Waits until a character is received, and returns it.
|
||||
*
|
||||
* \param usart Base address of the USART instance.
|
||||
* \param data Data to read
|
||||
*
|
||||
*/
|
||||
static inline void usart_serial_getchar(struct usart_module *const module,
|
||||
uint8_t *c)
|
||||
{
|
||||
uint16_t temp;
|
||||
|
||||
usart_read_wait(module, &temp);
|
||||
|
||||
*c = temp;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Send a sequence of bytes to USART device
|
||||
*
|
||||
* \param usart Base address of the USART instance.
|
||||
* \param data Data buffer to read
|
||||
* \param len Length of data
|
||||
*
|
||||
*/
|
||||
static inline enum status_code usart_serial_write_packet(struct usart_module *const module,
|
||||
const uint8_t *tx_data, uint16_t length)
|
||||
{
|
||||
return usart_write_buffer_wait(module, tx_data, length);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Receive a sequence of bytes from USART device
|
||||
*
|
||||
* \param usart Base address of the USART instance.
|
||||
* \param data Data buffer to write
|
||||
* \param len Length of data
|
||||
*
|
||||
*/
|
||||
static inline enum status_code usart_serial_read_packet(struct usart_module *const module,
|
||||
uint8_t *rx_data, uint16_t length)
|
||||
{
|
||||
return usart_read_buffer_wait(module, rx_data, length);
|
||||
}
|
||||
|
||||
#endif // _USART_SERIAL_H_
|
|
@ -0,0 +1,266 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Serial Mode management
|
||||
*
|
||||
* Copyright (c) 2010 - 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
#ifndef SERIAL_H_INCLUDED
|
||||
#define SERIAL_H_INCLUDED
|
||||
|
||||
#include <parts.h>
|
||||
#include "status_codes.h"
|
||||
|
||||
/**
|
||||
* \typedef usart_if
|
||||
*
|
||||
* This type can be used independently to refer to USART module for the
|
||||
* architecture used. It refers to the correct type definition for the
|
||||
* architecture, ie. USART_t* for XMEGA or avr32_usart_t* for UC3.
|
||||
*/
|
||||
|
||||
#if XMEGA
|
||||
# include "xmega_usart/usart_serial.h"
|
||||
#elif MEGA_RF
|
||||
# include "megarf_usart/usart_serial.h"
|
||||
#elif UC3
|
||||
# include "uc3_usart/usart_serial.h"
|
||||
#elif SAMD20
|
||||
#include "sam0_usart/usart_serial.h"
|
||||
#elif SAM
|
||||
# include "sam_uart/uart_serial.h"
|
||||
#else
|
||||
# error Unsupported chip type
|
||||
#endif
|
||||
|
||||
/**
|
||||
*
|
||||
* \defgroup serial_group Serial Interface (Serial)
|
||||
*
|
||||
* See \ref serial_quickstart.
|
||||
*
|
||||
* This is the common API for serial interface. Additional features are available
|
||||
* in the documentation of the specific modules.
|
||||
*
|
||||
* \section serial_group_platform Platform Dependencies
|
||||
*
|
||||
* The serial API is partially chip- or platform-specific. While all
|
||||
* platforms provide mostly the same functionality, there are some
|
||||
* variations around how different bus types and clock tree structures
|
||||
* are handled.
|
||||
*
|
||||
* The following functions are available on all platforms, but there may
|
||||
* be variations in the function signature (i.e. parameters) and
|
||||
* behaviour. These functions are typically called by platform-specific
|
||||
* parts of drivers, and applications that aren't intended to be
|
||||
* portable:
|
||||
* - usart_serial_init()
|
||||
* - usart_serial_putchar()
|
||||
* - usart_serial_getchar()
|
||||
* - usart_serial_write_packet()
|
||||
* - usart_serial_read_packet()
|
||||
*
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
//! @}
|
||||
|
||||
/**
|
||||
* \page serial_quickstart Quick start guide for Serial Interface service
|
||||
*
|
||||
* This is the quick start guide for the \ref serial_group "Serial Interface module", with
|
||||
* step-by-step instructions on how to configure and use the serial in a
|
||||
* selection of use cases.
|
||||
*
|
||||
* The use cases contain several code fragments. The code fragments in the
|
||||
* steps for setup can be copied into a custom initialization function, while
|
||||
* the steps for usage can be copied into, e.g., the main application function.
|
||||
*
|
||||
* \section serial_use_cases Serial use cases
|
||||
* - \ref serial_basic_use_case
|
||||
* - \subpage serial_use_case_1
|
||||
*
|
||||
* \section serial_basic_use_case Basic use case - transmit a character
|
||||
* In this use case, the serial module is configured for:
|
||||
* - Using USARTD0
|
||||
* - Baudrate: 9600
|
||||
* - Character length: 8 bit
|
||||
* - Parity mode: Disabled
|
||||
* - Stop bit: None
|
||||
* - RS232 mode
|
||||
*
|
||||
* The use case waits for a received character on the configured USART and
|
||||
* echoes the character back to the same USART.
|
||||
*
|
||||
* \section serial_basic_use_case_setup Setup steps
|
||||
*
|
||||
* \subsection serial_basic_use_case_setup_prereq Prerequisites
|
||||
* -# \ref sysclk_group "System Clock Management (sysclk)"
|
||||
*
|
||||
* \subsection serial_basic_use_case_setup_code Example code
|
||||
* The following configuration must be added to the project (typically to a
|
||||
* conf_serial.h file, but it can also be added to your main application file.)
|
||||
* \code
|
||||
* #define USART_SERIAL &USARTD0
|
||||
* #define USART_SERIAL_BAUDRATE 9600
|
||||
* #define USART_SERIAL_CHAR_LENGTH USART_CHSIZE_8BIT_gc
|
||||
* #define USART_SERIAL_PARITY USART_PMODE_DISABLED_gc
|
||||
* #define USART_SERIAL_STOP_BIT false
|
||||
* \endcode
|
||||
*
|
||||
* A variable for the received byte must be added:
|
||||
* \code uint8_t received_byte; \endcode
|
||||
*
|
||||
* Add to application initialization:
|
||||
* \code
|
||||
* sysclk_init();
|
||||
*
|
||||
* static usart_serial_options_t usart_options = {
|
||||
* .baudrate = USART_SERIAL_BAUDRATE,
|
||||
* .charlength = USART_SERIAL_CHAR_LENGTH,
|
||||
* .paritytype = USART_SERIAL_PARITY,
|
||||
* .stopbits = USART_SERIAL_STOP_BIT
|
||||
* };
|
||||
*
|
||||
* usart_serial_init(USART_SERIAL, &usart_options);
|
||||
* \endcode
|
||||
*
|
||||
* \subsection serial_basic_use_case_setup_flow Workflow
|
||||
* -# Initialize system clock:
|
||||
* - \code sysclk_init(); \endcode
|
||||
* -# Create serial USART options struct:
|
||||
* - \code
|
||||
* static usart_serial_options_t usart_options = {
|
||||
* .baudrate = USART_SERIAL_BAUDRATE,
|
||||
* .charlength = USART_SERIAL_CHAR_LENGTH,
|
||||
* .paritytype = USART_SERIAL_PARITY,
|
||||
* .stopbits = USART_SERIAL_STOP_BIT
|
||||
* };
|
||||
* \endcode
|
||||
* -# Initialize the serial service:
|
||||
* - \code usart_serial_init(USART_SERIAL, &usart_options);\endcode
|
||||
*
|
||||
* \section serial_basic_use_case_usage Usage steps
|
||||
*
|
||||
* \subsection serial_basic_use_case_usage_code Example code
|
||||
* Add to application C-file:
|
||||
* \code
|
||||
* usart_serial_getchar(USART_SERIAL, &received_byte);
|
||||
* usart_serial_putchar(USART_SERIAL, received_byte);
|
||||
* \endcode
|
||||
*
|
||||
* \subsection serial_basic_use_case_usage_flow Workflow
|
||||
* -# Wait for reception of a character:
|
||||
* - \code usart_serial_getchar(USART_SERIAL, &received_byte); \endcode
|
||||
* -# Echo the character back:
|
||||
* - \code usart_serial_putchar(USART_SERIAL, received_byte); \endcode
|
||||
*/
|
||||
|
||||
/**
|
||||
* \page serial_use_case_1 Advanced use case - Send a packet of serial data
|
||||
*
|
||||
* In this use case, the USART module is configured for:
|
||||
* - Using USARTD0
|
||||
* - Baudrate: 9600
|
||||
* - Character length: 8 bit
|
||||
* - Parity mode: Disabled
|
||||
* - Stop bit: None
|
||||
* - RS232 mode
|
||||
*
|
||||
* The use case sends a string of text through the USART.
|
||||
*
|
||||
* \section serial_use_case_1_setup Setup steps
|
||||
*
|
||||
* \subsection serial_use_case_1_setup_prereq Prerequisites
|
||||
* -# \ref sysclk_group "System Clock Management (sysclk)"
|
||||
*
|
||||
* \subsection serial_use_case_1_setup_code Example code
|
||||
* The following configuration must be added to the project (typically to a
|
||||
* conf_serial.h file, but it can also be added to your main application file.):
|
||||
* \code
|
||||
* #define USART_SERIAL &USARTD0
|
||||
* #define USART_SERIAL_BAUDRATE 9600
|
||||
* #define USART_SERIAL_CHAR_LENGTH USART_CHSIZE_8BIT_gc
|
||||
* #define USART_SERIAL_PARITY USART_PMODE_DISABLED_gc
|
||||
* #define USART_SERIAL_STOP_BIT false
|
||||
* \endcode
|
||||
*
|
||||
* Add to application initialization:
|
||||
* \code
|
||||
* sysclk_init();
|
||||
*
|
||||
* static usart_serial_options_t usart_options = {
|
||||
* .baudrate = USART_SERIAL_BAUDRATE,
|
||||
* .charlength = USART_SERIAL_CHAR_LENGTH,
|
||||
* .paritytype = USART_SERIAL_PARITY,
|
||||
* .stopbits = USART_SERIAL_STOP_BIT
|
||||
* };
|
||||
*
|
||||
* usart_serial_init(USART_SERIAL, &usart_options);
|
||||
* \endcode
|
||||
*
|
||||
* \subsection serial_use_case_1_setup_flow Workflow
|
||||
* -# Initialize system clock:
|
||||
* - \code sysclk_init(); \endcode
|
||||
* -# Create USART options struct:
|
||||
* - \code
|
||||
* static usart_serial_options_t usart_options = {
|
||||
* .baudrate = USART_SERIAL_BAUDRATE,
|
||||
* .charlength = USART_SERIAL_CHAR_LENGTH,
|
||||
* .paritytype = USART_SERIAL_PARITY,
|
||||
* .stopbits = USART_SERIAL_STOP_BIT
|
||||
* };
|
||||
* \endcode
|
||||
* -# Initialize in RS232 mode:
|
||||
* - \code usart_serial_init(USART_SERIAL_EXAMPLE, &usart_options); \endcode
|
||||
*
|
||||
* \section serial_use_case_1_usage Usage steps
|
||||
*
|
||||
* \subsection serial_use_case_1_usage_code Example code
|
||||
* Add to, e.g., main loop in application C-file:
|
||||
* \code
|
||||
* usart_serial_write_packet(USART_SERIAL, "Test String", strlen("Test String"));
|
||||
* \endcode
|
||||
*
|
||||
* \subsection serial_use_case_1_usage_flow Workflow
|
||||
* -# Write a string of text to the USART:
|
||||
* - \code usart_serial_write_packet(USART_SERIAL, "Test String", strlen("Test String")); \endcode
|
||||
*/
|
||||
|
||||
#endif /* SERIAL_H_INCLUDED */
|
|
@ -0,0 +1,139 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Global interrupt management for 8- and 32-bit AVR
|
||||
*
|
||||
* Copyright (c) 2010-2012 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
#ifndef UTILS_INTERRUPT_H
|
||||
#define UTILS_INTERRUPT_H
|
||||
|
||||
#include <parts.h>
|
||||
|
||||
#if XMEGA || MEGA || TINY
|
||||
# include "interrupt/interrupt_avr8.h"
|
||||
#elif UC3
|
||||
# include "interrupt/interrupt_avr32.h"
|
||||
#elif SAM3S || SAM3N || SAM3XA || SAM3U || SAM4S || SAM4L || SAM4E || SAMD20 || SAM
|
||||
# include "interrupt/interrupt_sam_nvic.h"
|
||||
#else
|
||||
# error Unsupported device.
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \defgroup interrupt_group Global interrupt management
|
||||
*
|
||||
* This is a driver for global enabling and disabling of interrupts.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
#if defined(__DOXYGEN__)
|
||||
/**
|
||||
* \def CONFIG_INTERRUPT_FORCE_INTC
|
||||
* \brief Force usage of the ASF INTC driver
|
||||
*
|
||||
* Predefine this symbol when preprocessing to force the use of the ASF INTC driver.
|
||||
* This is useful to ensure compatibility across compilers and shall be used only when required
|
||||
* by the application needs.
|
||||
*/
|
||||
# define CONFIG_INTERRUPT_FORCE_INTC
|
||||
#endif
|
||||
|
||||
//! \name Global interrupt flags
|
||||
//@{
|
||||
/**
|
||||
* \typedef irqflags_t
|
||||
* \brief Type used for holding state of interrupt flag
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def cpu_irq_enable
|
||||
* \brief Enable interrupts globally
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def cpu_irq_disable
|
||||
* \brief Disable interrupts globally
|
||||
*/
|
||||
|
||||
/**
|
||||
* \fn irqflags_t cpu_irq_save(void)
|
||||
* \brief Get and clear the global interrupt flags
|
||||
*
|
||||
* Use in conjunction with \ref cpu_irq_restore.
|
||||
*
|
||||
* \return Current state of interrupt flags.
|
||||
*
|
||||
* \note This function leaves interrupts disabled.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \fn void cpu_irq_restore(irqflags_t flags)
|
||||
* \brief Restore global interrupt flags
|
||||
*
|
||||
* Use in conjunction with \ref cpu_irq_save.
|
||||
*
|
||||
* \param flags State to set interrupt flag to.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \fn bool cpu_irq_is_enabled_flags(irqflags_t flags)
|
||||
* \brief Check if interrupts are globally enabled in supplied flags
|
||||
*
|
||||
* \param flags Currents state of interrupt flags.
|
||||
*
|
||||
* \return True if interrupts are enabled.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def cpu_irq_is_enabled
|
||||
* \brief Check if interrupts are globally enabled
|
||||
*
|
||||
* \return True if interrupts are enabled.
|
||||
*/
|
||||
//@}
|
||||
|
||||
//! @}
|
||||
|
||||
/**
|
||||
* \ingroup interrupt_group
|
||||
* \defgroup interrupt_deprecated_group Deprecated interrupt definitions
|
||||
*/
|
||||
|
||||
#endif /* UTILS_INTERRUPT_H */
|
|
@ -0,0 +1,83 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Global interrupt management for SAM D20, SAM3 and SAM4 (NVIC based)
|
||||
*
|
||||
* Copyright (c) 2012-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#include "interrupt_sam_nvic.h"
|
||||
|
||||
#if !defined(__DOXYGEN__)
|
||||
/* Deprecated - global flag to determine the global interrupt state. Required by
|
||||
* QTouch library, however new applications should use cpu_irq_is_enabled()
|
||||
* which probes the true global interrupt state from the CPU special registers.
|
||||
*/
|
||||
volatile bool g_interrupt_enabled = true;
|
||||
#endif
|
||||
|
||||
void cpu_irq_enter_critical(void)
|
||||
{
|
||||
if (cpu_irq_critical_section_counter == 0) {
|
||||
if (cpu_irq_is_enabled()) {
|
||||
cpu_irq_disable();
|
||||
cpu_irq_prev_interrupt_state = true;
|
||||
} else {
|
||||
/* Make sure the to save the prev state as false */
|
||||
cpu_irq_prev_interrupt_state = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
cpu_irq_critical_section_counter++;
|
||||
}
|
||||
|
||||
void cpu_irq_leave_critical(void)
|
||||
{
|
||||
/* Check if the user is trying to leave a critical section when not in a critical section */
|
||||
Assert(cpu_irq_critical_section_counter > 0);
|
||||
|
||||
cpu_irq_critical_section_counter--;
|
||||
|
||||
/* Only enable global interrupts when the counter reaches 0 and the state of the global interrupt flag
|
||||
was enabled when entering critical state */
|
||||
if ((cpu_irq_critical_section_counter == 0) && (cpu_irq_prev_interrupt_state)) {
|
||||
cpu_irq_enable();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,178 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Global interrupt management for SAM D20, SAM3 and SAM4 (NVIC based)
|
||||
*
|
||||
* Copyright (c) 2012-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef UTILS_INTERRUPT_INTERRUPT_H
|
||||
#define UTILS_INTERRUPT_INTERRUPT_H
|
||||
|
||||
#include <compiler.h>
|
||||
#include <parts.h>
|
||||
|
||||
/**
|
||||
* \weakgroup interrupt_group
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \name Interrupt Service Routine definition
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Define service routine
|
||||
*
|
||||
* \note For NVIC devices the interrupt service routines are predefined to
|
||||
* add to vector table in binary generation, so there is no service
|
||||
* register at run time. The routine collections are in exceptions.h.
|
||||
*
|
||||
* Usage:
|
||||
* \code
|
||||
* ISR(foo_irq_handler)
|
||||
* {
|
||||
* // Function definition
|
||||
* ...
|
||||
* }
|
||||
* \endcode
|
||||
*
|
||||
* \param func Name for the function.
|
||||
*/
|
||||
# define ISR(func) \
|
||||
void func (void)
|
||||
|
||||
/**
|
||||
* \brief Initialize interrupt vectors
|
||||
*
|
||||
* For NVIC the interrupt vectors are put in vector table. So nothing
|
||||
* to do to initialize them, except defined the vector function with
|
||||
* right name.
|
||||
*
|
||||
* This must be called prior to \ref irq_register_handler.
|
||||
*/
|
||||
# define irq_initialize_vectors() \
|
||||
do { \
|
||||
} while(0)
|
||||
|
||||
/**
|
||||
* \brief Register handler for interrupt
|
||||
*
|
||||
* For NVIC the interrupt vectors are put in vector table. So nothing
|
||||
* to do to register them, except defined the vector function with
|
||||
* right name.
|
||||
*
|
||||
* Usage:
|
||||
* \code
|
||||
* irq_initialize_vectors();
|
||||
* irq_register_handler(foo_irq_handler);
|
||||
* \endcode
|
||||
*
|
||||
* \note The function \a func must be defined with the \ref ISR macro.
|
||||
* \note The functions prototypes can be found in the device exception header
|
||||
* files (exceptions.h).
|
||||
*/
|
||||
# define irq_register_handler(int_num, int_prio) \
|
||||
NVIC_ClearPendingIRQ( (IRQn_Type)int_num); \
|
||||
NVIC_SetPriority( (IRQn_Type)int_num, int_prio); \
|
||||
NVIC_EnableIRQ( (IRQn_Type)int_num); \
|
||||
|
||||
//@}
|
||||
|
||||
# define cpu_irq_enable() \
|
||||
do { \
|
||||
g_interrupt_enabled = true; \
|
||||
__DMB(); \
|
||||
__enable_irq(); \
|
||||
} while (0)
|
||||
# define cpu_irq_disable() \
|
||||
do { \
|
||||
__disable_irq(); \
|
||||
__DMB(); \
|
||||
g_interrupt_enabled = false; \
|
||||
} while (0)
|
||||
|
||||
typedef uint32_t irqflags_t;
|
||||
|
||||
#if !defined(__DOXYGEN__)
|
||||
extern volatile bool g_interrupt_enabled;
|
||||
#endif
|
||||
|
||||
#define cpu_irq_is_enabled() (__get_PRIMASK() == 0)
|
||||
|
||||
static volatile uint32_t cpu_irq_critical_section_counter;
|
||||
static volatile bool cpu_irq_prev_interrupt_state;
|
||||
|
||||
static inline irqflags_t cpu_irq_save(void)
|
||||
{
|
||||
irqflags_t flags = cpu_irq_is_enabled();
|
||||
cpu_irq_disable();
|
||||
return flags;
|
||||
}
|
||||
|
||||
static inline bool cpu_irq_is_enabled_flags(irqflags_t flags)
|
||||
{
|
||||
return (flags);
|
||||
}
|
||||
|
||||
static inline void cpu_irq_restore(irqflags_t flags)
|
||||
{
|
||||
if (cpu_irq_is_enabled_flags(flags))
|
||||
cpu_irq_enable();
|
||||
}
|
||||
|
||||
void cpu_irq_enter_critical(void);
|
||||
void cpu_irq_leave_critical(void);
|
||||
|
||||
/**
|
||||
* \weakgroup interrupt_deprecated_group
|
||||
* @{
|
||||
*/
|
||||
|
||||
#define Enable_global_interrupt() cpu_irq_enable()
|
||||
#define Disable_global_interrupt() cpu_irq_disable()
|
||||
#define Is_global_interrupt_enabled() cpu_irq_is_enabled()
|
||||
|
||||
//@}
|
||||
|
||||
//@}
|
||||
|
||||
#endif /* UTILS_INTERRUPT_INTERRUPT_H */
|
|
@ -0,0 +1,949 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Atmel part identification macros
|
||||
*
|
||||
* Copyright (C) 2012-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ATMEL_PARTS_H
|
||||
#define ATMEL_PARTS_H
|
||||
|
||||
/**
|
||||
* \defgroup part_macros_group Atmel part identification macros
|
||||
*
|
||||
* This collection of macros identify which series and families that the various
|
||||
* Atmel parts belong to. These can be used to select part-dependent sections of
|
||||
* code at compile time.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \name Convenience macros for part checking
|
||||
* @{
|
||||
*/
|
||||
/* ! Check GCC and IAR part definition for 8-bit AVR */
|
||||
#define AVR8_PART_IS_DEFINED(part) \
|
||||
(defined(__ ## part ## __) || defined(__AVR_ ## part ## __))
|
||||
|
||||
/* ! Check GCC and IAR part definition for 32-bit AVR */
|
||||
#define AVR32_PART_IS_DEFINED(part) \
|
||||
(defined(__AT32 ## part ## __) || defined(__AVR32_ ## part ## __))
|
||||
|
||||
/* ! Check GCC and IAR part definition for SAM */
|
||||
#define SAM_PART_IS_DEFINED(part) (defined(__ ## part ## __))
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \defgroup uc3_part_macros_group AVR UC3 parts
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \name AVR UC3 A series
|
||||
* @{
|
||||
*/
|
||||
#define UC3A0 ( \
|
||||
AVR32_PART_IS_DEFINED(UC3A0128) || \
|
||||
AVR32_PART_IS_DEFINED(UC3A0256) || \
|
||||
AVR32_PART_IS_DEFINED(UC3A0512) \
|
||||
)
|
||||
|
||||
#define UC3A1 ( \
|
||||
AVR32_PART_IS_DEFINED(UC3A1128) || \
|
||||
AVR32_PART_IS_DEFINED(UC3A1256) || \
|
||||
AVR32_PART_IS_DEFINED(UC3A1512) \
|
||||
)
|
||||
|
||||
#define UC3A3 ( \
|
||||
AVR32_PART_IS_DEFINED(UC3A364) || \
|
||||
AVR32_PART_IS_DEFINED(UC3A364S) || \
|
||||
AVR32_PART_IS_DEFINED(UC3A3128) || \
|
||||
AVR32_PART_IS_DEFINED(UC3A3128S) || \
|
||||
AVR32_PART_IS_DEFINED(UC3A3256) || \
|
||||
AVR32_PART_IS_DEFINED(UC3A3256S) \
|
||||
)
|
||||
|
||||
#define UC3A4 ( \
|
||||
AVR32_PART_IS_DEFINED(UC3A464) || \
|
||||
AVR32_PART_IS_DEFINED(UC3A464S) || \
|
||||
AVR32_PART_IS_DEFINED(UC3A4128) || \
|
||||
AVR32_PART_IS_DEFINED(UC3A4128S) || \
|
||||
AVR32_PART_IS_DEFINED(UC3A4256) || \
|
||||
AVR32_PART_IS_DEFINED(UC3A4256S) \
|
||||
)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name AVR UC3 B series
|
||||
* @{
|
||||
*/
|
||||
#define UC3B0 ( \
|
||||
AVR32_PART_IS_DEFINED(UC3B064) || \
|
||||
AVR32_PART_IS_DEFINED(UC3B0128) || \
|
||||
AVR32_PART_IS_DEFINED(UC3B0256) || \
|
||||
AVR32_PART_IS_DEFINED(UC3B0512) \
|
||||
)
|
||||
|
||||
#define UC3B1 ( \
|
||||
AVR32_PART_IS_DEFINED(UC3B164) || \
|
||||
AVR32_PART_IS_DEFINED(UC3B1128) || \
|
||||
AVR32_PART_IS_DEFINED(UC3B1256) || \
|
||||
AVR32_PART_IS_DEFINED(UC3B1512) \
|
||||
)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name AVR UC3 C series
|
||||
* @{
|
||||
*/
|
||||
#define UC3C0 ( \
|
||||
AVR32_PART_IS_DEFINED(UC3C064C) || \
|
||||
AVR32_PART_IS_DEFINED(UC3C0128C) || \
|
||||
AVR32_PART_IS_DEFINED(UC3C0256C) || \
|
||||
AVR32_PART_IS_DEFINED(UC3C0512C) \
|
||||
)
|
||||
|
||||
#define UC3C1 ( \
|
||||
AVR32_PART_IS_DEFINED(UC3C164C) || \
|
||||
AVR32_PART_IS_DEFINED(UC3C1128C) || \
|
||||
AVR32_PART_IS_DEFINED(UC3C1256C) || \
|
||||
AVR32_PART_IS_DEFINED(UC3C1512C) \
|
||||
)
|
||||
|
||||
#define UC3C2 ( \
|
||||
AVR32_PART_IS_DEFINED(UC3C264C) || \
|
||||
AVR32_PART_IS_DEFINED(UC3C2128C) || \
|
||||
AVR32_PART_IS_DEFINED(UC3C2256C) || \
|
||||
AVR32_PART_IS_DEFINED(UC3C2512C) \
|
||||
)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name AVR UC3 D series
|
||||
* @{
|
||||
*/
|
||||
#define UC3D3 ( \
|
||||
AVR32_PART_IS_DEFINED(UC64D3) || \
|
||||
AVR32_PART_IS_DEFINED(UC128D3) \
|
||||
)
|
||||
|
||||
#define UC3D4 ( \
|
||||
AVR32_PART_IS_DEFINED(UC64D4) || \
|
||||
AVR32_PART_IS_DEFINED(UC128D4) \
|
||||
)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name AVR UC3 L series
|
||||
* @{
|
||||
*/
|
||||
#define UC3L0 ( \
|
||||
AVR32_PART_IS_DEFINED(UC3L016) || \
|
||||
AVR32_PART_IS_DEFINED(UC3L032) || \
|
||||
AVR32_PART_IS_DEFINED(UC3L064) \
|
||||
)
|
||||
|
||||
#define UC3L0128 ( \
|
||||
AVR32_PART_IS_DEFINED(UC3L0128) \
|
||||
)
|
||||
|
||||
#define UC3L0256 ( \
|
||||
AVR32_PART_IS_DEFINED(UC3L0256) \
|
||||
)
|
||||
|
||||
#define UC3L3 ( \
|
||||
AVR32_PART_IS_DEFINED(UC64L3U) || \
|
||||
AVR32_PART_IS_DEFINED(UC128L3U) || \
|
||||
AVR32_PART_IS_DEFINED(UC256L3U) \
|
||||
)
|
||||
|
||||
#define UC3L4 ( \
|
||||
AVR32_PART_IS_DEFINED(UC64L4U) || \
|
||||
AVR32_PART_IS_DEFINED(UC128L4U) || \
|
||||
AVR32_PART_IS_DEFINED(UC256L4U) \
|
||||
)
|
||||
|
||||
#define UC3L3_L4 (UC3L3 || UC3L4)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name AVR UC3 families
|
||||
* @{
|
||||
*/
|
||||
/** AVR UC3 A family */
|
||||
#define UC3A (UC3A0 || UC3A1 || UC3A3 || UC3A4)
|
||||
|
||||
/** AVR UC3 B family */
|
||||
#define UC3B (UC3B0 || UC3B1)
|
||||
|
||||
/** AVR UC3 C family */
|
||||
#define UC3C (UC3C0 || UC3C1 || UC3C2)
|
||||
|
||||
/** AVR UC3 D family */
|
||||
#define UC3D (UC3D3 || UC3D4)
|
||||
|
||||
/** AVR UC3 L family */
|
||||
#define UC3L (UC3L0 || UC3L0128 || UC3L0256 || UC3L3_L4)
|
||||
/** @} */
|
||||
|
||||
/** AVR UC3 product line */
|
||||
#define UC3 (UC3A || UC3B || UC3C || UC3D || UC3L)
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \defgroup xmega_part_macros_group AVR XMEGA parts
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \name AVR XMEGA A series
|
||||
* @{
|
||||
*/
|
||||
#define XMEGA_A1 ( \
|
||||
AVR8_PART_IS_DEFINED(ATxmega64A1) || \
|
||||
AVR8_PART_IS_DEFINED(ATxmega128A1) \
|
||||
)
|
||||
|
||||
#define XMEGA_A3 ( \
|
||||
AVR8_PART_IS_DEFINED(ATxmega64A3) || \
|
||||
AVR8_PART_IS_DEFINED(ATxmega128A3) || \
|
||||
AVR8_PART_IS_DEFINED(ATxmega192A3) || \
|
||||
AVR8_PART_IS_DEFINED(ATxmega256A3) \
|
||||
)
|
||||
|
||||
#define XMEGA_A3B ( \
|
||||
AVR8_PART_IS_DEFINED(ATxmega256A3B) \
|
||||
)
|
||||
|
||||
#define XMEGA_A4 ( \
|
||||
AVR8_PART_IS_DEFINED(ATxmega16A4) || \
|
||||
AVR8_PART_IS_DEFINED(ATxmega32A4) \
|
||||
)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name AVR XMEGA AU series
|
||||
* @{
|
||||
*/
|
||||
#define XMEGA_A1U ( \
|
||||
AVR8_PART_IS_DEFINED(ATxmega64A1U) || \
|
||||
AVR8_PART_IS_DEFINED(ATxmega128A1U) \
|
||||
)
|
||||
|
||||
#define XMEGA_A3U ( \
|
||||
AVR8_PART_IS_DEFINED(ATxmega64A3U) || \
|
||||
AVR8_PART_IS_DEFINED(ATxmega128A3U) || \
|
||||
AVR8_PART_IS_DEFINED(ATxmega192A3U) || \
|
||||
AVR8_PART_IS_DEFINED(ATxmega256A3U) \
|
||||
)
|
||||
|
||||
#define XMEGA_A3BU ( \
|
||||
AVR8_PART_IS_DEFINED(ATxmega256A3BU) \
|
||||
)
|
||||
|
||||
#define XMEGA_A4U ( \
|
||||
AVR8_PART_IS_DEFINED(ATxmega16A4U) || \
|
||||
AVR8_PART_IS_DEFINED(ATxmega32A4U) || \
|
||||
AVR8_PART_IS_DEFINED(ATxmega64A4U) || \
|
||||
AVR8_PART_IS_DEFINED(ATxmega128A4U) \
|
||||
)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name AVR XMEGA B series
|
||||
* @{
|
||||
*/
|
||||
#define XMEGA_B1 ( \
|
||||
AVR8_PART_IS_DEFINED(ATxmega64B1) || \
|
||||
AVR8_PART_IS_DEFINED(ATxmega128B1) \
|
||||
)
|
||||
|
||||
#define XMEGA_B3 ( \
|
||||
AVR8_PART_IS_DEFINED(ATxmega64B3) || \
|
||||
AVR8_PART_IS_DEFINED(ATxmega128B3) \
|
||||
)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name AVR XMEGA C series
|
||||
* @{
|
||||
*/
|
||||
#define XMEGA_C3 ( \
|
||||
AVR8_PART_IS_DEFINED(ATxmega384C3) || \
|
||||
AVR8_PART_IS_DEFINED(ATxmega256C3) || \
|
||||
AVR8_PART_IS_DEFINED(ATxmega192C3) || \
|
||||
AVR8_PART_IS_DEFINED(ATxmega128C3) || \
|
||||
AVR8_PART_IS_DEFINED(ATxmega64C3) \
|
||||
)
|
||||
|
||||
#define XMEGA_C4 ( \
|
||||
AVR8_PART_IS_DEFINED(ATxmega32C4) || \
|
||||
AVR8_PART_IS_DEFINED(ATxmega16C4) \
|
||||
)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name AVR XMEGA D series
|
||||
* @{
|
||||
*/
|
||||
#define XMEGA_D3 ( \
|
||||
AVR8_PART_IS_DEFINED(ATxmega64D3) || \
|
||||
AVR8_PART_IS_DEFINED(ATxmega128D3) || \
|
||||
AVR8_PART_IS_DEFINED(ATxmega192D3) || \
|
||||
AVR8_PART_IS_DEFINED(ATxmega256D3) || \
|
||||
AVR8_PART_IS_DEFINED(ATxmega384D3) \
|
||||
)
|
||||
|
||||
#define XMEGA_D4 ( \
|
||||
AVR8_PART_IS_DEFINED(ATxmega16D4) || \
|
||||
AVR8_PART_IS_DEFINED(ATxmega32D4) || \
|
||||
AVR8_PART_IS_DEFINED(ATxmega64D4) || \
|
||||
AVR8_PART_IS_DEFINED(ATxmega128D4) \
|
||||
)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name AVR XMEGA E series
|
||||
* @{
|
||||
*/
|
||||
#define XMEGA_E5 ( \
|
||||
AVR8_PART_IS_DEFINED(ATxmega8E5) || \
|
||||
AVR8_PART_IS_DEFINED(ATxmega16E5) || \
|
||||
AVR8_PART_IS_DEFINED(ATxmega32E5) \
|
||||
)
|
||||
/** @} */
|
||||
|
||||
|
||||
/**
|
||||
* \name AVR XMEGA families
|
||||
* @{
|
||||
*/
|
||||
/** AVR XMEGA A family */
|
||||
#define XMEGA_A (XMEGA_A1 || XMEGA_A3 || XMEGA_A3B || XMEGA_A4)
|
||||
|
||||
/** AVR XMEGA AU family */
|
||||
#define XMEGA_AU (XMEGA_A1U || XMEGA_A3U || XMEGA_A3BU || XMEGA_A4U)
|
||||
|
||||
/** AVR XMEGA B family */
|
||||
#define XMEGA_B (XMEGA_B1 || XMEGA_B3)
|
||||
|
||||
/** AVR XMEGA C family */
|
||||
#define XMEGA_C (XMEGA_C3 || XMEGA_C4)
|
||||
|
||||
/** AVR XMEGA D family */
|
||||
#define XMEGA_D (XMEGA_D3 || XMEGA_D4)
|
||||
|
||||
/** AVR XMEGA E family */
|
||||
#define XMEGA_E (XMEGA_E5)
|
||||
/** @} */
|
||||
|
||||
|
||||
/** AVR XMEGA product line */
|
||||
#define XMEGA (XMEGA_A || XMEGA_AU || XMEGA_B || XMEGA_C || XMEGA_D || XMEGA_E)
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \defgroup mega_part_macros_group megaAVR parts
|
||||
*
|
||||
* \note These megaAVR groupings are based on the groups in AVR Libc for the
|
||||
* part header files. They are not names of official megaAVR device series or
|
||||
* families.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \name ATmegaxx0/xx1 subgroups
|
||||
* @{
|
||||
*/
|
||||
#define MEGA_XX0 ( \
|
||||
AVR8_PART_IS_DEFINED(ATmega640) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega1280) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega2560) \
|
||||
)
|
||||
|
||||
#define MEGA_XX1 ( \
|
||||
AVR8_PART_IS_DEFINED(ATmega1281) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega2561) \
|
||||
)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name megaAVR groups
|
||||
* @{
|
||||
*/
|
||||
/** ATmegaxx0/xx1 group */
|
||||
#define MEGA_XX0_1 (MEGA_XX0 || MEGA_XX1)
|
||||
|
||||
/** ATmegaxx4 group */
|
||||
#define MEGA_XX4 ( \
|
||||
AVR8_PART_IS_DEFINED(ATmega164A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega164PA) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega324A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega324PA) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega644) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega644A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega644PA) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega1284P) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega128RFA1) \
|
||||
)
|
||||
|
||||
/** ATmegaxx4 group */
|
||||
#define MEGA_XX4_A ( \
|
||||
AVR8_PART_IS_DEFINED(ATmega164A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega164PA) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega324A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega324PA) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega644A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega644PA) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega1284P) \
|
||||
)
|
||||
|
||||
/** ATmegaxx8 group */
|
||||
#define MEGA_XX8 ( \
|
||||
AVR8_PART_IS_DEFINED(ATmega48) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega48A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega48PA) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega88) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega88A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega88PA) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega168) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega168A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega168PA) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega328) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega328P) \
|
||||
)
|
||||
|
||||
/** ATmegaxx8A/P/PA group */
|
||||
#define MEGA_XX8_A ( \
|
||||
AVR8_PART_IS_DEFINED(ATmega48A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega48PA) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega88A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega88PA) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega168A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega168PA) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega328P) \
|
||||
)
|
||||
|
||||
/** ATmegaxx group */
|
||||
#define MEGA_XX ( \
|
||||
AVR8_PART_IS_DEFINED(ATmega16) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega16A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega32) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega32A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega64) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega64A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega128) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega128A) \
|
||||
)
|
||||
|
||||
/** ATmegaxxA/P/PA group */
|
||||
#define MEGA_XX_A ( \
|
||||
AVR8_PART_IS_DEFINED(ATmega16A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega32A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega64A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega128A) \
|
||||
)
|
||||
/** ATmegaxxRFA1 group */
|
||||
#define MEGA_RFA1 ( \
|
||||
AVR8_PART_IS_DEFINED(ATmega128RFA1) \
|
||||
)
|
||||
|
||||
/** ATmegaxxRFR2 group */
|
||||
#define MEGA_RFR2 ( \
|
||||
AVR8_PART_IS_DEFINED(ATmega64RFR2) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega128RFR2) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega256RFR2) \
|
||||
)
|
||||
|
||||
|
||||
/** ATmegaxxRFxx group */
|
||||
#define MEGA_RF (MEGA_RFA1 || MEGA_RFR2)
|
||||
|
||||
/**
|
||||
* \name ATmegaxx_un0/un1/un2 subgroups
|
||||
* @{
|
||||
*/
|
||||
#define MEGA_XX_UN0 ( \
|
||||
AVR8_PART_IS_DEFINED(ATmega16) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega16A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega32) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega32A) \
|
||||
)
|
||||
|
||||
/** ATmegaxx group without power reduction and
|
||||
* And interrupt sense register.
|
||||
*/
|
||||
#define MEGA_XX_UN1 ( \
|
||||
AVR8_PART_IS_DEFINED(ATmega64) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega64A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega128) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega128A) \
|
||||
)
|
||||
|
||||
/** ATmegaxx group without power reduction and
|
||||
* And interrupt sense register.
|
||||
*/
|
||||
#define MEGA_XX_UN2 ( \
|
||||
AVR8_PART_IS_DEFINED(ATmega169P) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega169PA) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega329P) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega329PA) \
|
||||
)
|
||||
|
||||
/** Devices added to complete megaAVR offering.
|
||||
* Please do not use this group symbol as it is not intended
|
||||
* to be permanent: the devices should be regrouped.
|
||||
*/
|
||||
#define MEGA_UNCATEGORIZED ( \
|
||||
AVR8_PART_IS_DEFINED(AT90CAN128) || \
|
||||
AVR8_PART_IS_DEFINED(AT90CAN32) || \
|
||||
AVR8_PART_IS_DEFINED(AT90CAN64) || \
|
||||
AVR8_PART_IS_DEFINED(AT90PWM1) || \
|
||||
AVR8_PART_IS_DEFINED(AT90PWM216) || \
|
||||
AVR8_PART_IS_DEFINED(AT90PWM2B) || \
|
||||
AVR8_PART_IS_DEFINED(AT90PWM316) || \
|
||||
AVR8_PART_IS_DEFINED(AT90PWM3B) || \
|
||||
AVR8_PART_IS_DEFINED(AT90PWM81) || \
|
||||
AVR8_PART_IS_DEFINED(AT90USB1286) || \
|
||||
AVR8_PART_IS_DEFINED(AT90USB1287) || \
|
||||
AVR8_PART_IS_DEFINED(AT90USB162) || \
|
||||
AVR8_PART_IS_DEFINED(AT90USB646) || \
|
||||
AVR8_PART_IS_DEFINED(AT90USB647) || \
|
||||
AVR8_PART_IS_DEFINED(AT90USB82) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega1284) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega162) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega164P) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega165A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega165P) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega165PA) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega168P) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega169A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega16M1) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega16U2) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega16U4) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega2564RFR2) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega256RFA2) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega324P) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega325) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega3250) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega3250A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega3250P) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega3250PA) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega325A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega325P) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega325PA) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega329) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega3290) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega3290A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega3290P) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega3290PA) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega329A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega32M1) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega32U2) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega32U4) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega48P) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega644P) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega645) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega6450) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega6450A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega6450P) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega645A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega645P) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega649) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega6490) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega6490A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega6490P) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega649A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega649P) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega64M1) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega64RFA2) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega8) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega8515) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega8535) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega88P) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega8A) || \
|
||||
AVR8_PART_IS_DEFINED(ATmega8U2) \
|
||||
)
|
||||
|
||||
/** Unspecified group */
|
||||
#define MEGA_UNSPECIFIED (MEGA_XX_UN0 || MEGA_XX_UN1 || MEGA_XX_UN2 || \
|
||||
MEGA_UNCATEGORIZED)
|
||||
|
||||
/** @} */
|
||||
|
||||
/** megaAVR product line */
|
||||
#define MEGA (MEGA_XX0_1 || MEGA_XX4 || MEGA_XX8 || MEGA_XX || MEGA_RF || \
|
||||
MEGA_UNSPECIFIED)
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \defgroup tiny_part_macros_group tinyAVR parts
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \name tinyAVR groups
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** Devices added to complete tinyAVR offering.
|
||||
* Please do not use this group symbol as it is not intended
|
||||
* to be permanent: the devices should be regrouped.
|
||||
*/
|
||||
#define TINY_UNCATEGORIZED ( \
|
||||
AVR8_PART_IS_DEFINED(ATtiny10) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny13) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny13A) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny1634) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny167) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny20) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny2313) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny2313A) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny24) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny24A) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny25) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny26) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny261) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny261A) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny4) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny40) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny4313) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny43U) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny44) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny44A) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny45) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny461) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny461A) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny48) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny5) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny828) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny84) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny84A) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny85) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny861) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny861A) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny87) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny88) || \
|
||||
AVR8_PART_IS_DEFINED(ATtiny9) \
|
||||
)
|
||||
|
||||
/** @} */
|
||||
|
||||
/** tinyAVR product line */
|
||||
#define TINY (TINY_UNCATEGORIZED)
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \defgroup sam_part_macros_group SAM parts
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \name SAM3S series
|
||||
* @{
|
||||
*/
|
||||
#define SAM3S1 ( \
|
||||
SAM_PART_IS_DEFINED(SAM3S1A) || \
|
||||
SAM_PART_IS_DEFINED(SAM3S1B) || \
|
||||
SAM_PART_IS_DEFINED(SAM3S1C) \
|
||||
)
|
||||
|
||||
#define SAM3S2 ( \
|
||||
SAM_PART_IS_DEFINED(SAM3S2A) || \
|
||||
SAM_PART_IS_DEFINED(SAM3S2B) || \
|
||||
SAM_PART_IS_DEFINED(SAM3S2C) \
|
||||
)
|
||||
|
||||
#define SAM3S4 ( \
|
||||
SAM_PART_IS_DEFINED(SAM3S4A) || \
|
||||
SAM_PART_IS_DEFINED(SAM3S4B) || \
|
||||
SAM_PART_IS_DEFINED(SAM3S4C) \
|
||||
)
|
||||
|
||||
#define SAM3S8 ( \
|
||||
SAM_PART_IS_DEFINED(SAM3S8B) || \
|
||||
SAM_PART_IS_DEFINED(SAM3S8C) \
|
||||
)
|
||||
|
||||
#define SAM3SD8 ( \
|
||||
SAM_PART_IS_DEFINED(SAM3SD8B) || \
|
||||
SAM_PART_IS_DEFINED(SAM3SD8C) \
|
||||
)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name SAM3U series
|
||||
* @{
|
||||
*/
|
||||
#define SAM3U1 ( \
|
||||
SAM_PART_IS_DEFINED(SAM3U1C) || \
|
||||
SAM_PART_IS_DEFINED(SAM3U1E) \
|
||||
)
|
||||
|
||||
#define SAM3U2 ( \
|
||||
SAM_PART_IS_DEFINED(SAM3U2C) || \
|
||||
SAM_PART_IS_DEFINED(SAM3U2E) \
|
||||
)
|
||||
|
||||
#define SAM3U4 ( \
|
||||
SAM_PART_IS_DEFINED(SAM3U4C) || \
|
||||
SAM_PART_IS_DEFINED(SAM3U4E) \
|
||||
)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name SAM3N series
|
||||
* @{
|
||||
*/
|
||||
#define SAM3N1 ( \
|
||||
SAM_PART_IS_DEFINED(SAM3N1A) || \
|
||||
SAM_PART_IS_DEFINED(SAM3N1B) || \
|
||||
SAM_PART_IS_DEFINED(SAM3N1C) \
|
||||
)
|
||||
|
||||
#define SAM3N2 ( \
|
||||
SAM_PART_IS_DEFINED(SAM3N2A) || \
|
||||
SAM_PART_IS_DEFINED(SAM3N2B) || \
|
||||
SAM_PART_IS_DEFINED(SAM3N2C) \
|
||||
)
|
||||
|
||||
#define SAM3N4 ( \
|
||||
SAM_PART_IS_DEFINED(SAM3N4A) || \
|
||||
SAM_PART_IS_DEFINED(SAM3N4B) || \
|
||||
SAM_PART_IS_DEFINED(SAM3N4C) \
|
||||
)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name SAM3X series
|
||||
* @{
|
||||
*/
|
||||
#define SAM3X4 ( \
|
||||
SAM_PART_IS_DEFINED(SAM3X4C) || \
|
||||
SAM_PART_IS_DEFINED(SAM3X4E) \
|
||||
)
|
||||
|
||||
#define SAM3X8 ( \
|
||||
SAM_PART_IS_DEFINED(SAM3X8C) || \
|
||||
SAM_PART_IS_DEFINED(SAM3X8E) || \
|
||||
SAM_PART_IS_DEFINED(SAM3X8H) \
|
||||
)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name SAM3A series
|
||||
* @{
|
||||
*/
|
||||
#define SAM3A4 ( \
|
||||
SAM_PART_IS_DEFINED(SAM3A4C) \
|
||||
)
|
||||
|
||||
#define SAM3A8 ( \
|
||||
SAM_PART_IS_DEFINED(SAM3A8C) \
|
||||
)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name SAM4S series
|
||||
* @{
|
||||
*/
|
||||
#define SAM4S8 ( \
|
||||
SAM_PART_IS_DEFINED(SAM4S8B) || \
|
||||
SAM_PART_IS_DEFINED(SAM4S8C) \
|
||||
)
|
||||
|
||||
#define SAM4S16 ( \
|
||||
SAM_PART_IS_DEFINED(SAM4S16B) || \
|
||||
SAM_PART_IS_DEFINED(SAM4S16C) \
|
||||
)
|
||||
|
||||
#define SAM4SA16 ( \
|
||||
SAM_PART_IS_DEFINED(SAM4SA16B) || \
|
||||
SAM_PART_IS_DEFINED(SAM4SA16C) \
|
||||
)
|
||||
|
||||
#define SAM4SD16 ( \
|
||||
SAM_PART_IS_DEFINED(SAM4SD16B) || \
|
||||
SAM_PART_IS_DEFINED(SAM4SD16C) \
|
||||
)
|
||||
|
||||
#define SAM4SD32 ( \
|
||||
SAM_PART_IS_DEFINED(SAM4SD32B) || \
|
||||
SAM_PART_IS_DEFINED(SAM4SD32C) \
|
||||
)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name SAM4L series
|
||||
* @{
|
||||
*/
|
||||
#define SAM4LS ( \
|
||||
SAM_PART_IS_DEFINED(SAM4LS2A) || \
|
||||
SAM_PART_IS_DEFINED(SAM4LS2B) || \
|
||||
SAM_PART_IS_DEFINED(SAM4LS2C) || \
|
||||
SAM_PART_IS_DEFINED(SAM4LS4A) || \
|
||||
SAM_PART_IS_DEFINED(SAM4LS4B) || \
|
||||
SAM_PART_IS_DEFINED(SAM4LS4C) || \
|
||||
SAM_PART_IS_DEFINED(SAM4LS8A) || \
|
||||
SAM_PART_IS_DEFINED(SAM4LS8B) || \
|
||||
SAM_PART_IS_DEFINED(SAM4LS8C) \
|
||||
)
|
||||
|
||||
#define SAM4LC ( \
|
||||
SAM_PART_IS_DEFINED(SAM4LC2A) || \
|
||||
SAM_PART_IS_DEFINED(SAM4LC2B) || \
|
||||
SAM_PART_IS_DEFINED(SAM4LC2C) || \
|
||||
SAM_PART_IS_DEFINED(SAM4LC4A) || \
|
||||
SAM_PART_IS_DEFINED(SAM4LC4B) || \
|
||||
SAM_PART_IS_DEFINED(SAM4LC4C) || \
|
||||
SAM_PART_IS_DEFINED(SAM4LC8A) || \
|
||||
SAM_PART_IS_DEFINED(SAM4LC8B) || \
|
||||
SAM_PART_IS_DEFINED(SAM4LC8C) \
|
||||
)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name SAMD20 series
|
||||
* @{
|
||||
*/
|
||||
#define SAMD20J ( \
|
||||
SAM_PART_IS_DEFINED(SAMD20J14) || \
|
||||
SAM_PART_IS_DEFINED(SAMD20J15) || \
|
||||
SAM_PART_IS_DEFINED(SAMD20J16) || \
|
||||
SAM_PART_IS_DEFINED(SAMD20J17) || \
|
||||
SAM_PART_IS_DEFINED(SAMD20J18) \
|
||||
)
|
||||
|
||||
#define SAMD20G ( \
|
||||
SAM_PART_IS_DEFINED(SAMD20G14) || \
|
||||
SAM_PART_IS_DEFINED(SAMD20G15) || \
|
||||
SAM_PART_IS_DEFINED(SAMD20G16) || \
|
||||
SAM_PART_IS_DEFINED(SAMD20G17) || \
|
||||
SAM_PART_IS_DEFINED(SAMD20G18) \
|
||||
)
|
||||
|
||||
#define SAMD20E ( \
|
||||
SAM_PART_IS_DEFINED(SAMD20E14) || \
|
||||
SAM_PART_IS_DEFINED(SAMD20E15) || \
|
||||
SAM_PART_IS_DEFINED(SAMD20E16) || \
|
||||
SAM_PART_IS_DEFINED(SAMD20E17) || \
|
||||
SAM_PART_IS_DEFINED(SAMD20E18) \
|
||||
)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name SAM4E series
|
||||
* @{
|
||||
*/
|
||||
#define SAM4E8 ( \
|
||||
SAM_PART_IS_DEFINED(SAM4E8E) \
|
||||
)
|
||||
|
||||
#define SAM4E16 ( \
|
||||
SAM_PART_IS_DEFINED(SAM4E16E) \
|
||||
)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name SAM4N series
|
||||
* @{
|
||||
*/
|
||||
#define SAM4N8 ( \
|
||||
SAM_PART_IS_DEFINED(SAM4N8A) || \
|
||||
SAM_PART_IS_DEFINED(SAM4N8B) || \
|
||||
SAM_PART_IS_DEFINED(SAM4N8C) \
|
||||
)
|
||||
|
||||
#define SAM4N16 ( \
|
||||
SAM_PART_IS_DEFINED(SAM4N16B) || \
|
||||
SAM_PART_IS_DEFINED(SAM4N16C) \
|
||||
)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name SAM families
|
||||
* @{
|
||||
*/
|
||||
/** SAM3S Family */
|
||||
#define SAM3S (SAM3S1 || SAM3S2 || SAM3S4 || SAM3S8 || SAM3SD8)
|
||||
|
||||
/** SAM3U Family */
|
||||
#define SAM3U (SAM3U1 || SAM3U2 || SAM3U4)
|
||||
|
||||
/** SAM3N Family */
|
||||
#define SAM3N (SAM3N1 || SAM3N2 || SAM3N4)
|
||||
|
||||
/** SAM3XA Family */
|
||||
#define SAM3XA (SAM3X4 || SAM3X8 || SAM3A4 || SAM3A8)
|
||||
|
||||
/** SAM4S Family */
|
||||
#define SAM4S (SAM4S8 || SAM4S16 || SAM4SA16 || SAM4SD16 || SAM4SD32)
|
||||
|
||||
/** SAM4L Family */
|
||||
#define SAM4L (SAM4LS || SAM4LC)
|
||||
|
||||
/** SAMD20 Family */
|
||||
#define SAMD20 (SAMD20J || SAMD20G || SAMD20E)
|
||||
/** @} */
|
||||
|
||||
/** SAM4E Family */
|
||||
#define SAM4E (SAM4E8 || SAM4E16)
|
||||
|
||||
/** SAM4N Family */
|
||||
#define SAM4N (SAM4N8 || SAM4N16)
|
||||
|
||||
/** @} */
|
||||
|
||||
/** SAM product line */
|
||||
#define SAM (SAM3S || SAM3U || SAM3N || SAM3XA || SAM4S || SAM4L || SAM4E || SAMD20 || SAM4N)
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
|
||||
#endif /* ATMEL_PARTS_H */
|
|
@ -0,0 +1,70 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 Xplained Pro board initialization
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#include <compiler.h>
|
||||
#include <board.h>
|
||||
#include <conf_board.h>
|
||||
#include <port.h>
|
||||
|
||||
#if defined(__GNUC__)
|
||||
void board_init(void) WEAK __attribute__((alias("system_board_init")));
|
||||
#elif defined(__ICCARM__)
|
||||
void board_init(void);
|
||||
# pragma weak board_init=system_board_init
|
||||
#endif
|
||||
|
||||
void system_board_init(void)
|
||||
{
|
||||
struct port_config pin_conf;
|
||||
port_get_config_defaults(&pin_conf);
|
||||
|
||||
/* Configure LEDs as outputs, turn them off */
|
||||
pin_conf.direction = PORT_PIN_DIR_OUTPUT;
|
||||
port_pin_set_config(LED_0_PIN, &pin_conf);
|
||||
port_pin_set_output_level(LED_0_PIN, LED_0_INACTIVE);
|
||||
|
||||
/* Set buttons as inputs */
|
||||
pin_conf.direction = PORT_PIN_DIR_INPUT;
|
||||
pin_conf.input_pull = PORT_PIN_PULL_UP;
|
||||
port_pin_set_config(BUTTON_0_PIN, &pin_conf);
|
||||
}
|
|
@ -0,0 +1,521 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 Xplained Pro board definition
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SAMD20_XPLAINED_PRO_H_INCLUDED
|
||||
#define SAMD20_XPLAINED_PRO_H_INCLUDED
|
||||
|
||||
#include <conf_board.h>
|
||||
#include <compiler.h>
|
||||
|
||||
/**
|
||||
* \ingroup group_common_boards
|
||||
* \defgroup samd20_xplained_pro_group SAM D20 Xplained Pro board
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
void system_board_init(void);
|
||||
|
||||
/**
|
||||
* \defgroup samd20_xplained_pro_features_group Features
|
||||
*
|
||||
* Symbols that describe features and capabilities of the board.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** Name string macro */
|
||||
#define BOARD_NAME "SAMD20_XPLAINED_PRO"
|
||||
|
||||
/** \name Resonator definitions
|
||||
* @{ */
|
||||
#define BOARD_FREQ_SLCK_XTAL (32768U)
|
||||
#define BOARD_FREQ_SLCK_BYPASS (32768U)
|
||||
#define BOARD_FREQ_MAINCK_XTAL 0 /* Not Mounted */
|
||||
#define BOARD_FREQ_MAINCK_BYPASS 0 /* Not Mounted */
|
||||
#define BOARD_MCK CHIP_FREQ_CPU_MAX
|
||||
#define BOARD_OSC_STARTUP_US 15625
|
||||
/** @} */
|
||||
|
||||
/** \name LED0 definitions
|
||||
* @{ */
|
||||
#define LED0_PIN PIN_PA14
|
||||
#define LED0_ACTIVE false
|
||||
#define LED0_INACTIVE !LED0_ACTIVE
|
||||
/** @} */
|
||||
|
||||
/** \name SW0 definitions
|
||||
* @{ */
|
||||
#define SW0_PIN PIN_PA15
|
||||
#define SW0_ACTIVE false
|
||||
#define SW0_INACTIVE !SW0_ACTIVE
|
||||
#define SW0_EIC_PIN PIN_PA15A_EIC_EXTINT15
|
||||
#define SW0_EIC_MUX MUX_PA15A_EIC_EXTINT15
|
||||
#define SW0_EIC_PINMUX PINMUX_PA15A_EIC_EXTINT15
|
||||
#define SW0_EIC_LINE 15
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name LED #0 definitions
|
||||
*
|
||||
* Wrapper macros for LED0, to ensure common naming across all Xplained Pro
|
||||
* boards.
|
||||
*
|
||||
* @{ */
|
||||
#define LED_0_NAME "LED0 (yellow)"
|
||||
#define LED_0_PIN LED0_PIN
|
||||
#define LED_0_ACTIVE LED0_ACTIVE
|
||||
#define LED_0_INACTIVE LED0_INACTIVE
|
||||
/** @} */
|
||||
|
||||
/** Number of on-board LEDs */
|
||||
#define LED_COUNT 1
|
||||
|
||||
/**
|
||||
* \name Button #0 definitions
|
||||
*
|
||||
* Wrapper macros for SW0, to ensure common naming across all Xplained Pro
|
||||
* boards.
|
||||
*
|
||||
* @{ */
|
||||
#define BUTTON_0_NAME "SW0"
|
||||
#define BUTTON_0_PIN SW0_PIN
|
||||
#define BUTTON_0_ACTIVE SW0_ACTIVE
|
||||
#define BUTTON_0_INACTIVE SW0_INACTIVE
|
||||
#define BUTTON_0_EIC_PIN SW0_EIC_PIN
|
||||
#define BUTTON_0_EIC_MUX SW0_EIC_MUX
|
||||
#define BUTTON_0_EIC_PINMUX SW0_EIC_PINMUX
|
||||
#define BUTTON_0_EIC_LINE SW0_EIC_LINE
|
||||
/** @} */
|
||||
|
||||
/** Number of on-board buttons */
|
||||
#define BUTTON_COUNT 1
|
||||
|
||||
/** \name Extension header #1 pin definitions
|
||||
* @{
|
||||
*/
|
||||
#define EXT1_PIN_3 PIN_PB00
|
||||
#define EXT1_PIN_4 PIN_PB01
|
||||
#define EXT1_PIN_5 PIN_PB06
|
||||
#define EXT1_PIN_6 PIN_PB07
|
||||
#define EXT1_PIN_7 PIN_PB02
|
||||
#define EXT1_PIN_8 PIN_PB03
|
||||
#define EXT1_PIN_9 PIN_PB04
|
||||
#define EXT1_PIN_10 PIN_PB05
|
||||
#define EXT1_PIN_11 PIN_PA08
|
||||
#define EXT1_PIN_12 PIN_PA09
|
||||
#define EXT1_PIN_13 PIN_PB09
|
||||
#define EXT1_PIN_14 PIN_PB08
|
||||
#define EXT1_PIN_15 PIN_PA05
|
||||
#define EXT1_PIN_16 PIN_PA06
|
||||
#define EXT1_PIN_17 PIN_PA04
|
||||
#define EXT1_PIN_18 PIN_PA07
|
||||
/** @} */
|
||||
|
||||
/** \name Extension header #1 pin definitions by function
|
||||
* @{
|
||||
*/
|
||||
#define EXT1_PIN_ADC_0 EXT1_PIN_3
|
||||
#define EXT1_PIN_ADC_1 EXT1_PIN_4
|
||||
#define EXT1_PIN_GPIO_0 EXT1_PIN_5
|
||||
#define EXT1_PIN_GPIO_1 EXT1_PIN_6
|
||||
#define EXT1_PIN_PWM_0 EXT1_PIN_7
|
||||
#define EXT1_PIN_PWM_1 EXT1_PIN_8
|
||||
#define EXT1_PIN_IRQ EXT1_PIN_9
|
||||
#define EXT1_PIN_I2C_SDA EXT1_PIN_11
|
||||
#define EXT1_PIN_I2C_SCL EXT1_PIN_12
|
||||
#define EXT1_PIN_UART_RX EXT1_PIN_13
|
||||
#define EXT1_PIN_UART_TX EXT1_PIN_14
|
||||
#define EXT1_PIN_SPI_SS_1 EXT1_PIN_10
|
||||
#define EXT1_PIN_SPI_SS_0 EXT1_PIN_15
|
||||
#define EXT1_PIN_SPI_MOSI EXT1_PIN_16
|
||||
#define EXT1_PIN_SPI_MISO EXT1_PIN_17
|
||||
#define EXT1_PIN_SPI_SCK EXT1_PIN_18
|
||||
/** @} */
|
||||
|
||||
/** \name Extension header #1 ADC definitions
|
||||
* @{
|
||||
*/
|
||||
#define EXT1_ADC_MODULE ADC
|
||||
#define EXT1_ADC_0_CHANNEL 8
|
||||
#define EXT1_ADC_0_PIN PIN_PB00B_ADC_AIN8
|
||||
#define EXT1_ADC_0_MUX MUX_PB00B_ADC_AIN8
|
||||
#define EXT1_ADC_0_PINMUX PINMUX_PB00B_ADC_AIN8
|
||||
#define EXT1_ADC_1_CHANNEL 9
|
||||
#define EXT1_ADC_1_PIN PIN_PB01B_ADC_AIN9
|
||||
#define EXT1_ADC_1_MUX MUX_PB01B_ADC_AIN9
|
||||
#define EXT1_ADC_1_PINMUX PINMUX_PB01B_ADC_AIN9
|
||||
/** @} */
|
||||
|
||||
/** \name Extension header #1 PWM definitions
|
||||
* @{
|
||||
*/
|
||||
#define EXT1_PWM_MODULE TC6
|
||||
#define EXT1_PWM_0_CHANNEL 0
|
||||
#define EXT1_PWM_0_PIN PIN_PB02F_TC6_WO0
|
||||
#define EXT1_PWM_0_MUX MUX_PB02F_TC6_WO0
|
||||
#define EXT1_PWM_0_PINMUX PINMUX_PB02F_TC6_WO0
|
||||
#define EXT1_PWM_1_CHANNEL 1
|
||||
#define EXT1_PWM_1_PIN PIN_PB03F_TC6_WO1
|
||||
#define EXT1_PWM_1_MUX MUX_PB03F_TC6_WO1
|
||||
#define EXT1_PWM_1_PINMUX PINMUX_PB03F_TC6_WO1
|
||||
/** @} */
|
||||
|
||||
/** \name Extension header #1 IRQ/External interrupt definitions
|
||||
* @{
|
||||
*/
|
||||
#define EXT1_IRQ_MODULE EIC
|
||||
#define EXT1_IRQ_INPUT 4
|
||||
#define EXT1_IRQ_PIN PIN_PB04A_EIC_EXTINT4
|
||||
#define EXT1_IRQ_MUX MUX_PB04A_EIC_EXTINT4
|
||||
#define EXT1_IRQ_PINMUX PINMUX_PB04A_EIC_EXTINT4
|
||||
/** @} */
|
||||
|
||||
/** \name Extension header #1 I2C definitions
|
||||
* @{
|
||||
*/
|
||||
#define EXT1_I2C_MODULE SERCOM2
|
||||
#define EXT1_I2C_SERCOM_PINMUX_PAD0 PINMUX_PA08D_SERCOM2_PAD0
|
||||
#define EXT1_I2C_SERCOM_PINMUX_PAD1 PINMUX_PA09D_SERCOM2_PAD1
|
||||
/** @} */
|
||||
|
||||
/** \name Extension header #1 UART definitions
|
||||
* @{
|
||||
*/
|
||||
#define EXT1_UART_MODULE SERCOM4
|
||||
#define EXT1_UART_SERCOM_MUX_SETTING USART_RX_1_TX_0_XCK_1
|
||||
#define EXT1_UART_SERCOM_PINMUX_PAD0 PINMUX_PB08D_SERCOM4_PAD0
|
||||
#define EXT1_UART_SERCOM_PINMUX_PAD1 PINMUX_PB09D_SERCOM4_PAD1
|
||||
#define EXT1_UART_SERCOM_PINMUX_PAD2 PINMUX_UNUSED
|
||||
#define EXT1_UART_SERCOM_PINMUX_PAD3 PINMUX_UNUSED
|
||||
/** @} */
|
||||
|
||||
/** \name Extension header #1 SPI definitions
|
||||
* @{
|
||||
*/
|
||||
#define EXT1_SPI_MODULE SERCOM0
|
||||
#define EXT1_SPI_SERCOM_MUX_SETTING SPI_SIGNAL_MUX_SETTING_E
|
||||
#define EXT1_SPI_SERCOM_PINMUX_PAD0 PINMUX_PA04D_SERCOM0_PAD0
|
||||
#define EXT1_SPI_SERCOM_PINMUX_PAD1 PINMUX_PA05D_SERCOM0_PAD1
|
||||
#define EXT1_SPI_SERCOM_PINMUX_PAD2 PINMUX_PA06D_SERCOM0_PAD2
|
||||
#define EXT1_SPI_SERCOM_PINMUX_PAD3 PINMUX_PA07D_SERCOM0_PAD3
|
||||
/** @} */
|
||||
|
||||
/** \name Extension header #2 pin definitions
|
||||
* @{
|
||||
*/
|
||||
#define EXT2_PIN_3 PIN_PA10
|
||||
#define EXT2_PIN_4 PIN_PA11
|
||||
#define EXT2_PIN_5 PIN_PA20
|
||||
#define EXT2_PIN_6 PIN_PA21
|
||||
#define EXT2_PIN_7 PIN_PA22
|
||||
#define EXT2_PIN_8 PIN_PA23
|
||||
#define EXT2_PIN_9 PIN_PB14
|
||||
#define EXT2_PIN_10 PIN_PB15
|
||||
#define EXT2_PIN_11 PIN_PA08
|
||||
#define EXT2_PIN_12 PIN_PA09
|
||||
#define EXT2_PIN_13 PIN_PB13
|
||||
#define EXT2_PIN_14 PIN_PB12
|
||||
#define EXT2_PIN_15 PIN_PA17
|
||||
#define EXT2_PIN_16 PIN_PA18
|
||||
#define EXT2_PIN_17 PIN_PA16
|
||||
#define EXT2_PIN_18 PIN_PA19
|
||||
/** @} */
|
||||
|
||||
/** \name Extension header #2 pin definitions by function
|
||||
* @{
|
||||
*/
|
||||
#define EXT2_PIN_ADC_0 EXT2_PIN_3
|
||||
#define EXT2_PIN_ADC_1 EXT2_PIN_4
|
||||
#define EXT2_PIN_GPIO_0 EXT2_PIN_5
|
||||
#define EXT2_PIN_GPIO_1 EXT2_PIN_6
|
||||
#define EXT2_PIN_PWM_0 EXT2_PIN_7
|
||||
#define EXT2_PIN_PWM_1 EXT2_PIN_8
|
||||
#define EXT2_PIN_IRQ EXT2_PIN_9
|
||||
#define EXT2_PIN_I2C_SDA EXT2_PIN_11
|
||||
#define EXT2_PIN_I2C_SCL EXT2_PIN_12
|
||||
#define EXT2_PIN_UART_RX EXT2_PIN_13
|
||||
#define EXT2_PIN_UART_TX EXT2_PIN_14
|
||||
#define EXT2_PIN_SPI_SS_1 EXT2_PIN_10
|
||||
#define EXT2_PIN_SPI_SS_0 EXT2_PIN_15
|
||||
#define EXT2_PIN_SPI_MOSI EXT2_PIN_16
|
||||
#define EXT2_PIN_SPI_MISO EXT2_PIN_17
|
||||
#define EXT2_PIN_SPI_SCK EXT2_PIN_18
|
||||
/** @} */
|
||||
|
||||
/** \name Extension header #2 ADC definitions
|
||||
* @{
|
||||
*/
|
||||
#define EXT2_ADC_MODULE ADC
|
||||
#define EXT2_ADC_0_CHANNEL 18
|
||||
#define EXT2_ADC_0_PIN PIN_PA10B_ADC_AIN18
|
||||
#define EXT2_ADC_0_MUX MUX_PA10B_ADC_AIN18
|
||||
#define EXT2_ADC_0_PINMUX PINMUX_PA10B_ADC_AIN18
|
||||
#define EXT2_ADC_1_CHANNEL 19
|
||||
#define EXT2_ADC_1_PIN PIN_PA11B_ADC_AIN19
|
||||
#define EXT2_ADC_1_MUX MUX_PA11B_ADC_AIN19
|
||||
#define EXT2_ADC_1_PINMUX PINMUX_PA11B_ADC_AIN19
|
||||
/** @} */
|
||||
|
||||
/** \name Extension header #2 PWM definitions
|
||||
* @{
|
||||
*/
|
||||
#define EXT2_PWM_MODULE TC4
|
||||
#define EXT2_PWM_0_CHANNEL 0
|
||||
#define EXT2_PWM_0_PIN PIN_PA22F_TC4_WO0
|
||||
#define EXT2_PWM_0_MUX MUX_PA22F_TC4_WO0
|
||||
#define EXT2_PWM_0_PINMUX PINMUX_PA22F_TC4_WO0
|
||||
#define EXT2_PWM_1_CHANNEL 1
|
||||
#define EXT2_PWM_1_PIN PIN_PA23F_TC4_WO1
|
||||
#define EXT2_PWM_1_MUX MUX_PA23F_TC4_WO1
|
||||
#define EXT2_PWM_1_PINMUX PINMUX_PA23F_TC4_WO1
|
||||
/** @} */
|
||||
|
||||
/** \name Extension header #2 IRQ/External interrupt definitions
|
||||
* @{
|
||||
*/
|
||||
#define EXT2_IRQ_MODULE EIC
|
||||
#define EXT2_IRQ_INPUT 14
|
||||
#define EXT2_IRQ_PIN PIN_PB14A_EIC_EXTINT14
|
||||
#define EXT2_IRQ_MUX MUX_PB14A_EIC_EXTINT14
|
||||
#define EXT2_IRQ_PINMUX PINMUX_PB14A_EIC_EXTINT14
|
||||
/** @} */
|
||||
|
||||
/** \name Extension header #2 I2C definitions
|
||||
* @{
|
||||
*/
|
||||
#define EXT2_I2C_MODULE SERCOM2
|
||||
#define EXT2_I2C_SERCOM_PINMUX_PAD0 PINMUX_PA08D_SERCOM2_PAD0
|
||||
#define EXT2_I2C_SERCOM_PINMUX_PAD1 PINMUX_PA09D_SERCOM2_PAD1
|
||||
/** @} */
|
||||
|
||||
/** \name Extension header #2 UART definitions
|
||||
* @{
|
||||
*/
|
||||
#define EXT2_UART_MODULE SERCOM4
|
||||
#define EXT2_UART_SERCOM_MUX_SETTING USART_RX_1_TX_0_XCK_1
|
||||
#define EXT2_UART_SERCOM_PINMUX_PAD0 PINMUX_PB12C_SERCOM4_PAD0
|
||||
#define EXT2_UART_SERCOM_PINMUX_PAD1 PINMUX_PB13C_SERCOM4_PAD1
|
||||
#define EXT2_UART_SERCOM_PINMUX_PAD2 PINMUX_UNUSED
|
||||
#define EXT2_UART_SERCOM_PINMUX_PAD3 PINMUX_UNUSED
|
||||
/** @} */
|
||||
|
||||
/** \name Extension header #2 SPI definitions
|
||||
* @{
|
||||
*/
|
||||
#define EXT2_SPI_MODULE SERCOM1
|
||||
#define EXT2_SPI_SERCOM_MUX_SETTING SPI_SIGNAL_MUX_SETTING_E
|
||||
#define EXT2_SPI_SERCOM_PINMUX_PAD0 PINMUX_PA16C_SERCOM1_PAD0
|
||||
#define EXT2_SPI_SERCOM_PINMUX_PAD1 PINMUX_PA17C_SERCOM1_PAD1
|
||||
#define EXT2_SPI_SERCOM_PINMUX_PAD2 PINMUX_PA18C_SERCOM1_PAD2
|
||||
#define EXT2_SPI_SERCOM_PINMUX_PAD3 PINMUX_PA19C_SERCOM1_PAD3
|
||||
/** @} */
|
||||
|
||||
/** \name Extension header #3 pin definitions
|
||||
* @{
|
||||
*/
|
||||
#define EXT3_PIN_3 PIN_PA02
|
||||
#define EXT3_PIN_4 PIN_PA03
|
||||
#define EXT3_PIN_5 PIN_PB30
|
||||
#define EXT3_PIN_6 PIN_PA15
|
||||
#define EXT3_PIN_7 PIN_PA12
|
||||
#define EXT3_PIN_8 PIN_PA13
|
||||
#define EXT3_PIN_9 PIN_PA28
|
||||
#define EXT3_PIN_10 PIN_PA27
|
||||
#define EXT3_PIN_11 PIN_PA08
|
||||
#define EXT3_PIN_12 PIN_PA09
|
||||
#define EXT3_PIN_13 PIN_PB11
|
||||
#define EXT3_PIN_14 PIN_PB10
|
||||
#define EXT3_PIN_15 PIN_PB17
|
||||
#define EXT3_PIN_16 PIN_PB22
|
||||
#define EXT3_PIN_17 PIN_PB16
|
||||
#define EXT3_PIN_18 PIN_PB23
|
||||
/** @} */
|
||||
|
||||
/** \name Extension header #3 pin definitions by function
|
||||
* @{
|
||||
*/
|
||||
#define EXT3_PIN_ADC_0 EXT3_PIN_3
|
||||
#define EXT3_PIN_ADC_1 EXT3_PIN_4
|
||||
#define EXT3_PIN_GPIO_0 EXT3_PIN_5
|
||||
#define EXT3_PIN_GPIO_1 EXT3_PIN_6
|
||||
#define EXT3_PIN_PWM_0 EXT3_PIN_7
|
||||
#define EXT3_PIN_PWM_1 EXT3_PIN_8
|
||||
#define EXT3_PIN_IRQ EXT3_PIN_9
|
||||
#define EXT3_PIN_I2C_SDA EXT3_PIN_11
|
||||
#define EXT3_PIN_I2C_SCL EXT3_PIN_12
|
||||
#define EXT3_PIN_UART_RX EXT3_PIN_13
|
||||
#define EXT3_PIN_UART_TX EXT3_PIN_14
|
||||
#define EXT3_PIN_SPI_SS_1 EXT3_PIN_10
|
||||
#define EXT3_PIN_SPI_SS_0 EXT3_PIN_15
|
||||
#define EXT3_PIN_SPI_MOSI EXT3_PIN_16
|
||||
#define EXT3_PIN_SPI_MISO EXT3_PIN_17
|
||||
#define EXT3_PIN_SPI_SCK EXT3_PIN_18
|
||||
/** @} */
|
||||
|
||||
/** \name Extension header #3 ADC definitions
|
||||
* @{
|
||||
*/
|
||||
#define EXT3_ADC_MODULE ADC
|
||||
#define EXT3_ADC_0_CHANNEL 0
|
||||
#define EXT3_ADC_0_PIN PIN_PA02B_ADC_AIN0
|
||||
#define EXT3_ADC_0_MUX MUX_PA02B_ADC_AIN0
|
||||
#define EXT3_ADC_0_PINMUX PINMUX_PA02B_ADC_AIN0
|
||||
#define EXT3_ADC_1_CHANNEL 1
|
||||
#define EXT3_ADC_1_PIN PIN_PA03B_ADC_AIN1
|
||||
#define EXT3_ADC_1_MUX MUX_PA03B_ADC_AIN1
|
||||
#define EXT3_ADC_1_PINMUX PINMUX_PA03B_ADC_AIN1
|
||||
/** @} */
|
||||
|
||||
/** \name Extension header #3 PWM definitions
|
||||
* @{
|
||||
*/
|
||||
#define EXT3_PWM_MODULE TC2
|
||||
#define EXT3_PWM_0_CHANNEL 0
|
||||
#define EXT3_PWM_0_PIN PIN_PA12E_TC2_WO0
|
||||
#define EXT3_PWM_0_MUX MUX_PA12E_TC2_WO0
|
||||
#define EXT3_PWM_0_PINMUX PINMUX_PA12E_TC2_WO0
|
||||
#define EXT3_PWM_1_CHANNEL 1
|
||||
#define EXT3_PWM_1_PIN PIN_PA13E_TC2_WO1
|
||||
#define EXT3_PWM_1_MUX MUX_PA13E_TC2_WO1
|
||||
#define EXT3_PWM_1_PINMUX PINMUX_PA13E_TC2_WO1
|
||||
/** @} */
|
||||
|
||||
/** \name Extension header #3 IRQ/External interrupt definitions
|
||||
* @{
|
||||
*/
|
||||
#define EXT3_IRQ_MODULE EIC
|
||||
#define EXT3_IRQ_INPUT 8
|
||||
#define EXT3_IRQ_PIN PIN_PA28A_EIC_EXTINT8
|
||||
#define EXT3_IRQ_MUX MUX_PA28A_EIC_EXTINT8
|
||||
#define EXT3_IRQ_PINMUX PINMUX_PA28A_EIC_EXTINT8
|
||||
/** @} */
|
||||
|
||||
/** \name Extension header #3 I2C definitions
|
||||
* @{
|
||||
*/
|
||||
#define EXT3_I2C_MODULE SERCOM2
|
||||
#define EXT3_I2C_SERCOM_PINMUX_PAD0 PINMUX_PA08D_SERCOM2_PAD0
|
||||
#define EXT3_I2C_SERCOM_PINMUX_PAD1 PINMUX_PA09D_SERCOM2_PAD1
|
||||
/** @} */
|
||||
|
||||
/** \name Extension header #3 UART definitions
|
||||
* @{
|
||||
*/
|
||||
#define EXT3_UART_MODULE SERCOM4
|
||||
#define EXT3_UART_SERCOM_MUX_SETTING USART_RX_3_TX_2_XCK_3
|
||||
#define EXT3_UART_SERCOM_PINMUX_PAD0 PINMUX_UNUSED
|
||||
#define EXT3_UART_SERCOM_PINMUX_PAD1 PINMUX_UNUSED
|
||||
#define EXT3_UART_SERCOM_PINMUX_PAD2 PINMUX_PB10D_SERCOM4_PAD2
|
||||
#define EXT3_UART_SERCOM_PINMUX_PAD3 PINMUX_PB11D_SERCOM4_PAD3
|
||||
/** @} */
|
||||
|
||||
/** \name Extension header #3 SPI definitions
|
||||
* @{
|
||||
*/
|
||||
#define EXT3_SPI_MODULE SERCOM5
|
||||
#define EXT3_SPI_SERCOM_MUX_SETTING SPI_SIGNAL_MUX_SETTING_E
|
||||
#define EXT3_SPI_SERCOM_PINMUX_PAD0 PINMUX_PB16C_SERCOM5_PAD0
|
||||
#define EXT3_SPI_SERCOM_PINMUX_PAD1 PINMUX_PB17C_SERCOM5_PAD1
|
||||
#define EXT3_SPI_SERCOM_PINMUX_PAD2 PINMUX_PB22D_SERCOM5_PAD2
|
||||
#define EXT3_SPI_SERCOM_PINMUX_PAD3 PINMUX_PB23D_SERCOM5_PAD3
|
||||
/** @} */
|
||||
|
||||
/** \name Embedded debugger GPIO interface definitions
|
||||
* @{
|
||||
*/
|
||||
#define EDBG_GPIO0_PIN PIN_PA27
|
||||
#define EDBG_GPIO1_PIN PIN_PA28
|
||||
#define EDBG_GPIO2_PIN PIN_PA20
|
||||
#define EDBG_GPIO3_PIN PIN_PA21
|
||||
/** @} */
|
||||
|
||||
/** \name Embedded debugger USART interface definitions
|
||||
* @{
|
||||
*/
|
||||
#define EDBG_UART_MODULE -1 /* Not available on this board */
|
||||
#define EDBG_UART_RX_PIN -1 /* Not available on this board */
|
||||
#define EDBG_UART_RX_MUX -1 /* Not available on this board */
|
||||
#define EDBG_UART_RX_PINMUX -1 /* Not available on this board */
|
||||
#define EDBG_UART_RX_SERCOM_PAD -1 /* Not available on this board */
|
||||
#define EDBG_UART_TX_PIN -1 /* Not available on this board */
|
||||
#define EDBG_UART_TX_MUX -1 /* Not available on this board */
|
||||
#define EDBG_UART_TX_PINMUX -1 /* Not available on this board */
|
||||
#define EDBG_UART_TX_SERCOM_PAD -1 /* Not available on this board */
|
||||
/** @} */
|
||||
|
||||
/** \name Embedded debugger I2C interface definitions
|
||||
* @{
|
||||
*/
|
||||
#define EDBG_I2C_MODULE SERCOM2
|
||||
#define EDBG_I2C_SERCOM_PINMUX_PAD0 PINMUX_PA08D_SERCOM2_PAD0
|
||||
#define EDBG_I2C_SERCOM_PINMUX_PAD1 PINMUX_PA09D_SERCOM2_PAD1
|
||||
/** @} */
|
||||
|
||||
/** \name Embedded debugger SPI interface definitions
|
||||
* @{
|
||||
*/
|
||||
#define EDBG_SPI_MODULE SERCOM5
|
||||
#define EDBG_SPI_SERCOM_MUX_SETTING SPI_SIGNAL_MUX_SETTING_E
|
||||
#define EDBG_SPI_SERCOM_PINMUX_PAD0 PINMUX_PB16C_SERCOM5_PAD0
|
||||
#define EDBG_SPI_SERCOM_PINMUX_PAD1 PINMUX_PB31D_SERCOM5_PAD1
|
||||
#define EDBG_SPI_SERCOM_PINMUX_PAD2 PINMUX_PB22D_SERCOM5_PAD2
|
||||
#define EDBG_SPI_SERCOM_PINMUX_PAD3 PINMUX_PB23D_SERCOM5_PAD3
|
||||
/** @} */
|
||||
|
||||
/** \name Embedded debugger CDC Gateway USART interface definitions
|
||||
* @{
|
||||
*/
|
||||
#define EDBG_CDC_MODULE SERCOM3
|
||||
#define EDBG_CDC_SERCOM_MUX_SETTING USART_RX_3_TX_2_XCK_3
|
||||
#define EDBG_CDC_SERCOM_PINMUX_PAD0 PINMUX_UNUSED
|
||||
#define EDBG_CDC_SERCOM_PINMUX_PAD1 PINMUX_UNUSED
|
||||
#define EDBG_CDC_SERCOM_PINMUX_PAD2 PINMUX_PA24C_SERCOM3_PAD2
|
||||
#define EDBG_CDC_SERCOM_PINMUX_PAD3 PINMUX_PA25C_SERCOM3_PAD3
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
|
||||
#endif /* SAMD20_XPLAINED_PRO_H_INCLUDED */
|
|
@ -0,0 +1,104 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 GPIO Port Driver
|
||||
*
|
||||
* Copyright (C) 2012-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
#include <port.h>
|
||||
|
||||
/**
|
||||
* \brief Writes a Port pin configuration to the hardware module.
|
||||
*
|
||||
* Writes out a given configuration of a Port pin configuration to the hardware
|
||||
* module.
|
||||
*
|
||||
* \note If the pin direction is set as an output, the pull-up/pull-down input
|
||||
* configuration setting is ignored.
|
||||
*
|
||||
* \param[in] gpio_pin Index of the GPIO pin to configure.
|
||||
* \param[in] config Configuration settings for the pin.
|
||||
*/
|
||||
void port_pin_set_config(
|
||||
const uint8_t gpio_pin,
|
||||
const struct port_config *const config)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(config);
|
||||
|
||||
struct system_pinmux_config pinmux_config;
|
||||
system_pinmux_get_config_defaults(&pinmux_config);
|
||||
|
||||
pinmux_config.mux_position = SYSTEM_PINMUX_GPIO;
|
||||
pinmux_config.direction = (enum system_pinmux_pin_dir)config->direction;
|
||||
pinmux_config.input_pull = (enum system_pinmux_pin_pull)config->input_pull;
|
||||
|
||||
system_pinmux_pin_set_config(gpio_pin, &pinmux_config);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Writes a Port group configuration group to the hardware module.
|
||||
*
|
||||
* Writes out a given configuration of a Port group configuration to the
|
||||
* hardware module.
|
||||
*
|
||||
* \note If the pin direction is set as an output, the pull-up/pull-down input
|
||||
* configuration setting is ignored.
|
||||
*
|
||||
* \param[out] port Base of the PORT module to write to.
|
||||
* \param[in] mask Mask of the port pin(s) to configure.
|
||||
* \param[in] config Configuration settings for the pin group.
|
||||
*/
|
||||
void port_group_set_config(
|
||||
PortGroup *const port,
|
||||
const uint32_t mask,
|
||||
const struct port_config *const config)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(port);
|
||||
Assert(config);
|
||||
|
||||
struct system_pinmux_config pinmux_config;
|
||||
system_pinmux_get_config_defaults(&pinmux_config);
|
||||
|
||||
pinmux_config.mux_position = SYSTEM_PINMUX_GPIO;
|
||||
pinmux_config.direction = (enum system_pinmux_pin_dir)config->direction;
|
||||
pinmux_config.input_pull = (enum system_pinmux_pin_pull)config->input_pull;
|
||||
|
||||
system_pinmux_group_set_config(port, mask, &pinmux_config);
|
||||
}
|
|
@ -0,0 +1,535 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 GPIO Port Driver
|
||||
*
|
||||
* Copyright (C) 2012-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
#ifndef PORT_H_INCLUDED
|
||||
#define PORT_H_INCLUDED
|
||||
|
||||
/**
|
||||
* \defgroup asfdoc_samd20_port_group SAM D20 Port Driver (PORT)
|
||||
*
|
||||
* This driver for SAM D20 devices provides an interface for the configuration
|
||||
* and management of the device's General Purpose Input/Output (GPIO) pin
|
||||
* functionality, for manual pin state reading and writing.
|
||||
*
|
||||
* The following peripherals are used by this module:
|
||||
*
|
||||
* - PORT (GPIO Management)
|
||||
*
|
||||
* The outline of this documentation is as follows:
|
||||
* - \ref asfdoc_samd20_port_prerequisites
|
||||
* - \ref asfdoc_samd20_port_module_overview
|
||||
* - \ref asfdoc_samd20_port_special_considerations
|
||||
* - \ref asfdoc_samd20_port_extra_info
|
||||
* - \ref asfdoc_samd20_port_examples
|
||||
* - \ref asfdoc_samd20_port_api_overview
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_port_prerequisites Prerequisites
|
||||
*
|
||||
* There are no prerequisites for this module.
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_port_module_overview Module Overview
|
||||
*
|
||||
* The device GPIO (PORT) module provides an interface between the user
|
||||
* application logic and external hardware peripherals, when general pin state
|
||||
* manipulation is required. This driver provides an easy-to-use interface to
|
||||
* the physical pin input samplers and output drivers, so that pins can be read
|
||||
* from or written to for general purpose external hardware control.
|
||||
*
|
||||
* \subsection asfdoc_samd20_port_module_overview_pin_numbering Physical and Logical GPIO Pins
|
||||
* SAM D20 devices use two naming conventions for the I/O pins in the device; one
|
||||
* physical, and one logical. Each physical pin on a device package is assigned
|
||||
* both a physical port and pin identifier (e.g. "PORTA.0") as well as a
|
||||
* monotonically incrementing logical GPIO number (e.g. "GPIO0"). While the
|
||||
* former is used to map physical pins to their physical internal device module
|
||||
* counterparts, for simplicity the design of this driver uses the logical GPIO
|
||||
* numbers instead.
|
||||
*
|
||||
* \subsection asfdoc_samd20_port_module_overview_physical Physical Connection
|
||||
*
|
||||
* \ref asfdoc_samd20_port_module_int_connections "The diagram below" shows how
|
||||
* this module is interconnected within the device.
|
||||
*
|
||||
* \anchor asfdoc_samd20_port_module_int_connections
|
||||
* \dot
|
||||
* digraph overview {
|
||||
* node [label="Port Pad" shape=square] pad;
|
||||
*
|
||||
* subgraph driver {
|
||||
* node [label="Peripheral Mux" shape=trapezium] pinmux;
|
||||
* node [label="GPIO Module" shape=ellipse] gpio;
|
||||
* node [label="Other Peripheral Modules" shape=ellipse style=filled fillcolor=lightgray] peripherals;
|
||||
* }
|
||||
*
|
||||
* pinmux -> gpio;
|
||||
* pad -> pinmux;
|
||||
* pinmux -> peripherals;
|
||||
* }
|
||||
* \enddot
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_port_special_considerations Special Considerations
|
||||
*
|
||||
* The SAM D20 port pin input sampler can be disabled when the pin is configured
|
||||
* in pure output mode to save power; reading the pin state of a pin configured
|
||||
* in output-only mode will read the logical output state that was last set.
|
||||
*
|
||||
* \section asfdoc_samd20_port_extra_info Extra Information
|
||||
*
|
||||
* For extra information see \ref asfdoc_samd20_port_extra. This includes:
|
||||
* - \ref asfdoc_samd20_port_extra_acronyms
|
||||
* - \ref asfdoc_samd20_port_extra_dependencies
|
||||
* - \ref asfdoc_samd20_port_extra_errata
|
||||
* - \ref asfdoc_samd20_port_extra_history
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_port_examples Examples
|
||||
*
|
||||
* For a list of examples related to this driver, see
|
||||
* \ref asfdoc_samd20_port_exqsg.
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_port_api_overview API Overview
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include <compiler.h>
|
||||
#include <pinmux.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \name PORT Alias Macros
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** Convenience definition for GPIO module group A on the device (if
|
||||
* available). */
|
||||
#if (PORT_GROUPS > 0) || defined(__DOXYGEN__)
|
||||
# define PORTA PORT->Group[0]
|
||||
#endif
|
||||
|
||||
#if (PORT_GROUPS > 1) || defined(__DOXYGEN__)
|
||||
/** Convenience definition for GPIO module group B on the device (if
|
||||
* available). */
|
||||
# define PORTB PORT->Group[1]
|
||||
#endif
|
||||
|
||||
#if (PORT_GROUPS > 2) || defined(__DOXYGEN__)
|
||||
/** Convenience definition for GPIO module group C on the device (if
|
||||
* available). */
|
||||
# define PORTC PORT->Group[2]
|
||||
#endif
|
||||
|
||||
#if (PORT_GROUPS > 3) || defined(__DOXYGEN__)
|
||||
/** Convenience definition for GPIO module group D on the device (if
|
||||
* available). */
|
||||
# define PORTD PORT->Group[3]
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \brief Port pin direction configuration enum.
|
||||
*
|
||||
* Enum for the possible pin direction settings of the port pin configuration
|
||||
* structure, to indicate the direction the pin should use.
|
||||
*/
|
||||
enum port_pin_dir {
|
||||
/** The pin's input buffer should be enabled, so that the pin state can
|
||||
* be read. */
|
||||
PORT_PIN_DIR_INPUT = SYSTEM_PINMUX_PIN_DIR_INPUT,
|
||||
/** The pin's output buffer should be enabled, so that the pin state can
|
||||
* be set. */
|
||||
PORT_PIN_DIR_OUTPUT = SYSTEM_PINMUX_PIN_DIR_OUTPUT,
|
||||
/** The pin's output and input buffers should be enabled, so that the pin
|
||||
* state can be set and read back. */
|
||||
PORT_PIN_DIR_OUTPUT_WTH_READBACK = SYSTEM_PINMUX_PIN_DIR_OUTPUT_WITH_READBACK,
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Port pin input pull configuration enum.
|
||||
*
|
||||
* Enum for the possible pin pull settings of the port pin configuration
|
||||
* structure, to indicate the type of logic level pull the pin should use.
|
||||
*/
|
||||
enum port_pin_pull {
|
||||
/** No logical pull should be applied to the pin. */
|
||||
PORT_PIN_PULL_NONE = SYSTEM_PINMUX_PIN_PULL_NONE,
|
||||
/** Pin should be pulled up when idle. */
|
||||
PORT_PIN_PULL_UP = SYSTEM_PINMUX_PIN_PULL_UP,
|
||||
/** Pin should be pulled down when idle. */
|
||||
PORT_PIN_PULL_DOWN = SYSTEM_PINMUX_PIN_PULL_DOWN,
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Port pin configuration structure.
|
||||
*
|
||||
* Configuration structure for a port pin instance. This structure should be
|
||||
* initialized by the \ref port_get_config_defaults() function before being
|
||||
* modified by the user application.
|
||||
*/
|
||||
struct port_config {
|
||||
/** Port buffer input/output direction. */
|
||||
enum port_pin_dir direction;
|
||||
|
||||
/** Port pull-up/pull-down for input pins. */
|
||||
enum port_pin_pull input_pull;
|
||||
};
|
||||
|
||||
/** \name State reading/writing (physical group orientated)
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Retrieves the PORT module group instance from a given GPIO pin number.
|
||||
*
|
||||
* Retrieves the PORT module group instance associated with a given logical
|
||||
* GPIO pin number.
|
||||
*
|
||||
* \param[in] gpio_pin Index of the GPIO pin to convert.
|
||||
*
|
||||
* \return Base address of the associated PORT module.
|
||||
*/
|
||||
static inline PortGroup* port_get_group_from_gpio_pin(
|
||||
const uint8_t gpio_pin)
|
||||
{
|
||||
return system_pinmux_get_group_from_gpio_pin(gpio_pin);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Retrieves the state of a group of port pins that are configured as inputs.
|
||||
*
|
||||
* Reads the current logic level of a port module's pins and returns the
|
||||
* current levels as a bitmask.
|
||||
*
|
||||
* \param[in] port Base of the PORT module to read from.
|
||||
* \param[in] mask Mask of the port pin(s) to read.
|
||||
*
|
||||
* \return Status of the port pin(s) input buffers.
|
||||
*/
|
||||
static inline uint32_t port_group_get_input_level(
|
||||
const PortGroup *const port,
|
||||
const uint32_t mask)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(port);
|
||||
|
||||
return (port->IN.reg & mask);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Retrieves the state of a group of port pins that are configured as outputs.
|
||||
*
|
||||
* Reads the current logical output level of a port module's pins and returns
|
||||
* the current levels as a bitmask.
|
||||
*
|
||||
* \param[in] port Base of the PORT module to read from.
|
||||
* \param[in] mask Mask of the port pin(s) to read.
|
||||
*
|
||||
* \return Status of the port pin(s) output buffers.
|
||||
*/
|
||||
static inline uint32_t port_group_get_output_level(
|
||||
const PortGroup *const port,
|
||||
const uint32_t mask)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(port);
|
||||
|
||||
return (port->OUT.reg & mask);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Sets the state of a group of port pins that are configured as outputs.
|
||||
*
|
||||
* Sets the current output level of a port module's pins to a given logic
|
||||
* level.
|
||||
*
|
||||
* \param[out] port Base of the PORT module to write to.
|
||||
* \param[in] mask Mask of the port pin(s) to change.
|
||||
* \param[in] level_mask Mask of the port level(s) to set.
|
||||
*/
|
||||
static inline void port_group_set_output_level(
|
||||
PortGroup *const port,
|
||||
const uint32_t mask,
|
||||
const uint32_t level_mask)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(port);
|
||||
|
||||
port->OUTSET.reg = (mask & level_mask);
|
||||
port->OUTCLR.reg = (mask & ~level_mask);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Toggles the state of a group of port pins that are configured as an outputs.
|
||||
*
|
||||
* Toggles the current output levels of a port module's pins.
|
||||
*
|
||||
* \param[out] port Base of the PORT module to write to.
|
||||
* \param[in] mask Mask of the port pin(s) to toggle.
|
||||
*/
|
||||
static inline void port_group_toggle_output_level(
|
||||
PortGroup *const port,
|
||||
const uint32_t mask)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(port);
|
||||
|
||||
port->OUTTGL.reg = mask;
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
||||
/** \name Configuration and initialization
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Initializes a Port pin/group configuration structure to defaults.
|
||||
*
|
||||
* Initializes a given Port pin/group configuration structure to a set of
|
||||
* known default values. This function should be called on all new
|
||||
* instances of these configuration structures before being modified by the
|
||||
* user application.
|
||||
*
|
||||
* The default configuration is as follows:
|
||||
* \li Input mode with internal pullup enabled
|
||||
*
|
||||
* \param[out] config Configuration structure to initialize to default values.
|
||||
*/
|
||||
static inline void port_get_config_defaults(
|
||||
struct port_config *const config)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(config);
|
||||
|
||||
/* Default configuration values */
|
||||
config->direction = PORT_PIN_DIR_INPUT;
|
||||
config->input_pull = PORT_PIN_PULL_UP;
|
||||
}
|
||||
|
||||
void port_pin_set_config(
|
||||
const uint8_t gpio_pin,
|
||||
const struct port_config *const config);
|
||||
|
||||
void port_group_set_config(
|
||||
PortGroup *const port,
|
||||
const uint32_t mask,
|
||||
const struct port_config *const config);
|
||||
|
||||
/** @} */
|
||||
|
||||
/** \name State reading/writing (logical pin orientated)
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Retrieves the state of a port pin that is configured as an input.
|
||||
*
|
||||
* Reads the current logic level of a port pin and returns the current
|
||||
* level as a boolean value.
|
||||
*
|
||||
* \param[in] gpio_pin Index of the GPIO pin to read.
|
||||
*
|
||||
* \return Status of the port pin's input buffer.
|
||||
*/
|
||||
static inline bool port_pin_get_input_level(
|
||||
const uint8_t gpio_pin)
|
||||
{
|
||||
PortGroup *const port_base = port_get_group_from_gpio_pin(gpio_pin);
|
||||
uint32_t pin_mask = (1UL << (gpio_pin % 32));
|
||||
|
||||
return (port_base->IN.reg & pin_mask);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Retrieves the state of a port pin that is configured as an output.
|
||||
*
|
||||
* Reads the current logical output level of a port pin and returns the current
|
||||
* level as a boolean value.
|
||||
*
|
||||
* \param[in] gpio_pin Index of the GPIO pin to read.
|
||||
*
|
||||
* \return Status of the port pin's output buffer.
|
||||
*/
|
||||
static inline bool port_pin_get_output_level(
|
||||
const uint8_t gpio_pin)
|
||||
{
|
||||
PortGroup *const port_base = port_get_group_from_gpio_pin(gpio_pin);
|
||||
uint32_t pin_mask = (1UL << (gpio_pin % 32));
|
||||
|
||||
return (port_base->OUT.reg & pin_mask);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Sets the state of a port pin that is configured as an output.
|
||||
*
|
||||
* Sets the current output level of a port pin to a given logic level.
|
||||
*
|
||||
* \param[in] gpio_pin Index of the GPIO pin to write to.
|
||||
* \param[in] level Logical level to set the given pin to.
|
||||
*/
|
||||
static inline void port_pin_set_output_level(
|
||||
const uint8_t gpio_pin,
|
||||
const bool level)
|
||||
{
|
||||
PortGroup *const port_base = port_get_group_from_gpio_pin(gpio_pin);
|
||||
uint32_t pin_mask = (1UL << (gpio_pin % 32));
|
||||
|
||||
/* Set the pin to high or low atomically based on the requested level */
|
||||
if (level) {
|
||||
port_base->OUTSET.reg = pin_mask;
|
||||
} else {
|
||||
port_base->OUTCLR.reg = pin_mask;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Toggles the state of a port pin that is configured as an output.
|
||||
*
|
||||
* Toggles the current output level of a port pin.
|
||||
*
|
||||
* \param[in] gpio_pin Index of the GPIO pin to toggle.
|
||||
*/
|
||||
static inline void port_pin_toggle_output_level(
|
||||
const uint8_t gpio_pin)
|
||||
{
|
||||
PortGroup *const port_base = port_get_group_from_gpio_pin(gpio_pin);
|
||||
uint32_t pin_mask = (1UL << (gpio_pin % 32));
|
||||
|
||||
/* Toggle pin output level */
|
||||
port_base->OUTTGL.reg = pin_mask;
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \page asfdoc_samd20_port_extra Extra Information for PORT Driver
|
||||
*
|
||||
* \section asfdoc_samd20_port_extra_acronyms Acronyms
|
||||
* Below is a table listing the acronyms used in this module, along with their
|
||||
* intended meanings.
|
||||
*
|
||||
* <table>
|
||||
* <tr>
|
||||
* <th>Acronym</th>
|
||||
* <th>Description</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>GPIO</td>
|
||||
* <td>General Purpose Input/Output</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>MUX</td>
|
||||
* <td>Multiplexer</td>
|
||||
* </tr>
|
||||
* </table>
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_port_extra_dependencies Dependencies
|
||||
* This driver has the following dependencies:
|
||||
*
|
||||
* - \ref asfdoc_samd20_system_pinmux_group "System Pin Multiplexer Driver"
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_port_extra_errata Errata
|
||||
* There are no errata related to this driver.
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_port_extra_history Module History
|
||||
* An overview of the module history is presented in the table below, with
|
||||
* details on the enhancements and fixes made to the module since its first
|
||||
* release. The current version of this corresponds to the newest version in
|
||||
* the table.
|
||||
*
|
||||
* <table>
|
||||
* <tr>
|
||||
* <th>Changelog</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>Initial Release</td>
|
||||
* </tr>
|
||||
* </table>
|
||||
*/
|
||||
|
||||
/**
|
||||
* \page asfdoc_samd20_port_exqsg Examples for PORT Driver
|
||||
*
|
||||
* This is a list of the available Quick Start guides (QSGs) and example
|
||||
* applications for \ref asfdoc_samd20_port_group. QSGs are simple examples with
|
||||
* step-by-step instructions to configure and use this driver in a selection of
|
||||
* use cases. Note that QSGs can be compiled as a standalone application or be
|
||||
* added to the user application.
|
||||
*
|
||||
* - \subpage asfdoc_samd20_port_basic_use_case
|
||||
*
|
||||
* \page asfdoc_samd20_port_document_revision_history Document Revision History
|
||||
*
|
||||
* <table>
|
||||
* <tr>
|
||||
* <th>Doc. Rev.</td>
|
||||
* <th>Date</td>
|
||||
* <th>Comments</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>B</td>
|
||||
* <td>06/2013</td>
|
||||
* <td>Corrected documentation typos.</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>A</td>
|
||||
* <td>06/2013</td>
|
||||
* <td>Initial release</td>
|
||||
* </tr>
|
||||
* </table>
|
||||
*/
|
||||
|
||||
#endif
|
|
@ -0,0 +1,105 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 GPIO Port Driver Quick Start
|
||||
*
|
||||
* Copyright (C) 2012-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \page asfdoc_samd20_port_basic_use_case Quick Start Guide for PORT - Basic
|
||||
*
|
||||
* In this use case, the PORT module is configured for:
|
||||
* \li One pin in input mode, with pull-up enabled
|
||||
* \li One pin in output mode
|
||||
*
|
||||
* This use case sets up the PORT to read the current state of a GPIO pin set as
|
||||
* an input, and mirrors the opposite logical state on a pin configured as an
|
||||
* output.
|
||||
*
|
||||
* \section asfdoc_samd20_port_basic_use_case_setup Setup
|
||||
*
|
||||
* \subsection asfdoc_samd20_port_basic_use_case_setup_prereq Prerequisites
|
||||
* There are no special setup requirements for this use-case.
|
||||
*
|
||||
* \subsection asfdoc_samd20_port_basic_use_case_setup_code Code
|
||||
* Copy-paste the following setup code to your user application:
|
||||
* \snippet qs_port_basic.c setup
|
||||
*
|
||||
* Add to user application initialization (typically the start of \c main()):
|
||||
* \snippet qs_port_basic.c setup_init
|
||||
*
|
||||
* \subsection asfdoc_samd20_port_basic_use_case_setup_flow Workflow
|
||||
* -# Create a PORT module pin configuration struct, which can be filled out to
|
||||
* adjust the configuration of a single port pin.
|
||||
* \snippet qs_port_basic.c setup_1
|
||||
* -# Initialize the pin configuration struct with the module's default values.
|
||||
* \note This should always be performed before using the configuration
|
||||
* struct to ensure that all values are initialized to known default
|
||||
* settings.
|
||||
*
|
||||
* \snippet qs_port_basic.c setup_2
|
||||
* -# Adjust the configuration struct to request an input pin.
|
||||
* \snippet qs_port_basic.c setup_3
|
||||
* -# Configure GPIO10 with the initialized pin configuration struct, to enable
|
||||
* the input sampler on the pin.
|
||||
* \snippet qs_port_basic.c setup_4
|
||||
* -# Adjust the configuration struct to request an output pin.
|
||||
* \note The existing configuration struct may be re-used, as long as any
|
||||
* values that have been altered from the default settings are taken
|
||||
* into account by the user application.
|
||||
*
|
||||
* \snippet qs_port_basic.c setup_5
|
||||
* -# Configure GPIO11 with the initialized pin configuration struct, to enable
|
||||
* the output driver on the pin.
|
||||
* \snippet qs_port_basic.c setup_6
|
||||
*
|
||||
* \section asfdoc_samd20_port_basic_use_case_use_main Use Case
|
||||
*
|
||||
* \subsection asfdoc_samd20_port_basic_use_case_code Code
|
||||
* Copy-paste the following code to your user application:
|
||||
* \snippet qs_port_basic.c main
|
||||
*
|
||||
* \subsection asfdoc_samd20_port_basic_use_case_flow Workflow
|
||||
* -# Read in the current input sampler state of GPIO10, which has been
|
||||
* configured as an input in the use-case setup code.
|
||||
* \snippet qs_port_basic.c main_1
|
||||
* -# Write the inverted pin level state to GPIO11, which has been configured as
|
||||
* an output in the use-case setup code.
|
||||
* \snippet qs_port_basic.c main_2
|
||||
*/
|
|
@ -0,0 +1,209 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 Serial Peripheral Interface Driver
|
||||
*
|
||||
* Copyright (C) 2012-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
#include "sercom.h"
|
||||
|
||||
#define SHIFT 32
|
||||
|
||||
#if !defined(__DOXYGEN__)
|
||||
/**
|
||||
* \internal Configuration structure to save current gclk status.
|
||||
*/
|
||||
struct _sercom_conf {
|
||||
/* Status of gclk generator initialization. */
|
||||
bool generator_is_set;
|
||||
/* Sercom gclk generator used. */
|
||||
enum gclk_generator generator_source;
|
||||
};
|
||||
|
||||
static struct _sercom_conf _sercom_config;
|
||||
|
||||
/**
|
||||
* \internal Calculate synchronous baudrate value (SPI/UART)
|
||||
*/
|
||||
enum status_code _sercom_get_sync_baud_val(
|
||||
const uint32_t baudrate,
|
||||
const uint32_t external_clock,
|
||||
uint16_t *const baudvalue)
|
||||
{
|
||||
/* Baud value variable */
|
||||
uint16_t baud_calculated = 0;
|
||||
|
||||
/* Check if baudrate is outside of valid range. */
|
||||
if (baudrate > (external_clock / 2)) {
|
||||
/* Return with error code */
|
||||
return STATUS_ERR_BAUDRATE_UNAVAILABLE;
|
||||
}
|
||||
|
||||
/* Calculate BAUD value from clock frequency and baudrate */
|
||||
baud_calculated = (external_clock / (2 * baudrate)) - 1;
|
||||
|
||||
/* Check if BAUD value is more than 255, which is maximum
|
||||
* for synchronous mode */
|
||||
if (baud_calculated > 0xFF) {
|
||||
/* Return with an error code */
|
||||
return STATUS_ERR_BAUDRATE_UNAVAILABLE;
|
||||
} else {
|
||||
*baudvalue = baud_calculated;
|
||||
return STATUS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \internal Calculate asynchronous baudrate value (UART)
|
||||
*/
|
||||
enum status_code _sercom_get_async_baud_val(
|
||||
const uint32_t baudrate,
|
||||
const uint32_t peripheral_clock,
|
||||
uint16_t *const baudval)
|
||||
{
|
||||
/* Temporary variables */
|
||||
uint64_t ratio = 0;
|
||||
uint64_t scale = 0;
|
||||
uint64_t baud_calculated = 0;
|
||||
|
||||
/* Check if the baudrate is outside of valid range */
|
||||
if ((baudrate * 16) >= peripheral_clock) {
|
||||
/* Return with error code */
|
||||
return STATUS_ERR_BAUDRATE_UNAVAILABLE;
|
||||
}
|
||||
|
||||
/* Calculate the BAUD value */
|
||||
ratio = ((16 * (uint64_t)baudrate) << SHIFT) / peripheral_clock;
|
||||
scale = ((uint64_t)1 << SHIFT) - ratio;
|
||||
baud_calculated = (65536 * scale) >> SHIFT;
|
||||
|
||||
*baudval = baud_calculated;
|
||||
|
||||
return STATUS_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Set GCLK channel to generator.
|
||||
*
|
||||
* This will set the appropriate GCLK channel to the requested GCLK generator.
|
||||
* This will set the generator for all SERCOM instances, and the user will thus
|
||||
* only be able to set the same generator that has previously been set, if any.
|
||||
*
|
||||
* After the generator has been set the first time, the generator can be changed
|
||||
* using the \c force_change flag.
|
||||
*
|
||||
* \param[in] generator_source The generator to use for SERCOM.
|
||||
* \param[in] force_change Force change the generator.
|
||||
*
|
||||
* \return Status code indicating the GCLK generator change operation.
|
||||
* \retval STATUS_OK If the generator update request was
|
||||
* successful.
|
||||
* \retval STATUS_ERR_ALREADY_INITIALIZED If a generator was already configured
|
||||
* and the new configuration was not
|
||||
* forced.
|
||||
*/
|
||||
enum status_code sercom_set_gclk_generator(
|
||||
const enum gclk_generator generator_source,
|
||||
const bool force_change)
|
||||
{
|
||||
/* Check if valid option. */
|
||||
if (!_sercom_config.generator_is_set || force_change) {
|
||||
/* Create and fill a GCLK configuration structure for the new config. */
|
||||
struct system_gclk_chan_config gclk_chan_conf;
|
||||
system_gclk_chan_get_config_defaults(&gclk_chan_conf);
|
||||
gclk_chan_conf.source_generator = generator_source;
|
||||
system_gclk_chan_set_config(SERCOM_GCLK_ID, &gclk_chan_conf);
|
||||
system_gclk_chan_enable(SERCOM_GCLK_ID);
|
||||
|
||||
/* Save config. */
|
||||
_sercom_config.generator_source = generator_source;
|
||||
_sercom_config.generator_is_set = true;
|
||||
|
||||
return STATUS_OK;
|
||||
} else if (generator_source == _sercom_config.generator_source) {
|
||||
/* Return status OK if same config. */
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
||||
/* Return invalid config to already initialized GCLK. */
|
||||
return STATUS_ERR_ALREADY_INITIALIZED;
|
||||
}
|
||||
|
||||
/** \internal
|
||||
* Creates a switch statement case entry to convert a SERCOM instance and pad
|
||||
* index to the default SERCOM pad MUX setting.
|
||||
*/
|
||||
#define _SERCOM_PAD_DEFAULTS_CASE(n, pad) \
|
||||
case (uintptr_t)SERCOM##n: \
|
||||
switch (pad) { \
|
||||
case 0: \
|
||||
return SERCOM##n##_PAD0_DEFAULT; \
|
||||
case 1: \
|
||||
return SERCOM##n##_PAD1_DEFAULT; \
|
||||
case 2: \
|
||||
return SERCOM##n##_PAD2_DEFAULT; \
|
||||
case 3: \
|
||||
return SERCOM##n##_PAD3_DEFAULT; \
|
||||
} \
|
||||
break;
|
||||
|
||||
/**
|
||||
* \internal Gets the default PAD pinout for a given SERCOM.
|
||||
*
|
||||
* Returns the PINMUX settings for the given SERCOM and pad. This is used
|
||||
* for default configuration of pins.
|
||||
*
|
||||
* \param[in] sercom_module Pointer to the SERCOM module
|
||||
* \param[in] pad PAD to get default pinout for
|
||||
*
|
||||
* \returns The default PINMUX for the given SERCOM instance and PAD
|
||||
*
|
||||
*/
|
||||
uint32_t _sercom_get_default_pad(
|
||||
Sercom *const sercom_module,
|
||||
const uint8_t pad)
|
||||
{
|
||||
switch ((uintptr_t)sercom_module) {
|
||||
/* Auto-generate a lookup table for the default SERCOM pad defaults */
|
||||
MREPEAT(SERCOM_INST_NUM, _SERCOM_PAD_DEFAULTS_CASE, pad)
|
||||
}
|
||||
|
||||
Assert(false);
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,87 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 Serial Peripheral Interface Driver
|
||||
*
|
||||
* Copyright (C) 2012-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SERCOM_H_INCLUDED
|
||||
#define SERCOM_H_INCLUDED
|
||||
|
||||
#include <compiler.h>
|
||||
#include <system.h>
|
||||
#include <clock.h>
|
||||
#include "sercom_interrupt.h"
|
||||
#include "sercom_pinout.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if (SERCOM0_GCLK_ID_SLOW == SERCOM1_GCLK_ID_SLOW && \
|
||||
SERCOM0_GCLK_ID_SLOW == SERCOM2_GCLK_ID_SLOW && \
|
||||
SERCOM0_GCLK_ID_SLOW == SERCOM3_GCLK_ID_SLOW)
|
||||
# define SERCOM_GCLK_ID SERCOM0_GCLK_ID_SLOW
|
||||
#else
|
||||
# error "SERCOM modules must share the same slow GCLK channel ID."
|
||||
#endif
|
||||
|
||||
enum status_code sercom_set_gclk_generator(
|
||||
const enum gclk_generator generator_source,
|
||||
const bool force_change);
|
||||
|
||||
enum status_code _sercom_get_sync_baud_val(
|
||||
const uint32_t baudrate,
|
||||
const uint32_t external_clock,
|
||||
uint16_t *const baudval);
|
||||
|
||||
enum status_code _sercom_get_async_baud_val(
|
||||
const uint32_t baudrate,
|
||||
const uint32_t peripheral_clock,
|
||||
uint16_t *const baudval);
|
||||
|
||||
uint32_t _sercom_get_default_pad(
|
||||
Sercom *const sercom_module,
|
||||
const uint8_t pad);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif //__SERCOM_H_INCLUDED
|
|
@ -0,0 +1,164 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 Serial Peripheral Interface Driver
|
||||
*
|
||||
* Copyright (C) 2012-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
#include "sercom_interrupt.h"
|
||||
|
||||
void *_sercom_instances[SERCOM_INST_NUM];
|
||||
|
||||
/** Save status of initialized handlers. */
|
||||
static bool _handler_table_initialized = false;
|
||||
|
||||
/** Void pointers for saving device instance structures. */
|
||||
static void (*_sercom_interrupt_handlers[SERCOM_INST_NUM])(const uint8_t instance);
|
||||
|
||||
/**
|
||||
* \internal
|
||||
* Default interrupt handler.
|
||||
*
|
||||
* \param[in] instance SERCOM instance used.
|
||||
*/
|
||||
static void _sercom_default_handler(
|
||||
const uint8_t instance)
|
||||
{
|
||||
Assert(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* \internal
|
||||
* Find index of given instance.
|
||||
*
|
||||
* \param[in] sercom_instance Instance pointer.
|
||||
*
|
||||
* \return Index of given instance.
|
||||
*/
|
||||
uint8_t _sercom_get_sercom_inst_index(
|
||||
Sercom *const sercom_instance)
|
||||
{
|
||||
/* Save all available SERCOM instances for compare. */
|
||||
Sercom *sercom_instances[SERCOM_INST_NUM] = SERCOM_INSTS;
|
||||
|
||||
/* Find index for sercom instance. */
|
||||
for (uint32_t i = 0; i < SERCOM_INST_NUM; i++) {
|
||||
if ((uintptr_t)sercom_instance == (uintptr_t)sercom_instances[i]) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
/* Invalid data given. */
|
||||
Assert(false);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* \internal
|
||||
* Saves the given callback handler.
|
||||
*
|
||||
* \param[in] instance Instance index.
|
||||
* \param[in] interrupt_handler Pointer to instance callback handler.
|
||||
*/
|
||||
void _sercom_set_handler(
|
||||
const uint8_t instance,
|
||||
const sercom_handler_t interrupt_handler)
|
||||
{
|
||||
/* Initialize handlers with default handler and device instances with 0. */
|
||||
if (_handler_table_initialized == false) {
|
||||
for (uint32_t i = 0; i < SERCOM_INST_NUM; i++) {
|
||||
_sercom_interrupt_handlers[i] = &_sercom_default_handler;
|
||||
_sercom_instances[i] = NULL;
|
||||
}
|
||||
|
||||
_handler_table_initialized = true;
|
||||
}
|
||||
|
||||
/* Save interrupt handler. */
|
||||
_sercom_interrupt_handlers[instance] = interrupt_handler;
|
||||
}
|
||||
|
||||
|
||||
/** \internal
|
||||
* Converts a given SERCOM index to its interrupt vector index.
|
||||
*/
|
||||
#define _SERCOM_INTERRUPT_VECT_NUM(n, unused) \
|
||||
SYSTEM_INTERRUPT_MODULE_SERCOM##n,
|
||||
|
||||
/** \internal
|
||||
* Generates a SERCOM interrupt handler function for a given SERCOM index.
|
||||
*/
|
||||
#define _SERCOM_INTERRUPT_HANDLER(n, unused) \
|
||||
void SERCOM##n##_Handler(void) \
|
||||
{ \
|
||||
_sercom_interrupt_handlers[n](n); \
|
||||
}
|
||||
|
||||
/**
|
||||
* \internal
|
||||
* Returns the system interrupt vector.
|
||||
*
|
||||
* \param[in] sercom_instance Instance pointer
|
||||
*
|
||||
* \return Enum of system interrupt vector
|
||||
* \retval SYSTEM_INTERRUPT_MODULE_SERCOM0
|
||||
* \retval SYSTEM_INTERRUPT_MODULE_SERCOM1
|
||||
* \retval SYSTEM_INTERRUPT_MODULE_SERCOM2
|
||||
* \retval SYSTEM_INTERRUPT_MODULE_SERCOM3
|
||||
* \retval SYSTEM_INTERRUPT_MODULE_SERCOM4
|
||||
* \retval SYSTEM_INTERRUPT_MODULE_SERCOM5
|
||||
* \retval SYSTEM_INTERRUPT_MODULE_SERCOM6
|
||||
* \retval SYSTEM_INTERRUPT_MODULE_SERCOM7
|
||||
*/
|
||||
enum system_interrupt_vector _sercom_get_interrupt_vector(
|
||||
Sercom *const sercom_instance)
|
||||
{
|
||||
const uint8_t sercom_int_vectors[SERCOM_INST_NUM] =
|
||||
{
|
||||
MREPEAT(SERCOM_INST_NUM, _SERCOM_INTERRUPT_VECT_NUM, ~)
|
||||
};
|
||||
|
||||
/* Retrieve the index of the SERCOM being requested */
|
||||
uint8_t instance_index = _sercom_get_sercom_inst_index(sercom_instance);
|
||||
|
||||
/* Get the vector number from the lookup table for the requested SERCOM */
|
||||
return (enum system_interrupt_vector)sercom_int_vectors[instance_index];
|
||||
}
|
||||
|
||||
/** Auto-generate a set of interrupt handlers for each SERCOM in the device */
|
||||
MREPEAT(SERCOM_INST_NUM, _SERCOM_INTERRUPT_HANDLER, ~)
|
|
@ -0,0 +1,64 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 Serial Peripheral Interface Driver
|
||||
*
|
||||
* Copyright (C) 2012-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
#ifndef SERCOM_INTERRUPT_H_INCLUDED
|
||||
#define SERCOM_INTERRUPT_H_INCLUDED
|
||||
|
||||
#include "sercom.h"
|
||||
#include <system_interrupt.h>
|
||||
|
||||
/* Look-up table for device instances. */
|
||||
extern void *_sercom_instances[SERCOM_INST_NUM];
|
||||
|
||||
typedef void (*sercom_handler_t)(uint8_t instance);
|
||||
|
||||
uint8_t _sercom_get_sercom_inst_index(
|
||||
Sercom *const sercom_instance);
|
||||
|
||||
enum system_interrupt_vector _sercom_get_interrupt_vector(
|
||||
Sercom *const sercom_instance);
|
||||
|
||||
void _sercom_set_handler(
|
||||
const uint8_t instance,
|
||||
const sercom_handler_t interrupt_handler);
|
||||
|
||||
#endif /* SERCOM_INTERRUPT_H_INCLUDED */
|
|
@ -0,0 +1,84 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 SERCOM Module Pinout Definitions
|
||||
*
|
||||
* Copyright (C) 2012-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
#ifndef SERCOM_PINOUT_H_INCLUDED
|
||||
#define SERCOM_PINOUT_H_INCLUDED
|
||||
|
||||
#include "sercom.h"
|
||||
|
||||
/* SERCOM0 */
|
||||
#define SERCOM0_PAD0_DEFAULT PINMUX_PA04D_SERCOM0_PAD0
|
||||
#define SERCOM0_PAD1_DEFAULT PINMUX_PA05D_SERCOM0_PAD1
|
||||
#define SERCOM0_PAD2_DEFAULT PINMUX_PA06D_SERCOM0_PAD2
|
||||
#define SERCOM0_PAD3_DEFAULT PINMUX_PA07D_SERCOM0_PAD3
|
||||
|
||||
/* SERCOM1 */
|
||||
#define SERCOM1_PAD0_DEFAULT PINMUX_PA00D_SERCOM1_PAD0
|
||||
#define SERCOM1_PAD1_DEFAULT PINMUX_PA01D_SERCOM1_PAD1
|
||||
#define SERCOM1_PAD2_DEFAULT PINMUX_PA30D_SERCOM1_PAD2
|
||||
#define SERCOM1_PAD3_DEFAULT PINMUX_PA31D_SERCOM1_PAD3
|
||||
|
||||
/* SERCOM2 */
|
||||
#define SERCOM2_PAD0_DEFAULT PINMUX_PA08D_SERCOM2_PAD0
|
||||
#define SERCOM2_PAD1_DEFAULT PINMUX_PA09D_SERCOM2_PAD1
|
||||
#define SERCOM2_PAD2_DEFAULT PINMUX_PA10D_SERCOM2_PAD2
|
||||
#define SERCOM2_PAD3_DEFAULT PINMUX_PA11D_SERCOM2_PAD3
|
||||
|
||||
/* SERCOM3 */
|
||||
#define SERCOM3_PAD0_DEFAULT PINMUX_PA16D_SERCOM3_PAD0
|
||||
#define SERCOM3_PAD1_DEFAULT PINMUX_PA17D_SERCOM3_PAD1
|
||||
#define SERCOM3_PAD2_DEFAULT PINMUX_PA18D_SERCOM3_PAD2
|
||||
#define SERCOM3_PAD3_DEFAULT PINMUX_PA19D_SERCOM3_PAD3
|
||||
|
||||
/* SERCOM4 */
|
||||
#define SERCOM4_PAD0_DEFAULT PINMUX_PA12D_SERCOM4_PAD0
|
||||
#define SERCOM4_PAD1_DEFAULT PINMUX_PA13D_SERCOM4_PAD1
|
||||
#define SERCOM4_PAD2_DEFAULT PINMUX_PA14D_SERCOM4_PAD2
|
||||
#define SERCOM4_PAD3_DEFAULT PINMUX_PA15D_SERCOM4_PAD3
|
||||
|
||||
/* SERCOM5 */
|
||||
#define SERCOM5_PAD0_DEFAULT PINMUX_PA22D_SERCOM5_PAD0
|
||||
#define SERCOM5_PAD1_DEFAULT PINMUX_PA23D_SERCOM5_PAD1
|
||||
#define SERCOM5_PAD2_DEFAULT PINMUX_PA24D_SERCOM5_PAD2
|
||||
#define SERCOM5_PAD3_DEFAULT PINMUX_PA25D_SERCOM5_PAD3
|
||||
|
||||
#endif /* SERCOM_PINOUT_H_INCLUDED */
|
|
@ -0,0 +1,113 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 USART Interface Driver
|
||||
*
|
||||
* Copyright (C) 2012-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \page asfdoc_samd20_sercom_usart_basic_use_case Quick Start Guide for SERCOM USART - Basic
|
||||
*
|
||||
* This quick start will echo back characters typed into the terminal. In this
|
||||
* use case the USART will be configured with the following settings:
|
||||
* - Asynchronous mode
|
||||
* - 9600 Baudrate
|
||||
* - 8-bits, No Parity and 1 Stop Bit
|
||||
* - TX and RX enabled and connected to the Xplained PRO Embedded Debugger virtual COM port
|
||||
*
|
||||
* \section asfdoc_samd20_sercom_usart_basic_use_case_setup Setup
|
||||
*
|
||||
* \subsection asfdoc_samd20_sercom_usart_basic_use_case_prereq Prerequisites
|
||||
* There are no special setup requirements for this use-case.
|
||||
*
|
||||
* \subsection asfdoc_samd20_usart_basic_use_case_setup_code Code
|
||||
* Add to the main application source file, outside of any functions:
|
||||
* \snippet qs_usart_basic_use.c module_inst
|
||||
*
|
||||
* Copy-paste the following setup code to your user application:
|
||||
* \snippet qs_usart_basic_use.c setup
|
||||
*
|
||||
* Add to user application initialization (typically the start of \c main()):
|
||||
* \snippet qs_usart_basic_use.c setup_init
|
||||
*
|
||||
* \subsection asfdoc_samd20_usart_basic_use_case_setup_flow Workflow
|
||||
* -# Create a module software instance structure for the USART module to store
|
||||
* the USART driver state while it is in use.
|
||||
* \note This should never go out of scope as long as the module is in use.
|
||||
* In most cases, this should be global.
|
||||
*
|
||||
* \snippet qs_usart_basic_use.c module_inst
|
||||
* -# Configure the USART module.
|
||||
* -# Create a USART module configuration struct, which can be filled out to
|
||||
* adjust the configuration of a physical USART peripheral.
|
||||
* \snippet qs_usart_basic_use.c setup_config
|
||||
* -# Initialize the USART configuration struct with the module's default values.
|
||||
* \note This should always be performed before using the configuration
|
||||
* struct to ensure that all values are initialized to known default
|
||||
* settings.
|
||||
*
|
||||
* \snippet qs_usart_basic_use.c setup_config_defaults
|
||||
* -# Alter the USART settings to configure the physical pinout, baud rate and
|
||||
* other relevant parameters.
|
||||
* \snippet qs_usart_basic_use.c setup_change_config
|
||||
* -# Configure the USART module with the desired settings, retrying while the
|
||||
* driver is busy until the configuration is stressfully set.
|
||||
* \snippet qs_usart_basic_use.c setup_set_config
|
||||
* -# Enable the USART module.
|
||||
* \snippet qs_usart_basic_use.c setup_enable
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_usart_basic_use_case_main Use Case
|
||||
*
|
||||
* \subsection asfdoc_samd20_usart_basic_use_case_main_code Code
|
||||
* Copy-paste the following code to your user application:
|
||||
* \snippet qs_usart_basic_use.c main
|
||||
*
|
||||
* \subsection asfdoc_samd20_usart_basic_use_case_main_flow Workflow
|
||||
* -# Send a string to the USART to show the demo is running, blocking until
|
||||
* all characters have been sent.
|
||||
* \snippet qs_usart_basic_use.c main_send_string
|
||||
* -# Enter an infinite loop to continuously echo received values on the USART.
|
||||
* \snippet qs_usart_basic_use.c main_loop
|
||||
* -# Perform a blocking read of the USART, storing the received character into
|
||||
* the previously declared temporary variable.
|
||||
* \snippet qs_usart_basic_use.c main_read
|
||||
* -# Echo the received variable back to the USART via a blocking write.
|
||||
* \snippet qs_usart_basic_use.c main_write
|
||||
*/
|
|
@ -0,0 +1,127 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 USART Interface Driver
|
||||
*
|
||||
* Copyright (C) 2012-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \page asfdoc_samd20_sercom_usart_callback_use_case Quick Start Guide for SERCOM USART - Callback
|
||||
*
|
||||
* This quick start will echo back characters typed into the terminal, using
|
||||
* asynchronous TX and RX callbacks from the USART peripheral. In this use case
|
||||
* the USART will be configured with the following settings:
|
||||
* - Asynchronous mode
|
||||
* - 9600 Baudrate
|
||||
* - 8-bits, No Parity and 1 Stop Bit
|
||||
* - TX and RX enabled and connected to the Xplained PRO Embedded Debugger virtual COM port
|
||||
*
|
||||
* \section asfdoc_samd20_sercom_usart_callback_use_case_setup Setup
|
||||
*
|
||||
* \subsection asfdoc_samd20_sercom_usart_callback_use_case_prereq Prerequisites
|
||||
* There are no special setup requirements for this use-case.
|
||||
*
|
||||
* \subsection asfdoc_samd20_usart_callback_use_case_setup_code Code
|
||||
* Add to the main application source file, outside of any functions:
|
||||
* \snippet qs_usart_callback.c module_inst
|
||||
* \snippet qs_usart_callback.c rx_buffer_var
|
||||
*
|
||||
* Copy-paste the following callback function code to your user application:
|
||||
* \snippet qs_usart_callback.c callback_funcs
|
||||
*
|
||||
* Copy-paste the following setup code to your user application:
|
||||
* \snippet qs_usart_callback.c setup
|
||||
*
|
||||
* Add to user application initialization (typically the start of \c main()):
|
||||
* \snippet qs_usart_callback.c setup_init
|
||||
*
|
||||
* \subsection asfdoc_samd20_usart_callback_use_case_setup_flow Workflow
|
||||
* -# Create a module software instance structure for the USART module to store
|
||||
* the USART driver state while it is in use.
|
||||
* \note This should never go out of scope as long as the module is in use.
|
||||
* In most cases, this should be global.
|
||||
*
|
||||
* \snippet qs_usart_callback.c module_inst
|
||||
* -# Configure the USART module.
|
||||
* -# Create a USART module configuration struct, which can be filled out to
|
||||
* adjust the configuration of a physical USART peripheral.
|
||||
* \snippet qs_usart_callback.c setup_config
|
||||
* -# Initialize the USART configuration struct with the module's default values.
|
||||
* \note This should always be performed before using the configuration
|
||||
* struct to ensure that all values are initialized to known default
|
||||
* settings.
|
||||
*
|
||||
* \snippet qs_usart_callback.c setup_config_defaults
|
||||
* -# Alter the USART settings to configure the physical pinout, baud rate and
|
||||
* other relevant parameters.
|
||||
* \snippet qs_usart_callback.c setup_change_config
|
||||
* -# Configure the USART module with the desired settings, retrying while the
|
||||
* driver is busy until the configuration is stressfully set.
|
||||
* \snippet qs_usart_callback.c setup_set_config
|
||||
* -# Enable the USART module.
|
||||
* \snippet qs_usart_callback.c setup_enable
|
||||
* -# Configure the USART callbacks.
|
||||
* -# Register the TX and RX callback functions with the driver.
|
||||
* \snippet qs_usart_callback.c setup_register_callbacks
|
||||
* -# Enable the TX and RX callbacks so that they will be called by the driver
|
||||
* when appropriate.
|
||||
* \snippet qs_usart_callback.c setup_enable_callbacks
|
||||
*
|
||||
* \section asfdoc_samd20_usart_callback_use_case_main Use Case
|
||||
*
|
||||
* \subsection asfdoc_samd20_usart_callback_use_case_main_code Code
|
||||
* Copy-paste the following code to your user application:
|
||||
* \snippet qs_usart_callback.c main
|
||||
*
|
||||
* \subsection asfdoc_samd20_usart_callback_use_case_main_flow Workflow
|
||||
* -# Enable global interrupts, so that the callbacks can be fired.
|
||||
* \snippet qs_usart_callback.c enable_global_interrupts
|
||||
* -# Send a string to the USART to show the demo is running, blocking until
|
||||
* all characters have been sent.
|
||||
* \snippet qs_usart_callback.c main_send_string
|
||||
* -# Enter an infinite loop to continuously echo received values on the USART.
|
||||
* \snippet qs_usart_callback.c main_loop
|
||||
* -# Perform an asynchronous read of the USART, which will fire the registered
|
||||
* callback when characters are received.
|
||||
* \snippet qs_usart_callback.c main_read
|
||||
*/
|
||||
|
||||
#include <asf.h>
|
||||
#include <conf_clocks.h>
|
||||
|
|
@ -0,0 +1,779 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 SERCOM USART Driver
|
||||
*
|
||||
* Copyright (C) 2012-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
#include "usart.h"
|
||||
#include <pinmux.h>
|
||||
#if USART_CALLBACK_MODE == true
|
||||
# include "usart_interrupt.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \internal Checks a USART config against current set config
|
||||
*
|
||||
* This function will check that the config does not alter the
|
||||
* configuration of the module. If the new config changes any
|
||||
* setting, the initialization will be discarded.
|
||||
*
|
||||
* \param[in] module Pointer to the software instance struct
|
||||
* \param[in] config Pointer to the configuration struct
|
||||
*
|
||||
* \return The status of the configuration
|
||||
* \retval STATUS_ERR_INVALID_ARG If invalid argument(s) were provided.
|
||||
* \retval STATUS_ERR_DENIED If configuration was different from previous
|
||||
* \retval STATUS_OK If the configuration was written
|
||||
*/
|
||||
static enum status_code _usart_check_config(
|
||||
struct usart_module *const module,
|
||||
const struct usart_config *const config)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module);
|
||||
Assert(module->hw);
|
||||
|
||||
SercomUsart *const usart_hw = &(module->hw->USART);
|
||||
Sercom *const hw = (module->hw);
|
||||
|
||||
uint32_t pad0 = config->pinmux_pad0;
|
||||
uint32_t pad1 = config->pinmux_pad1;
|
||||
uint32_t pad2 = config->pinmux_pad2;
|
||||
uint32_t pad3 = config->pinmux_pad3;
|
||||
|
||||
/* SERCOM PAD0 */
|
||||
if (pad0 == PINMUX_DEFAULT) {
|
||||
pad0 = _sercom_get_default_pad(hw, 0);
|
||||
}
|
||||
if ((pad0 != PINMUX_UNUSED) && ((pad0 & 0xFFFF)!=
|
||||
system_pinmux_pin_get_mux_position(pad0 >> 16))) {
|
||||
return STATUS_ERR_DENIED;
|
||||
}
|
||||
|
||||
/* SERCOM PAD1 */
|
||||
if (pad1 == PINMUX_DEFAULT) {
|
||||
pad1 = _sercom_get_default_pad(hw, 1);
|
||||
}
|
||||
if ((pad1 != PINMUX_UNUSED) && ((pad1 & 0xFFFF) !=
|
||||
system_pinmux_pin_get_mux_position(pad1 >> 16))) {
|
||||
return STATUS_ERR_DENIED;
|
||||
}
|
||||
|
||||
/* SERCOM PAD2 */
|
||||
if (pad2 == PINMUX_DEFAULT) {
|
||||
pad2 = _sercom_get_default_pad(hw, 2);
|
||||
}
|
||||
if ((pad2 != PINMUX_UNUSED) && ((pad2 & 0xFFFF) !=
|
||||
system_pinmux_pin_get_mux_position(pad2 >> 16))) {
|
||||
return STATUS_ERR_DENIED;
|
||||
}
|
||||
|
||||
/* SERCOM PAD3 */
|
||||
if (pad3 == PINMUX_DEFAULT) {
|
||||
pad3 = _sercom_get_default_pad(hw, 3);
|
||||
}
|
||||
if ((pad3 != PINMUX_UNUSED) && ((pad3 & 0xFFFF) !=
|
||||
system_pinmux_pin_get_mux_position(pad3 >> 16))) {
|
||||
return STATUS_ERR_DENIED;
|
||||
}
|
||||
|
||||
/* Find baud value and compare it */
|
||||
uint16_t baud = 0;
|
||||
enum status_code status_code = STATUS_OK;
|
||||
|
||||
switch (config->transfer_mode)
|
||||
{
|
||||
case USART_TRANSFER_SYNCHRONOUSLY:
|
||||
if (!config->use_external_clock) {
|
||||
status_code = _sercom_get_sync_baud_val(config->baudrate,
|
||||
system_gclk_chan_get_hz(SERCOM_GCLK_ID), &baud);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case USART_TRANSFER_ASYNCHRONOUSLY:
|
||||
if (config->use_external_clock) {
|
||||
status_code =
|
||||
_sercom_get_async_baud_val(config->baudrate,
|
||||
config->ext_clock_freq, &baud);
|
||||
} else {
|
||||
status_code =
|
||||
_sercom_get_async_baud_val(config->baudrate,
|
||||
system_gclk_chan_get_hz(SERCOM_GCLK_ID), &baud);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (status_code != STATUS_OK) {
|
||||
/* Baud rate calculation error, return status code */
|
||||
return STATUS_ERR_DENIED;
|
||||
}
|
||||
|
||||
if (usart_hw->BAUD.reg != baud) {
|
||||
return STATUS_ERR_DENIED;
|
||||
}
|
||||
|
||||
uint32_t ctrla = 0;
|
||||
uint32_t ctrlb = 0;
|
||||
|
||||
/* Check sample mode, data order, internal muxing, and clock polarity */
|
||||
ctrla = (uint32_t)config->data_order |
|
||||
(uint32_t)config->mux_setting |
|
||||
(uint32_t)config->transfer_mode |
|
||||
SERCOM_USART_CTRLA_MODE(0) |
|
||||
(config->clock_polarity_inverted << SERCOM_USART_CTRLA_CPOL_Pos);
|
||||
|
||||
/* set enable bit */
|
||||
ctrla |= (SERCOM_USART_CTRLA_ENABLE);
|
||||
|
||||
if (config->use_external_clock == false) {
|
||||
ctrla |= SERCOM_USART_CTRLA_MODE_USART_INT_CLK;
|
||||
}
|
||||
else {
|
||||
ctrla |= SERCOM_USART_CTRLA_MODE_USART_EXT_CLK;
|
||||
}
|
||||
|
||||
/* Check stopbits and character size */
|
||||
ctrlb = (uint32_t)config->stopbits | (uint32_t)config->character_size |
|
||||
(config->receiver_enable << SERCOM_USART_CTRLB_RXEN_Pos) |
|
||||
(config->transmitter_enable << SERCOM_USART_CTRLB_TXEN_Pos);
|
||||
|
||||
/* Check parity mode bits */
|
||||
if (config->parity != USART_PARITY_NONE) {
|
||||
ctrla |= SERCOM_USART_CTRLA_FORM(1);
|
||||
ctrlb |= config->parity;
|
||||
} else {
|
||||
ctrla |= SERCOM_USART_CTRLA_FORM(0);
|
||||
}
|
||||
|
||||
if (usart_hw->CTRLA.reg == ctrla && usart_hw->CTRLB.reg == ctrlb) {
|
||||
module->character_size = config->character_size;
|
||||
return STATUS_OK;
|
||||
} else {
|
||||
module->hw = NULL;
|
||||
return STATUS_ERR_DENIED;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \internal
|
||||
* Set Configuration of the USART module
|
||||
*/
|
||||
static enum status_code _usart_set_config(
|
||||
struct usart_module *const module,
|
||||
const struct usart_config *const config)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module);
|
||||
Assert(module->hw);
|
||||
|
||||
/* Get a pointer to the hardware module instance */
|
||||
SercomUsart *const usart_hw = &(module->hw->USART);
|
||||
|
||||
/* Index for generic clock */
|
||||
uint32_t sercom_index = _sercom_get_sercom_inst_index(module->hw);
|
||||
uint32_t gclk_index = sercom_index + SERCOM0_GCLK_ID_CORE;
|
||||
|
||||
/* Cache new register values to minimize the number of register writes */
|
||||
uint32_t ctrla = 0;
|
||||
uint32_t ctrlb = 0;
|
||||
uint16_t baud = 0;
|
||||
|
||||
/* Set data order, internal muxing, and clock polarity */
|
||||
ctrla = (uint32_t)config->data_order |
|
||||
(uint32_t)config->mux_setting |
|
||||
(config->clock_polarity_inverted << SERCOM_USART_CTRLA_CPOL_Pos);
|
||||
|
||||
enum status_code status_code = STATUS_OK;
|
||||
|
||||
/* Get baud value from mode and clock */
|
||||
switch (config->transfer_mode)
|
||||
{
|
||||
case USART_TRANSFER_SYNCHRONOUSLY:
|
||||
if (!config->use_external_clock) {
|
||||
status_code = _sercom_get_sync_baud_val(config->baudrate,
|
||||
system_gclk_chan_get_hz(gclk_index), &baud);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case USART_TRANSFER_ASYNCHRONOUSLY:
|
||||
if (config->use_external_clock) {
|
||||
status_code =
|
||||
_sercom_get_async_baud_val(config->baudrate,
|
||||
config->ext_clock_freq, &baud);
|
||||
} else {
|
||||
status_code =
|
||||
_sercom_get_async_baud_val(config->baudrate,
|
||||
system_gclk_chan_get_hz(gclk_index), &baud);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
/* Check if calculating the baud rate failed */
|
||||
if (status_code != STATUS_OK) {
|
||||
/* Abort */
|
||||
return status_code;
|
||||
}
|
||||
|
||||
/* Wait until synchronization is complete */
|
||||
_usart_wait_for_sync(module);
|
||||
|
||||
/*Set baud val */
|
||||
usart_hw->BAUD.reg = baud;
|
||||
|
||||
/* Set sample mode */
|
||||
ctrla |= config->transfer_mode;
|
||||
|
||||
if (config->use_external_clock == false) {
|
||||
ctrla |= SERCOM_USART_CTRLA_MODE_USART_INT_CLK;
|
||||
}
|
||||
else {
|
||||
ctrla |= SERCOM_USART_CTRLA_MODE_USART_EXT_CLK;
|
||||
}
|
||||
|
||||
/* Set stopbits, character size and enable transceivers */
|
||||
ctrlb = (uint32_t)config->stopbits | (uint32_t)config->character_size |
|
||||
(config->receiver_enable << SERCOM_USART_CTRLB_RXEN_Pos) |
|
||||
(config->transmitter_enable << SERCOM_USART_CTRLB_TXEN_Pos);
|
||||
|
||||
/* Set parity mode */
|
||||
if (config->parity != USART_PARITY_NONE) {
|
||||
ctrla |= SERCOM_USART_CTRLA_FORM(1);
|
||||
ctrlb |= config->parity;
|
||||
} else {
|
||||
ctrla |= SERCOM_USART_CTRLA_FORM(0);
|
||||
}
|
||||
|
||||
/* Set run mode during device sleep */
|
||||
if (config->run_in_standby) {
|
||||
/* Enable in sleep mode */
|
||||
ctrla |= SERCOM_USART_CTRLA_RUNSTDBY;
|
||||
}
|
||||
|
||||
/* Wait until synchronization is complete */
|
||||
_usart_wait_for_sync(module);
|
||||
|
||||
/* Write configuration to CTRLB */
|
||||
usart_hw->CTRLB.reg = ctrlb;
|
||||
|
||||
/* Wait until synchronization is complete */
|
||||
_usart_wait_for_sync(module);
|
||||
|
||||
/* Write configuration to CTRLA */
|
||||
usart_hw->CTRLA.reg = ctrla;
|
||||
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Initializes the device
|
||||
*
|
||||
* Initializes the USART device based on the setting specified in the
|
||||
* configuration struct.
|
||||
*
|
||||
* \param[out] module Pointer to USART device
|
||||
* \param[in] hw Pointer to USART hardware instance
|
||||
* \param[in] config Pointer to configuration struct
|
||||
*
|
||||
* \return Status of the initialization
|
||||
*
|
||||
* \retval STATUS_OK The initialization was successful
|
||||
* \retval STATUS_BUSY The USART module is busy
|
||||
* resetting
|
||||
* \retval STATUS_ERR_DENIED The USART have not been disabled in
|
||||
* advance of initialization
|
||||
* \retval STATUS_ERR_INVALID_ARG The configuration struct contains
|
||||
* invalid configuration
|
||||
* \retval STATUS_ERR_ALREADY_INITIALIZED The SERCOM instance has already been
|
||||
* initialized with different clock
|
||||
* configuration
|
||||
* \retval STATUS_ERR_BAUD_UNAVAILABLE The BAUD rate given by the
|
||||
* configuration
|
||||
* struct cannot be reached with
|
||||
* the current clock configuration
|
||||
*/
|
||||
enum status_code usart_init(
|
||||
struct usart_module *const module,
|
||||
Sercom *const hw,
|
||||
const struct usart_config *const config)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module);
|
||||
Assert(hw);
|
||||
Assert(config);
|
||||
|
||||
enum status_code status_code = STATUS_OK;
|
||||
|
||||
/* Assign module pointer to software instance struct */
|
||||
module->hw = hw;
|
||||
|
||||
/* Get a pointer to the hardware module instance */
|
||||
SercomUsart *const usart_hw = &(module->hw->USART);
|
||||
|
||||
uint32_t sercom_index = _sercom_get_sercom_inst_index(module->hw);
|
||||
uint32_t pm_index = sercom_index + PM_APBCMASK_SERCOM0_Pos;
|
||||
uint32_t gclk_index = sercom_index + SERCOM0_GCLK_ID_CORE;
|
||||
|
||||
if (usart_hw->CTRLA.reg & SERCOM_USART_CTRLA_SWRST) {
|
||||
/* The module is busy resetting itself */
|
||||
return STATUS_BUSY;
|
||||
}
|
||||
|
||||
if (usart_hw->CTRLA.reg & SERCOM_USART_CTRLA_ENABLE) {
|
||||
/* Check if the new setting are the same as the old */
|
||||
return _usart_check_config(module, config);
|
||||
}
|
||||
|
||||
/* Turn on module in PM */
|
||||
system_apb_clock_set_mask(SYSTEM_CLOCK_APB_APBC, 1 << pm_index);
|
||||
|
||||
/* Set up the GCLK for the module */
|
||||
struct system_gclk_chan_config gclk_chan_conf;
|
||||
system_gclk_chan_get_config_defaults(&gclk_chan_conf);
|
||||
gclk_chan_conf.source_generator = config->generator_source;
|
||||
system_gclk_chan_set_config(gclk_index, &gclk_chan_conf);
|
||||
system_gclk_chan_enable(gclk_index);
|
||||
sercom_set_gclk_generator(config->generator_source, false);
|
||||
|
||||
/* Set character size */
|
||||
module->character_size = config->character_size;
|
||||
|
||||
/* Set transmitter and receiver status */
|
||||
module->receiver_enabled = config->receiver_enable;
|
||||
module->transmitter_enabled = config->transmitter_enable;
|
||||
|
||||
/* Configure Pins */
|
||||
struct system_pinmux_config pin_conf;
|
||||
system_pinmux_get_config_defaults(&pin_conf);
|
||||
pin_conf.direction = SYSTEM_PINMUX_PIN_DIR_INPUT;
|
||||
|
||||
/* Set configuration according to the config struct */
|
||||
status_code = _usart_set_config(module, config);
|
||||
if(status_code != STATUS_OK) {
|
||||
return status_code;
|
||||
}
|
||||
|
||||
uint32_t pad0 = config->pinmux_pad0;
|
||||
uint32_t pad1 = config->pinmux_pad1;
|
||||
uint32_t pad2 = config->pinmux_pad2;
|
||||
uint32_t pad3 = config->pinmux_pad3;
|
||||
|
||||
/* SERCOM PAD0 */
|
||||
if (pad0 == PINMUX_DEFAULT) {
|
||||
pad0 = _sercom_get_default_pad(hw, 0);
|
||||
}
|
||||
if (pad0 != PINMUX_UNUSED) {
|
||||
pin_conf.mux_position = pad0 & 0xFFFF;
|
||||
system_pinmux_pin_set_config(pad0 >> 16, &pin_conf);
|
||||
}
|
||||
|
||||
/* SERCOM PAD1 */
|
||||
if (pad1 == PINMUX_DEFAULT) {
|
||||
pad1 = _sercom_get_default_pad(hw, 1);
|
||||
}
|
||||
if (pad1 != PINMUX_UNUSED) {
|
||||
pin_conf.mux_position = pad1 & 0xFFFF;
|
||||
system_pinmux_pin_set_config(pad1 >> 16, &pin_conf);
|
||||
}
|
||||
|
||||
/* SERCOM PAD2 */
|
||||
if (pad2 == PINMUX_DEFAULT) {
|
||||
pad2 = _sercom_get_default_pad(hw, 2);
|
||||
}
|
||||
if (pad2 != PINMUX_UNUSED) {
|
||||
pin_conf.mux_position = pad2 & 0xFFFF;
|
||||
system_pinmux_pin_set_config(pad2 >> 16, &pin_conf);
|
||||
}
|
||||
|
||||
/* SERCOM PAD3 */
|
||||
if (pad3 == PINMUX_DEFAULT) {
|
||||
pad3 = _sercom_get_default_pad(hw, 3);
|
||||
}
|
||||
if (pad3 != PINMUX_UNUSED) {
|
||||
pin_conf.mux_position = pad3 & 0xFFFF;
|
||||
system_pinmux_pin_set_config(pad3 >> 16, &pin_conf);
|
||||
}
|
||||
#if USART_CALLBACK_MODE == true
|
||||
/* Initialize parameters */
|
||||
for (uint32_t i = 0; i < USART_CALLBACK_N; i++) {
|
||||
module->callback[i] = NULL;
|
||||
}
|
||||
|
||||
module->tx_buffer_ptr = NULL;
|
||||
module->rx_buffer_ptr = NULL;
|
||||
module->remaining_tx_buffer_length = 0x0000;
|
||||
module->remaining_rx_buffer_length = 0x0000;
|
||||
module->callback_reg_mask = 0x00;
|
||||
module->callback_enable_mask = 0x00;
|
||||
module->rx_status = STATUS_OK;
|
||||
module->tx_status = STATUS_OK;
|
||||
|
||||
/* Set interrupt handler and register USART software module struct in
|
||||
* look-up table */
|
||||
uint8_t instance_index = _sercom_get_sercom_inst_index(module->hw);
|
||||
_sercom_set_handler(instance_index, _usart_interrupt_handler);
|
||||
_sercom_instances[instance_index] = module;
|
||||
#endif
|
||||
return status_code;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Transmit a character via the USART
|
||||
*
|
||||
* This blocking function will transmit a single character via the
|
||||
* USART.
|
||||
*
|
||||
* \param[in] module Pointer to the software instance struct
|
||||
* \param[in] tx_data Data to transfer
|
||||
*
|
||||
* \return Status of the operation
|
||||
* \retval STATUS_OK If the operation was completed
|
||||
* \retval STATUS_BUSY If the operation was not completed, due to the USART
|
||||
* module being busy.
|
||||
* \retval STATUS_ERR_DENIED If the transmitter is not enabled
|
||||
*/
|
||||
enum status_code usart_write_wait(
|
||||
struct usart_module *const module,
|
||||
const uint16_t tx_data)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module);
|
||||
Assert(module->hw);
|
||||
|
||||
/* Get a pointer to the hardware module instance */
|
||||
SercomUsart *const usart_hw = &(module->hw->USART);
|
||||
|
||||
/* Check that the transmitter is enabled */
|
||||
if (!(module->transmitter_enabled)) {
|
||||
return STATUS_ERR_DENIED;
|
||||
}
|
||||
|
||||
#if USART_CALLBACK_MODE == true
|
||||
/* Check if the USART is busy doing asynchronous operation. */
|
||||
if (module->remaining_tx_buffer_length > 0) {
|
||||
return STATUS_BUSY;
|
||||
}
|
||||
|
||||
#else
|
||||
/* Check if USART is ready for new data */
|
||||
if (!(usart_hw->INTFLAG.reg & SERCOM_USART_INTFLAG_DRE)) {
|
||||
/* Return error code */
|
||||
return STATUS_BUSY;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Wait until synchronization is complete */
|
||||
_usart_wait_for_sync(module);
|
||||
|
||||
/* Write data to USART module */
|
||||
usart_hw->DATA.reg = tx_data;
|
||||
|
||||
while (!(usart_hw->INTFLAG.reg & SERCOM_USART_INTFLAG_TXC)) {
|
||||
/* Wait until data is sent */
|
||||
}
|
||||
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Receive a character via the USART
|
||||
*
|
||||
* This blocking function will receive a character via the USART.
|
||||
*
|
||||
* \param[in] module Pointer to the software instance struct
|
||||
* \param[out] rx_data Pointer to received data
|
||||
*
|
||||
* \return Status of the operation
|
||||
* \retval STATUS_OK If the operation was completed
|
||||
* \retval STATUS_BUSY If the operation was not completed,
|
||||
* due to the USART module being busy
|
||||
* \retval STATUS_ERR_BAD_FORMAT If the operation was not completed,
|
||||
* due to configuration mismatch between USART
|
||||
* and the sender
|
||||
* \retval STATUS_ERR_BAD_OVERFLOW If the operation was not completed,
|
||||
* due to the baud rate being too low or the
|
||||
* system frequency being too high
|
||||
* \retval STATUS_ERR_BAD_DATA If the operation was not completed, due to
|
||||
* data being corrupted
|
||||
* \retval STATUS_ERR_DENIED If the receiver is not enabled
|
||||
*/
|
||||
enum status_code usart_read_wait(
|
||||
struct usart_module *const module,
|
||||
uint16_t *const rx_data)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module);
|
||||
Assert(module->hw);
|
||||
|
||||
/* Error variable */
|
||||
uint8_t error_code;
|
||||
|
||||
/* Get a pointer to the hardware module instance */
|
||||
SercomUsart *const usart_hw = &(module->hw->USART);
|
||||
|
||||
/* Check that the receiver is enabled */
|
||||
if (!(module->receiver_enabled)) {
|
||||
return STATUS_ERR_DENIED;
|
||||
}
|
||||
|
||||
#if USART_CALLBACK_MODE == true
|
||||
/* Check if the USART is busy doing asynchronous operation. */
|
||||
if (module->remaining_rx_buffer_length > 0) {
|
||||
return STATUS_BUSY;
|
||||
}
|
||||
|
||||
#else
|
||||
/* Check if USART has new data */
|
||||
if (!(usart_hw->INTFLAG.reg & SERCOM_USART_INTFLAG_RXC)) {
|
||||
/* Return error code */
|
||||
return STATUS_BUSY;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Wait until synchronization is complete */
|
||||
_usart_wait_for_sync(module);
|
||||
|
||||
/* Read out the status code and mask away all but the 3 LSBs*/
|
||||
error_code = (uint8_t)(usart_hw->STATUS.reg & SERCOM_USART_STATUS_MASK);
|
||||
|
||||
/* Check if an error has occurred during the receiving */
|
||||
if (error_code) {
|
||||
/* Check which error occurred */
|
||||
if (error_code & SERCOM_USART_STATUS_FERR) {
|
||||
/* Clear flag by writing a 1 to it and
|
||||
* return with an error code */
|
||||
usart_hw->STATUS.reg = SERCOM_USART_STATUS_FERR;
|
||||
|
||||
return STATUS_ERR_BAD_FORMAT;
|
||||
} else if (error_code & SERCOM_USART_STATUS_BUFOVF) {
|
||||
/* Clear flag by writing a 1 to it and
|
||||
* return with an error code */
|
||||
usart_hw->STATUS.reg = SERCOM_USART_STATUS_BUFOVF;
|
||||
|
||||
return STATUS_ERR_OVERFLOW;
|
||||
} else if (error_code & SERCOM_USART_STATUS_PERR) {
|
||||
/* Clear flag by writing a 1 to it and
|
||||
* return with an error code */
|
||||
usart_hw->STATUS.reg = SERCOM_USART_STATUS_PERR;
|
||||
|
||||
return STATUS_ERR_BAD_DATA;
|
||||
}
|
||||
}
|
||||
|
||||
/* Read data from USART module */
|
||||
*rx_data = usart_hw->DATA.reg;
|
||||
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Transmit a buffer of characters via the USART
|
||||
*
|
||||
* This blocking function will transmit a block of \c length characters
|
||||
* via the USART
|
||||
*
|
||||
* \note Using this function in combination with the interrupt (\c _job) functions is
|
||||
* not recommended as it has no functionality to check if there is an
|
||||
* ongoing interrupt driven operation running or not.
|
||||
*
|
||||
* \param[in] module Pointer to USART software instance struct
|
||||
* \param[in] tx_data Pointer to data to transmit
|
||||
* \param[in] length Number of characters to transmit
|
||||
*
|
||||
* \return Status of the operation
|
||||
* \retval STATUS_OK If operation was completed
|
||||
* \retval STATUS_ERR_INVALID_ARG If operation was not completed, due to invalid
|
||||
* arguments
|
||||
* \retval STATUS_ERR_TIMEOUT If operation was not completed, due to USART
|
||||
* module timing out
|
||||
* \retval STATUS_ERR_DENIED If the transmitter is not enabled
|
||||
*/
|
||||
enum status_code usart_write_buffer_wait(
|
||||
struct usart_module *const module,
|
||||
const uint8_t *tx_data,
|
||||
uint16_t length)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module);
|
||||
Assert(module->hw);
|
||||
|
||||
/* Check if the buffer length is valid */
|
||||
if (length == 0) {
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
/* Check that the transmitter is enabled */
|
||||
if (!(module->transmitter_enabled)) {
|
||||
return STATUS_ERR_DENIED;
|
||||
}
|
||||
|
||||
/* Get a pointer to the hardware module instance */
|
||||
SercomUsart *const usart_hw = &(module->hw->USART);
|
||||
|
||||
/* Wait until synchronization is complete */
|
||||
_usart_wait_for_sync(module);
|
||||
|
||||
uint16_t tx_pos = 0;
|
||||
|
||||
/* Blocks while buffer is being transferred */
|
||||
while (length--) {
|
||||
/* Wait for the USART to be ready for new data and abort
|
||||
* operation if it doesn't get ready within the timeout*/
|
||||
for (uint32_t i = 0; i <= USART_TIMEOUT; i++) {
|
||||
if (usart_hw->INTFLAG.reg & SERCOM_USART_INTFLAG_DRE) {
|
||||
break;
|
||||
} else if (i == USART_TIMEOUT) {
|
||||
return STATUS_ERR_TIMEOUT;
|
||||
}
|
||||
}
|
||||
|
||||
/* Data to send is at least 8 bits long */
|
||||
uint16_t data_to_send = tx_data[tx_pos++];
|
||||
|
||||
/* Check if the character size exceeds 8 bit */
|
||||
if (module->character_size == USART_CHARACTER_SIZE_9BIT) {
|
||||
data_to_send |= (tx_data[tx_pos++] << 8);
|
||||
}
|
||||
|
||||
/* Send the data through the USART module */
|
||||
usart_write_wait(module, data_to_send);
|
||||
}
|
||||
|
||||
/* Wait until Transmit is complete or timeout */
|
||||
for (uint32_t i = 0; i <= USART_TIMEOUT; i++) {
|
||||
if (usart_hw->INTFLAG.reg & SERCOM_USART_INTFLAG_TXC) {
|
||||
break;
|
||||
} else if (i == USART_TIMEOUT) {
|
||||
return STATUS_ERR_TIMEOUT;
|
||||
}
|
||||
}
|
||||
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Receive a buffer of \c length characters via the USART
|
||||
*
|
||||
* This blocking function will receive a block of \c length characters
|
||||
* via the USART.
|
||||
*
|
||||
* \note Using this function in combination with the interrupt (\c *_job)
|
||||
* functions is not recommended as it has no functionality to check if
|
||||
* there is an ongoing interrupt driven operation running or not.
|
||||
*
|
||||
* \param[in] module Pointer to USART software instance struct
|
||||
* \param[out] rx_data Pointer to receive buffer
|
||||
* \param[in] length Number of characters to receive
|
||||
*
|
||||
* \return Status of the operation.
|
||||
* \retval STATUS_OK If operation was completed
|
||||
* \retval STATUS_ERR_INVALID_ARG If operation was not completed, due to an
|
||||
* invalid argument being supplied
|
||||
* \retval STATUS_ERR_TIMEOUT If operation was not completed, due
|
||||
* to USART module timing out
|
||||
* \retval STATUS_ERR_BAD_FORMAT If the operation was not completed,
|
||||
* due to a configuration mismatch
|
||||
* between USART and the sender
|
||||
* \retval STATUS_ERR_BAD_OVERFLOW If the operation was not completed,
|
||||
* due to the baud rate being too low or the
|
||||
* system frequency being too high
|
||||
* \retval STATUS_ERR_BAD_DATA If the operation was not completed, due
|
||||
* to data being corrupted
|
||||
* \retval STATUS_ERR_DENIED If the receiver is not enabled
|
||||
*/
|
||||
enum status_code usart_read_buffer_wait(
|
||||
struct usart_module *const module,
|
||||
uint8_t *rx_data,
|
||||
uint16_t length)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module);
|
||||
Assert(module->hw);
|
||||
|
||||
/* Check if the buffer length is valid */
|
||||
if (length == 0) {
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
/* Check that the receiver is enabled */
|
||||
if (!(module->receiver_enabled)) {
|
||||
return STATUS_ERR_DENIED;
|
||||
}
|
||||
|
||||
/* Get a pointer to the hardware module instance */
|
||||
SercomUsart *const usart_hw = &(module->hw->USART);
|
||||
|
||||
uint16_t rx_pos = 0;
|
||||
|
||||
/* Blocks while buffer is being received */
|
||||
while (length--) {
|
||||
/* Wait for the USART to have new data and abort operation if it
|
||||
* doesn't get ready within the timeout*/
|
||||
for (uint32_t i = 0; i <= USART_TIMEOUT; i++) {
|
||||
if (usart_hw->INTFLAG.reg & SERCOM_USART_INTFLAG_RXC) {
|
||||
break;
|
||||
} else if (i == USART_TIMEOUT) {
|
||||
return STATUS_ERR_TIMEOUT;
|
||||
}
|
||||
}
|
||||
|
||||
enum status_code retval;
|
||||
uint16_t received_data = 0;
|
||||
|
||||
retval = usart_read_wait(module, &received_data);
|
||||
|
||||
if (retval != STATUS_OK) {
|
||||
/* Overflow, abort */
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* Read value will be at least 8-bits long */
|
||||
rx_data[rx_pos++] = received_data;
|
||||
|
||||
/* If 9-bit data, write next received byte to the buffer */
|
||||
if (module->character_size == USART_CHARACTER_SIZE_9BIT) {
|
||||
rx_data[rx_pos++] = (received_data >> 8);
|
||||
}
|
||||
}
|
||||
|
||||
return STATUS_OK;
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,558 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 SERCOM USART Asynchronous Driver
|
||||
*
|
||||
* Copyright (C) 2012-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#include "usart_interrupt.h"
|
||||
|
||||
/**
|
||||
* \internal
|
||||
* Asynchronous write of a buffer with a given length
|
||||
*
|
||||
* \param[in] module Pointer to USART software instance struct
|
||||
* \param[in] tx_data Pointer to data to be transmitted
|
||||
* \param[in] length Length of data buffer
|
||||
*
|
||||
*/
|
||||
void _usart_write_buffer(
|
||||
struct usart_module *const module,
|
||||
uint8_t *tx_data,
|
||||
uint16_t length)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module);
|
||||
Assert(module->hw);
|
||||
|
||||
/* Get a pointer to the hardware module instance */
|
||||
SercomUsart *const usart_hw = &(module->hw->USART);
|
||||
|
||||
/* Write parameters to the device instance */
|
||||
module->remaining_tx_buffer_length = length;
|
||||
module->tx_buffer_ptr = tx_data;
|
||||
module->tx_status = STATUS_BUSY;
|
||||
|
||||
/* Enable the Data Register Empty Interrupt */
|
||||
usart_hw->INTENSET.reg = SERCOM_USART_INTFLAG_DRE;
|
||||
}
|
||||
|
||||
/**
|
||||
* \internal
|
||||
* Asynchronous read of a buffer with a given length
|
||||
*
|
||||
* \param[in] module Pointer to USART software instance struct
|
||||
* \param[in] rx_data Pointer to data to be received
|
||||
* \param[in] length Length of data buffer
|
||||
*
|
||||
*/
|
||||
void _usart_read_buffer(
|
||||
struct usart_module *const module,
|
||||
uint8_t *rx_data,
|
||||
uint16_t length)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module);
|
||||
Assert(module->hw);
|
||||
|
||||
/* Get a pointer to the hardware module instance */
|
||||
SercomUsart *const usart_hw = &(module->hw->USART);
|
||||
|
||||
/* Set length for the buffer and the pointer, and let
|
||||
* the interrupt handler do the rest */
|
||||
module->remaining_rx_buffer_length = length;
|
||||
module->rx_buffer_ptr = rx_data;
|
||||
module->rx_status = STATUS_BUSY;
|
||||
|
||||
/* Enable the RX Complete Interrupt */
|
||||
usart_hw->INTENSET.reg = SERCOM_USART_INTFLAG_RXC;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Registers a callback
|
||||
*
|
||||
* Registers a callback function which is implemented by the user.
|
||||
*
|
||||
* \note The callback must be enabled by \ref usart_enable_callback,
|
||||
* in order for the interrupt handler to call it when the conditions for
|
||||
* the callback type are met.
|
||||
*
|
||||
* \param[in] module Pointer to USART software instance struct
|
||||
* \param[in] callback_func Pointer to callback function
|
||||
* \param[in] callback_type Callback type given by an enum
|
||||
*
|
||||
*/
|
||||
void usart_register_callback(
|
||||
struct usart_module *const module,
|
||||
usart_callback_t callback_func,
|
||||
enum usart_callback callback_type)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module);
|
||||
Assert(callback_func);
|
||||
|
||||
/* Register callback function */
|
||||
module->callback[callback_type] = callback_func;
|
||||
|
||||
/* Set the bit corresponding to the callback_type */
|
||||
module->callback_reg_mask |= (1 << callback_type);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Unregisters a callback
|
||||
*
|
||||
* Unregisters a callback function which is implemented by the user.
|
||||
*
|
||||
* \param[in,out] module Pointer to USART software instance struct
|
||||
* \param[in] callback_type Callback type given by an enum
|
||||
*
|
||||
*/
|
||||
void usart_unregister_callback(
|
||||
struct usart_module *const module,
|
||||
enum usart_callback callback_type)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module);
|
||||
|
||||
/* Unregister callback function */
|
||||
module->callback[callback_type] = NULL;
|
||||
|
||||
/* Clear the bit corresponding to the callback_type */
|
||||
module->callback_reg_mask &= ~(1 << callback_type);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Asynchronous write a single char
|
||||
*
|
||||
* Sets up the driver to write the data given. If registered and enabled,
|
||||
* a callback function will be called when the transmit is completed.
|
||||
*
|
||||
* \param[in] module Pointer to USART software instance struct
|
||||
* \param[in] tx_data Data to transfer
|
||||
*
|
||||
* \returns Status of the operation
|
||||
* \retval STATUS_OK If operation was completed
|
||||
* \retval STATUS_BUSY If operation was not completed, due to the
|
||||
* USART module being busy
|
||||
* \retval STATUS_ERR_DENIED If the transmitter is not enabled
|
||||
*/
|
||||
enum status_code usart_write_job(
|
||||
struct usart_module *const module,
|
||||
const uint16_t tx_data)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module);
|
||||
Assert(module->hw);
|
||||
/* Check if the USART transmitter is busy */
|
||||
if (module->remaining_tx_buffer_length > 0) {
|
||||
return STATUS_BUSY;
|
||||
}
|
||||
|
||||
/* Check that the transmitter is enabled */
|
||||
if (!(module->transmitter_enabled)) {
|
||||
return STATUS_ERR_DENIED;
|
||||
}
|
||||
|
||||
/* Call internal write buffer function with length 1 */
|
||||
_usart_write_buffer(module, (uint8_t *)&tx_data, 1);
|
||||
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Asynchronous read a single char
|
||||
*
|
||||
* Sets up the driver to read data from the USART module to the data
|
||||
* pointer given. If registered and enabled, a callback will be called
|
||||
* when the receiving is completed.
|
||||
*
|
||||
* \param[in] module Pointer to USART software instance struct
|
||||
* \param[out] rx_data Pointer to where received data should be put
|
||||
*
|
||||
* \returns Status of the operation
|
||||
* \retval STATUS_OK If operation was completed
|
||||
* \retval STATUS_BUSY If operation was not completed,
|
||||
*/
|
||||
enum status_code usart_read_job(
|
||||
struct usart_module *const module,
|
||||
uint16_t *const rx_data)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module);
|
||||
|
||||
/* Check if the USART receiver is busy */
|
||||
if (module->remaining_rx_buffer_length > 0) {
|
||||
return STATUS_BUSY;
|
||||
}
|
||||
|
||||
/* Call internal read buffer function with length 1 */
|
||||
_usart_read_buffer(module, (uint8_t *)rx_data, 1);
|
||||
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Asynchronous buffer write
|
||||
*
|
||||
* Sets up the driver to write a given buffer over the USART. If registered and
|
||||
* enabled, a callback function will be called.
|
||||
*
|
||||
* \param[in] module Pointer to USART software instance struct
|
||||
* \param[in] tx_data Pointer do data buffer to transmit
|
||||
* \param[in] length Length of the data to transmit
|
||||
*
|
||||
* \returns Status of the operation
|
||||
* \retval STATUS_OK If operation was completed successfully.
|
||||
* \retval STATUS_BUSY If operation was not completed, due to the
|
||||
* USART module being busy
|
||||
* \retval STATUS_ERR_INVALID_ARG If operation was not completed, due to invalid
|
||||
* arguments
|
||||
* \retval STATUS_ERR_DENIED If the transmitter is not enabled
|
||||
*/
|
||||
enum status_code usart_write_buffer_job(
|
||||
struct usart_module *const module,
|
||||
uint8_t *tx_data,
|
||||
uint16_t length)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module);
|
||||
|
||||
if (length == 0) {
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
/* Check if the USART transmitter is busy */
|
||||
if (module->remaining_tx_buffer_length > 0) {
|
||||
return STATUS_BUSY;
|
||||
}
|
||||
|
||||
/* Check that the receiver is enabled */
|
||||
if (!(module->transmitter_enabled)) {
|
||||
return STATUS_ERR_DENIED;
|
||||
}
|
||||
|
||||
/* Issue internal asynchronous write */
|
||||
_usart_write_buffer(module, tx_data, length);
|
||||
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Asynchronous buffer read
|
||||
*
|
||||
* Sets up the driver to read from the USART to a given buffer. If registered
|
||||
* and enabled, a callback function will be called.
|
||||
*
|
||||
* \param[in] module Pointer to USART software instance struct
|
||||
* \param[out] rx_data Pointer to data buffer to receive
|
||||
* \param[in] length Data buffer length
|
||||
*
|
||||
* \returns Status of the operation
|
||||
* \retval STATUS_OK If operation was completed
|
||||
* \retval STATUS_BUSY If operation was not completed, due to the
|
||||
* USART module being busy
|
||||
* \retval STATUS_ERR_INVALID_ARG If operation was not completed, due to invalid
|
||||
* arguments
|
||||
* \retval STATUS_ERR_DENIED If the transmitter is not enabled
|
||||
*/
|
||||
enum status_code usart_read_buffer_job(
|
||||
struct usart_module *const module,
|
||||
uint8_t *rx_data,
|
||||
uint16_t length)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module);
|
||||
Assert(rx_data);
|
||||
|
||||
if (length == 0) {
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
/* Check that the receiver is enabled */
|
||||
if (!(module->receiver_enabled)) {
|
||||
return STATUS_ERR_DENIED;
|
||||
}
|
||||
|
||||
/* Check if the USART receiver is busy */
|
||||
if (module->remaining_rx_buffer_length > 0) {
|
||||
return STATUS_BUSY;
|
||||
}
|
||||
|
||||
/* Issue internal asynchronous read */
|
||||
_usart_read_buffer(module, rx_data, length);
|
||||
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Cancels ongoing read/write operation
|
||||
*
|
||||
* Cancels the ongoing read/write operation modifying parameters in the
|
||||
* USART software struct.
|
||||
*
|
||||
* \param[in] module Pointer to USART software instance struct
|
||||
* \param[in] transceiver_type Transfer type to cancel
|
||||
*/
|
||||
void usart_abort_job(
|
||||
struct usart_module *const module,
|
||||
enum usart_transceiver_type transceiver_type)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module);
|
||||
Assert(module->hw);
|
||||
|
||||
/* Get a pointer to the hardware module instance */
|
||||
SercomUsart *const usart_hw = &(module->hw->USART);
|
||||
|
||||
switch(transceiver_type) {
|
||||
case USART_TRANSCEIVER_RX:
|
||||
/* Clear the interrupt flag in order to prevent the receive
|
||||
* complete callback to fire */
|
||||
usart_hw->INTFLAG.reg |= SERCOM_USART_INTFLAG_RXC;
|
||||
|
||||
/* Clear the software reception buffer */
|
||||
module->remaining_rx_buffer_length = 0;
|
||||
|
||||
break;
|
||||
|
||||
case USART_TRANSCEIVER_TX:
|
||||
/* Clear the interrupt flag in order to prevent the receive
|
||||
* complete callback to fire */
|
||||
usart_hw->INTFLAG.reg |= SERCOM_USART_INTFLAG_TXC;
|
||||
|
||||
/* Clear the software reception buffer */
|
||||
module->remaining_tx_buffer_length = 0;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Get status from the ongoing or last asynchronous transfer operation
|
||||
*
|
||||
* Returns the error from a given ongoing or last asynchronous transfer operation.
|
||||
* Either from a read or write transfer.
|
||||
*
|
||||
* \param[in] module Pointer to USART software instance struct
|
||||
* \param[in] transceiver_type Transfer type to check
|
||||
*
|
||||
* \return Status of the given job.
|
||||
* \retval STATUS_OK No error occurred during the last transfer
|
||||
* \retval STATUS_BUSY A transfer is ongoing
|
||||
* \retval STATUS_ERR_BAD_DATA The last operation was aborted due to a
|
||||
* parity error. The transfer could be affected
|
||||
* by external noise.
|
||||
* \retval STATUS_ERR_BAD_FORMAT The last operation was aborted due to a
|
||||
* frame error.
|
||||
* \retval STATUS_ERR_OVERFLOW The last operation was aborted due to a
|
||||
* buffer overflow.
|
||||
* \retval STATUS_ERR_INVALID_ARG An invalid transceiver enum given.
|
||||
*/
|
||||
enum status_code usart_get_job_status(
|
||||
struct usart_module *const module,
|
||||
enum usart_transceiver_type transceiver_type)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module);
|
||||
|
||||
/* Variable for status code */
|
||||
enum status_code status_code;
|
||||
|
||||
switch(transceiver_type) {
|
||||
case USART_TRANSCEIVER_RX:
|
||||
status_code = module->rx_status;
|
||||
break;
|
||||
|
||||
case USART_TRANSCEIVER_TX:
|
||||
status_code = module->tx_status;
|
||||
break;
|
||||
|
||||
default:
|
||||
status_code = STATUS_ERR_INVALID_ARG;
|
||||
break;
|
||||
}
|
||||
|
||||
return status_code;
|
||||
}
|
||||
|
||||
/**
|
||||
* \internal
|
||||
* Handles interrupts as they occur, and it will run callback functions
|
||||
* which are registered and enabled.
|
||||
*
|
||||
* \param[in] instance ID of the SERCOM instance calling the interrupt
|
||||
* handler.
|
||||
*/
|
||||
void _usart_interrupt_handler(
|
||||
uint8_t instance)
|
||||
{
|
||||
/* Temporary variables */
|
||||
uint16_t interrupt_status;
|
||||
uint16_t callback_status;
|
||||
uint8_t error_code;
|
||||
|
||||
|
||||
/* Get device instance from the look-up table */
|
||||
struct usart_module *module
|
||||
= (struct usart_module *)_sercom_instances[instance];
|
||||
|
||||
/* Pointer to the hardware module instance */
|
||||
SercomUsart *const usart_hw
|
||||
= &(module->hw->USART);
|
||||
|
||||
/* Wait for the synchronization to complete */
|
||||
_usart_wait_for_sync(module);
|
||||
|
||||
/* Read and mask interrupt flag register */
|
||||
interrupt_status = usart_hw->INTFLAG.reg;
|
||||
callback_status = module->callback_reg_mask
|
||||
&module->callback_enable_mask;
|
||||
|
||||
/* Check if a DATA READY interrupt has occurred,
|
||||
* and if there is more to transfer */
|
||||
if (interrupt_status & SERCOM_USART_INTFLAG_DRE) {
|
||||
if (module->remaining_tx_buffer_length) {
|
||||
/* Write value will be at least 8-bits long */
|
||||
uint16_t data_to_send = *(module->tx_buffer_ptr);
|
||||
/* Increment 8-bit pointer */
|
||||
(module->tx_buffer_ptr)++;
|
||||
|
||||
if (module->character_size == USART_CHARACTER_SIZE_9BIT) {
|
||||
data_to_send = (*(module->tx_buffer_ptr) << 8);
|
||||
/* Increment 8-bit pointer */
|
||||
(module->tx_buffer_ptr)++;
|
||||
}
|
||||
/* Write the data to send */
|
||||
usart_hw->DATA.reg = (data_to_send & SERCOM_USART_DATA_MASK);
|
||||
|
||||
if (--(module->remaining_tx_buffer_length) == 0) {
|
||||
/* Disable the Data Register Empty Interrupt */
|
||||
usart_hw->INTENCLR.reg = SERCOM_USART_INTFLAG_DRE;
|
||||
/* Enable Transmission Complete interrupt */
|
||||
usart_hw->INTENSET.reg = SERCOM_USART_INTFLAG_TXC;
|
||||
|
||||
}
|
||||
} else {
|
||||
usart_hw->INTENCLR.reg = SERCOM_USART_INTFLAG_DRE;
|
||||
}
|
||||
|
||||
/* Check if the Transmission Complete interrupt has occurred and
|
||||
* that the transmit buffer is empty */
|
||||
}
|
||||
if (interrupt_status & SERCOM_USART_INTFLAG_TXC) {
|
||||
|
||||
/* Disable TX Complete Interrupt, and set STATUS_OK */
|
||||
usart_hw->INTENCLR.reg = SERCOM_USART_INTFLAG_TXC;
|
||||
module->tx_status = STATUS_OK;
|
||||
|
||||
/* Run callback if registered and enabled */
|
||||
if (callback_status & (1 << USART_CALLBACK_BUFFER_TRANSMITTED)) {
|
||||
(*(module->callback[USART_CALLBACK_BUFFER_TRANSMITTED]))(module);
|
||||
}
|
||||
|
||||
/* Check if the Receive Complete interrupt has occurred, and that
|
||||
* there's more data to receive */
|
||||
}
|
||||
if (interrupt_status & SERCOM_USART_INTFLAG_RXC) {
|
||||
|
||||
if (module->remaining_rx_buffer_length) {
|
||||
/* Read out the status code and mask away all but the 4 LSBs*/
|
||||
error_code = (uint8_t)(usart_hw->STATUS.reg & SERCOM_USART_STATUS_MASK);
|
||||
|
||||
/* Check if an error has occurred during the receiving */
|
||||
if (error_code) {
|
||||
/* Check which error occurred */
|
||||
if (error_code & SERCOM_USART_STATUS_FERR) {
|
||||
/* Store the error code and clear flag by writing 1 to it */
|
||||
module->rx_status = STATUS_ERR_BAD_FORMAT;
|
||||
usart_hw->STATUS.reg |= SERCOM_USART_STATUS_FERR;
|
||||
} else if (error_code & SERCOM_USART_STATUS_BUFOVF) {
|
||||
/* Store the error code and clear flag by writing 1 to it */
|
||||
module->rx_status = STATUS_ERR_OVERFLOW;
|
||||
usart_hw->STATUS.reg |= SERCOM_USART_STATUS_BUFOVF;
|
||||
} else if (error_code & SERCOM_USART_STATUS_PERR) {
|
||||
/* Store the error code and clear flag by writing 1 to it */
|
||||
module->rx_status = STATUS_ERR_BAD_DATA;
|
||||
usart_hw->STATUS.reg |= SERCOM_USART_STATUS_PERR;
|
||||
}
|
||||
|
||||
/* Run callback if registered and enabled */
|
||||
if (callback_status
|
||||
& (1 << USART_CALLBACK_ERROR)) {
|
||||
(*(module->callback[USART_CALLBACK_ERROR]))(module);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
/* Read current packet from DATA register,
|
||||
* increment buffer pointer and decrement buffer length */
|
||||
uint16_t received_data = (usart_hw->DATA.reg & SERCOM_USART_DATA_MASK);
|
||||
|
||||
/* Read value will be at least 8-bits long */
|
||||
*(module->rx_buffer_ptr) = received_data;
|
||||
/* Increment 8-bit pointer */
|
||||
module->rx_buffer_ptr += 1;
|
||||
|
||||
if (module->character_size == USART_CHARACTER_SIZE_9BIT) {
|
||||
/* 9-bit data, write next received byte to the buffer */
|
||||
*(module->rx_buffer_ptr) = (received_data >> 8);
|
||||
/* Increment 8-bit pointer */
|
||||
module->rx_buffer_ptr += 1;
|
||||
}
|
||||
|
||||
/* Check if the last character have been received */
|
||||
if(--(module->remaining_rx_buffer_length) == 0) {
|
||||
/* Disable RX Complete Interrupt,
|
||||
* and set STATUS_OK */
|
||||
usart_hw->INTENCLR.reg = SERCOM_USART_INTFLAG_RXC;
|
||||
module->rx_status = STATUS_OK;
|
||||
|
||||
/* Run callback if registered and enabled */
|
||||
if (callback_status
|
||||
& (1 << USART_CALLBACK_BUFFER_RECEIVED)) {
|
||||
(*(module->callback[USART_CALLBACK_BUFFER_RECEIVED]))(module);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* This should not happen. Disable Receive Complete interrupt. */
|
||||
usart_hw->INTENCLR.reg = SERCOM_USART_INTFLAG_RXC;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,164 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 SERCOM USART Asynchronous Driver
|
||||
*
|
||||
* Copyright (C) 2012-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
#ifndef USART_INTERRUPT_H_INCLUDED
|
||||
#define USART_INTERRUPT_H_INCLUDED
|
||||
|
||||
#include "usart.h"
|
||||
|
||||
#if !defined(__DOXYGEN__)
|
||||
void _usart_write_buffer(
|
||||
struct usart_module *const module,
|
||||
uint8_t *tx_data,
|
||||
uint16_t length);
|
||||
|
||||
void _usart_read_buffer(
|
||||
struct usart_module *const module,
|
||||
uint8_t *rx_data,
|
||||
uint16_t length);
|
||||
|
||||
void _usart_interrupt_handler(
|
||||
uint8_t instance);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \addtogroup asfdoc_samd20_sercom_usart_group
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \name Callback Management
|
||||
* @{
|
||||
*/
|
||||
void usart_register_callback(
|
||||
struct usart_module *const module,
|
||||
usart_callback_t callback_func,
|
||||
enum usart_callback callback_type);
|
||||
|
||||
void usart_unregister_callback(
|
||||
struct usart_module *module,
|
||||
enum usart_callback callback_type);
|
||||
|
||||
/**
|
||||
* \brief Enables callback
|
||||
*
|
||||
* Enables the callback function registered by the \ref usart_register_callback.
|
||||
* The callback function will be called from the interrupt handler when the
|
||||
* conditions for the callback type are met.
|
||||
*
|
||||
* \param[in] module Pointer to USART software instance struct
|
||||
* \param[in] callback_type Callback type given by an enum
|
||||
*/
|
||||
static inline void usart_enable_callback(
|
||||
struct usart_module *const module,
|
||||
enum usart_callback callback_type)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module);
|
||||
|
||||
/* Enable callback */
|
||||
module->callback_enable_mask |= (1 << callback_type);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Disable callback
|
||||
*
|
||||
* Disables the callback function registered by the \ref usart_register_callback,
|
||||
* and the callback will not be called from the interrupt routine.
|
||||
*
|
||||
* \param[in] module Pointer to USART software instance struct
|
||||
* \param[in] callback_type Callback type given by an enum
|
||||
*/
|
||||
static inline void usart_disable_callback(
|
||||
struct usart_module *const module,
|
||||
enum usart_callback callback_type)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module);
|
||||
|
||||
/* Disable callback */
|
||||
module->callback_enable_mask &= ~(1 << callback_type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* \name Writing and reading
|
||||
* @{
|
||||
*/
|
||||
enum status_code usart_write_job(
|
||||
struct usart_module *const module,
|
||||
const uint16_t tx_data);
|
||||
|
||||
enum status_code usart_read_job(
|
||||
struct usart_module *const module,
|
||||
uint16_t *const rx_data);
|
||||
|
||||
enum status_code usart_write_buffer_job(
|
||||
struct usart_module *const module,
|
||||
uint8_t *tx_data,
|
||||
uint16_t length);
|
||||
|
||||
enum status_code usart_read_buffer_job(
|
||||
struct usart_module *const module,
|
||||
uint8_t *rx_data,
|
||||
uint16_t length);
|
||||
|
||||
void usart_abort_job(
|
||||
struct usart_module *const module,
|
||||
enum usart_transceiver_type transceiver_type);
|
||||
|
||||
enum status_code usart_get_job_status(
|
||||
struct usart_module *const module,
|
||||
enum usart_transceiver_type transceiver_type);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
#endif /* USART_INTERRUPT_H_INCLUDED */
|
|
@ -0,0 +1,748 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 Clock Driver
|
||||
*
|
||||
* Copyright (C) 2012-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
#include <clock.h>
|
||||
#include <conf_clocks.h>
|
||||
|
||||
/**
|
||||
* \internal
|
||||
* \brief DFLL-specific data container
|
||||
*/
|
||||
struct _system_clock_dfll_config {
|
||||
uint32_t control;
|
||||
uint32_t val;
|
||||
uint32_t mul;
|
||||
};
|
||||
|
||||
/**
|
||||
* \internal
|
||||
* \brief XOSC-specific data container
|
||||
*/
|
||||
struct _system_clock_xosc_config {
|
||||
uint32_t frequency;
|
||||
};
|
||||
|
||||
/**
|
||||
* \internal
|
||||
* \brief System clock module data container
|
||||
*/
|
||||
struct _system_clock_module {
|
||||
volatile struct _system_clock_dfll_config dfll;
|
||||
volatile struct _system_clock_xosc_config xosc;
|
||||
volatile struct _system_clock_xosc_config xosc32k;
|
||||
};
|
||||
|
||||
/**
|
||||
* \internal
|
||||
* \brief Internal module instance to cache configuration values
|
||||
*/
|
||||
static struct _system_clock_module _system_clock_inst = {
|
||||
.dfll = {
|
||||
.control = 0,
|
||||
.val = 0,
|
||||
.mul = 0,
|
||||
},
|
||||
.xosc = {
|
||||
.frequency = 0,
|
||||
},
|
||||
.xosc32k = {
|
||||
.frequency = 0,
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* \internal
|
||||
* \brief Wait for sync to the DFLL control registers
|
||||
*/
|
||||
static inline void _system_dfll_wait_for_sync(void)
|
||||
{
|
||||
while (!(SYSCTRL->PCLKSR.reg & SYSCTRL_PCLKSR_DFLLRDY)) {
|
||||
/* Wait for DFLL sync */
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \internal
|
||||
* \brief Wait for sync to the OSC32K control registers
|
||||
*/
|
||||
static inline void _system_osc32k_wait_for_sync(void)
|
||||
{
|
||||
while (!(SYSCTRL->PCLKSR.reg & SYSCTRL_PCLKSR_OSC32KRDY)) {
|
||||
/* Wait for OSC32K sync */
|
||||
}
|
||||
}
|
||||
|
||||
static inline void _system_clock_source_dfll_set_config_errata_9905(void)
|
||||
{
|
||||
|
||||
/* Disable ONDEMAND mode while writing configurations */
|
||||
SYSCTRL->DFLLCTRL.reg = _system_clock_inst.dfll.control & ~SYSCTRL_DFLLCTRL_ONDEMAND;
|
||||
_system_dfll_wait_for_sync();
|
||||
|
||||
SYSCTRL->DFLLMUL.reg = _system_clock_inst.dfll.mul;
|
||||
SYSCTRL->DFLLVAL.reg = _system_clock_inst.dfll.val;
|
||||
|
||||
/* Write full configuration to DFLL control register */
|
||||
SYSCTRL->DFLLCTRL.reg = _system_clock_inst.dfll.control;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Retrieve the frequency of a clock source
|
||||
*
|
||||
* Determines the current operating frequency of a given clock source.
|
||||
*
|
||||
* \param[in] clock_source Clock source to get the frequency of
|
||||
*
|
||||
* \returns Frequency of the given clock source, in Hz
|
||||
*/
|
||||
uint32_t system_clock_source_get_hz(
|
||||
const enum system_clock_source clock_source)
|
||||
{
|
||||
switch (clock_source) {
|
||||
case SYSTEM_CLOCK_SOURCE_XOSC:
|
||||
return _system_clock_inst.xosc.frequency;
|
||||
|
||||
case SYSTEM_CLOCK_SOURCE_OSC8M:
|
||||
return 8000000UL >> SYSCTRL->OSC8M.bit.PRESC;
|
||||
|
||||
case SYSTEM_CLOCK_SOURCE_OSC32K:
|
||||
return 32768UL;
|
||||
|
||||
case SYSTEM_CLOCK_SOURCE_ULP32K:
|
||||
return 32768UL;
|
||||
|
||||
case SYSTEM_CLOCK_SOURCE_XOSC32K:
|
||||
return _system_clock_inst.xosc32k.frequency;
|
||||
|
||||
case SYSTEM_CLOCK_SOURCE_DFLL:
|
||||
|
||||
/* Check if the DFLL has been configured */
|
||||
if (!(_system_clock_inst.dfll.control & SYSCTRL_DFLLCTRL_ENABLE))
|
||||
return 0;
|
||||
|
||||
/* Make sure that the DFLL module is ready */
|
||||
_system_dfll_wait_for_sync();
|
||||
|
||||
/* Check if operating in closed loop mode */
|
||||
if (_system_clock_inst.dfll.control & SYSCTRL_DFLLCTRL_MODE) {
|
||||
return system_gclk_chan_get_hz(SYSCTRL_GCLK_ID_DFLL48) *
|
||||
(_system_clock_inst.dfll.mul & 0xffff);
|
||||
}
|
||||
|
||||
return 48000000UL;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Configure the internal OSC8M oscillator clock source
|
||||
*
|
||||
* Configures the 8MHz (nominal) internal RC oscillator with the given
|
||||
* configuration settings.
|
||||
*
|
||||
* \param[in] config OSC8M configuration structure containing the new config
|
||||
*/
|
||||
void system_clock_source_osc8m_set_config(
|
||||
struct system_clock_source_osc8m_config *const config)
|
||||
{
|
||||
SYSCTRL_OSC8M_Type temp = SYSCTRL->OSC8M;
|
||||
|
||||
/* Use temporary struct to reduce register access */
|
||||
temp.bit.PRESC = config->prescaler;
|
||||
temp.bit.ONDEMAND = config->on_demand;
|
||||
temp.bit.RUNSTDBY = config->run_in_standby;
|
||||
|
||||
SYSCTRL->OSC8M = temp;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Configure the internal OSC32K oscillator clock source
|
||||
*
|
||||
* Configures the 32KHz (nominal) internal RC oscillator with the given
|
||||
* configuration settings.
|
||||
*
|
||||
* \param[in] config OSC32K configuration structure containing the new config
|
||||
*/
|
||||
void system_clock_source_osc32k_set_config(
|
||||
struct system_clock_source_osc32k_config *const config)
|
||||
{
|
||||
SYSCTRL_OSC32K_Type temp = SYSCTRL->OSC32K;
|
||||
|
||||
/* Update settings via a temporary struct to reduce register access */
|
||||
temp.bit.EN1K = config->enable_1khz_output;
|
||||
temp.bit.EN32K = config->enable_32khz_output;
|
||||
temp.bit.STARTUP = config->startup_time;
|
||||
temp.bit.ONDEMAND = config->on_demand;
|
||||
temp.bit.RUNSTDBY = config->run_in_standby;
|
||||
|
||||
SYSCTRL->OSC32K = temp;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Configure the external oscillator clock source
|
||||
*
|
||||
* Configures the external oscillator clock source with the given configuration
|
||||
* settings.
|
||||
*
|
||||
* \param[in] config External oscillator configuration structure containing
|
||||
* the new config
|
||||
*/
|
||||
void system_clock_source_xosc_set_config(
|
||||
struct system_clock_source_xosc_config *const config)
|
||||
{
|
||||
SYSCTRL_XOSC_Type temp = SYSCTRL->XOSC;
|
||||
|
||||
temp.bit.STARTUP = config->startup_time;
|
||||
|
||||
if (config->external_clock == SYSTEM_CLOCK_EXTERNAL_CRYSTAL) {
|
||||
temp.bit.XTALEN = 1;
|
||||
} else {
|
||||
temp.bit.XTALEN = 0;
|
||||
}
|
||||
|
||||
temp.bit.AMPGC = config->auto_gain_control;
|
||||
|
||||
/* Set gain if automatic gain control is not selected */
|
||||
if (!config->auto_gain_control) {
|
||||
if (config->frequency <= 2000000) {
|
||||
temp.bit.GAIN = 0;
|
||||
} else if (config->frequency <= 4000000) {
|
||||
temp.bit.GAIN = 1;
|
||||
} else if (config->frequency <= 8000000) {
|
||||
temp.bit.GAIN = 2;
|
||||
} else if (config->frequency <= 16000000) {
|
||||
temp.bit.GAIN = 3;
|
||||
} else if (config->frequency <= 30000000) {
|
||||
temp.bit.GAIN = 4;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
temp.bit.ONDEMAND = config->on_demand;
|
||||
temp.bit.RUNSTDBY = config->run_in_standby;
|
||||
|
||||
/* Store XOSC frequency for internal use */
|
||||
_system_clock_inst.xosc.frequency = config->frequency;
|
||||
|
||||
SYSCTRL->XOSC = temp;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Configure the XOSC32K external 32KHz oscillator clock source
|
||||
*
|
||||
* Configures the external 32KHz oscillator clock source with the given
|
||||
* configuration settings.
|
||||
*
|
||||
* \param[in] config XOSC32K configuration structure containing the new config
|
||||
*/
|
||||
void system_clock_source_xosc32k_set_config(
|
||||
struct system_clock_source_xosc32k_config *const config)
|
||||
{
|
||||
SYSCTRL_XOSC32K_Type temp = SYSCTRL->XOSC32K;
|
||||
|
||||
temp.bit.STARTUP = config->startup_time;
|
||||
|
||||
if (config->external_clock == SYSTEM_CLOCK_EXTERNAL_CRYSTAL) {
|
||||
temp.bit.XTALEN = 1;
|
||||
} else {
|
||||
temp.bit.XTALEN = 0;
|
||||
}
|
||||
|
||||
temp.bit.AAMPEN = config->auto_gain_control;
|
||||
temp.bit.EN1K = config->enable_1khz_output;
|
||||
temp.bit.EN32K = config->enable_32khz_output;
|
||||
|
||||
temp.bit.ONDEMAND = config->on_demand;
|
||||
temp.bit.RUNSTDBY = config->run_in_standby;
|
||||
|
||||
/* Cache the new frequency in case the user needs to check the current
|
||||
* operating frequency later */
|
||||
_system_clock_inst.xosc32k.frequency = config->frequency;
|
||||
|
||||
SYSCTRL->XOSC32K = temp;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Configure the DFLL clock source
|
||||
*
|
||||
* Configures the Digital Frequency Locked Loop clock source with the given
|
||||
* configuration settings.
|
||||
*
|
||||
* \note The DFLL will be running when this function returns, as the DFLL module
|
||||
* needs to be enabled in order to perform the module configuration.
|
||||
*
|
||||
* \param[in] config DFLL configuration structure containing the new config
|
||||
*/
|
||||
void system_clock_source_dfll_set_config(
|
||||
struct system_clock_source_dfll_config *const config)
|
||||
{
|
||||
_system_clock_inst.dfll.val =
|
||||
SYSCTRL_DFLLVAL_COARSE(config->coarse_value) |
|
||||
SYSCTRL_DFLLVAL_FINE(config->fine_value);
|
||||
|
||||
_system_clock_inst.dfll.control =
|
||||
(uint32_t)config->wakeup_lock |
|
||||
(uint32_t)config->stable_tracking |
|
||||
(uint32_t)config->quick_lock |
|
||||
(uint32_t)config->chill_cycle |
|
||||
(uint32_t)config->run_in_standby << SYSCTRL_DFLLCTRL_RUNSTDBY_Pos |
|
||||
(uint32_t)config->on_demand << SYSCTRL_DFLLCTRL_ONDEMAND_Pos;
|
||||
|
||||
if (config->loop_mode == SYSTEM_CLOCK_DFLL_LOOP_MODE_CLOSED) {
|
||||
_system_clock_inst.dfll.mul =
|
||||
SYSCTRL_DFLLMUL_CSTEP(config->coarse_max_step) |
|
||||
SYSCTRL_DFLLMUL_FSTEP(config->fine_max_step) |
|
||||
SYSCTRL_DFLLMUL_MUL(config->multiply_factor);
|
||||
|
||||
/* Enable the closed loop mode */
|
||||
_system_clock_inst.dfll.control |= config->loop_mode;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Writes the calibration values for a given oscillator clock source
|
||||
*
|
||||
* Writes an oscillator calibration value to the given oscillator control
|
||||
* registers. The acceptable ranges are:
|
||||
*
|
||||
* For OSC32K:
|
||||
* - 7 bits (max value 128)
|
||||
* For OSC8MHZ:
|
||||
* - 8 bits (Max value 255)
|
||||
* For OSCULP:
|
||||
* - 5 bits (Max value 32)
|
||||
*
|
||||
* \note The frequency range parameter applies only when configuring the 8MHz
|
||||
* oscillator and will be ignored for the other oscillators.
|
||||
*
|
||||
* \param[in] clock_source Clock source to calibrate
|
||||
* \param[in] calibration_value Calibration value to write
|
||||
* \param[in] freq_range Frequency range (8MHz oscillator only)
|
||||
*
|
||||
* \retval STATUS_ERR_INVALID_ARG The selected clock source is not available
|
||||
*/
|
||||
enum status_code system_clock_source_write_calibration(
|
||||
const enum system_clock_source clock_source,
|
||||
const uint16_t calibration_value,
|
||||
const uint8_t freq_range)
|
||||
{
|
||||
switch (clock_source) {
|
||||
case SYSTEM_CLOCK_SOURCE_OSC8M:
|
||||
|
||||
if (calibration_value > 0xfff || freq_range > 4) {
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
SYSCTRL->OSC8M.bit.CALIB = calibration_value;
|
||||
SYSCTRL->OSC8M.bit.FRANGE = freq_range;
|
||||
break;
|
||||
|
||||
case SYSTEM_CLOCK_SOURCE_OSC32K:
|
||||
|
||||
if (calibration_value > 128) {
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
_system_osc32k_wait_for_sync();
|
||||
SYSCTRL->OSC32K.bit.CALIB = calibration_value;
|
||||
break;
|
||||
|
||||
case SYSTEM_CLOCK_SOURCE_ULP32K:
|
||||
|
||||
if (calibration_value > 32) {
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
SYSCTRL->OSCULP32K.bit.CALIB = calibration_value;
|
||||
break;
|
||||
|
||||
default:
|
||||
Assert(false);
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
break;
|
||||
}
|
||||
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Enables a clock source
|
||||
*
|
||||
* Enables a clock source which has been previously configured.
|
||||
*
|
||||
* \param[in] clock_source Clock source to enable
|
||||
*
|
||||
* \retval STATUS_OK Clock source was enabled successfully and
|
||||
* is ready
|
||||
* \retval STATUS_ERR_INVALID_ARG The clock source is not available on this
|
||||
* device
|
||||
*
|
||||
* \retval STATUS_ERR_NOT_INITIALIZED DFLL configuration is not initialized
|
||||
*/
|
||||
enum status_code system_clock_source_enable(
|
||||
const enum system_clock_source clock_source)
|
||||
{
|
||||
switch (clock_source) {
|
||||
case SYSTEM_CLOCK_SOURCE_OSC8M:
|
||||
SYSCTRL->OSC8M.reg |= SYSCTRL_OSC8M_ENABLE;
|
||||
return STATUS_OK;
|
||||
|
||||
case SYSTEM_CLOCK_SOURCE_OSC32K:
|
||||
SYSCTRL->OSC32K.reg |= SYSCTRL_OSC32K_ENABLE;
|
||||
break;
|
||||
|
||||
case SYSTEM_CLOCK_SOURCE_XOSC:
|
||||
SYSCTRL->XOSC.reg |= SYSCTRL_XOSC_ENABLE;
|
||||
break;
|
||||
|
||||
case SYSTEM_CLOCK_SOURCE_XOSC32K:
|
||||
SYSCTRL->XOSC32K.reg |= SYSCTRL_XOSC32K_ENABLE;
|
||||
break;
|
||||
|
||||
case SYSTEM_CLOCK_SOURCE_DFLL:
|
||||
_system_clock_inst.dfll.control |= SYSCTRL_DFLLCTRL_ENABLE;
|
||||
_system_clock_source_dfll_set_config_errata_9905();
|
||||
break;
|
||||
|
||||
case SYSTEM_CLOCK_SOURCE_ULP32K:
|
||||
/* Always enabled */
|
||||
return STATUS_OK;
|
||||
|
||||
default:
|
||||
Assert(false);
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Disables a clock source
|
||||
*
|
||||
* Disables a clock source that was previously enabled.
|
||||
*
|
||||
* \param[in] clock_source Clock source to disable
|
||||
*
|
||||
* \retval STATUS_OK Clock source was disabled successfully
|
||||
* \retval STATUS_ERR_INVALID_ARG An invalid or unavailable clock source was
|
||||
* given
|
||||
*/
|
||||
enum status_code system_clock_source_disable(
|
||||
const enum system_clock_source clock_source)
|
||||
{
|
||||
switch (clock_source) {
|
||||
case SYSTEM_CLOCK_SOURCE_OSC8M:
|
||||
SYSCTRL->OSC8M.reg &= ~SYSCTRL_OSC8M_ENABLE;
|
||||
break;
|
||||
|
||||
case SYSTEM_CLOCK_SOURCE_OSC32K:
|
||||
SYSCTRL->OSC32K.reg &= ~SYSCTRL_OSC32K_ENABLE;
|
||||
break;
|
||||
|
||||
case SYSTEM_CLOCK_SOURCE_XOSC:
|
||||
SYSCTRL->XOSC.reg &= ~SYSCTRL_XOSC_ENABLE;
|
||||
break;
|
||||
|
||||
case SYSTEM_CLOCK_SOURCE_XOSC32K:
|
||||
SYSCTRL->XOSC32K.reg &= ~SYSCTRL_XOSC32K_ENABLE;
|
||||
break;
|
||||
|
||||
case SYSTEM_CLOCK_SOURCE_DFLL:
|
||||
_system_clock_inst.dfll.control &= ~SYSCTRL_DFLLCTRL_ENABLE;
|
||||
SYSCTRL->DFLLCTRL.reg = _system_clock_inst.dfll.control;
|
||||
break;
|
||||
|
||||
case SYSTEM_CLOCK_SOURCE_ULP32K:
|
||||
/* Not possible to disable */
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
|
||||
default:
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Checks if a clock source is ready
|
||||
*
|
||||
* Checks if a given clock source is ready to be used.
|
||||
*
|
||||
* \param[in] clock_source Clock source to check if ready
|
||||
*
|
||||
* \returns Ready state of the given clock source.
|
||||
*
|
||||
* \retval true Clock source is enabled and ready
|
||||
* \retval false Clock source is disabled or not yet ready
|
||||
*/
|
||||
bool system_clock_source_is_ready(
|
||||
const enum system_clock_source clock_source)
|
||||
{
|
||||
uint32_t mask;
|
||||
|
||||
switch (clock_source) {
|
||||
case SYSTEM_CLOCK_SOURCE_OSC8M:
|
||||
mask = SYSCTRL_PCLKSR_OSC8MRDY;
|
||||
break;
|
||||
|
||||
case SYSTEM_CLOCK_SOURCE_OSC32K:
|
||||
mask = SYSCTRL_PCLKSR_OSC32KRDY;
|
||||
break;
|
||||
|
||||
case SYSTEM_CLOCK_SOURCE_XOSC:
|
||||
mask = SYSCTRL_PCLKSR_XOSCRDY;
|
||||
break;
|
||||
|
||||
case SYSTEM_CLOCK_SOURCE_XOSC32K:
|
||||
mask = SYSCTRL_PCLKSR_XOSC32KRDY;
|
||||
break;
|
||||
|
||||
case SYSTEM_CLOCK_SOURCE_DFLL:
|
||||
mask = SYSCTRL_PCLKSR_DFLLRDY;
|
||||
break;
|
||||
|
||||
case SYSTEM_CLOCK_SOURCE_ULP32K:
|
||||
/* Not possible to disable */
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return ((SYSCTRL->PCLKSR.reg & mask) != 0);
|
||||
}
|
||||
|
||||
/* Include some checks for conf_clocks.h validation */
|
||||
#include "clock_config_check.h"
|
||||
|
||||
#if !defined(__DOXYGEN__)
|
||||
/** \internal
|
||||
*
|
||||
* Configures a Generic Clock Generator with the configuration from \c conf_clocks.h.
|
||||
*/
|
||||
# define _CONF_CLOCK_GCLK_CONFIG(n, unused) \
|
||||
if (CONF_CLOCK_GCLK_##n##_ENABLE == true) { \
|
||||
struct system_gclk_gen_config gclk_conf; \
|
||||
system_gclk_gen_get_config_defaults(&gclk_conf); \
|
||||
gclk_conf.source_clock = CONF_CLOCK_GCLK_##n##_CLOCK_SOURCE; \
|
||||
gclk_conf.division_factor = CONF_CLOCK_GCLK_##n##_PRESCALER; \
|
||||
gclk_conf.run_in_standby = CONF_CLOCK_GCLK_##n##_RUN_IN_STANDBY; \
|
||||
gclk_conf.output_enable = CONF_CLOCK_GCLK_##n##_OUTPUT_ENABLE; \
|
||||
system_gclk_gen_set_config(GCLK_GENERATOR_##n, &gclk_conf); \
|
||||
system_gclk_gen_enable(GCLK_GENERATOR_##n); \
|
||||
}
|
||||
|
||||
/** \internal
|
||||
*
|
||||
* Configures a Generic Clock Generator with the configuration from \c conf_clocks.h,
|
||||
* provided that it is not the main Generic Clock Generator channel.
|
||||
*/
|
||||
# define _CONF_CLOCK_GCLK_CONFIG_NONMAIN(n, unused) \
|
||||
if (n > 0) { _CONF_CLOCK_GCLK_CONFIG(n, unused); }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Initialize clock system based on the configuration in conf_clocks.h
|
||||
*
|
||||
* This function will apply the settings in conf_clocks.h when run from the user
|
||||
* application. All clock sources and GCLK generators are running when this function
|
||||
* returns.
|
||||
*/
|
||||
void system_clock_init(void)
|
||||
{
|
||||
/* Workaround for errata 10558 */
|
||||
SYSCTRL->INTFLAG.reg = SYSCTRL_INTFLAG_BOD12RDY | SYSCTRL_INTFLAG_BOD33RDY |
|
||||
SYSCTRL_INTFLAG_BOD12DET | SYSCTRL_INTFLAG_BOD33DET |
|
||||
SYSCTRL_INTFLAG_DFLLRDY;
|
||||
|
||||
system_flash_set_waitstates(CONF_CLOCK_FLASH_WAIT_STATES);
|
||||
|
||||
/* XOSC */
|
||||
#if CONF_CLOCK_XOSC_ENABLE == true
|
||||
struct system_clock_source_xosc_config xosc_conf;
|
||||
system_clock_source_xosc_get_config_defaults(&xosc_conf);
|
||||
|
||||
xosc_conf.external_clock = CONF_CLOCK_XOSC_EXTERNAL_CRYSTAL;
|
||||
xosc_conf.startup_time = CONF_CLOCK_XOSC_STARTUP_TIME;
|
||||
xosc_conf.auto_gain_control = CONF_CLOCK_XOSC_AUTO_GAIN_CONTROL;
|
||||
xosc_conf.frequency = CONF_CLOCK_XOSC_EXTERNAL_FREQUENCY;
|
||||
xosc_conf.on_demand = CONF_CLOCK_XOSC_ON_DEMAND;
|
||||
xosc_conf.run_in_standby = CONF_CLOCK_XOSC_RUN_IN_STANDBY;
|
||||
|
||||
system_clock_source_xosc_set_config(&xosc_conf);
|
||||
system_clock_source_enable(SYSTEM_CLOCK_SOURCE_XOSC);
|
||||
#endif
|
||||
|
||||
|
||||
/* XOSC32K */
|
||||
#if CONF_CLOCK_XOSC32K_ENABLE == true
|
||||
struct system_clock_source_xosc32k_config xosc32k_conf;
|
||||
system_clock_source_xosc32k_get_config_defaults(&xosc32k_conf);
|
||||
|
||||
xosc32k_conf.frequency = 32768UL;
|
||||
xosc32k_conf.external_clock = CONF_CLOCK_XOSC32K_EXTERNAL_CRYSTAL;
|
||||
xosc32k_conf.startup_time = CONF_CLOCK_XOSC32K_STARTUP_TIME;
|
||||
xosc32k_conf.auto_gain_control = CONF_CLOCK_XOSC32K_AUTO_AMPLITUDE_CONTROL;
|
||||
xosc32k_conf.enable_1khz_output = CONF_CLOCK_XOSC32K_ENABLE_1KHZ_OUPUT;
|
||||
xosc32k_conf.enable_32khz_output = CONF_CLOCK_XOSC32K_ENABLE_32KHZ_OUTPUT;
|
||||
xosc32k_conf.on_demand = CONF_CLOCK_XOSC32K_ON_DEMAND;
|
||||
xosc32k_conf.run_in_standby = CONF_CLOCK_XOSC32K_RUN_IN_STANDBY;
|
||||
|
||||
system_clock_source_xosc32k_set_config(&xosc32k_conf);
|
||||
system_clock_source_enable(SYSTEM_CLOCK_SOURCE_XOSC32K);
|
||||
#endif
|
||||
|
||||
|
||||
/* OSCK32K */
|
||||
#if CONF_CLOCK_OSC32K_ENABLE == true
|
||||
SYSCTRL->OSC32K.bit.CALIB =
|
||||
(*(uint32_t *)SYSCTRL_FUSES_OSC32KCAL_ADDR >> SYSCTRL_FUSES_OSC32KCAL_Pos);
|
||||
|
||||
struct system_clock_source_osc32k_config osc32k_conf;
|
||||
system_clock_source_osc32k_get_config_defaults(&osc32k_conf);
|
||||
|
||||
osc32k_conf.startup_time = CONF_CLOCK_OSC32K_STARTUP_TIME;
|
||||
osc32k_conf.enable_1khz_output = CONF_CLOCK_OSC32K_ENABLE_1KHZ_OUTPUT;
|
||||
osc32k_conf.enable_32khz_output = CONF_CLOCK_OSC32K_ENABLE_32KHZ_OUTPUT;
|
||||
osc32k_conf.on_demand = CONF_CLOCK_OSC32K_ON_DEMAND;
|
||||
osc32k_conf.run_in_standby = CONF_CLOCK_OSC32K_RUN_IN_STANDBY;
|
||||
|
||||
system_clock_source_osc32k_set_config(&osc32k_conf);
|
||||
system_clock_source_enable(SYSTEM_CLOCK_SOURCE_OSC32K);
|
||||
#endif
|
||||
|
||||
|
||||
/* DFLL (Open and Closed Loop) */
|
||||
#if CONF_CLOCK_DFLL_ENABLE == true
|
||||
struct system_clock_source_dfll_config dfll_conf;
|
||||
system_clock_source_dfll_get_config_defaults(&dfll_conf);
|
||||
|
||||
dfll_conf.loop_mode = CONF_CLOCK_DFLL_LOOP_MODE;
|
||||
dfll_conf.on_demand = CONF_CLOCK_DFLL_ON_DEMAND;
|
||||
dfll_conf.run_in_standby = CONF_CLOCK_DFLL_RUN_IN_STANDBY;
|
||||
|
||||
if (CONF_CLOCK_DFLL_LOOP_MODE == SYSTEM_CLOCK_DFLL_LOOP_MODE_OPEN) {
|
||||
dfll_conf.coarse_value = CONF_CLOCK_DFLL_COARSE_VALUE;
|
||||
dfll_conf.fine_value = CONF_CLOCK_DFLL_FINE_VALUE;
|
||||
}
|
||||
|
||||
# if CONF_CLOCK_DFLL_QUICK_LOCK == true
|
||||
dfll_conf.quick_lock = SYSTEM_CLOCK_DFLL_QUICK_LOCK_ENABLE;
|
||||
# else
|
||||
dfll_conf.quick_lock = SYSTEM_CLOCK_DFLL_QUICK_LOCK_DISABLE;
|
||||
# endif
|
||||
|
||||
# if CONF_CLOCK_DFLL_TRACK_AFTER_FINE_LOCK == true
|
||||
dfll_conf.stable_tracking = SYSTEM_CLOCK_DFLL_STABLE_TRACKING_TRACK_AFTER_LOCK;
|
||||
# else
|
||||
dfll_conf.stable_tracking = SYSTEM_CLOCK_DFLL_STABLE_TRACKING_FIX_AFTER_LOCK;
|
||||
# endif
|
||||
|
||||
# if CONF_CLOCK_DFLL_KEEP_LOCK_ON_WAKEUP == true
|
||||
dfll_conf.wakeup_lock = SYSTEM_CLOCK_DFLL_WAKEUP_LOCK_KEEP;
|
||||
# else
|
||||
dfll_conf.wakeup_lock = SYSTEM_CLOCK_DFLL_WAKEUP_LOCK_LOSE;
|
||||
# endif
|
||||
|
||||
# if CONF_CLOCK_DFLL_ENABLE_CHILL_CYCLE == true
|
||||
dfll_conf.chill_cycle = SYSTEM_CLOCK_DFLL_CHILL_CYCLE_ENABLE;
|
||||
# else
|
||||
dfll_conf.chill_cycle = SYSTEM_CLOCK_DFLL_CHILL_CYCLE_DISABLE;
|
||||
# endif
|
||||
|
||||
if (CONF_CLOCK_DFLL_LOOP_MODE == SYSTEM_CLOCK_DFLL_LOOP_MODE_CLOSED) {
|
||||
dfll_conf.multiply_factor = CONF_CLOCK_DFLL_MULTIPLY_FACTOR;
|
||||
}
|
||||
|
||||
dfll_conf.coarse_max_step = CONF_CLOCK_DFLL_MAX_COARSE_STEP_SIZE;
|
||||
dfll_conf.fine_max_step = CONF_CLOCK_DFLL_MAX_FINE_STEP_SIZE;
|
||||
|
||||
system_clock_source_dfll_set_config(&dfll_conf);
|
||||
system_clock_source_enable(SYSTEM_CLOCK_SOURCE_DFLL);
|
||||
#endif
|
||||
|
||||
|
||||
/* OSC8M */
|
||||
struct system_clock_source_osc8m_config osc8m_conf;
|
||||
system_clock_source_osc8m_get_config_defaults(&osc8m_conf);
|
||||
|
||||
osc8m_conf.prescaler = CONF_CLOCK_OSC8M_PRESCALER;
|
||||
osc8m_conf.on_demand = CONF_CLOCK_OSC8M_ON_DEMAND;
|
||||
osc8m_conf.run_in_standby = CONF_CLOCK_OSC8M_RUN_IN_STANDBY;
|
||||
|
||||
system_clock_source_osc8m_set_config(&osc8m_conf);
|
||||
system_clock_source_enable(SYSTEM_CLOCK_SOURCE_OSC8M);
|
||||
|
||||
|
||||
/* GCLK */
|
||||
#if CONF_CLOCK_CONFIGURE_GCLK == true
|
||||
system_gclk_init();
|
||||
|
||||
/* Configure all GCLK generators except for the main generator, which
|
||||
* is configured later after all other clock systems are set up */
|
||||
MREPEAT(GCLK_GEN_NUM_MSB, _CONF_CLOCK_GCLK_CONFIG_NONMAIN, ~);
|
||||
|
||||
# if (CONF_CLOCK_DFLL_ENABLE)
|
||||
/* Enable DFLL reference clock if in closed loop mode */
|
||||
if (CONF_CLOCK_DFLL_LOOP_MODE == SYSTEM_CLOCK_DFLL_LOOP_MODE_CLOSED) {
|
||||
struct system_gclk_chan_config dfll_gclk_chan_conf;
|
||||
|
||||
system_gclk_chan_get_config_defaults(&dfll_gclk_chan_conf);
|
||||
dfll_gclk_chan_conf.source_generator = CONF_CLOCK_DFLL_SOURCE_GCLK_GENERATOR;
|
||||
system_gclk_chan_set_config(SYSCTRL_GCLK_ID_DFLL48, &dfll_gclk_chan_conf);
|
||||
system_gclk_chan_enable(SYSCTRL_GCLK_ID_DFLL48);
|
||||
}
|
||||
# endif
|
||||
|
||||
/* Configure the main GCLK last as it might depend on other generators */
|
||||
_CONF_CLOCK_GCLK_CONFIG(0, ~);
|
||||
#endif
|
||||
|
||||
|
||||
/* CPU and BUS clocks */
|
||||
system_cpu_clock_set_divider(CONF_CLOCK_CPU_DIVIDER);
|
||||
system_main_clock_set_failure_detect(CONF_CLOCK_CPU_CLOCK_FAILURE_DETECT);
|
||||
system_apb_clock_set_divider(SYSTEM_CLOCK_APB_APBA, CONF_CLOCK_APBA_DIVIDER);
|
||||
system_apb_clock_set_divider(SYSTEM_CLOCK_APB_APBB, CONF_CLOCK_APBB_DIVIDER);
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,383 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 Clock Driver
|
||||
*
|
||||
* Copyright (C) 2012-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CLOCK_CONFIG_CHECK_H
|
||||
# define CLOCK_CONFIG_CHECK_H
|
||||
|
||||
#if !defined(CONF_CLOCK_CPU_CLOCK_FAILURE_DETECT)
|
||||
# error CONF_CLOCK_CPU_CLOCK_FAILURE_DETECT not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_FLASH_WAIT_STATES)
|
||||
# error CONF_CLOCK_FLASH_WAIT_STATES not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_CPU_DIVIDER)
|
||||
# error CONF_CLOCK_CPU_DIVIDER not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_APBA_DIVIDER)
|
||||
# error CONF_CLOCK_APBA_DIVIDER not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_APBB_DIVIDER)
|
||||
# error CONF_CLOCK_APBB_DIVIDER not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_OSC8M_PRESCALER)
|
||||
# error CONF_CLOCK_OSC8M_PRESCALER not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_OSC8M_ON_DEMAND)
|
||||
# error CONF_CLOCK_OSC8M_ON_DEMAND not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_OSC8M_RUN_IN_STANDBY)
|
||||
# error CONF_CLOCK_OSC8M_RUN_IN_STANDBY not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_XOSC_ENABLE)
|
||||
# error CONF_CLOCK_XOSC_ENABLE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_XOSC_EXTERNAL_CRYSTAL)
|
||||
# error CONF_CLOCK_XOSC_EXTERNAL_CRYSTAL not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_XOSC_EXTERNAL_FREQUENCY)
|
||||
# error CONF_CLOCK_XOSC_EXTERNAL_FREQUENCY not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_XOSC_STARTUP_TIME)
|
||||
# error CONF_CLOCK_XOSC_STARTUP_TIME not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_XOSC_AUTO_GAIN_CONTROL)
|
||||
# error CONF_CLOCK_XOSC_AUTO_GAIN_CONTROL not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_XOSC_ON_DEMAND)
|
||||
# error CONF_CLOCK_XOSC_ON_DEMAND not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_XOSC_RUN_IN_STANDBY)
|
||||
# error CONF_CLOCK_XOSC_RUN_IN_STANDBY not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_XOSC32K_ENABLE)
|
||||
# error CONF_CLOCK_XOSC32K_ENABLE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_XOSC32K_EXTERNAL_CRYSTAL)
|
||||
# error CONF_CLOCK_XOSC32K_EXTERNAL_CRYSTAL not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_XOSC32K_STARTUP_TIME)
|
||||
# error CONF_CLOCK_XOSC32K_STARTUP_TIME not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_XOSC32K_AUTO_AMPLITUDE_CONTROL)
|
||||
# error CONF_CLOCK_XOSC32K_AUTO_AMPLITUDE_CONTROL not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_XOSC32K_ENABLE_1KHZ_OUPUT)
|
||||
# error CONF_CLOCK_XOSC32K_ENABLE_1KHZ_OUPUT not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_XOSC32K_ENABLE_32KHZ_OUTPUT)
|
||||
# error CONF_CLOCK_XOSC32K_ENABLE_32KHZ_OUTPUT not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_XOSC32K_ON_DEMAND)
|
||||
# error CONF_CLOCK_XOSC32K_ON_DEMAND not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_XOSC32K_RUN_IN_STANDBY)
|
||||
# error CONF_CLOCK_XOSC32K_RUN_IN_STANDBY not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_OSC32K_ENABLE)
|
||||
# error CONF_CLOCK_OSC32K_ENABLE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_OSC32K_STARTUP_TIME)
|
||||
# error CONF_CLOCK_OSC32K_STARTUP_TIME not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_OSC32K_ENABLE_1KHZ_OUTPUT)
|
||||
# error CONF_CLOCK_OSC32K_ENABLE_1KHZ_OUTPUT not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_OSC32K_ENABLE_32KHZ_OUTPUT)
|
||||
# error CONF_CLOCK_OSC32K_ENABLE_32KHZ_OUTPUT not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_OSC32K_ON_DEMAND)
|
||||
# error CONF_CLOCK_OSC32K_ON_DEMAND not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_OSC32K_RUN_IN_STANDBY)
|
||||
# error CONF_CLOCK_OSC32K_RUN_IN_STANDBY not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_DFLL_ENABLE)
|
||||
# error CONF_CLOCK_DFLL_ENABLE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_DFLL_LOOP_MODE)
|
||||
# error CONF_CLOCK_DFLL_LOOP_MODE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_DFLL_ON_DEMAND)
|
||||
# error CONF_CLOCK_DFLL_ON_DEMAND not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_DFLL_RUN_IN_STANDBY)
|
||||
# error CONF_CLOCK_DFLL_RUN_IN_STANDBY not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_DFLL_COARSE_VALUE)
|
||||
# error CONF_CLOCK_DFLL_COARSE_VALUE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_DFLL_FINE_VALUE)
|
||||
# error CONF_CLOCK_DFLL_FINE_VALUE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_DFLL_SOURCE_GCLK_GENERATOR)
|
||||
# error CONF_CLOCK_DFLL_SOURCE_GCLK_GENERATOR not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_DFLL_MULTIPLY_FACTOR)
|
||||
# error CONF_CLOCK_DFLL_MULTIPLY_FACTOR not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_DFLL_QUICK_LOCK)
|
||||
# error CONF_CLOCK_DFLL_QUICK_LOCK not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_DFLL_TRACK_AFTER_FINE_LOCK)
|
||||
# error CONF_CLOCK_DFLL_TRACK_AFTER_FINE_LOCK not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_DFLL_KEEP_LOCK_ON_WAKEUP)
|
||||
# error CONF_CLOCK_DFLL_KEEP_LOCK_ON_WAKEUP not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_DFLL_ENABLE_CHILL_CYCLE)
|
||||
# error CONF_CLOCK_DFLL_ENABLE_CHILL_CYCLE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_DFLL_MAX_COARSE_STEP_SIZE)
|
||||
# error CONF_CLOCK_DFLL_MAX_COARSE_STEP_SIZE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_DFLL_MAX_FINE_STEP_SIZE)
|
||||
# error CONF_CLOCK_DFLL_MAX_FINE_STEP_SIZE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_CONFIGURE_GCLK)
|
||||
# error CONF_CLOCK_CONFIGURE_GCLK not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_0_ENABLE)
|
||||
# error CONF_CLOCK_GCLK_0_ENABLE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_0_RUN_IN_STANDBY)
|
||||
# error CONF_CLOCK_GCLK_0_RUN_IN_STANDBY not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_0_CLOCK_SOURCE)
|
||||
# error CONF_CLOCK_GCLK_0_CLOCK_SOURCE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_0_PRESCALER)
|
||||
# error CONF_CLOCK_GCLK_0_PRESCALER not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_0_OUTPUT_ENABLE)
|
||||
# error CONF_CLOCK_GCLK_0_OUTPUT_ENABLE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_1_ENABLE)
|
||||
# error CONF_CLOCK_GCLK_1_ENABLE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_1_RUN_IN_STANDBY)
|
||||
# error CONF_CLOCK_GCLK_1_RUN_IN_STANDBY not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_1_CLOCK_SOURCE)
|
||||
# error CONF_CLOCK_GCLK_1_CLOCK_SOURCE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_1_PRESCALER)
|
||||
# error CONF_CLOCK_GCLK_1_PRESCALER not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_1_OUTPUT_ENABLE)
|
||||
# error CONF_CLOCK_GCLK_1_OUTPUT_ENABLE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_2_ENABLE)
|
||||
# error CONF_CLOCK_GCLK_2_ENABLE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_2_RUN_IN_STANDBY)
|
||||
# error CONF_CLOCK_GCLK_2_RUN_IN_STANDBY not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_2_CLOCK_SOURCE)
|
||||
# error CONF_CLOCK_GCLK_2_CLOCK_SOURCE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_2_PRESCALER)
|
||||
# error CONF_CLOCK_GCLK_2_PRESCALER not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_2_OUTPUT_ENABLE)
|
||||
# error CONF_CLOCK_GCLK_2_OUTPUT_ENABLE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_3_ENABLE)
|
||||
# error CONF_CLOCK_GCLK_3_ENABLE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_3_RUN_IN_STANDBY)
|
||||
# error CONF_CLOCK_GCLK_3_RUN_IN_STANDBY not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_3_CLOCK_SOURCE)
|
||||
# error CONF_CLOCK_GCLK_3_CLOCK_SOURCE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_3_PRESCALER)
|
||||
# error CONF_CLOCK_GCLK_3_PRESCALER not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_3_OUTPUT_ENABLE)
|
||||
# error CONF_CLOCK_GCLK_3_OUTPUT_ENABLE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_4_ENABLE)
|
||||
# error CONF_CLOCK_GCLK_4_ENABLE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_4_RUN_IN_STANDBY)
|
||||
# error CONF_CLOCK_GCLK_4_RUN_IN_STANDBY not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_4_CLOCK_SOURCE)
|
||||
# error CONF_CLOCK_GCLK_4_CLOCK_SOURCE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_4_PRESCALER)
|
||||
# error CONF_CLOCK_GCLK_4_PRESCALER not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_4_OUTPUT_ENABLE)
|
||||
# error CONF_CLOCK_GCLK_4_OUTPUT_ENABLE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_5_ENABLE)
|
||||
# error CONF_CLOCK_GCLK_5_ENABLE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_5_RUN_IN_STANDBY)
|
||||
# error CONF_CLOCK_GCLK_5_RUN_IN_STANDBY not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_5_CLOCK_SOURCE)
|
||||
# error CONF_CLOCK_GCLK_5_CLOCK_SOURCE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_5_PRESCALER)
|
||||
# error CONF_CLOCK_GCLK_5_PRESCALER not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_5_OUTPUT_ENABLE)
|
||||
# error CONF_CLOCK_GCLK_5_OUTPUT_ENABLE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_6_ENABLE)
|
||||
# error CONF_CLOCK_GCLK_6_ENABLE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_6_RUN_IN_STANDBY)
|
||||
# error CONF_CLOCK_GCLK_6_RUN_IN_STANDBY not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_6_CLOCK_SOURCE)
|
||||
# error CONF_CLOCK_GCLK_6_CLOCK_SOURCE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_6_PRESCALER)
|
||||
# error CONF_CLOCK_GCLK_6_PRESCALER not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_6_OUTPUT_ENABLE)
|
||||
# error CONF_CLOCK_GCLK_6_OUTPUT_ENABLE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_7_ENABLE)
|
||||
# error CONF_CLOCK_GCLK_7_ENABLE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_7_RUN_IN_STANDBY)
|
||||
# error CONF_CLOCK_GCLK_7_RUN_IN_STANDBY not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_7_CLOCK_SOURCE)
|
||||
# error CONF_CLOCK_GCLK_7_CLOCK_SOURCE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_7_PRESCALER)
|
||||
# error CONF_CLOCK_GCLK_7_PRESCALER not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#if !defined(CONF_CLOCK_GCLK_7_OUTPUT_ENABLE)
|
||||
# error CONF_CLOCK_GCLK_7_OUTPUT_ENABLE not defined in conf_clock.h
|
||||
#endif
|
||||
|
||||
#endif /* CLOCK_CONFIG_CHECK_H */
|
|
@ -0,0 +1,392 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 Generic Clock Driver
|
||||
*
|
||||
* Copyright (C) 2012-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#include <gclk.h>
|
||||
#include <clock.h>
|
||||
#include <system_interrupt.h>
|
||||
|
||||
/**
|
||||
* \brief Initializes the GCLK driver.
|
||||
*
|
||||
* Initializes the Generic Clock module, disabling and resetting all active
|
||||
* Generic Clock Generators and Channels to their power-on default values.
|
||||
*/
|
||||
void system_gclk_init(void)
|
||||
{
|
||||
/* Turn on the digital interface clock */
|
||||
system_apb_clock_set_mask(SYSTEM_CLOCK_APB_APBA, PM_APBAMASK_GCLK);
|
||||
|
||||
/* Software reset the module to ensure it is re-initialized correctly */
|
||||
GCLK->CTRL.reg = GCLK_CTRL_SWRST;
|
||||
while (GCLK->CTRL.reg & GCLK_CTRL_SWRST) {
|
||||
/* Wait for reset to complete */
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Writes a Generic Clock Generator configuration to the hardware module.
|
||||
*
|
||||
* Writes out a given configuration of a Generic Clock Generator configuration
|
||||
* to the hardware module.
|
||||
*
|
||||
* \note Changing the clock source on the fly (on a running
|
||||
* generator) can take additional time if the clock source is configured
|
||||
* to only run on-demand (ONDEMAND bit is set) and it is not currently
|
||||
* running (no peripheral is requesting the clock source). In this case
|
||||
* the GCLK will request the new clock while still keeping a request to
|
||||
* the old clock source until the new clock source is ready.
|
||||
*
|
||||
* \note This function will not start a generator that is not already running;
|
||||
* to start the generator, call \ref system_gclk_gen_enable()
|
||||
* after configuring a generator.
|
||||
*
|
||||
* \param[in] generator Generic Clock Generator index to configure
|
||||
* \param[in] config Configuration settings for the generator
|
||||
*/
|
||||
void system_gclk_gen_set_config(
|
||||
const uint8_t generator,
|
||||
struct system_gclk_gen_config *const config)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(config);
|
||||
|
||||
/* Cache new register configurations to minimize sync requirements. */
|
||||
uint32_t new_genctrl_config = (generator << GCLK_GENCTRL_ID_Pos);
|
||||
uint32_t new_gendiv_config = (generator << GCLK_GENDIV_ID_Pos);
|
||||
|
||||
/* Select the requested source clock for the generator */
|
||||
new_genctrl_config |= config->source_clock << GCLK_GENCTRL_SRC_Pos;
|
||||
|
||||
/* Configure the clock to be either high or low when disabled */
|
||||
if (config->high_when_disabled) {
|
||||
new_genctrl_config |= GCLK_GENCTRL_OOV;
|
||||
}
|
||||
|
||||
/* Configure if the clock output to I/O pin should be enabled. */
|
||||
if (config->output_enable) {
|
||||
new_genctrl_config |= GCLK_GENCTRL_OE;
|
||||
}
|
||||
|
||||
/* Set division factor */
|
||||
if (config->division_factor > 1) {
|
||||
/* Check if division is a power of two */
|
||||
if (((config->division_factor & (config->division_factor - 1)) == 0)) {
|
||||
/* Determine the index of the highest bit set to get the
|
||||
* division factor that must be loaded into the division
|
||||
* register */
|
||||
|
||||
uint32_t div2_count = 0;
|
||||
|
||||
uint32_t mask;
|
||||
for (mask = (1UL << 1); mask < config->division_factor;
|
||||
mask <<= 1) {
|
||||
div2_count++;
|
||||
}
|
||||
|
||||
/* Set binary divider power of 2 division factor */
|
||||
new_gendiv_config |= div2_count << GCLK_GENDIV_DIV_Pos;
|
||||
new_genctrl_config |= GCLK_GENCTRL_DIVSEL;
|
||||
} else {
|
||||
/* Set integer division factor */
|
||||
|
||||
new_gendiv_config |=
|
||||
(config->division_factor) << GCLK_GENDIV_DIV_Pos;
|
||||
|
||||
/* Enable non-binary division with increased duty cycle accuracy */
|
||||
new_genctrl_config |= GCLK_GENCTRL_IDC;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Enable or disable the clock in standby mode */
|
||||
if (config->run_in_standby) {
|
||||
new_genctrl_config |= GCLK_GENCTRL_RUNSTDBY;
|
||||
}
|
||||
|
||||
while (system_gclk_is_syncing()) {
|
||||
/* Wait for synchronization */
|
||||
};
|
||||
|
||||
system_interrupt_enter_critical_section();
|
||||
|
||||
/* Select the correct generator */
|
||||
*((uint8_t*)&GCLK->GENDIV.reg) = generator;
|
||||
|
||||
/* Write the new generator configuration */
|
||||
while (system_gclk_is_syncing()) {
|
||||
/* Wait for synchronization */
|
||||
};
|
||||
GCLK->GENDIV.reg = new_gendiv_config;
|
||||
|
||||
while (system_gclk_is_syncing()) {
|
||||
/* Wait for synchronization */
|
||||
};
|
||||
GCLK->GENCTRL.reg = new_genctrl_config | (GCLK->GENCTRL.reg & GCLK_GENCTRL_GENEN);
|
||||
|
||||
system_interrupt_leave_critical_section();
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Enables a Generic Clock Generator that was previously configured.
|
||||
*
|
||||
* Starts the clock generation of a Generic Clock Generator that was previously
|
||||
* configured via a call to \ref system_gclk_gen_set_config().
|
||||
*
|
||||
* \param[in] generator Generic Clock Generator index to enable
|
||||
*/
|
||||
void system_gclk_gen_enable(
|
||||
const uint8_t generator)
|
||||
{
|
||||
while (system_gclk_is_syncing()) {
|
||||
/* Wait for synchronization */
|
||||
};
|
||||
|
||||
system_interrupt_enter_critical_section();
|
||||
|
||||
/* Select the requested generator */
|
||||
*((uint8_t*)&GCLK->GENCTRL.reg) = generator;
|
||||
while (system_gclk_is_syncing()) {
|
||||
/* Wait for synchronization */
|
||||
};
|
||||
|
||||
/* Enable generator */
|
||||
GCLK->GENCTRL.reg |= GCLK_GENCTRL_GENEN;
|
||||
|
||||
system_interrupt_leave_critical_section();
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Disables a Generic Clock Generator that was previously enabled.
|
||||
*
|
||||
* Stops the clock generation of a Generic Clock Generator that was previously
|
||||
* started via a call to \ref system_gclk_gen_enable().
|
||||
*
|
||||
* \param[in] generator Generic Clock Generator index to disable
|
||||
*/
|
||||
void system_gclk_gen_disable(
|
||||
const uint8_t generator)
|
||||
{
|
||||
while (system_gclk_is_syncing()) {
|
||||
/* Wait for synchronization */
|
||||
};
|
||||
|
||||
system_interrupt_enter_critical_section();
|
||||
|
||||
/* Select the requested generator */
|
||||
*((uint8_t*)&GCLK->GENCTRL.reg) = generator;
|
||||
while (system_gclk_is_syncing()) {
|
||||
/* Wait for synchronization */
|
||||
};
|
||||
|
||||
/* Disable generator */
|
||||
GCLK->GENCTRL.reg &= ~GCLK_GENCTRL_GENEN;
|
||||
while (GCLK->GENCTRL.reg & GCLK_GENCTRL_GENEN) {
|
||||
/* Wait for clock to become disabled */
|
||||
}
|
||||
|
||||
system_interrupt_leave_critical_section();
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Retrieves the clock frequency of a Generic Clock generator.
|
||||
*
|
||||
* Determines the clock frequency (in Hz) of a specified Generic Clock
|
||||
* generator, used as a source to a Generic Clock Channel module.
|
||||
*
|
||||
* \param[in] generator Generic Clock Generator index
|
||||
*
|
||||
* \return The frequency of the generic clock generator, in Hz.
|
||||
*/
|
||||
uint32_t system_gclk_gen_get_hz(
|
||||
const uint8_t generator)
|
||||
{
|
||||
while (system_gclk_is_syncing()) {
|
||||
/* Wait for synchronization */
|
||||
};
|
||||
|
||||
system_interrupt_enter_critical_section();
|
||||
|
||||
/* Select the appropriate generator */
|
||||
*((uint8_t*)&GCLK->GENCTRL.reg) = generator;
|
||||
while (system_gclk_is_syncing()) {
|
||||
/* Wait for synchronization */
|
||||
};
|
||||
|
||||
/* Get the frequency of the source connected to the GCLK generator */
|
||||
uint32_t gen_input_hz = system_clock_source_get_hz(
|
||||
(enum system_clock_source)GCLK->GENCTRL.bit.SRC);
|
||||
|
||||
*((uint8_t*)&GCLK->GENCTRL.reg) = generator;
|
||||
|
||||
uint8_t divsel = GCLK->GENCTRL.bit.DIVSEL;
|
||||
|
||||
/* Select the appropriate generator division register */
|
||||
*((uint8_t*)&GCLK->GENDIV.reg) = generator;
|
||||
while (system_gclk_is_syncing()) {
|
||||
/* Wait for synchronization */
|
||||
};
|
||||
|
||||
uint32_t divider = GCLK->GENDIV.bit.DIV;
|
||||
|
||||
system_interrupt_leave_critical_section();
|
||||
|
||||
/* Check if the generator is using fractional or binary division */
|
||||
if (!divsel && divider > 1) {
|
||||
gen_input_hz /= divider;
|
||||
} else if (divsel) {
|
||||
gen_input_hz >>= (divider+1);
|
||||
}
|
||||
|
||||
return gen_input_hz;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Writes a Generic Clock configuration to the hardware module.
|
||||
*
|
||||
* Writes out a given configuration of a Generic Clock configuration to the
|
||||
* hardware module. If the clock is currently running, it will be stopped.
|
||||
*
|
||||
* \note Once called the clock will not be running; to start the clock,
|
||||
* call \ref system_gclk_chan_enable() after configuring a clock channel.
|
||||
*
|
||||
* \param[in] channel Generic Clock channel to configure
|
||||
* \param[in] config Configuration settings for the clock
|
||||
*/
|
||||
void system_gclk_chan_set_config(
|
||||
const uint8_t channel,
|
||||
struct system_gclk_chan_config *const config)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(config);
|
||||
|
||||
/* Cache the new config to reduce sync requirements */
|
||||
uint32_t new_clkctrl_config = (channel << GCLK_CLKCTRL_ID_Pos);
|
||||
|
||||
/* Select the desired generic clock generator */
|
||||
new_clkctrl_config |= config->source_generator << GCLK_CLKCTRL_GEN_Pos;
|
||||
|
||||
/* Enable write lock if requested to prevent further modification */
|
||||
if (config->write_lock) {
|
||||
new_clkctrl_config |= GCLK_CLKCTRL_WRTLOCK;
|
||||
}
|
||||
|
||||
/* Disable generic clock channel */
|
||||
system_gclk_chan_disable(channel);
|
||||
|
||||
/* Write the new configuration */
|
||||
GCLK->CLKCTRL.reg = new_clkctrl_config;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Enables a Generic Clock that was previously configured.
|
||||
*
|
||||
* Starts the clock generation of a Generic Clock that was previously
|
||||
* configured via a call to \ref system_gclk_chan_set_config().
|
||||
*
|
||||
* \param[in] channel Generic Clock channel to enable
|
||||
*/
|
||||
void system_gclk_chan_enable(
|
||||
const uint8_t channel)
|
||||
{
|
||||
system_interrupt_enter_critical_section();
|
||||
|
||||
/* Select the requested generator channel */
|
||||
*((uint8_t*)&GCLK->CLKCTRL.reg) = channel;
|
||||
|
||||
/* Enable the generic clock */
|
||||
GCLK->CLKCTRL.reg |= GCLK_CLKCTRL_CLKEN;
|
||||
|
||||
system_interrupt_leave_critical_section();
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Disables a Generic Clock that was previously enabled.
|
||||
*
|
||||
* Stops the clock generation of a Generic Clock that was previously started
|
||||
* via a call to \ref system_gclk_chan_enable().
|
||||
*
|
||||
* \param[in] channel Generic Clock channel to disable
|
||||
*/
|
||||
void system_gclk_chan_disable(
|
||||
const uint8_t channel)
|
||||
{
|
||||
system_interrupt_enter_critical_section();
|
||||
|
||||
/* Select the requested generator channel */
|
||||
*((uint8_t*)&GCLK->CLKCTRL.reg) = channel;
|
||||
|
||||
/* Disable the generic clock */
|
||||
GCLK->CLKCTRL.reg &= ~GCLK_CLKCTRL_CLKEN;
|
||||
while (GCLK->CLKCTRL.reg & GCLK_CLKCTRL_CLKEN) {
|
||||
/* Wait for clock to become disabled */
|
||||
}
|
||||
|
||||
system_interrupt_leave_critical_section();
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Retrieves the clock frequency of a Generic Clock channel.
|
||||
*
|
||||
* Determines the clock frequency (in Hz) of a specified Generic Clock
|
||||
* channel, used as a source to a device peripheral module.
|
||||
*
|
||||
* \param[in] channel Generic Clock Channel index
|
||||
*
|
||||
* \return The frequency of the generic clock channel, in Hz.
|
||||
*/
|
||||
uint32_t system_gclk_chan_get_hz(
|
||||
const uint8_t channel)
|
||||
{
|
||||
uint8_t gen_id;
|
||||
|
||||
system_interrupt_enter_critical_section();
|
||||
|
||||
/* Select the requested generic clock channel */
|
||||
*((uint8_t*)&GCLK->CLKCTRL.reg) = channel;
|
||||
gen_id = GCLK->CLKCTRL.bit.GEN;
|
||||
|
||||
system_interrupt_leave_critical_section();
|
||||
|
||||
/* Return the clock speed of the associated GCLK generator */
|
||||
return system_gclk_gen_get_hz(gen_id);
|
||||
}
|
|
@ -0,0 +1,314 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 Generic Clock Driver
|
||||
*
|
||||
* Copyright (C) 2012-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
#ifndef SYSTEM_CLOCK_GCLK_H_INCLUDED
|
||||
#define SYSTEM_CLOCK_GCLK_H_INCLUDED
|
||||
|
||||
/**
|
||||
* \addtogroup asfdoc_samd20_system_clock_group
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include <compiler.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief List of available GCLK generators.
|
||||
*
|
||||
* List of Available GCLK generators. This enum is used in the peripheral
|
||||
* device drivers to select the GCLK generator to be used for its operation.
|
||||
*
|
||||
* The number of GCLK generators available is device dependent.
|
||||
*/
|
||||
enum gclk_generator {
|
||||
/** GCLK generator channel 0. */
|
||||
GCLK_GENERATOR_0,
|
||||
#if defined(__DOXYGEN__) || (GCLK_GEN_NUM_MSB > 0)
|
||||
/** GCLK generator channel 1. */
|
||||
GCLK_GENERATOR_1,
|
||||
#endif
|
||||
#if defined(__DOXYGEN__) || (GCLK_GEN_NUM_MSB > 1)
|
||||
/** GCLK generator channel 2. */
|
||||
GCLK_GENERATOR_2,
|
||||
#endif
|
||||
#if defined(__DOXYGEN__) || (GCLK_GEN_NUM_MSB > 2)
|
||||
/** GCLK generator channel 3. */
|
||||
GCLK_GENERATOR_3,
|
||||
#endif
|
||||
#if defined(__DOXYGEN__) || (GCLK_GEN_NUM_MSB > 3)
|
||||
/** GCLK generator channel 4. */
|
||||
GCLK_GENERATOR_4,
|
||||
#endif
|
||||
#if defined(__DOXYGEN__) || (GCLK_GEN_NUM_MSB > 4)
|
||||
/** GCLK generator channel 5. */
|
||||
GCLK_GENERATOR_5,
|
||||
#endif
|
||||
#if defined(__DOXYGEN__) || (GCLK_GEN_NUM_MSB > 5)
|
||||
/** GCLK generator channel 6. */
|
||||
GCLK_GENERATOR_6,
|
||||
#endif
|
||||
#if defined(__DOXYGEN__) || (GCLK_GEN_NUM_MSB > 6)
|
||||
/** GCLK generator channel 7. */
|
||||
GCLK_GENERATOR_7,
|
||||
#endif
|
||||
#if defined(__DOXYGEN__) || (GCLK_GEN_NUM_MSB > 7)
|
||||
/** GCLK generator channel 8. */
|
||||
GCLK_GENERATOR_8,
|
||||
#endif
|
||||
#if defined(__DOXYGEN__) || (GCLK_GEN_NUM_MSB > 8)
|
||||
/** GCLK generator channel 9. */
|
||||
GCLK_GENERATOR_9,
|
||||
#endif
|
||||
#if defined(__DOXYGEN__) || (GCLK_GEN_NUM_MSB > 9)
|
||||
/** GCLK generator channel 10. */
|
||||
GCLK_GENERATOR_10,
|
||||
#endif
|
||||
#if defined(__DOXYGEN__) || (GCLK_GEN_NUM_MSB > 10)
|
||||
/** GCLK generator channel 11. */
|
||||
GCLK_GENERATOR_11,
|
||||
#endif
|
||||
#if defined(__DOXYGEN__) || (GCLK_GEN_NUM_MSB > 11)
|
||||
/** GCLK generator channel 12. */
|
||||
GCLK_GENERATOR_12,
|
||||
#endif
|
||||
#if defined(__DOXYGEN__) || (GCLK_GEN_NUM_MSB > 12)
|
||||
/** GCLK generator channel 13. */
|
||||
GCLK_GENERATOR_13,
|
||||
#endif
|
||||
#if defined(__DOXYGEN__) || (GCLK_GEN_NUM_MSB > 13)
|
||||
/** GCLK generator channel 14. */
|
||||
GCLK_GENERATOR_14,
|
||||
#endif
|
||||
#if defined(__DOXYGEN__) || (GCLK_GEN_NUM_MSB > 14)
|
||||
/** GCLK generator channel 15. */
|
||||
GCLK_GENERATOR_15,
|
||||
#endif
|
||||
#if defined(__DOXYGEN__) || (GCLK_GEN_NUM_MSB > 15)
|
||||
/** GCLK generator channel 16. */
|
||||
GCLK_GENERATOR_16,
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Generic Clock Generator configuration structure.
|
||||
*
|
||||
* Configuration structure for a Generic Clock Generator channel. This
|
||||
* structure should be initialized by the
|
||||
* \ref system_gclk_gen_get_config_defaults() function before being modified by
|
||||
* the user application.
|
||||
*/
|
||||
struct system_gclk_gen_config {
|
||||
/** Source clock input channel index. */
|
||||
uint8_t source_clock;
|
||||
/** If \c true, the generator output level is high when disabled. */
|
||||
bool high_when_disabled;
|
||||
/** Integer division factor of the clock output compared to the input. */
|
||||
uint32_t division_factor;
|
||||
/** If \c true, the clock is kept enabled during device standby mode. */
|
||||
bool run_in_standby;
|
||||
/** If \c true, enables GCLK generator clock output to a GPIO pin. */
|
||||
bool output_enable;
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Generic Clock configuration structure.
|
||||
*
|
||||
* Configuration structure for a Generic Clock channel. This structure
|
||||
* should be initialized by the \ref system_gclk_chan_get_config_defaults()
|
||||
* function before being modified by the user application.
|
||||
*/
|
||||
struct system_gclk_chan_config {
|
||||
/** Generic Clock Generator source channel. */
|
||||
enum gclk_generator source_generator;
|
||||
/** If \c true the clock configuration will be locked until the device is
|
||||
* reset. */
|
||||
bool write_lock;
|
||||
};
|
||||
|
||||
/** \name Generic Clock management
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Determines if the hardware module(s) are currently synchronizing to the bus.
|
||||
*
|
||||
* Checks to see if the underlying hardware peripheral module(s) are currently
|
||||
* synchronizing across multiple clock domains to the hardware bus, This
|
||||
* function can be used to delay further operations on a module until such time
|
||||
* that it is ready, to prevent blocking delays for synchronization in the
|
||||
* user application.
|
||||
*
|
||||
* \return Synchronization status of the underlying hardware module(s).
|
||||
*
|
||||
* \retval true if the module has completed synchronization
|
||||
* \retval false if the module synchronization is ongoing
|
||||
*/
|
||||
static inline bool system_gclk_is_syncing(void)
|
||||
{
|
||||
if (GCLK->STATUS.reg & GCLK_STATUS_SYNCBUSY) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void system_gclk_init(void);
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
/**
|
||||
* \name Generic Clock management (Generators)
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Initializes a Generic Clock Generator configuration structure to defaults.
|
||||
*
|
||||
* Initializes a given Generic Clock Generator configuration structure to
|
||||
* a set of known default values. This function should be called on all
|
||||
* new instances of these configuration structures before being modified
|
||||
* by the user application.
|
||||
*
|
||||
* The default configuration is as follows:
|
||||
* \li Clock is generated undivided from the source frequency
|
||||
* \li Clock generator output is low when the generator is disabled
|
||||
* \li The input clock is sourced from input clock channel 0
|
||||
* \li Clock will be disabled during sleep
|
||||
* \li The clock output will not be routed to a physical GPIO pin
|
||||
*
|
||||
* \param[out] config Configuration structure to initialize to default values
|
||||
*/
|
||||
static inline void system_gclk_gen_get_config_defaults(
|
||||
struct system_gclk_gen_config *const config)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(config);
|
||||
|
||||
/* Default configuration values */
|
||||
config->division_factor = 1;
|
||||
config->high_when_disabled = false;
|
||||
config->source_clock = GCLK_SOURCE_OSC8M;
|
||||
config->run_in_standby = false;
|
||||
config->output_enable = false;
|
||||
}
|
||||
|
||||
void system_gclk_gen_set_config(
|
||||
const uint8_t generator,
|
||||
struct system_gclk_gen_config *const config);
|
||||
|
||||
void system_gclk_gen_enable(
|
||||
const uint8_t generator);
|
||||
|
||||
void system_gclk_gen_disable(
|
||||
const uint8_t generator);
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
/**
|
||||
* \name Generic Clock management (Channels)
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Initializes a Generic Clock configuration structure to defaults.
|
||||
*
|
||||
* Initializes a given Generic Clock configuration structure to a set of
|
||||
* known default values. This function should be called on all new
|
||||
* instances of these configuration structures before being modified by the
|
||||
* user application.
|
||||
*
|
||||
* The default configuration is as follows:
|
||||
* \li Clock is sourced from the Generic Clock Generator channel 0
|
||||
* \li Clock configuration will not be write-locked when set
|
||||
*
|
||||
* \param[out] config Configuration structure to initialize to default values
|
||||
*/
|
||||
static inline void system_gclk_chan_get_config_defaults(
|
||||
struct system_gclk_chan_config *const config)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(config);
|
||||
|
||||
/* Default configuration values */
|
||||
config->source_generator = GCLK_GENERATOR_0;
|
||||
config->write_lock = false;
|
||||
}
|
||||
|
||||
void system_gclk_chan_set_config(
|
||||
const uint8_t channel,
|
||||
struct system_gclk_chan_config *const config);
|
||||
|
||||
void system_gclk_chan_enable(
|
||||
const uint8_t channel);
|
||||
|
||||
void system_gclk_chan_disable(
|
||||
const uint8_t channel);
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
/**
|
||||
* \name Generic Clock frequency retrieval
|
||||
* @{
|
||||
*/
|
||||
|
||||
uint32_t system_gclk_gen_get_hz(
|
||||
const uint8_t generator);
|
||||
|
||||
uint32_t system_gclk_chan_get_hz(
|
||||
const uint8_t channel);
|
||||
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
||||
#endif
|
|
@ -0,0 +1,125 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 System Clock Driver Quick Start
|
||||
*
|
||||
* Copyright (C) 2012-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*/
|
||||
|
||||
/**
|
||||
* \page asfdoc_samd20_system_clock_basic_use_case Quick Start Guide for SYSTEM CLOCK - Basic
|
||||
*
|
||||
* In this case we apply the following configuration:
|
||||
* - RC8MHz (internal 8MHz RC oscillator)
|
||||
* - Divide by 4, giving a frequency of 2MHz
|
||||
* - DFLL (Digital frequency locked loop)
|
||||
* - Open loop mode
|
||||
* - 48MHz frequency
|
||||
* - CPU clock
|
||||
* - Use the DFLL, configured to 48MHz
|
||||
*
|
||||
* \section asfdoc_samd20_system_clock_basic_use_case_setup Setup
|
||||
*
|
||||
* \subsection asfdoc_samd20_system_clock_basic_use_case_setup_prereq Prerequisites
|
||||
* There are no special setup requirements for this use-case.
|
||||
*
|
||||
* \subsection asfdoc_samd20_system_clock_basic_use_case_setup_code Code
|
||||
* Copy-paste the following setup code to your application:
|
||||
* \snippet qs_clock_source.c setup
|
||||
*
|
||||
* \subsection asfdoc_samd20_system_clock_basic_use_case_setup_flow Workflow
|
||||
* -# Create a EXTOSC32K module configuration struct, which can be filled
|
||||
* out to adjust the configuration of the external 32KHz oscillator channel.
|
||||
* \snippet qs_clock_source.c config_extosc32k_config
|
||||
*
|
||||
* -# Initialize the oscillator configuration struct with the module's default
|
||||
* values.
|
||||
* \note This should always be performed before using the configuration
|
||||
* struct to ensure that all values are initialized to known default
|
||||
* settings.
|
||||
*
|
||||
* \snippet qs_clock_source.c config_extosc32k_get_defaults
|
||||
*
|
||||
* -# Alter the EXTOSC32K module configuration struct to require a start-up time
|
||||
* of 4096 clock cycles.
|
||||
* \snippet qs_clock_source.c config_extosc32k_change_defaults
|
||||
*
|
||||
* -# Write the new configuration to the EXTOSC32K module.
|
||||
* \snippet qs_clock_source.c config_extosc32k_set_config
|
||||
*
|
||||
* -# Create a DFLL module configuration struct, which can be filled
|
||||
* out to adjust the configuration of the external 32KHz oscillator channel.
|
||||
* \snippet qs_clock_source.c config_dfll_config
|
||||
*
|
||||
* -# Initialize the DFLL oscillator configuration struct with the module's
|
||||
* default values.
|
||||
* \note This should always be performed before using the configuration
|
||||
* struct to ensure that all values are initialized to known default
|
||||
* settings.
|
||||
*
|
||||
* \snippet qs_clock_source.c config_dfll_get_defaults
|
||||
*
|
||||
* -# Write the new configuration to the DFLL module.
|
||||
* \snippet qs_clock_source.c config_extosc32k_set_config
|
||||
|
||||
|
||||
* \section asfdoc_samd20_system_clock_basic_use_case_use_main Use Case
|
||||
*
|
||||
* \subsection asfdoc_samd20_system_clock_basic_use_case_code Code
|
||||
*
|
||||
* Copy-paste the following code to your user application:
|
||||
* \snippet qs_clock_source.c main
|
||||
*
|
||||
* \subsection asfdoc_samd20_system_clock_basic_use_case_flow Workflow
|
||||
* -# Configure the external 32KHz oscillator source using the previously
|
||||
* defined setup function.
|
||||
* \snippet qs_clock_source.c config_extosc32k_main
|
||||
*
|
||||
* -# Enable the configured external 32KHz oscillator source.
|
||||
* \snippet qs_clock_source.c enable_extosc32k_main
|
||||
*
|
||||
* -# Configure the DFLL oscillator source using the previously defined setup
|
||||
* function.
|
||||
* \snippet qs_clock_source.c config_dfll_main
|
||||
*
|
||||
* -# Enable the configured DFLL oscillator source.
|
||||
* \snippet qs_clock_source.c enable_dfll_main
|
||||
*
|
||||
* -# Switch the system clock source to the DFLL, by reconfiguring the main
|
||||
* clock generator.
|
||||
* \snippet qs_clock_source.c set_sys_clk_src
|
||||
*/
|
|
@ -0,0 +1,126 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 Generic Clock Driver Quick Start
|
||||
*
|
||||
* Copyright (C) 2012-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \page asfdoc_samd20_system_gclk_basic_use_case Quick Start Guide for SYSTEM CLOCK - GCLK Configuration
|
||||
*
|
||||
* In this use case, the GCLK module is configured for:
|
||||
* \li One generator attached to the internal 8MHz RC oscillator clock source
|
||||
* \li Generator output equal to input frequency divided by a factor of 128
|
||||
* \li One channel (connected to the TC0 module) enabled with the enabled generator selected
|
||||
*
|
||||
* This use case configures a clock channel to output a clock for a peripheral
|
||||
* within the device, by first setting up a clock generator from a master clock
|
||||
* source, and then linking the generator to the desired channel. This clock
|
||||
* can then be used to clock a module within the device.
|
||||
*
|
||||
* \section asfdoc_samd20_system_gclk_basic_use_case_setup Setup
|
||||
*
|
||||
* \subsection asfdoc_samd20_system_gclk_basic_use_case_setup_prereq Prerequisites
|
||||
* There are no special setup requirements for this use-case.
|
||||
*
|
||||
* \subsection asfdoc_samd20_system_gclk_basic_use_case_setup_code Code
|
||||
* Copy-paste the following setup code to your user application:
|
||||
* \snippet qs_gclk_basic.c setup
|
||||
*
|
||||
* Add to user application initialization (typically the start of \c main()):
|
||||
* \snippet qs_gclk_basic.c setup_init
|
||||
*
|
||||
* \subsection asfdoc_samd20_system_gclk_basic_use_case_setup_flow Workflow
|
||||
* -# Create a GCLK generator configuration struct, which can be filled out to
|
||||
* adjust the configuration of a single clock generator.
|
||||
* \snippet qs_gclk_basic.c setup_1
|
||||
* -# Initialize the generator configuration struct with the module's default
|
||||
* values.
|
||||
* \note This should always be performed before using the configuration
|
||||
* struct to ensure that all values are initialized to known default
|
||||
* settings.
|
||||
*
|
||||
* \snippet qs_gclk_basic.c setup_2
|
||||
* -# Adjust the configuration struct to request that the master clock source
|
||||
* channel 0 be used as the source of the generator, and set the generator
|
||||
* output prescaler to divide the input clock by a factor of 128.
|
||||
* \snippet qs_gclk_basic.c setup_3
|
||||
* -# Configure the generator using the configuration structure.
|
||||
* \note The existing configuration struct may be re-used, as long as any
|
||||
* values that have been altered from the default settings are taken
|
||||
* into account by the user application.
|
||||
*
|
||||
* \snippet qs_gclk_basic.c setup_4
|
||||
* -# Enable the generator once it has been properly configured, to begin clock
|
||||
* generation.
|
||||
* \snippet qs_gclk_basic.c setup_5
|
||||
*
|
||||
* -# Create a GCLK channel configuration struct, which can be filled out to
|
||||
* adjust the configuration of a single generic clock channel.
|
||||
* \snippet qs_gclk_basic.c setup_6
|
||||
* -# Initialize the channel configuration struct with the module's default
|
||||
* values.
|
||||
* \note This should always be performed before using the configuration
|
||||
* struct to ensure that all values are initialized to known default
|
||||
* settings.
|
||||
*
|
||||
* \snippet qs_gclk_basic.c setup_7
|
||||
* -# Adjust the configuration struct to request that the previously configured
|
||||
* and enabled clock generator be used as the clock source for the channel.
|
||||
* \snippet qs_gclk_basic.c setup_8
|
||||
* -# Configure the channel using the configuration structure.
|
||||
* \note The existing configuration struct may be re-used, as long as any
|
||||
* values that have been altered from the default settings are taken
|
||||
* into account by the user application.
|
||||
*
|
||||
* \snippet qs_gclk_basic.c setup_9
|
||||
* -# Enable the channel once it has been properly configured, to output the
|
||||
* clock to the channel's peripheral module consumers.
|
||||
* \snippet qs_gclk_basic.c setup_10
|
||||
*
|
||||
* \section asfdoc_samd20_system_gclk_basic_use_case_main Use Case
|
||||
*
|
||||
* \subsection asfdoc_samd20_system_gclk_basic_use_case_code Code
|
||||
* Copy-paste the following code to your user application:
|
||||
* \snippet qs_gclk_basic.c main
|
||||
*
|
||||
* \subsection asfdoc_samd20_system_gclk_basic_use_case_flow Workflow
|
||||
* -# As the clock is generated asynchronously to the system core, no special
|
||||
* extra application code is required.
|
||||
*/
|
|
@ -0,0 +1,103 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 External Interrupt Driver Quick Start
|
||||
*
|
||||
* Copyright (C) 2012-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \page asfdoc_samd20_system_interrupt_critsec_use_case Quick Start Guide for SYSTEM INTERRUPT - Critical Section Use Case
|
||||
*
|
||||
* In this case we perform a critical piece of code, disabling all interrupts
|
||||
* while a global shared flag is read. During the critical section, no interrupts
|
||||
* may occur.
|
||||
*
|
||||
* \section asfdoc_samd20_system_interrupt_critsec_use_case_setup Setup
|
||||
*
|
||||
* \subsection asfdoc_samd20_system_interrupt_critsec_use_case_setup_prereq Prerequisites
|
||||
* There are no special setup requirements for this use-case.
|
||||
*
|
||||
* \section asfdoc_samd20_system_interrupt_critsec_use_case_use_main Use Case
|
||||
*
|
||||
* \subsection asfdoc_samd20_system_interrupt_critsec_use_case_code Code
|
||||
* Copy-paste the following code to your user application:
|
||||
* \snippet qs_system_interrupt.c main_1
|
||||
*
|
||||
* \subsection asfdoc_samd20_system_interrupt_critsec_use_case_flow Workflow
|
||||
* -# Enter a critical section to disable global interrupts.
|
||||
* \note Critical sections <i>may</i> be nested if desired; if nested, global
|
||||
* interrupts will only be re-enabled once the outer-most critical
|
||||
* section has completed.
|
||||
*
|
||||
* \snippet qs_system_interrupt.c critical_section_start
|
||||
*
|
||||
* -# Check a global shared flag and perform a response. This code may be any
|
||||
* critical code that requires exclusive access to all resources without the
|
||||
* possibility of interruption.
|
||||
* \snippet qs_system_interrupt.c do_critical_code
|
||||
*
|
||||
* -# Exit the critical section to re-enable global interrupts.
|
||||
* \snippet qs_system_interrupt.c critical_section_end
|
||||
*/
|
||||
|
||||
/**
|
||||
* \page asfdoc_samd20_system_interrupt_enablemodint_use_case Quick Start Guide for SYSTEM INTERRUPT - Enable Module Interrupt Use Case
|
||||
*
|
||||
* In this case we enable interrupt handling for a specific module, as well as
|
||||
* enable interrupts globally for the device.
|
||||
*
|
||||
* \section asfdoc_samd20_system_interrupt_enablemodint_use_case_setup Setup
|
||||
*
|
||||
* \subsection asfdoc_samd20_system_interrupt_enablemodint_use_case_setup_prereq Prerequisites
|
||||
* There are no special setup requirements for this use-case.
|
||||
*
|
||||
* \section asfdoc_samd20_system_interrupt_enablemodint_use_case_use_main Use Case
|
||||
*
|
||||
* \subsection asfdoc_samd20_system_interrupt_enablemodint_use_case_code Code
|
||||
* Copy-paste the following code to your user application:
|
||||
* \snippet qs_system_interrupt.c main_2
|
||||
*
|
||||
* \subsection asfdoc_samd20_system_interrupt_enablemodint_use_case_flow Workflow
|
||||
* -# Enable interrupt handling for the device's RTC peripheral.
|
||||
* \snippet qs_system_interrupt.c module_int_enable
|
||||
*
|
||||
* -# Enable global interrupts, so that any enabled and active interrupt sources
|
||||
* can trigger their respective handler functions.
|
||||
* \snippet qs_system_interrupt.c global_int_enable
|
||||
*/
|
|
@ -0,0 +1,211 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 System Interrupt Driver
|
||||
*
|
||||
* Copyright (C) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
#include "system_interrupt.h"
|
||||
|
||||
/**
|
||||
* \brief Check if a interrupt line is pending
|
||||
*
|
||||
* Checks if the requested interrupt vector is pending.
|
||||
*
|
||||
* \param[in] vector Interrupt vector number to check
|
||||
*
|
||||
* \returns A boolean identifying if the requested interrupt vector is pending.
|
||||
*
|
||||
* \retval true Specified interrupt vector is pending
|
||||
* \retval false Specified interrupt vector is not pending
|
||||
*
|
||||
*/
|
||||
bool system_interrupt_is_pending(
|
||||
const enum system_interrupt_vector vector)
|
||||
{
|
||||
bool result;
|
||||
|
||||
if (vector >= _SYSTEM_INTERRUPT_EXTERNAL_VECTOR_START) {
|
||||
result = ((NVIC->ISPR[0] & (1 << vector)) != 0);
|
||||
} else if (vector == SYSTEM_INTERRUPT_SYSTICK) {
|
||||
result = ((SCB->ICSR & SCB_ICSR_PENDSTSET_Msk) != 0);
|
||||
} else {
|
||||
Assert(false);
|
||||
result = false;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Set a interrupt vector as pending
|
||||
*
|
||||
* Set the requested interrupt vector as pending (i.e issues a software
|
||||
* interrupt request for the specified vector). The software handler will be
|
||||
* handled (if enabled) in a priority order based on vector number and
|
||||
* configured priority settings.
|
||||
*
|
||||
* \param[in] vector Interrupt vector number which is set as pending
|
||||
*
|
||||
* \returns Status code identifying if the vector was successfully set as
|
||||
* pending.
|
||||
*
|
||||
* \retval STATUS_OK If no error was detected
|
||||
* \retval STATUS_INVALID_ARG If an unsupported interrupt vector number was given
|
||||
*/
|
||||
enum status_code system_interrupt_set_pending(
|
||||
const enum system_interrupt_vector vector)
|
||||
{
|
||||
enum status_code status = STATUS_OK;
|
||||
|
||||
if (vector >= _SYSTEM_INTERRUPT_EXTERNAL_VECTOR_START) {
|
||||
NVIC->ISPR[0] = (1 << vector);
|
||||
} else if (vector == SYSTEM_INTERRUPT_NON_MASKABLE) {
|
||||
/* Note: Because NMI has highest priority it will be executed
|
||||
* immediately after it has been set pending */
|
||||
SCB->ICSR = SCB_ICSR_NMIPENDSET_Msk;
|
||||
} else if (vector == SYSTEM_INTERRUPT_SYSTICK) {
|
||||
SCB->ICSR = SCB_ICSR_PENDSTSET_Msk;
|
||||
} else {
|
||||
/* The user want to set something unsupported as pending */
|
||||
Assert(false);
|
||||
status = STATUS_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Clear pending interrupt vector
|
||||
*
|
||||
* Clear a pending interrupt vector, so the software handler is not executed.
|
||||
*
|
||||
* \param[in] vector Interrupt vector number to clear
|
||||
*
|
||||
* \returns A status code identifying if the interrupt pending state was
|
||||
* successfully cleared.
|
||||
*
|
||||
* \retval STATUS_OK If no error was detected
|
||||
* \retval STATUS_INVALID_ARG If an unsupported interrupt vector number was given
|
||||
*/
|
||||
enum status_code system_interrupt_clear_pending(
|
||||
const enum system_interrupt_vector vector)
|
||||
{
|
||||
enum status_code status = STATUS_OK;
|
||||
|
||||
if (vector >= _SYSTEM_INTERRUPT_EXTERNAL_VECTOR_START) {
|
||||
NVIC->ICPR[0] = (1 << vector);
|
||||
} else if (vector == SYSTEM_INTERRUPT_NON_MASKABLE) {
|
||||
/* Note: Clearing of NMI pending interrupts does not make sense and is
|
||||
* not supported by the device, as it has the highest priority and will
|
||||
* always be executed at the moment it is set */
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
} else if (vector == SYSTEM_INTERRUPT_SYSTICK) {
|
||||
SCB->ICSR = SCB_ICSR_PENDSTCLR_Msk;
|
||||
} else {
|
||||
Assert(false);
|
||||
status = STATUS_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Set interrupt vector priority level
|
||||
*
|
||||
* Set the priority level of an external interrupt or exception.
|
||||
*
|
||||
* \param[in] vector Interrupt vector to change
|
||||
* \param[in] priority_level New vector priority level to set
|
||||
*
|
||||
* \returns Status code indicating if the priority level of the interrupt was
|
||||
* successfully set.
|
||||
*
|
||||
* \retval STATUS_OK If no error was detected
|
||||
* \retval STATUS_INVALID_ARG If an unsupported interrupt vector number was given
|
||||
*/
|
||||
enum status_code system_interrupt_set_priority(
|
||||
const enum system_interrupt_vector vector,
|
||||
const enum system_interrupt_priority_level priority_level)
|
||||
{
|
||||
enum status_code status = STATUS_OK;
|
||||
|
||||
if (vector >= _SYSTEM_INTERRUPT_EXTERNAL_VECTOR_START) {
|
||||
uint8_t register_num = vector / 4;
|
||||
uint8_t priority_pos = ((vector % 4) * 8) + (8 - __NVIC_PRIO_BITS);
|
||||
|
||||
NVIC->IP[register_num] = (priority_level << priority_pos);
|
||||
} else if (vector == SYSTEM_INTERRUPT_SYSTICK) {
|
||||
SCB->SHP[1] = (priority_level << _SYSTEM_INTERRUPT_SYSTICK_PRI_POS);
|
||||
} else {
|
||||
Assert(false);
|
||||
status = STATUS_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Get interrupt vector priority level
|
||||
*
|
||||
* Retrieves the priority level of the requested external interrupt or exception.
|
||||
*
|
||||
* \param[in] vector Interrupt vector of which the priority level will be read
|
||||
*
|
||||
* \return Currently configured interrupt priority level of the given interrupt
|
||||
* vector.
|
||||
*/
|
||||
enum system_interrupt_priority_level system_interrupt_get_priority(
|
||||
const enum system_interrupt_vector vector)
|
||||
{
|
||||
uint8_t register_num = vector / 4;
|
||||
uint8_t priority_pos = ((vector % 4) * 8) + (8 - __NVIC_PRIO_BITS);
|
||||
|
||||
enum system_interrupt_priority_level priority = SYSTEM_INTERRUPT_PRIORITY_LEVEL_0;
|
||||
|
||||
if (vector >= 0) {
|
||||
priority = (enum system_interrupt_priority_level)
|
||||
((NVIC->IP[register_num] >> priority_pos) & _SYSTEM_INTERRUPT_PRIORITY_MASK);
|
||||
} else if (vector == SYSTEM_INTERRUPT_SYSTICK) {
|
||||
priority = (enum system_interrupt_priority_level)
|
||||
((SCB->SHP[1] >> _SYSTEM_INTERRUPT_SYSTICK_PRI_POS) & _SYSTEM_INTERRUPT_PRIORITY_MASK);
|
||||
}
|
||||
|
||||
return priority;
|
||||
}
|
||||
|
|
@ -0,0 +1,467 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 System Interrupt Driver
|
||||
*
|
||||
* Copyright (C) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
#ifndef SYSTEM_INTERRUPT_H_INCLUDED
|
||||
#define SYSTEM_INTERRUPT_H_INCLUDED
|
||||
|
||||
/**
|
||||
* \defgroup asfdoc_samd20_system_interrupt_group SAM D20 System Interrupt Driver (SYSTEM INTERRUPT)
|
||||
*
|
||||
* This driver for SAM D20 devices provides an interface for the configuration
|
||||
* and management of internal software and hardware interrupts/exceptions.
|
||||
*
|
||||
* The following peripherals are used by this module:
|
||||
*
|
||||
* - NVIC (Nested Vector Interrupt Controller)
|
||||
*
|
||||
* The outline of this documentation is as follows:
|
||||
* - \ref asfdoc_samd20_system_interrupt_prerequisites
|
||||
* - \ref asfdoc_samd20_system_interrupt_module_overview
|
||||
* - \ref asfdoc_samd20_system_interrupt_special_considerations
|
||||
* - \ref asfdoc_samd20_system_interrupt_extra_info
|
||||
* - \ref asfdoc_samd20_system_interrupt_examples
|
||||
* - \ref asfdoc_samd20_system_interrupt_api_overview
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_system_interrupt_prerequisites Prerequisites
|
||||
*
|
||||
* There are no prerequisites for this module.
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_system_interrupt_module_overview Module Overview
|
||||
*
|
||||
* The Cortex M0+ core contains an interrupt an exception vector table, which
|
||||
* can be used to configure the device's interrupt handlers; individual
|
||||
* interrupts and exceptions can be enabled and disabled, as well as configured
|
||||
* with a variable priority.
|
||||
*
|
||||
* This driver provides a set of wrappers around the core interrupt functions,
|
||||
* to expose a simple API for the management of global and individual interrupts
|
||||
* within the device.
|
||||
*
|
||||
* \subsection asfdoc_samd20_system_interrupt_module_overview_criticalsec Critical Sections
|
||||
* In some applications it is important to ensure that no interrupts may be
|
||||
* executed by the system whilst a critical portion of code is being run; for
|
||||
* example, a buffer may be copied from one context to another - during which
|
||||
* interrupts must be disabled to avoid corruption of the source buffer contents
|
||||
* until the copy has completed. This driver provides a basic API to enter and
|
||||
* exit nested critical sections, so that global interrupts can be kept disabled
|
||||
* for as long as necessary to complete a critical application code section.
|
||||
*
|
||||
* \subsection asfdoc_samd20_system_interrupt_module_overview_softints Software Interrupts
|
||||
* For some applications, it may be desirable to raise a module or core
|
||||
* interrupt via software. For this reason, a set of APIs to set an interrupt or
|
||||
* exception as pending are provided to the user application.
|
||||
*
|
||||
* \section asfdoc_samd20_system_interrupt_special_considerations Special Considerations
|
||||
*
|
||||
* Interrupts from peripherals in the SAM D20 devices are on a per-module basis;
|
||||
* an interrupt raised from any source within a module will cause a single,
|
||||
* module-common handler to execute. It is the user application or driver's
|
||||
* responsibility to de-multiplex the module-common interrupt to determine the
|
||||
* exact interrupt cause.
|
||||
*
|
||||
* \section asfdoc_samd20_system_interrupt_extra_info Extra Information
|
||||
*
|
||||
* For extra information see \ref asfdoc_samd20_system_interrupt_extra. This includes:
|
||||
* - \ref asfdoc_samd20_system_interrupt_extra_acronyms
|
||||
* - \ref asfdoc_samd20_system_interrupt_extra_dependencies
|
||||
* - \ref asfdoc_samd20_system_interrupt_extra_errata
|
||||
* - \ref asfdoc_samd20_system_interrupt_extra_history
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_system_interrupt_examples Examples
|
||||
*
|
||||
* For a list of examples related to this driver, see
|
||||
* \ref asfdoc_samd20_system_interrupt_exqsg.
|
||||
*
|
||||
* \section asfdoc_samd20_system_interrupt_api_overview API Overview
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include <compiler.h>
|
||||
#include <core_cm0plus.h>
|
||||
|
||||
#if !defined(__DOXYGEN__)
|
||||
/* Generates a interrupt vector table enum list entry for a given module type
|
||||
and index (e.g. "SYSTEM_INTERRUPT_MODULE_TC0 = TC0_IRQn,"). */
|
||||
# define _MODULE_IRQn(n, module) \
|
||||
SYSTEM_INTERRUPT_MODULE_##module##n = module##n##_IRQn,
|
||||
|
||||
/* Generates interrupt vector table enum list entries for all instances of a
|
||||
given module type on the selected device. */
|
||||
# define _SYSTEM_INTERRUPT_MODULES(name) \
|
||||
MREPEAT(name##_INST_NUM, _MODULE_IRQn, name)
|
||||
|
||||
|
||||
# define _SYSTEM_INTERRUPT_IPSR_MASK 0x0000003f
|
||||
# define _SYSTEM_INTERRUPT_PRIORITY_MASK 0x00000007
|
||||
|
||||
# define _SYSTEM_INTERRUPT_EXTERNAL_VECTOR_START 0
|
||||
|
||||
# define _SYSTEM_INTERRUPT_SYSTICK_PRI_POS 29
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Table of possible system interrupt/exception vector numbers.
|
||||
*
|
||||
* Table of all possible interrupt and exception vector indexes within the
|
||||
* device.
|
||||
*/
|
||||
enum system_interrupt_vector {
|
||||
/** Interrupt vector index for a NMI interrupt. */
|
||||
SYSTEM_INTERRUPT_NON_MASKABLE = NonMaskableInt_IRQn,
|
||||
/** Interrupt vector index for a Hard Fault memory access exception. */
|
||||
SYSTEM_INTERRUPT_HARD_FAULT = HardFault_IRQn,
|
||||
/** Interrupt vector index for a Supervisor Call exception. */
|
||||
SYSTEM_INTERRUPT_SV_CALL = SVCall_IRQn,
|
||||
/** Interrupt vector index for a Pending Supervisor interrupt. */
|
||||
SYSTEM_INTERRUPT_PENDING_SV = PendSV_IRQn,
|
||||
/** Interrupt vector index for a System Tick interrupt. */
|
||||
SYSTEM_INTERRUPT_SYSTICK = SysTick_IRQn,
|
||||
|
||||
/** Interrupt vector index for a Power Manager peripheral interrupt. */
|
||||
SYSTEM_INTERRUPT_MODULE_PM = PM_IRQn,
|
||||
/** Interrupt vector index for a System Control peripheral interrupt. */
|
||||
SYSTEM_INTERRUPT_MODULE_SYSCTRL = SYSCTRL_IRQn,
|
||||
/** Interrupt vector index for a Watch Dog peripheral interrupt. */
|
||||
SYSTEM_INTERRUPT_MODULE_WDT = WDT_IRQn,
|
||||
/** Interrupt vector index for a Real Time Clock peripheral interrupt. */
|
||||
SYSTEM_INTERRUPT_MODULE_RTC = RTC_IRQn,
|
||||
/** Interrupt vector index for an External Interrupt peripheral interrupt. */
|
||||
SYSTEM_INTERRUPT_MODULE_EIC = EIC_IRQn,
|
||||
/** Interrupt vector index for a Non Volatile Memory Controller interrupt. */
|
||||
SYSTEM_INTERRUPT_MODULE_NVMCTRL = NVMCTRL_IRQn,
|
||||
/** Interrupt vector index for an Event System interrupt. */
|
||||
SYSTEM_INTERRUPT_MODULE_EVSYS = EVSYS_IRQn,
|
||||
#if defined(__DOXYGEN__)
|
||||
/** Interrupt vector index for a SERCOM peripheral interrupt.
|
||||
*
|
||||
* Each specific device may contain several SERCOM peripherals; each module
|
||||
* instance will have its own entry in the table, with the instance number
|
||||
* substituted for "n" in the entry name (e.g.
|
||||
* \c SYSTEM_INTERRUPT_MODULE_SERCOM0).
|
||||
*/
|
||||
SYSTEM_INTERRUPT_MODULE_SERCOMn = SERCOMn_IRQn,
|
||||
/** Interrupt vector index for a Timer/Counter peripheral interrupt.
|
||||
*
|
||||
* Each specific device may contain several TC peripherals; each module
|
||||
* instance will have its own entry in the table, with the instance number
|
||||
* substituted for "n" in the entry name (e.g.
|
||||
* \c SYSTEM_INTERRUPT_MODULE_TC0).
|
||||
*/
|
||||
SYSTEM_INTERRUPT_MODULE_TCn = TCn_IRQn,
|
||||
#else
|
||||
_SYSTEM_INTERRUPT_MODULES(SERCOM)
|
||||
_SYSTEM_INTERRUPT_MODULES(TC)
|
||||
#endif
|
||||
/** Interrupt vector index for an Analog Comparator peripheral interrupt. */
|
||||
SYSTEM_INTERRUPT_MODULE_AC = AC_IRQn,
|
||||
/** Interrupt vector index for an Analog-to-Digital peripheral interrupt. */
|
||||
SYSTEM_INTERRUPT_MODULE_ADC = ADC_IRQn,
|
||||
/** Interrupt vector index for a Digital-to-Analog peripheral interrupt. */
|
||||
SYSTEM_INTERRUPT_MODULE_DAC = DAC_IRQn,
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Table of possible system interrupt/exception vector priorities.
|
||||
*
|
||||
* Table of all possible interrupt and exception vector priorities within the
|
||||
* device.
|
||||
*/
|
||||
enum system_interrupt_priority_level {
|
||||
/** Priority level 0, the highest possible interrupt priority. */
|
||||
SYSTEM_INTERRUPT_PRIORITY_LEVEL_0 = 0,
|
||||
/** Priority level 1. */
|
||||
SYSTEM_INTERRUPT_PRIORITY_LEVEL_1 = 1,
|
||||
/** Priority level 2. */
|
||||
SYSTEM_INTERRUPT_PRIORITY_LEVEL_2 = 2,
|
||||
/** Priority level 3, the lowest possible interrupt priority. */
|
||||
SYSTEM_INTERRUPT_PRIORITY_LEVEL_3 = 3,
|
||||
};
|
||||
|
||||
/**
|
||||
* \name Critical Section Management
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Enters a critical section
|
||||
*
|
||||
* Disables global interrupts. To support nested critical sections, an internal
|
||||
* count of the critical section nesting will be kept, so that global interrupts
|
||||
* are only re-enabled upon leaving the outermost nested critical section.
|
||||
*
|
||||
*/
|
||||
static inline void system_interrupt_enter_critical_section(void)
|
||||
{
|
||||
cpu_irq_enter_critical();
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Leaves a critical section
|
||||
*
|
||||
* Enables global interrupts. To support nested critical sections, an internal
|
||||
* count of the critical section nesting will be kept, so that global interrupts
|
||||
* are only re-enabled upon leaving the outermost nested critical section.
|
||||
*
|
||||
*/
|
||||
static inline void system_interrupt_leave_critical_section(void)
|
||||
{
|
||||
cpu_irq_leave_critical();
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name Interrupt Enabling/Disabling
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Check if global interrupts are enabled
|
||||
*
|
||||
* Checks if global interrupts are currently enabled.
|
||||
*
|
||||
* \returns A boolean that identifies if the global interrupts are enabled or not.
|
||||
*
|
||||
* \retval true Global interrupts are currently enabled
|
||||
* \retval false Global interrupts are currently disabled
|
||||
*
|
||||
*/
|
||||
static inline bool system_interrupt_is_global_enabled(void)
|
||||
{
|
||||
return cpu_irq_is_enabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Enables global interrupts
|
||||
*
|
||||
* Enables global interrupts in the device to fire any enabled interrupt handlers.
|
||||
*/
|
||||
static inline void system_interrupt_enable_global(void)
|
||||
{
|
||||
cpu_irq_enable();
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Disables global interrupts
|
||||
*
|
||||
* Disabled global interrupts in the device, preventing any enabled interrupt
|
||||
* handlers from executing.
|
||||
*/
|
||||
static inline void system_interrupt_disable_global(void)
|
||||
{
|
||||
cpu_irq_disable();
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Checks if an interrupt vector is enabled or not
|
||||
*
|
||||
* Checks if a specific interrupt vector is currently enabled.
|
||||
*
|
||||
* \param[in] vector Interrupt vector number to check
|
||||
*
|
||||
* \returns A variable identifying if the requested interrupt vector is enabled
|
||||
*
|
||||
* \retval true Specified interrupt vector is currently enabled
|
||||
* \retval false Specified interrupt vector is currently disabled
|
||||
*
|
||||
*/
|
||||
static inline bool system_interrupt_is_enabled(
|
||||
const enum system_interrupt_vector vector)
|
||||
{
|
||||
return (bool)((NVIC->ISER[0] >> (uint32_t)vector) & 0x00000001);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Enable interrupt vector
|
||||
*
|
||||
* Enables execution of the software handler for the requested interrupt vector.
|
||||
*
|
||||
* \param[in] vector Interrupt vector to enable
|
||||
*/
|
||||
static inline void system_interrupt_enable(
|
||||
const enum system_interrupt_vector vector)
|
||||
{
|
||||
NVIC->ISER[0] = (uint32_t)(1 << ((uint32_t)vector & 0x0000001f));
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Disable interrupt vector
|
||||
*
|
||||
* Disables execution of the software handler for the requested interrupt vector.
|
||||
*
|
||||
* \param[in] vector Interrupt vector to disable
|
||||
*/
|
||||
static inline void system_interrupt_disable(
|
||||
const enum system_interrupt_vector vector)
|
||||
{
|
||||
NVIC->ICER[0] = (uint32_t)(1 << ((uint32_t)vector & 0x0000001f));
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name Interrupt State Management
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Get active interrupt (if any)
|
||||
*
|
||||
* Return the vector number for the current executing software handler, if any.
|
||||
*
|
||||
* \return Interrupt number that is currently executing.
|
||||
*/
|
||||
static inline enum system_interrupt_vector system_interrupt_get_active(void)
|
||||
{
|
||||
uint32_t IPSR = __get_IPSR();
|
||||
|
||||
return (enum system_interrupt_vector)(IPSR & _SYSTEM_INTERRUPT_IPSR_MASK);
|
||||
}
|
||||
|
||||
bool system_interrupt_is_pending(
|
||||
const enum system_interrupt_vector vector);
|
||||
|
||||
enum status_code system_interrupt_set_pending(
|
||||
const enum system_interrupt_vector vector);
|
||||
|
||||
enum status_code system_interrupt_clear_pending(
|
||||
const enum system_interrupt_vector vector);
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name Interrupt Priority Management
|
||||
* @{
|
||||
*/
|
||||
|
||||
enum status_code system_interrupt_set_priority(
|
||||
const enum system_interrupt_vector vector,
|
||||
const enum system_interrupt_priority_level priority_level);
|
||||
|
||||
enum system_interrupt_priority_level system_interrupt_get_priority(
|
||||
const enum system_interrupt_vector vector);
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \page asfdoc_samd20_system_interrupt_extra Extra Information for SYSTEM INTERRUPT Driver
|
||||
*
|
||||
* \section asfdoc_samd20_system_interrupt_extra_acronyms Acronyms
|
||||
* The table below presents the acronyms used in this module:
|
||||
*
|
||||
* <table>
|
||||
* <tr>
|
||||
* <th>Acronym</th>
|
||||
* <th>Description</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>ISR</td>
|
||||
* <td>Interrupt Service Routine</td>
|
||||
* </tr>
|
||||
* </table>
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_system_interrupt_extra_dependencies Dependencies
|
||||
* This driver has the following dependencies:
|
||||
*
|
||||
* - None
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_system_interrupt_extra_errata Errata
|
||||
* There are no errata related to this driver.
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_system_interrupt_extra_history Module History
|
||||
* An overview of the module history is presented in the table below, with
|
||||
* details on the enhancements and fixes made to the module since its first
|
||||
* release. The current version of this corresponds to the newest version in
|
||||
* the table.
|
||||
*
|
||||
* <table>
|
||||
* <tr>
|
||||
* <th>Changelog</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>Initial Release</td>
|
||||
* </tr>
|
||||
* </table>
|
||||
*/
|
||||
|
||||
/**
|
||||
* \page asfdoc_samd20_system_interrupt_exqsg Examples for SYSTEM INTERRUPT Driver
|
||||
*
|
||||
* This is a list of the available Quick Start guides (QSGs) and example
|
||||
* applications for \ref asfdoc_samd20_system_interrupt_group. QSGs are simple examples with
|
||||
* step-by-step instructions to configure and use this driver in a selection of
|
||||
* use cases. Note that QSGs can be compiled as a standalone application or be
|
||||
* added to the user application.
|
||||
*
|
||||
* - \subpage asfdoc_samd20_system_interrupt_critsec_use_case
|
||||
* - \subpage asfdoc_samd20_system_interrupt_enablemodint_use_case
|
||||
*
|
||||
* \page asfdoc_samd20_system_interrupt_document_revision_history Document Revision History
|
||||
*
|
||||
* <table>
|
||||
* <tr>
|
||||
* <th>Doc. Rev.</td>
|
||||
* <th>Date</td>
|
||||
* <th>Comments</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>B</td>
|
||||
* <td>06/2013</td>
|
||||
* <td>Corrected documentation typos.</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>A</td>
|
||||
* <td>06/2013</td>
|
||||
* <td>Initial release</td>
|
||||
* </tr>
|
||||
* </table>
|
||||
*/
|
||||
|
||||
#endif
|
|
@ -0,0 +1,301 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 Pin Multiplexer Driver
|
||||
*
|
||||
* Copyright (C) 2012-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
#include <pinmux.h>
|
||||
|
||||
/**
|
||||
* \internal
|
||||
* Writes out a given configuration of a Port pin configuration to the
|
||||
* hardware module.
|
||||
*
|
||||
* \note If the pin direction is set as an output, the pull-up/pull-down input
|
||||
* configuration setting is ignored.
|
||||
*
|
||||
* \param[in] port Base of the PORT module to configure.
|
||||
* \param[in] pin_mask Mask of the port pin to configure.
|
||||
* \param[in] config Configuration settings for the pin.
|
||||
*/
|
||||
static void _system_pinmux_config(
|
||||
PortGroup *const port,
|
||||
const uint32_t pin_mask,
|
||||
const struct system_pinmux_config *const config)
|
||||
{
|
||||
Assert(port);
|
||||
Assert(config);
|
||||
|
||||
/* Track the configuration bits into a temporary variable before writing */
|
||||
uint32_t pin_cfg = 0;
|
||||
|
||||
/* Enable the pin peripheral mux flag if non-GPIO selected (pin mux will
|
||||
* be written later) and store the new mux mask */
|
||||
if (config->mux_position != SYSTEM_PINMUX_GPIO) {
|
||||
pin_cfg |= PORT_WRCONFIG_PMUXEN;
|
||||
pin_cfg |= (config->mux_position << PORT_WRCONFIG_PMUX_Pos);
|
||||
}
|
||||
|
||||
/* Check if the user has requested that the input buffer be enabled */
|
||||
if ((config->direction == SYSTEM_PINMUX_PIN_DIR_INPUT) ||
|
||||
(config->direction == SYSTEM_PINMUX_PIN_DIR_OUTPUT_WITH_READBACK)) {
|
||||
/* Enable input buffer flag */
|
||||
pin_cfg |= PORT_WRCONFIG_INEN;
|
||||
|
||||
/* Enable pull-up/pull-down control flag if requested */
|
||||
if (config->input_pull != SYSTEM_PINMUX_PIN_PULL_NONE) {
|
||||
pin_cfg |= PORT_WRCONFIG_PULLEN;
|
||||
}
|
||||
|
||||
/* Clear the port DIR bits to disable the output buffer */
|
||||
port->DIRCLR.reg = pin_mask;
|
||||
}
|
||||
|
||||
/* Check if the user has requested that the output buffer be enabled */
|
||||
if ((config->direction == SYSTEM_PINMUX_PIN_DIR_OUTPUT) ||
|
||||
(config->direction == SYSTEM_PINMUX_PIN_DIR_OUTPUT_WITH_READBACK)) {
|
||||
/* Cannot use a pullup if the output driver is enabled,
|
||||
* if requested the input buffer can only sample the current
|
||||
* output state */
|
||||
pin_cfg &= ~PORT_WRCONFIG_PULLEN;
|
||||
|
||||
/* Set the port DIR bits to enable the output buffer */
|
||||
port->DIRSET.reg = pin_mask;
|
||||
}
|
||||
|
||||
/* The Write Configuration register (WRCONFIG) requires the
|
||||
* pins to to grouped into two 16-bit half-words - split them out here */
|
||||
uint32_t lower_pin_mask = (pin_mask & 0xFFFF);
|
||||
uint32_t upper_pin_mask = (pin_mask >> 16);
|
||||
|
||||
/* Configure the lower 16-bits of the port to the desired configuration,
|
||||
* including the pin peripheral multiplexer just in case it is enabled */
|
||||
port->WRCONFIG.reg
|
||||
= (lower_pin_mask << PORT_WRCONFIG_PINMASK_Pos) |
|
||||
pin_cfg | PORT_WRCONFIG_WRPMUX | PORT_WRCONFIG_WRPINCFG;
|
||||
|
||||
/* Configure the upper 16-bits of the port to the desired configuration,
|
||||
* including the pin peripheral multiplexer just in case it is enabled */
|
||||
port->WRCONFIG.reg
|
||||
= (upper_pin_mask << PORT_WRCONFIG_PINMASK_Pos) |
|
||||
pin_cfg | PORT_WRCONFIG_WRPMUX | PORT_WRCONFIG_WRPINCFG |
|
||||
PORT_WRCONFIG_HWSEL;
|
||||
|
||||
/* Set the pull-up state once the port pins are configured if one was
|
||||
* requested and it does not violate the valid set of port
|
||||
* configurations */
|
||||
if (pin_cfg & PORT_WRCONFIG_PULLEN) {
|
||||
/* Set the OUT register bits to enable the pullup if requested,
|
||||
* clear to enable pull-down */
|
||||
if (config->input_pull == SYSTEM_PINMUX_PIN_PULL_UP) {
|
||||
port->OUTSET.reg = pin_mask;
|
||||
} else {
|
||||
port->OUTCLR.reg = pin_mask;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Writes a Port pin configuration to the hardware module.
|
||||
*
|
||||
* Writes out a given configuration of a Port pin configuration to the hardware
|
||||
* module.
|
||||
*
|
||||
* \note If the pin direction is set as an output, the pull-up/pull-down input
|
||||
* configuration setting is ignored.
|
||||
*
|
||||
* \param[in] gpio_pin Index of the GPIO pin to configure.
|
||||
* \param[in] config Configuration settings for the pin.
|
||||
*/
|
||||
void system_pinmux_pin_set_config(
|
||||
const uint8_t gpio_pin,
|
||||
const struct system_pinmux_config *const config)
|
||||
{
|
||||
PortGroup *const port = system_pinmux_get_group_from_gpio_pin(gpio_pin);
|
||||
uint32_t pin_mask = (1UL << (gpio_pin % 32));
|
||||
|
||||
_system_pinmux_config(port, pin_mask, config);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Writes a Port pin group configuration to the hardware module.
|
||||
*
|
||||
* Writes out a given configuration of a Port pin group configuration to the
|
||||
* hardware module.
|
||||
*
|
||||
* \note If the pin direction is set as an output, the pull-up/pull-down input
|
||||
* configuration setting is ignored.
|
||||
*
|
||||
* \param[in] port Base of the PORT module to configure.
|
||||
* \param[in] mask Mask of the port pin(s) to configure.
|
||||
* \param[in] config Configuration settings for the pin.
|
||||
*/
|
||||
void system_pinmux_group_set_config(
|
||||
PortGroup *const port,
|
||||
const uint32_t mask,
|
||||
const struct system_pinmux_config *const config)
|
||||
{
|
||||
Assert(port);
|
||||
|
||||
for (int i = 0; i < 32; i++) {
|
||||
if (mask & (1UL << i)) {
|
||||
_system_pinmux_config(port, (1UL << i), config);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Configures the input sampling mode for a group of pins.
|
||||
*
|
||||
* Configures the input sampling mode for a group of pins, to
|
||||
* control when the physical I/O pin value is sampled and
|
||||
* stored inside the microcontroller.
|
||||
*
|
||||
* \param[in] port Base of the PORT module to configure.
|
||||
* \param[in] mask Mask of the port pin(s) to configure.
|
||||
* \param[in] mode New pin sampling mode to configure.
|
||||
*/
|
||||
void system_pinmux_group_set_input_sample_mode(
|
||||
PortGroup *const port,
|
||||
const uint32_t mask,
|
||||
const enum system_pinmux_pin_sample mode)
|
||||
{
|
||||
Assert(port);
|
||||
|
||||
for (int i = 0; i < 32; i++) {
|
||||
if (mask & (1UL << i)) {
|
||||
uint32_t sample_quad_mask = (1UL << (i / 4));
|
||||
|
||||
if (mode == SYSTEM_PINMUX_PIN_SAMPLE_ONDEMAND) {
|
||||
port->CTRL.reg |= sample_quad_mask;
|
||||
}
|
||||
else {
|
||||
port->CTRL.reg &= ~sample_quad_mask;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Configures the output driver strength mode for a group of pins.
|
||||
*
|
||||
* Configures the output drive strength for a group of pins, to
|
||||
* control the amount of current the pad is able to sink/source.
|
||||
*
|
||||
* \param[in] port Base of the PORT module to configure.
|
||||
* \param[in] mask Mask of the port pin(s) to configure.
|
||||
* \param[in] mode New output driver strength mode to configure.
|
||||
*/
|
||||
void system_pinmux_group_set_output_strength(
|
||||
PortGroup *const port,
|
||||
const uint32_t mask,
|
||||
const enum system_pinmux_pin_strength mode)
|
||||
{
|
||||
Assert(port);
|
||||
|
||||
for (int i = 0; i < 32; i++) {
|
||||
if (mask & (1UL << i)) {
|
||||
if (mode == SYSTEM_PINMUX_PIN_STRENGTH_HIGH) {
|
||||
port->PINCFG[i].reg |= PORT_PINCFG_DRVSTR;
|
||||
}
|
||||
else {
|
||||
port->PINCFG[i].reg &= ~PORT_PINCFG_DRVSTR;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Configures the output slew rate mode for a group of pins.
|
||||
*
|
||||
* Configures the output slew rate mode for a group of pins, to
|
||||
* control the speed at which the physical output pin can react to
|
||||
* logical changes of the I/O pin value.
|
||||
*
|
||||
* \param[in] port Base of the PORT module to configure.
|
||||
* \param[in] mask Mask of the port pin(s) to configure.
|
||||
* \param[in] mode New pin slew rate mode to configure.
|
||||
*/
|
||||
void system_pinmux_group_set_output_slew_rate(
|
||||
PortGroup *const port,
|
||||
const uint32_t mask,
|
||||
const enum system_pinmux_pin_slew_rate mode)
|
||||
{
|
||||
Assert(port);
|
||||
|
||||
for (int i = 0; i < 32; i++) {
|
||||
if (mask & (1UL << i)) {
|
||||
if (mode == SYSTEM_PINMUX_PIN_SLEW_RATE_LIMITED) {
|
||||
port->PINCFG[i].reg |= PORT_PINCFG_SLEWLIM;
|
||||
}
|
||||
else {
|
||||
port->PINCFG[i].reg &= ~PORT_PINCFG_SLEWLIM;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Configures the output driver mode for a group of pins.
|
||||
*
|
||||
* Configures the output driver mode for a group of pins, to
|
||||
* control the pad behavior.
|
||||
*
|
||||
* \param[in] port Base of the PORT module to configure.
|
||||
* \param[in] mask Mask of the port pin(s) to configure.
|
||||
* \param[in] mode New pad output driver mode to configure.
|
||||
*/
|
||||
void system_pinmux_group_set_output_drive(
|
||||
PortGroup *const port,
|
||||
const uint32_t mask,
|
||||
const enum system_pinmux_pin_drive mode)
|
||||
{
|
||||
Assert(port);
|
||||
|
||||
for (int i = 0; i < 32; i++) {
|
||||
if (mask & (1UL << i)) {
|
||||
if (mode == SYSTEM_PINMUX_PIN_DRIVE_OPEN_DRAIN) {
|
||||
port->PINCFG[i].reg |= PORT_PINCFG_ODRAIN;
|
||||
}
|
||||
else {
|
||||
port->PINCFG[i].reg &= ~PORT_PINCFG_ODRAIN;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,608 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 Pin Multiplexer Driver
|
||||
*
|
||||
* Copyright (C) 2012-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
#ifndef PINMUX_H_INCLUDED
|
||||
#define PINMUX_H_INCLUDED
|
||||
|
||||
/**
|
||||
* \defgroup asfdoc_samd20_system_pinmux_group SAM D20 System Pin Multiplexer Driver (SYSTEM PINMUX)
|
||||
*
|
||||
* This driver for SAM D20 devices provides an interface for the configuration
|
||||
* and management of the device's physical I/O Pins, to alter the direction and
|
||||
* input/drive characteristics as well as to configure the pin peripheral
|
||||
* multiplexer selection.
|
||||
*
|
||||
* The following peripherals are used by this module:
|
||||
*
|
||||
* - PORT (Port I/O Management)
|
||||
*
|
||||
* Physically, the modules are interconnected within the device as shown in the
|
||||
* following diagram:
|
||||
*
|
||||
* The outline of this documentation is as follows:
|
||||
* - \ref asfdoc_samd20_system_pinmux_prerequisites
|
||||
* - \ref asfdoc_samd20_system_pinmux_module_overview
|
||||
* - \ref asfdoc_samd20_system_pinmux_special_considerations
|
||||
* - \ref asfdoc_samd20_system_pinmux_extra_info
|
||||
* - \ref asfdoc_samd20_system_pinmux_examples
|
||||
* - \ref asfdoc_samd20_system_pinmux_api_overview
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_system_pinmux_prerequisites Prerequisites
|
||||
*
|
||||
* There are no prerequisites for this module.
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_system_pinmux_module_overview Module Overview
|
||||
*
|
||||
* The SAM D20 devices contain a number of General Purpose I/O pins, used to
|
||||
* interface the user application logic and internal hardware peripherals to
|
||||
* an external system. The Pin Multiplexer (PINMUX) driver provides a method
|
||||
* of configuring the individual pin peripheral multiplexers to select
|
||||
* alternate pin functions,
|
||||
*
|
||||
* \subsection asfdoc_samd20_system_pinmux_physical_logical_pins Physical and Logical GPIO Pins
|
||||
* SAM D20 devices use two naming conventions for the I/O pins in the device; one
|
||||
* physical, and one logical. Each physical pin on a device package is assigned
|
||||
* both a physical port and pin identifier (e.g. "PORTA.0") as well as a
|
||||
* monotonically incrementing logical GPIO number (e.g. "GPIO0"). While the
|
||||
* former is used to map physical pins to their physical internal device module
|
||||
* counterparts, for simplicity the design of this driver uses the logical GPIO
|
||||
* numbers instead.
|
||||
*
|
||||
* \subsection asfdoc_samd20_system_pinmux_peripheral_muxing Peripheral Multiplexing
|
||||
* SAM D20 devices contain a peripheral MUX, which is individually controllable
|
||||
* for each I/O pin of the device. The peripheral MUX allows you to select the
|
||||
* function of a physical package pin - whether it will be controlled as a user
|
||||
* controllable GPIO pin, or whether it will be connected internally to one of
|
||||
* several peripheral modules (such as an I<SUP>2</SUP>C module). When a pin is
|
||||
* configured in GPIO mode, other peripherals connected to the same pin will be
|
||||
* disabled.
|
||||
*
|
||||
* \subsection asfdoc_samd20_system_pinmux_pad_characteristics Special Pad Characteristics
|
||||
* There are several special modes that can be selected on one or more I/O pins
|
||||
* of the device, which alter the input and output characteristics of the pad:
|
||||
*
|
||||
* \subsubsection asfdoc_samd20_system_pinmux_drive_strength Drive Strength
|
||||
* The Drive Strength configures the strength of the output driver on the
|
||||
* pad. Normally, there is a fixed current limit that each I/O pin can safely
|
||||
* drive, however some I/O pads offer a higher drive mode which increases this
|
||||
* limit for that I/O pin at the expense of an increased power consumption.
|
||||
*
|
||||
* \subsubsection asfdoc_samd20_system_pinmux_slew_rate Slew Rate
|
||||
* The Slew Rate configures the slew rate of the output driver, limiting the
|
||||
* rate at which the pad output voltage can change with time.
|
||||
*
|
||||
* \subsubsection asfdoc_samd20_system_pinmux_input_sample_mode Input Sample Mode
|
||||
* The Input Sample Mode configures the input sampler buffer of the pad. By
|
||||
* default, the input buffer is only sampled "on-demand", i.e. when the user
|
||||
* application attempts to read from the input buffer. This mode is the most
|
||||
* power efficient, but increases the latency of the input sample by two clock
|
||||
* cycles of the port clock. To reduce latency, the input sampler can instead
|
||||
* be configured to always sample the input buffer on each port clock cycle, at
|
||||
* the expense of an increased power consumption.
|
||||
*
|
||||
* \subsection asfdoc_samd20_system_pinmux_module_overview_physical Physical Connection
|
||||
*
|
||||
* \ref asfdoc_samd20_system_pinmux_intconnections "The diagram below" shows
|
||||
* how this module is interconnected within the device:
|
||||
*
|
||||
* \anchor asfdoc_samd20_system_pinmux_intconnections
|
||||
* \dot
|
||||
* digraph overview {
|
||||
* node [label="Port Pad" shape=square] pad;
|
||||
*
|
||||
* subgraph driver {
|
||||
* node [label="Peripheral Mux" shape=trapezium] pinmux;
|
||||
* node [label="GPIO Module" shape=ellipse shape=ellipse style=filled fillcolor=lightgray] gpio;
|
||||
* node [label="Other Peripheral Modules" shape=ellipse style=filled fillcolor=lightgray] peripherals;
|
||||
* }
|
||||
*
|
||||
* pinmux -> gpio;
|
||||
* pad -> pinmux;
|
||||
* pinmux -> peripherals;
|
||||
* }
|
||||
* \enddot
|
||||
*
|
||||
* \section asfdoc_samd20_system_pinmux_special_considerations Special Considerations
|
||||
*
|
||||
* The SAM D20 port pin input sampling mode is set in groups of four physical
|
||||
* pins; setting the sampling mode of any pin in a sub-group of four I/O pins
|
||||
* will configure the sampling mode of the entire sub-group.
|
||||
*
|
||||
* High Drive Strength output driver mode is not available on all device pins -
|
||||
* refer to your device specific datasheet.
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_system_pinmux_extra_info Extra Information
|
||||
*
|
||||
* For extra information see \ref asfdoc_samd20_system_pinmux_extra. This includes:
|
||||
* - \ref asfdoc_samd20_system_pinmux_extra_acronyms
|
||||
* - \ref asfdoc_samd20_system_pinmux_extra_dependencies
|
||||
* - \ref asfdoc_samd20_system_pinmux_extra_errata
|
||||
* - \ref asfdoc_samd20_system_pinmux_extra_history
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_system_pinmux_examples Examples
|
||||
*
|
||||
* For a list of examples related to this driver, see
|
||||
* \ref asfdoc_samd20_system_pinmux_exqsg.
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_system_pinmux_api_overview API Overview
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include <compiler.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** Peripheral multiplexer index to select GPIO mode for a pin. */
|
||||
#define SYSTEM_PINMUX_GPIO (1 << 7)
|
||||
|
||||
/**
|
||||
* \brief Port pin direction configuration enum.
|
||||
*
|
||||
* Enum for the possible pin direction settings of the port pin configuration
|
||||
* structure, to indicate the direction the pin should use.
|
||||
*/
|
||||
enum system_pinmux_pin_dir {
|
||||
/** The pin's input buffer should be enabled, so that the pin state can
|
||||
* be read. */
|
||||
SYSTEM_PINMUX_PIN_DIR_INPUT,
|
||||
/** The pin's output buffer should be enabled, so that the pin state can
|
||||
* be set (but not read back). */
|
||||
SYSTEM_PINMUX_PIN_DIR_OUTPUT,
|
||||
/** The pin's output and input buffers should both be enabled, so that the
|
||||
* pin state can be set and read back. */
|
||||
SYSTEM_PINMUX_PIN_DIR_OUTPUT_WITH_READBACK,
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Port pin input pull configuration enum.
|
||||
*
|
||||
* Enum for the possible pin pull settings of the port pin configuration
|
||||
* structure, to indicate the type of logic level pull the pin should use.
|
||||
*/
|
||||
enum system_pinmux_pin_pull {
|
||||
/** No logical pull should be applied to the pin. */
|
||||
SYSTEM_PINMUX_PIN_PULL_NONE,
|
||||
/** Pin should be pulled up when idle. */
|
||||
SYSTEM_PINMUX_PIN_PULL_UP,
|
||||
/** Pin should be pulled down when idle. */
|
||||
SYSTEM_PINMUX_PIN_PULL_DOWN,
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Port pin digital input sampling mode enum.
|
||||
*
|
||||
* Enum for the possible input sampling modes for the port pin configuration
|
||||
* structure, to indicate the type of sampling a port pin should use.
|
||||
*/
|
||||
enum system_pinmux_pin_sample {
|
||||
/** Pin input buffer should continuously sample the pin state. */
|
||||
SYSTEM_PINMUX_PIN_SAMPLE_CONTINUOUS,
|
||||
/** Pin input buffer should be enabled when the IN register is read. */
|
||||
SYSTEM_PINMUX_PIN_SAMPLE_ONDEMAND,
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Port pin drive output strength enum.
|
||||
*
|
||||
* Enum for the possible output drive strengths for the port pin
|
||||
* configuration structure, to indicate the driver strength the pin should
|
||||
* use.
|
||||
*/
|
||||
enum system_pinmux_pin_strength {
|
||||
/** Normal output driver strength. */
|
||||
SYSTEM_PINMUX_PIN_STRENGTH_NORMAL,
|
||||
/** High current output driver strength. */
|
||||
SYSTEM_PINMUX_PIN_STRENGTH_HIGH,
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Port pin output slew rate enum.
|
||||
*
|
||||
* Enum for the possible output drive slew rates for the port pin
|
||||
* configuration structure, to indicate the driver slew rate the pin should
|
||||
* use.
|
||||
*/
|
||||
enum system_pinmux_pin_slew_rate {
|
||||
/** Normal pin output slew rate. */
|
||||
SYSTEM_PINMUX_PIN_SLEW_RATE_NORMAL,
|
||||
/** Enable slew rate limiter on the pin. */
|
||||
SYSTEM_PINMUX_PIN_SLEW_RATE_LIMITED,
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Port pin output drive mode enum.
|
||||
*
|
||||
* Enum for the possible output drive modes for the port pin configuration
|
||||
* structure, to indicate the output mode the pin should use.
|
||||
*/
|
||||
enum system_pinmux_pin_drive {
|
||||
/** Use totem pole output drive mode. */
|
||||
SYSTEM_PINMUX_PIN_DRIVE_TOTEM,
|
||||
/** Use open drain output drive mode. */
|
||||
SYSTEM_PINMUX_PIN_DRIVE_OPEN_DRAIN,
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Port pin configuration structure.
|
||||
*
|
||||
* Configuration structure for a port pin instance. This structure should be
|
||||
* structure should be initialized by the
|
||||
* \ref system_pinmux_get_config_defaults() function before being modified by
|
||||
* the user application.
|
||||
*/
|
||||
struct system_pinmux_config {
|
||||
/** MUX index of the peripheral that should control the pin, if peripheral
|
||||
* control is desired. For GPIO use, this should be set to
|
||||
* \ref SYSTEM_PINMUX_GPIO. */
|
||||
uint8_t mux_position;
|
||||
|
||||
/** Port buffer input/output direction. */
|
||||
enum system_pinmux_pin_dir direction;
|
||||
|
||||
/** Logic level pull of the input buffer. */
|
||||
enum system_pinmux_pin_pull input_pull;
|
||||
};
|
||||
|
||||
/** \name Configuration and initialization
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Initializes a Port pin configuration structure to defaults.
|
||||
*
|
||||
* Initializes a given Port pin configuration structure to a set of
|
||||
* known default values. This function should be called on all new
|
||||
* instances of these configuration structures before being modified by the
|
||||
* user application.
|
||||
*
|
||||
* The default configuration is as follows:
|
||||
* \li Non peripheral (i.e. GPIO) controlled
|
||||
* \li Input mode with internal pull-up enabled
|
||||
*
|
||||
* \param[out] config Configuration structure to initialize to default values
|
||||
*/
|
||||
static inline void system_pinmux_get_config_defaults(
|
||||
struct system_pinmux_config *const config)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(config);
|
||||
|
||||
/* Default configuration values */
|
||||
config->mux_position = SYSTEM_PINMUX_GPIO;
|
||||
config->direction = SYSTEM_PINMUX_PIN_DIR_INPUT;
|
||||
config->input_pull = SYSTEM_PINMUX_PIN_PULL_UP;
|
||||
}
|
||||
|
||||
void system_pinmux_pin_set_config(
|
||||
const uint8_t gpio_pin,
|
||||
const struct system_pinmux_config *const config);
|
||||
|
||||
void system_pinmux_group_set_config(
|
||||
PortGroup *const port,
|
||||
const uint32_t mask,
|
||||
const struct system_pinmux_config *const config);
|
||||
|
||||
/** @} */
|
||||
|
||||
/** \name Special mode configuration (physical group orientated)
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Retrieves the PORT module group instance from a given GPIO pin number.
|
||||
*
|
||||
* Retrieves the PORT module group instance associated with a given logical
|
||||
* GPIO pin number.
|
||||
*
|
||||
* \param[in] gpio_pin Index of the GPIO pin to convert.
|
||||
*
|
||||
* \return Base address of the associated PORT module.
|
||||
*/
|
||||
static inline PortGroup* system_pinmux_get_group_from_gpio_pin(
|
||||
const uint8_t gpio_pin)
|
||||
{
|
||||
uint8_t port_index = (gpio_pin / 128);
|
||||
uint8_t group_index = (gpio_pin / 32);
|
||||
|
||||
/* Array of available ports. */
|
||||
Port *const ports[PORT_INST_NUM] = PORT_INSTS;
|
||||
|
||||
if (port_index < PORT_INST_NUM) {
|
||||
return &(ports[port_index]->Group[group_index]);
|
||||
} else {
|
||||
Assert(false);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void system_pinmux_group_set_input_sample_mode(
|
||||
PortGroup *const port,
|
||||
const uint32_t mask,
|
||||
const enum system_pinmux_pin_sample mode);
|
||||
|
||||
void system_pinmux_group_set_output_strength(
|
||||
PortGroup *const port,
|
||||
const uint32_t mask,
|
||||
const enum system_pinmux_pin_strength mode);
|
||||
|
||||
void system_pinmux_group_set_output_slew_rate(
|
||||
PortGroup *const port,
|
||||
const uint32_t mask,
|
||||
const enum system_pinmux_pin_slew_rate mode);
|
||||
|
||||
void system_pinmux_group_set_output_drive(
|
||||
PortGroup *const port,
|
||||
const uint32_t mask,
|
||||
const enum system_pinmux_pin_drive mode);
|
||||
|
||||
/** @} */
|
||||
|
||||
/** \name Special mode configuration (logical pin orientated)
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Retrieves the currently selected MUX position of a logical pin.
|
||||
*
|
||||
* Retrieves the selected MUX peripheral on a given logical GPIO pin.
|
||||
*
|
||||
* \param[in] gpio_pin Index of the GPIO pin to configure.
|
||||
*
|
||||
* \return Currently selected peripheral index on the specified pin.
|
||||
*/
|
||||
static inline uint8_t system_pinmux_pin_get_mux_position(
|
||||
const uint8_t gpio_pin)
|
||||
{
|
||||
PortGroup *const port = system_pinmux_get_group_from_gpio_pin(gpio_pin);
|
||||
uint32_t pin_index = (gpio_pin % 32);
|
||||
|
||||
if (!(port->PINCFG[pin_index].reg & PORT_PINCFG_PMUXEN)) {
|
||||
return SYSTEM_PINMUX_GPIO;
|
||||
}
|
||||
|
||||
uint32_t pmux_reg = port->PMUX[pin_index / 2].reg;
|
||||
|
||||
if (pin_index & 1) {
|
||||
return (pmux_reg & PORT_PMUX_PMUXO_Msk) >> PORT_PMUX_PMUXO_Pos;
|
||||
}
|
||||
else {
|
||||
return (pmux_reg & PORT_PMUX_PMUXE_Msk) >> PORT_PMUX_PMUXE_Pos;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Configures the input sampling mode for a GPIO pin.
|
||||
*
|
||||
* Configures the input sampling mode for a GPIO input, to
|
||||
* control when the physical I/O pin value is sampled and
|
||||
* stored inside the microcontroller.
|
||||
*
|
||||
* \param[in] gpio_pin Index of the GPIO pin to configure.
|
||||
* \param[in] mode New pin sampling mode to configure.
|
||||
*/
|
||||
static inline void system_pinmux_pin_set_input_sample_mode(
|
||||
const uint8_t gpio_pin,
|
||||
const enum system_pinmux_pin_sample mode)
|
||||
{
|
||||
PortGroup* const port = system_pinmux_get_group_from_gpio_pin(gpio_pin);
|
||||
uint32_t sample_quad_mask = (1UL << ((gpio_pin % 32) / 4));
|
||||
|
||||
if (mode == SYSTEM_PINMUX_PIN_SAMPLE_ONDEMAND) {
|
||||
port->CTRL.reg |= sample_quad_mask;
|
||||
}
|
||||
else {
|
||||
port->CTRL.reg &= ~sample_quad_mask;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Configures the output driver strength mode for a GPIO pin.
|
||||
*
|
||||
* Configures the output drive strength for a GPIO output, to
|
||||
* control the amount of current the pad is able to sink/source.
|
||||
*
|
||||
* \param[in] gpio_pin Index of the GPIO pin to configure.
|
||||
* \param[in] mode New output driver strength mode to configure.
|
||||
*/
|
||||
static inline void system_pinmux_pin_set_output_strength(
|
||||
const uint8_t gpio_pin,
|
||||
const enum system_pinmux_pin_strength mode)
|
||||
{
|
||||
PortGroup* const port = system_pinmux_get_group_from_gpio_pin(gpio_pin);
|
||||
uint32_t pin_index = (gpio_pin % 32);
|
||||
|
||||
if (mode == SYSTEM_PINMUX_PIN_STRENGTH_HIGH) {
|
||||
port->PINCFG[pin_index].reg |= PORT_PINCFG_DRVSTR;
|
||||
}
|
||||
else {
|
||||
port->PINCFG[pin_index].reg &= ~PORT_PINCFG_DRVSTR;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Configures the output slew rate mode for a GPIO pin.
|
||||
*
|
||||
* Configures the output slew rate mode for a GPIO output, to
|
||||
* control the speed at which the physical output pin can react to
|
||||
* logical changes of the I/O pin value.
|
||||
*
|
||||
* \param[in] gpio_pin Index of the GPIO pin to configure.
|
||||
* \param[in] mode New pin slew rate mode to configure.
|
||||
*/
|
||||
static inline void system_pinmux_pin_set_output_slew_rate(
|
||||
const uint8_t gpio_pin,
|
||||
const enum system_pinmux_pin_slew_rate mode)
|
||||
{
|
||||
PortGroup* const port = system_pinmux_get_group_from_gpio_pin(gpio_pin);
|
||||
uint32_t pin_index = (gpio_pin % 32);
|
||||
|
||||
if (mode == SYSTEM_PINMUX_PIN_SLEW_RATE_LIMITED) {
|
||||
port->PINCFG[pin_index].reg |= PORT_PINCFG_SLEWLIM;
|
||||
}
|
||||
else {
|
||||
port->PINCFG[pin_index].reg &= ~PORT_PINCFG_SLEWLIM;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Configures the output driver mode for a GPIO pin.
|
||||
*
|
||||
* Configures the output driver mode for a GPIO output, to
|
||||
* control the pad behavior.
|
||||
*
|
||||
* \param[in] gpio_pin Index of the GPIO pin to configure.
|
||||
* \param[in] mode New pad output driver mode to configure.
|
||||
*/
|
||||
static inline void system_pinmux_pin_set_output_drive(
|
||||
const uint8_t gpio_pin,
|
||||
const enum system_pinmux_pin_drive mode)
|
||||
{
|
||||
PortGroup* const port = system_pinmux_get_group_from_gpio_pin(gpio_pin);
|
||||
uint32_t pin_index = (gpio_pin % 32);
|
||||
|
||||
if (mode == SYSTEM_PINMUX_PIN_DRIVE_OPEN_DRAIN) {
|
||||
port->PINCFG[pin_index].reg |= PORT_PINCFG_ODRAIN;
|
||||
}
|
||||
else {
|
||||
port->PINCFG[pin_index].reg &= ~PORT_PINCFG_ODRAIN;
|
||||
}
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \page asfdoc_samd20_system_pinmux_extra Extra Information for SYSTEM PINMUX Driver
|
||||
*
|
||||
* \section asfdoc_samd20_system_pinmux_extra_acronyms Acronyms
|
||||
* The table below presents the acronyms used in this module:
|
||||
*
|
||||
* <table>
|
||||
* <tr>
|
||||
* <th>Acronym</th>
|
||||
* <th>Description</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>GPIO</td>
|
||||
* <td>General Purpose Input/Output</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>MUX</td>
|
||||
* <td>Multiplexer</td>
|
||||
* </tr>
|
||||
* </table>
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_system_pinmux_extra_dependencies Dependencies
|
||||
* This driver has the following dependencies:
|
||||
*
|
||||
* - None
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_system_pinmux_extra_errata Errata
|
||||
* There are no errata related to this driver.
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_system_pinmux_extra_history Module History
|
||||
* An overview of the module history is presented in the table below, with
|
||||
* details on the enhancements and fixes made to the module since its first
|
||||
* release. The current version of this corresponds to the newest version in
|
||||
* the table.
|
||||
*
|
||||
* <table>
|
||||
* <tr>
|
||||
* <th>Changelog</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>Added missing NULL pointer asserts to the PORT driver functions.</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>Initial Release</td>
|
||||
* </tr>
|
||||
* </table>
|
||||
*/
|
||||
|
||||
/**
|
||||
* \page asfdoc_samd20_system_pinmux_exqsg Examples for SYSTEM PINMUX Driver
|
||||
*
|
||||
* This is a list of the available Quick Start guides (QSGs) and example
|
||||
* applications for \ref asfdoc_samd20_system_pinmux_group. QSGs are simple
|
||||
* examples with step-by-step instructions to configure and use this driver in a
|
||||
* selection of use cases. Note that QSGs can be compiled as a standalone
|
||||
* application or be added to the user application.
|
||||
*
|
||||
* - \subpage asfdoc_samd20_system_pinmux_basic_use_case
|
||||
*
|
||||
* \page asfdoc_samd20_system_pinmux_document_revision_history Document Revision History
|
||||
*
|
||||
* <table>
|
||||
* <tr>
|
||||
* <th>Doc. Rev.</td>
|
||||
* <th>Date</td>
|
||||
* <th>Comments</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>B</td>
|
||||
* <td>06/2013</td>
|
||||
* <td>Corrected documentation typos.</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>A</td>
|
||||
* <td>06/2013</td>
|
||||
* <td>Initial release</td>
|
||||
* </tr>
|
||||
* </table>
|
||||
*/
|
||||
|
||||
#endif
|
|
@ -0,0 +1,86 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 PINMUX Driver Quick Start
|
||||
*
|
||||
* Copyright (C) 2012-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \page asfdoc_samd20_system_pinmux_basic_use_case Quick Start Guide for SYSTEM PINMUX - Basic
|
||||
*
|
||||
* In this use case, the PINMUX module is configured for:
|
||||
* \li One pin in input mode, with pull-up enabled, connected to the GPIO
|
||||
* module
|
||||
* \li Sampling mode of the pin changed to sample on demand
|
||||
*
|
||||
* This use case sets up the PINMUX to configure a physical I/O pin set as
|
||||
* an input with pull-up. and changes the sampling mode of the pin to reduce
|
||||
* power by only sampling the physical pin state when the user application
|
||||
* attempts to read it.
|
||||
*
|
||||
* \section asfdoc_samd20_system_pinmux_basic_use_case_setup Setup
|
||||
*
|
||||
* \subsection asfdoc_samd20_system_pinmux_basic_use_case_setup_prereq Prerequisites
|
||||
* There are no special setup requirements for this use-case.
|
||||
*
|
||||
* \section asfdoc_samd20_system_pinmux_basic_use_case_use_main Use Case
|
||||
*
|
||||
* \subsection asfdoc_samd20_system_pinmux_basic_use_case_code Code
|
||||
* Copy-paste the following code to your user application:
|
||||
* \snippet qs_pinmux_basic.c main
|
||||
*
|
||||
* \subsection asfdoc_samd20_system_pinmux_basic_use_case_flow Workflow
|
||||
* -# Create a PINMUX module pin configuration struct, which can be filled out
|
||||
* to adjust the configuration of a single port pin.
|
||||
* \snippet qs_pinmux_basic.c pinmux_config
|
||||
* -# Initialize the pin configuration struct with the module's default values.
|
||||
* \note This should always be performed before using the configuration
|
||||
* struct to ensure that all values are initialized to known default
|
||||
* settings.
|
||||
*
|
||||
* \snippet qs_pinmux_basic.c pinmux_config_defaults
|
||||
* -# Adjust the configuration struct to request an input pin with pullup
|
||||
* connected to the GPIO peripheral.
|
||||
* \snippet qs_pinmux_basic.c pinmux_update_config_values
|
||||
* -# Configure GPIO10 with the initialized pin configuration struct, to enable
|
||||
* the input sampler on the pin.
|
||||
* \snippet qs_pinmux_basic.c pinmux_set_config
|
||||
* -# Adjust the configuration of the pin to enable on-demand sampling mode.
|
||||
* \snippet qs_pinmux_basic.c pinmux_change_input_sampling
|
||||
*/
|
|
@ -0,0 +1,101 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 System related functionality
|
||||
*
|
||||
* Copyright (C) 2012-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#include <system.h>
|
||||
|
||||
/**
|
||||
* \internal
|
||||
* Dummy initialization function, used as a weak alias target for the various
|
||||
* init functions called by \ref system_init().
|
||||
*/
|
||||
void _system_dummy_init(void);
|
||||
void _system_dummy_init(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#if !defined(__DOXYGEN__)
|
||||
# if defined(__GNUC__)
|
||||
void system_clock_init(void) WEAK __attribute__((alias("_system_dummy_init")));
|
||||
void system_board_init(void) WEAK __attribute__((alias("_system_dummy_init")));
|
||||
# elif defined(__ICCARM__)
|
||||
void system_clock_init(void);
|
||||
void system_board_init(void);
|
||||
# pragma weak system_clock_init=_system_dummy_init
|
||||
# pragma weak system_board_init=_system_dummy_init
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Handler for the CPU Hard Fault interrupt, fired if an illegal access was
|
||||
* attempted to a memory address.
|
||||
*/
|
||||
void HardFault_Handler(void)
|
||||
{
|
||||
while (1) {
|
||||
/* Infinite loop if CPU exception is detected */
|
||||
Assert(false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Initialize system
|
||||
*
|
||||
* This function will call the various initialization functions within the
|
||||
* system namespace. If a given optional system module is not available, the
|
||||
* associated call will effectively be a NOP (No Operation).
|
||||
*
|
||||
* Currently the following initialization functions are supported:
|
||||
* - System clock initialization (via the SYSTEM CLOCK sub-module)
|
||||
* - Board hardware initialization (via the Board module)
|
||||
*/
|
||||
void system_init(void)
|
||||
{
|
||||
/* Configure GCLK and clock sources according to conf_clocks.h */
|
||||
system_clock_init();
|
||||
|
||||
/* Initialize board hardware */
|
||||
system_board_init();
|
||||
}
|
||||
|
|
@ -0,0 +1,531 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 System related functionality
|
||||
*
|
||||
* Copyright (C) 2012-2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
#ifndef SYSTEM_H_INCLUDED
|
||||
#define SYSTEM_H_INCLUDED
|
||||
|
||||
#include <compiler.h>
|
||||
#include <clock.h>
|
||||
#include <gclk.h>
|
||||
#include <pinmux.h>
|
||||
|
||||
/**
|
||||
* \defgroup asfdoc_samd20_system_group SAM D20 System Driver (SYSTEM)
|
||||
*
|
||||
* This driver for SAM D20 devices provides an interface for the configuration
|
||||
* and management of the device's system relation functionality, necessary for
|
||||
* the basic device operation. This is not limited to a single peripheral, but
|
||||
* extends across multiple hardware peripherals,
|
||||
*
|
||||
* The following peripherals are used by this module:
|
||||
*
|
||||
* - SYSCTRL (System Control)
|
||||
* - PM (Power Manager)
|
||||
*
|
||||
* The outline of this documentation is as follows:
|
||||
* - \ref asfdoc_samd20_system_prerequisites
|
||||
* - \ref asfdoc_samd20_system_module_overview
|
||||
* - \ref asfdoc_samd20_system_special_considerations
|
||||
* - \ref asfdoc_samd20_system_extra_info
|
||||
* - \ref asfdoc_samd20_system_examples
|
||||
* - \ref asfdoc_samd20_system_api_overview
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_system_prerequisites Prerequisites
|
||||
*
|
||||
* There are no prerequisites for this module.
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_system_module_overview Module Overview
|
||||
*
|
||||
* The System driver provides a collection of interfaces between the user
|
||||
* application logic, and the core device functionality (such as clocks, reset
|
||||
* cause determination, etc.) that is required for all applications. It contains
|
||||
* a number of sub-modules that control one specific aspect of the device:
|
||||
*
|
||||
* - System Core (this module)
|
||||
* - \ref asfdoc_samd20_system_clock_group "System Clock Control" (sub-module)
|
||||
* - \ref asfdoc_samd20_system_interrupt_group "System Interrupt Control" (sub-module)
|
||||
* - \ref asfdoc_samd20_system_pinmux_group "System Pin Multiplexer Control" (sub-module)
|
||||
*
|
||||
*
|
||||
* \subsection asfdoc_samd20_system_module_overview_vref Voltage References
|
||||
* The various analog modules within the SAM D20 devices (such as AC, ADC and
|
||||
* DAC) require a voltage reference to be configured to act as a reference point
|
||||
* for comparisons and conversions.
|
||||
*
|
||||
* The SAM D20 devices contain multiple references, including an internal
|
||||
* temperature sensor, and a fixed band-gap voltage source. When enabled, the
|
||||
* associated voltage reference can be selected within the desired peripheral
|
||||
* where applicable.
|
||||
*
|
||||
* \subsection asfdoc_samd20_system_module_overview_reset_cause System Reset Cause
|
||||
* In some application there may be a need to execute a different program
|
||||
* flow based on how the device was reset. For example, if the cause of reset
|
||||
* was the Watchdog timer (WDT), this might indicate an error in the application
|
||||
* and a form of error handling or error logging might be needed.
|
||||
*
|
||||
* For this reason, an API is provided to retrieve the cause of the last system
|
||||
* reset, so that appropriate action can be taken.
|
||||
*
|
||||
* \subsection asfdoc_samd20_system_module_overview_sleep_mode Sleep Modes
|
||||
* The SAM D20 devices have several sleep modes, where the sleep mode controls
|
||||
* which clock systems on the device will remain enabled or disabled when the
|
||||
* device enters a low power sleep mode.
|
||||
* \ref asfdoc_samd20_system_module_sleep_mode_table "The table below" lists the
|
||||
* clock settings of the different sleep modes.
|
||||
*
|
||||
* \anchor asfdoc_samd20_system_module_sleep_mode_table
|
||||
* <table>
|
||||
* <caption>SAM D20 Device Sleep Modes</caption>
|
||||
* <tr>
|
||||
* <th>Sleep mode</th>
|
||||
* <th>CPU clock</th>
|
||||
* <th>AHB clock</th>
|
||||
* <th>APB clocks</th>
|
||||
* <th>Clock sources</th>
|
||||
* <th>System clock</th>
|
||||
* <th>32KHz</th>
|
||||
* <th>Reg mode</th>
|
||||
* <th>RAM mode</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>IDLE 0</td>
|
||||
* <td>Stop</td>
|
||||
* <td>Run</td>
|
||||
* <td>Run</td>
|
||||
* <td>Run</td>
|
||||
* <td>Run</td>
|
||||
* <td>Run</td>
|
||||
* <td>Normal</td>
|
||||
* <td>Normal</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>IDLE 1</td>
|
||||
* <td>Stop</td>
|
||||
* <td>Stop</td>
|
||||
* <td>Run</td>
|
||||
* <td>Run</td>
|
||||
* <td>Run</td>
|
||||
* <td>Run</td>
|
||||
* <td>Normal</td>
|
||||
* <td>Normal</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>IDLE 2</td>
|
||||
* <td>Stop</td>
|
||||
* <td>Stop</td>
|
||||
* <td>Stop</td>
|
||||
* <td>Run</td>
|
||||
* <td>Run</td>
|
||||
* <td>Run</td>
|
||||
* <td>Normal</td>
|
||||
* <td>Normal</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>STANDBY</td>
|
||||
* <td>Stop</td>
|
||||
* <td>Stop</td>
|
||||
* <td>Stop</td>
|
||||
* <td>Stop</td>
|
||||
* <td>Stop</td>
|
||||
* <td>Stop</td>
|
||||
* <td>Low Power</td>
|
||||
* <td>Source/Drain biasing</td>
|
||||
* </tr>
|
||||
* </table>
|
||||
*
|
||||
* To enter device sleep, one of the available sleep modes must be set, and the
|
||||
* function to enter sleep called. The device will automatically wake up in
|
||||
* response to an interrupt being generated or other device event.
|
||||
*
|
||||
* Some peripheral clocks will remain enabled during sleep, depending on their
|
||||
* configuration; if desired, modules can remain clocked during sleep to allow
|
||||
* them to continue to operate while other parts of the system are powered down
|
||||
* to save power.
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_system_special_considerations Special Considerations
|
||||
*
|
||||
* Most of the functions in this driver have device specific restrictions and
|
||||
* caveats; refer to your device datasheet.
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_system_extra_info Extra Information
|
||||
*
|
||||
* For extra information see \ref asfdoc_samd20_system_extra. This includes:
|
||||
* - \ref asfdoc_samd20_system_extra_acronyms
|
||||
* - \ref asfdoc_samd20_system_extra_dependencies
|
||||
* - \ref asfdoc_samd20_system_extra_errata
|
||||
* - \ref asfdoc_samd20_system_extra_history
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_system_examples Examples
|
||||
*
|
||||
* For SYSTEM module related examples, please refer to the sub-modules listed in
|
||||
* the \ref asfdoc_samd20_system_module_overview "system module overview".
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_system_api_overview API Overview
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Voltage references within the device.
|
||||
*
|
||||
* List of available voltage references (VREF) that may be used within the
|
||||
* device.
|
||||
*/
|
||||
enum system_voltage_reference {
|
||||
/** Temperature sensor voltage reference. */
|
||||
SYSTEM_VOLTAGE_REFERENCE_TEMPSENSE,
|
||||
/** Bandgap voltage reference. */
|
||||
SYSTEM_VOLTAGE_REFERENCE_BANDGAP,
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Device sleep modes.
|
||||
*
|
||||
* List of available sleep modes in the device. A table of clocks available in
|
||||
* different sleep modes can be found in \ref asfdoc_samd20_system_module_overview_sleep_mode.
|
||||
*/
|
||||
enum system_sleepmode {
|
||||
/** IDLE 0 sleep mode. */
|
||||
SYSTEM_SLEEPMODE_IDLE_0,
|
||||
/** IDLE 1 sleep mode. */
|
||||
SYSTEM_SLEEPMODE_IDLE_1,
|
||||
/** IDLE 2 sleep mode. */
|
||||
SYSTEM_SLEEPMODE_IDLE_2,
|
||||
/** Standby sleep mode. */
|
||||
SYSTEM_SLEEPMODE_STANDBY,
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Reset causes of the system.
|
||||
*
|
||||
* List of possible reset causes of the system.
|
||||
*/
|
||||
enum system_reset_cause {
|
||||
/** The system was last reset by a software reset. */
|
||||
SYSTEM_RESET_CAUSE_SOFTWARE = PM_RCAUSE_SYST,
|
||||
/** The system was last reset by the watchdog timer. */
|
||||
SYSTEM_RESET_CAUSE_WDT = PM_RCAUSE_WDT,
|
||||
/** The system was last reset because the external reset line was pulled low. */
|
||||
SYSTEM_RESET_CAUSE_EXTERNAL_RESET = PM_RCAUSE_EXT,
|
||||
/** The system was last reset by the BOD33. */
|
||||
SYSTEM_RESET_CAUSE_BOD33 = PM_RCAUSE_BOD33,
|
||||
/** The system was last reset by the BOD12. */
|
||||
SYSTEM_RESET_CAUSE_BOD12 = PM_RCAUSE_BOD12,
|
||||
/** The system was last reset by the POR (Power on reset). */
|
||||
SYSTEM_RESET_CAUSE_POR = PM_RCAUSE_POR,
|
||||
};
|
||||
|
||||
/**
|
||||
* \name System identification
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Retrieve the device identification signature
|
||||
*
|
||||
* Retrieves the signature of the current device.
|
||||
*
|
||||
* \return Device ID signature as a 32-bit integer.
|
||||
*/
|
||||
static inline uint32_t system_get_device_id(void)
|
||||
{
|
||||
return DSU->DID.reg;
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* \name Voltage references
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Enable the selected voltage reference
|
||||
*
|
||||
* Enables the selected voltage reference source, making the voltage reference
|
||||
* available on a pin as well as an input source to the analog peripherals.
|
||||
*
|
||||
* \param[in] vref Voltage reference to enable
|
||||
*/
|
||||
static inline void system_voltage_reference_enable(
|
||||
const enum system_voltage_reference vref)
|
||||
{
|
||||
switch (vref) {
|
||||
case SYSTEM_VOLTAGE_REFERENCE_TEMPSENSE:
|
||||
SYSCTRL->VREF.reg |= SYSCTRL_VREF_TSEN;
|
||||
break;
|
||||
|
||||
case SYSTEM_VOLTAGE_REFERENCE_BANDGAP:
|
||||
SYSCTRL->VREF.reg |= SYSCTRL_VREF_BGOUTEN;
|
||||
break;
|
||||
|
||||
default:
|
||||
Assert(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Disable the selected voltage reference
|
||||
*
|
||||
* Disables the selected voltage reference source.
|
||||
*
|
||||
* \param[in] vref Voltage reference to disable
|
||||
*/
|
||||
static inline void system_voltage_reference_disable(
|
||||
const enum system_voltage_reference vref)
|
||||
{
|
||||
switch (vref) {
|
||||
case SYSTEM_VOLTAGE_REFERENCE_TEMPSENSE:
|
||||
SYSCTRL->VREF.reg &= ~SYSCTRL_VREF_TSEN;
|
||||
break;
|
||||
|
||||
case SYSTEM_VOLTAGE_REFERENCE_BANDGAP:
|
||||
SYSCTRL->VREF.reg &= ~SYSCTRL_VREF_BGOUTEN;
|
||||
break;
|
||||
|
||||
default:
|
||||
Assert(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* \name Device sleep
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Set the sleep mode of the device
|
||||
*
|
||||
* Sets the sleep mode of the device; the configured sleep mode will be entered
|
||||
* upon the next call of the \ref system_sleep() function.
|
||||
*
|
||||
* For an overview of which systems are disabled in sleep for the different
|
||||
* sleep modes, see \ref asfdoc_samd20_system_module_overview_sleep_mode.
|
||||
*
|
||||
* \param[in] sleep_mode Sleep mode to configure for the next sleep operation
|
||||
*
|
||||
* \retval STATUS_OK Operation completed successfully
|
||||
* \retval STATUS_ERR_INVALID_ARG The requested sleep mode was invalid or not
|
||||
* available
|
||||
*/
|
||||
static inline enum status_code system_set_sleepmode(
|
||||
const enum system_sleepmode sleep_mode)
|
||||
{
|
||||
switch (sleep_mode) {
|
||||
case SYSTEM_SLEEPMODE_IDLE_0:
|
||||
case SYSTEM_SLEEPMODE_IDLE_1:
|
||||
case SYSTEM_SLEEPMODE_IDLE_2:
|
||||
SCB->SCR &= ~SCB_SCR_SLEEPDEEP_Msk;
|
||||
PM->SLEEP.reg = sleep_mode;
|
||||
break;
|
||||
|
||||
case SYSTEM_SLEEPMODE_STANDBY:
|
||||
SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
|
||||
break;
|
||||
|
||||
default:
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Put the system to sleep waiting for interrupt
|
||||
*
|
||||
* Executes a device DSB (Data Synchronization Barrier) instruction to ensure
|
||||
* all ongoing memory accesses have completed, then a WFI (Wait For Interrupt)
|
||||
* instruction to place the device into the sleep mode specified by
|
||||
* \ref system_set_sleepmode until woken by an interrupt.
|
||||
*/
|
||||
static inline void system_sleep(void)
|
||||
{
|
||||
__DSB();
|
||||
__WFI();
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* \name Reset control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Reset the MCU
|
||||
*
|
||||
* Resets the MCU and all associated peripherals and registers, except RTC, all 32kHz sources,
|
||||
* WDT (if ALWAYSON is set) and GCLK (if WRTLOCK is set).
|
||||
*
|
||||
*/
|
||||
static inline void system_reset(void)
|
||||
{
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Return the reset cause
|
||||
*
|
||||
* Retrieves the cause of the last system reset.
|
||||
*
|
||||
* \return An enum value indicating the cause of the last system reset.
|
||||
*/
|
||||
static inline enum system_reset_cause system_get_reset_cause(void)
|
||||
{
|
||||
return (enum system_reset_cause)PM->RCAUSE.reg;
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* \name System initialization
|
||||
* @{
|
||||
*/
|
||||
|
||||
void system_init(void);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* \page asfdoc_samd20_system_extra Extra Information for SYSTEM Driver
|
||||
*
|
||||
* \section asfdoc_samd20_system_extra_acronyms Acronyms
|
||||
* Below is a table listing the acronyms used in this module, along with their
|
||||
* intended meanings.
|
||||
*
|
||||
* <table>
|
||||
* <tr>
|
||||
* <th>Acronym</th>
|
||||
* <th>Definition</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>PM</td>
|
||||
* <td>Power Manager</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>SYSCTRL</td>
|
||||
* <td>System control interface</td>
|
||||
* </tr>
|
||||
* </table>
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_system_extra_dependencies Dependencies
|
||||
* This driver has the following dependencies:
|
||||
*
|
||||
* - None
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_system_extra_errata Errata
|
||||
* There are no errata related to this driver.
|
||||
*
|
||||
*
|
||||
* \section asfdoc_samd20_system_extra_history Module History
|
||||
* An overview of the module history is presented in the table below, with
|
||||
* details on the enhancements and fixes made to the module since its first
|
||||
* release. The current version of this corresponds to the newest version in
|
||||
* the table.
|
||||
*
|
||||
* <table>
|
||||
* <tr>
|
||||
* <th>Changelog</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>Added new \c system_reset() to reset the complete MCU with some exceptions</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>Added new \c system_get_device_id() function to retrieved the device
|
||||
* ID.</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>Initial Release</td>
|
||||
* </tr>
|
||||
* </table>
|
||||
*
|
||||
* \page asfdoc_samd20_system_document_revision_history Document Revision History
|
||||
*
|
||||
* <table>
|
||||
* <tr>
|
||||
* <th>Doc. Rev.</td>
|
||||
* <th>Date</td>
|
||||
* <th>Comments</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>B</td>
|
||||
* <td>06/2013</td>
|
||||
* <td>Corrected documentation typos.</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>A</td>
|
||||
* <td>06/2013</td>
|
||||
* <td>Initial release</td>
|
||||
* </tr>
|
||||
* </table>
|
||||
*/
|
||||
|
||||
#endif /* SYSTEM_H_INCLUDED */
|
|
@ -0,0 +1,524 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Component description for AC
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_AC_COMPONENT_
|
||||
#define _SAMD20_AC_COMPONENT_
|
||||
|
||||
/* ========================================================================== */
|
||||
/** SOFTWARE API DEFINITION FOR AC */
|
||||
/* ========================================================================== */
|
||||
/** \addtogroup SAMD20_AC Analog Comparators */
|
||||
/*@{*/
|
||||
|
||||
#define REV_AC 0x110
|
||||
|
||||
/* -------- AC_CTRLA : (AC Offset: 0x00) (R/W 8) Control A Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t SWRST:1; /*!< bit: 0 Software Reset */
|
||||
uint8_t ENABLE:1; /*!< bit: 1 Enable */
|
||||
uint8_t RUNSTDBY:1; /*!< bit: 2 Run during Standby */
|
||||
uint8_t :5; /*!< bit: 3.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} AC_CTRLA_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define AC_CTRLA_OFFSET 0x00 /**< \brief (AC_CTRLA offset) Control A Register */
|
||||
#define AC_CTRLA_RESETVALUE 0x00 /**< \brief (AC_CTRLA reset_value) Control A Register */
|
||||
|
||||
#define AC_CTRLA_SWRST_Pos 0 /**< \brief (AC_CTRLA) Software Reset */
|
||||
#define AC_CTRLA_SWRST (0x1u << AC_CTRLA_SWRST_Pos)
|
||||
#define AC_CTRLA_ENABLE_Pos 1 /**< \brief (AC_CTRLA) Enable */
|
||||
#define AC_CTRLA_ENABLE (0x1u << AC_CTRLA_ENABLE_Pos)
|
||||
#define AC_CTRLA_RUNSTDBY_Pos 2 /**< \brief (AC_CTRLA) Run during Standby */
|
||||
#define AC_CTRLA_RUNSTDBY_Msk (0x1u << AC_CTRLA_RUNSTDBY_Pos)
|
||||
#define AC_CTRLA_RUNSTDBY(value) ((AC_CTRLA_RUNSTDBY_Msk & ((value) << AC_CTRLA_RUNSTDBY_Pos)))
|
||||
#define AC_CTRLA_MASK 0x07u /**< \brief (AC_CTRLA) MASK Register */
|
||||
|
||||
/* -------- AC_CTRLB : (AC Offset: 0x01) ( /W 8) Control B Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t START0:1; /*!< bit: 0 Comparator 0 Start Comparison */
|
||||
uint8_t START1:1; /*!< bit: 1 Comparator 1 Start Comparison */
|
||||
uint8_t START2:1; /*!< bit: 2 Comparator 2 Start Comparison */
|
||||
uint8_t START3:1; /*!< bit: 3 Comparator 3 Start Comparison */
|
||||
uint8_t :4; /*!< bit: 4.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} AC_CTRLB_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define AC_CTRLB_OFFSET 0x01 /**< \brief (AC_CTRLB offset) Control B Register */
|
||||
#define AC_CTRLB_RESETVALUE 0x00 /**< \brief (AC_CTRLB reset_value) Control B Register */
|
||||
|
||||
#define AC_CTRLB_START0_Pos 0 /**< \brief (AC_CTRLB) Comparator 0 Start Comparison */
|
||||
#define AC_CTRLB_START0 (0x1u << AC_CTRLB_START0_Pos)
|
||||
#define AC_CTRLB_START1_Pos 1 /**< \brief (AC_CTRLB) Comparator 1 Start Comparison */
|
||||
#define AC_CTRLB_START1 (0x1u << AC_CTRLB_START1_Pos)
|
||||
#define AC_CTRLB_START2_Pos 2 /**< \brief (AC_CTRLB) Comparator 2 Start Comparison */
|
||||
#define AC_CTRLB_START2 (0x1u << AC_CTRLB_START2_Pos)
|
||||
#define AC_CTRLB_START3_Pos 3 /**< \brief (AC_CTRLB) Comparator 3 Start Comparison */
|
||||
#define AC_CTRLB_START3 (0x1u << AC_CTRLB_START3_Pos)
|
||||
#define AC_CTRLB_MASK 0x0Fu /**< \brief (AC_CTRLB) MASK Register */
|
||||
|
||||
/* -------- AC_EVCTRL : (AC Offset: 0x02) (R/W 16) Event Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t COMPEO0:1; /*!< bit: 0 Comparator 0 Event Output Enable */
|
||||
uint16_t COMPEO1:1; /*!< bit: 1 Comparator 1 Event Output Enable */
|
||||
uint16_t COMPEO2:1; /*!< bit: 2 Comparator 2 Event Output Enable */
|
||||
uint16_t COMPEO3:1; /*!< bit: 3 Comparator 3 Event Output Enable */
|
||||
uint16_t WINEO0:1; /*!< bit: 4 Window 0 Event Output Enable */
|
||||
uint16_t WINEO1:1; /*!< bit: 5 Window 1 Event Output Enable */
|
||||
uint16_t :2; /*!< bit: 6.. 7 Reserved */
|
||||
uint16_t COMPEI0:1; /*!< bit: 8 Comparator 0 Event Input Enable */
|
||||
uint16_t COMPEI1:1; /*!< bit: 9 Comparator 1 Event Input Enable */
|
||||
uint16_t COMPEI2:1; /*!< bit: 10 Comparator 2 Event Input Enable */
|
||||
uint16_t COMPEI3:1; /*!< bit: 11 Comparator 3 Event Input Enable */
|
||||
uint16_t :4; /*!< bit: 12..15 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} AC_EVCTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define AC_EVCTRL_OFFSET 0x02 /**< \brief (AC_EVCTRL offset) Event Control Register */
|
||||
#define AC_EVCTRL_RESETVALUE 0x0000 /**< \brief (AC_EVCTRL reset_value) Event Control Register */
|
||||
|
||||
#define AC_EVCTRL_COMPEO0_Pos 0 /**< \brief (AC_EVCTRL) Comparator 0 Event Output Enable */
|
||||
#define AC_EVCTRL_COMPEO0 (0x1u << AC_EVCTRL_COMPEO0_Pos)
|
||||
#define AC_EVCTRL_COMPEO1_Pos 1 /**< \brief (AC_EVCTRL) Comparator 1 Event Output Enable */
|
||||
#define AC_EVCTRL_COMPEO1 (0x1u << AC_EVCTRL_COMPEO1_Pos)
|
||||
#define AC_EVCTRL_COMPEO2_Pos 2 /**< \brief (AC_EVCTRL) Comparator 2 Event Output Enable */
|
||||
#define AC_EVCTRL_COMPEO2 (0x1u << AC_EVCTRL_COMPEO2_Pos)
|
||||
#define AC_EVCTRL_COMPEO3_Pos 3 /**< \brief (AC_EVCTRL) Comparator 3 Event Output Enable */
|
||||
#define AC_EVCTRL_COMPEO3 (0x1u << AC_EVCTRL_COMPEO3_Pos)
|
||||
#define AC_EVCTRL_WINEO0_Pos 4 /**< \brief (AC_EVCTRL) Window 0 Event Output Enable */
|
||||
#define AC_EVCTRL_WINEO0 (0x1u << AC_EVCTRL_WINEO0_Pos)
|
||||
#define AC_EVCTRL_WINEO1_Pos 5 /**< \brief (AC_EVCTRL) Window 1 Event Output Enable */
|
||||
#define AC_EVCTRL_WINEO1 (0x1u << AC_EVCTRL_WINEO1_Pos)
|
||||
#define AC_EVCTRL_COMPEI0_Pos 8 /**< \brief (AC_EVCTRL) Comparator 0 Event Input Enable */
|
||||
#define AC_EVCTRL_COMPEI0 (0x1u << AC_EVCTRL_COMPEI0_Pos)
|
||||
#define AC_EVCTRL_COMPEI1_Pos 9 /**< \brief (AC_EVCTRL) Comparator 1 Event Input Enable */
|
||||
#define AC_EVCTRL_COMPEI1 (0x1u << AC_EVCTRL_COMPEI1_Pos)
|
||||
#define AC_EVCTRL_COMPEI2_Pos 10 /**< \brief (AC_EVCTRL) Comparator 2 Event Input Enable */
|
||||
#define AC_EVCTRL_COMPEI2 (0x1u << AC_EVCTRL_COMPEI2_Pos)
|
||||
#define AC_EVCTRL_COMPEI3_Pos 11 /**< \brief (AC_EVCTRL) Comparator 3 Event Input Enable */
|
||||
#define AC_EVCTRL_COMPEI3 (0x1u << AC_EVCTRL_COMPEI3_Pos)
|
||||
#define AC_EVCTRL_MASK 0x0F3Fu /**< \brief (AC_EVCTRL) MASK Register */
|
||||
|
||||
/* -------- AC_INTENCLR : (AC Offset: 0x04) (R/W 8) Interrupt Enable Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t COMP0:1; /*!< bit: 0 Comparator 0 Interrupt Disable */
|
||||
uint8_t COMP1:1; /*!< bit: 1 Comparator 1 Interrupt Disable */
|
||||
uint8_t COMP2:1; /*!< bit: 2 Comparator 2 Interrupt Disable */
|
||||
uint8_t COMP3:1; /*!< bit: 3 Comparator 3 Interrupt Disable */
|
||||
uint8_t WIN0:1; /*!< bit: 4 Window 0 Interrupt Disable */
|
||||
uint8_t WIN1:1; /*!< bit: 5 Window 1 Interrupt Disable */
|
||||
uint8_t :2; /*!< bit: 6.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} AC_INTENCLR_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define AC_INTENCLR_OFFSET 0x04 /**< \brief (AC_INTENCLR offset) Interrupt Enable Clear Register */
|
||||
#define AC_INTENCLR_RESETVALUE 0x00 /**< \brief (AC_INTENCLR reset_value) Interrupt Enable Clear Register */
|
||||
|
||||
#define AC_INTENCLR_COMP0_Pos 0 /**< \brief (AC_INTENCLR) Comparator 0 Interrupt Disable */
|
||||
#define AC_INTENCLR_COMP0 (0x1u << AC_INTENCLR_COMP0_Pos)
|
||||
#define AC_INTENCLR_COMP1_Pos 1 /**< \brief (AC_INTENCLR) Comparator 1 Interrupt Disable */
|
||||
#define AC_INTENCLR_COMP1 (0x1u << AC_INTENCLR_COMP1_Pos)
|
||||
#define AC_INTENCLR_COMP2_Pos 2 /**< \brief (AC_INTENCLR) Comparator 2 Interrupt Disable */
|
||||
#define AC_INTENCLR_COMP2 (0x1u << AC_INTENCLR_COMP2_Pos)
|
||||
#define AC_INTENCLR_COMP3_Pos 3 /**< \brief (AC_INTENCLR) Comparator 3 Interrupt Disable */
|
||||
#define AC_INTENCLR_COMP3 (0x1u << AC_INTENCLR_COMP3_Pos)
|
||||
#define AC_INTENCLR_WIN0_Pos 4 /**< \brief (AC_INTENCLR) Window 0 Interrupt Disable */
|
||||
#define AC_INTENCLR_WIN0 (0x1u << AC_INTENCLR_WIN0_Pos)
|
||||
#define AC_INTENCLR_WIN1_Pos 5 /**< \brief (AC_INTENCLR) Window 1 Interrupt Disable */
|
||||
#define AC_INTENCLR_WIN1 (0x1u << AC_INTENCLR_WIN1_Pos)
|
||||
#define AC_INTENCLR_MASK 0x3Fu /**< \brief (AC_INTENCLR) MASK Register */
|
||||
|
||||
/* -------- AC_INTENSET : (AC Offset: 0x05) (R/W 8) Interrupt Enable Set Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t COMP0:1; /*!< bit: 0 Comparator 0 Interrupt Enable */
|
||||
uint8_t COMP1:1; /*!< bit: 1 Comparator 1 Interrupt Enable */
|
||||
uint8_t COMP2:1; /*!< bit: 2 Comparator 2 Interrupt Enable */
|
||||
uint8_t COMP3:1; /*!< bit: 3 Comparator 3 Interrupt Enable */
|
||||
uint8_t WIN0:1; /*!< bit: 4 Window 0 Interrupt Enable */
|
||||
uint8_t WIN1:1; /*!< bit: 5 Window 1 Interrupt Enable */
|
||||
uint8_t :2; /*!< bit: 6.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} AC_INTENSET_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define AC_INTENSET_OFFSET 0x05 /**< \brief (AC_INTENSET offset) Interrupt Enable Set Register */
|
||||
#define AC_INTENSET_RESETVALUE 0x00 /**< \brief (AC_INTENSET reset_value) Interrupt Enable Set Register */
|
||||
|
||||
#define AC_INTENSET_COMP0_Pos 0 /**< \brief (AC_INTENSET) Comparator 0 Interrupt Enable */
|
||||
#define AC_INTENSET_COMP0 (0x1u << AC_INTENSET_COMP0_Pos)
|
||||
#define AC_INTENSET_COMP1_Pos 1 /**< \brief (AC_INTENSET) Comparator 1 Interrupt Enable */
|
||||
#define AC_INTENSET_COMP1 (0x1u << AC_INTENSET_COMP1_Pos)
|
||||
#define AC_INTENSET_COMP2_Pos 2 /**< \brief (AC_INTENSET) Comparator 2 Interrupt Enable */
|
||||
#define AC_INTENSET_COMP2 (0x1u << AC_INTENSET_COMP2_Pos)
|
||||
#define AC_INTENSET_COMP3_Pos 3 /**< \brief (AC_INTENSET) Comparator 3 Interrupt Enable */
|
||||
#define AC_INTENSET_COMP3 (0x1u << AC_INTENSET_COMP3_Pos)
|
||||
#define AC_INTENSET_WIN0_Pos 4 /**< \brief (AC_INTENSET) Window 0 Interrupt Enable */
|
||||
#define AC_INTENSET_WIN0 (0x1u << AC_INTENSET_WIN0_Pos)
|
||||
#define AC_INTENSET_WIN1_Pos 5 /**< \brief (AC_INTENSET) Window 1 Interrupt Enable */
|
||||
#define AC_INTENSET_WIN1 (0x1u << AC_INTENSET_WIN1_Pos)
|
||||
#define AC_INTENSET_MASK 0x3Fu /**< \brief (AC_INTENSET) MASK Register */
|
||||
|
||||
/* -------- AC_INTFLAG : (AC Offset: 0x06) (R/W 8) Interrupt Flag Status and Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t COMP0:1; /*!< bit: 0 Comparator 0 Interrupt Flag */
|
||||
uint8_t COMP1:1; /*!< bit: 1 Comparator 1 Interrupt Flag */
|
||||
uint8_t COMP2:1; /*!< bit: 2 Comparator 2 Interrupt Flag */
|
||||
uint8_t COMP3:1; /*!< bit: 3 Comparator 3 Interrupt Flag */
|
||||
uint8_t WIN0:1; /*!< bit: 4 Window 0 Interrupt Flag */
|
||||
uint8_t WIN1:1; /*!< bit: 5 Window 1 Interrupt Flag */
|
||||
uint8_t :2; /*!< bit: 6.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} AC_INTFLAG_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define AC_INTFLAG_OFFSET 0x06 /**< \brief (AC_INTFLAG offset) Interrupt Flag Status and Clear Register */
|
||||
#define AC_INTFLAG_RESETVALUE 0x00 /**< \brief (AC_INTFLAG reset_value) Interrupt Flag Status and Clear Register */
|
||||
|
||||
#define AC_INTFLAG_COMP0_Pos 0 /**< \brief (AC_INTFLAG) Comparator 0 Interrupt Flag */
|
||||
#define AC_INTFLAG_COMP0 (0x1u << AC_INTFLAG_COMP0_Pos)
|
||||
#define AC_INTFLAG_COMP1_Pos 1 /**< \brief (AC_INTFLAG) Comparator 1 Interrupt Flag */
|
||||
#define AC_INTFLAG_COMP1 (0x1u << AC_INTFLAG_COMP1_Pos)
|
||||
#define AC_INTFLAG_COMP2_Pos 2 /**< \brief (AC_INTFLAG) Comparator 2 Interrupt Flag */
|
||||
#define AC_INTFLAG_COMP2 (0x1u << AC_INTFLAG_COMP2_Pos)
|
||||
#define AC_INTFLAG_COMP3_Pos 3 /**< \brief (AC_INTFLAG) Comparator 3 Interrupt Flag */
|
||||
#define AC_INTFLAG_COMP3 (0x1u << AC_INTFLAG_COMP3_Pos)
|
||||
#define AC_INTFLAG_WIN0_Pos 4 /**< \brief (AC_INTFLAG) Window 0 Interrupt Flag */
|
||||
#define AC_INTFLAG_WIN0 (0x1u << AC_INTFLAG_WIN0_Pos)
|
||||
#define AC_INTFLAG_WIN1_Pos 5 /**< \brief (AC_INTFLAG) Window 1 Interrupt Flag */
|
||||
#define AC_INTFLAG_WIN1 (0x1u << AC_INTFLAG_WIN1_Pos)
|
||||
#define AC_INTFLAG_MASK 0x3Fu /**< \brief (AC_INTFLAG) MASK Register */
|
||||
|
||||
/* -------- AC_STATUSA : (AC Offset: 0x08) (R/ 8) Status A Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t STATE0:1; /*!< bit: 0 Comparator 0 Current State */
|
||||
uint8_t STATE1:1; /*!< bit: 1 Comparator 1 Current State */
|
||||
uint8_t STATE2:1; /*!< bit: 2 Comparator 2 Current State */
|
||||
uint8_t STATE3:1; /*!< bit: 3 Comparator 3 Current State */
|
||||
uint8_t WSTATE0:2; /*!< bit: 4.. 5 Window 0 Current State */
|
||||
uint8_t WSTATE1:2; /*!< bit: 6.. 7 Window 1 Current State */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} AC_STATUSA_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define AC_STATUSA_OFFSET 0x08 /**< \brief (AC_STATUSA offset) Status A Register */
|
||||
#define AC_STATUSA_RESETVALUE 0x00 /**< \brief (AC_STATUSA reset_value) Status A Register */
|
||||
|
||||
#define AC_STATUSA_STATE0_Pos 0 /**< \brief (AC_STATUSA) Comparator 0 Current State */
|
||||
#define AC_STATUSA_STATE0 (0x1u << AC_STATUSA_STATE0_Pos)
|
||||
#define AC_STATUSA_STATE1_Pos 1 /**< \brief (AC_STATUSA) Comparator 1 Current State */
|
||||
#define AC_STATUSA_STATE1 (0x1u << AC_STATUSA_STATE1_Pos)
|
||||
#define AC_STATUSA_STATE2_Pos 2 /**< \brief (AC_STATUSA) Comparator 2 Current State */
|
||||
#define AC_STATUSA_STATE2 (0x1u << AC_STATUSA_STATE2_Pos)
|
||||
#define AC_STATUSA_STATE3_Pos 3 /**< \brief (AC_STATUSA) Comparator 3 Current State */
|
||||
#define AC_STATUSA_STATE3 (0x1u << AC_STATUSA_STATE3_Pos)
|
||||
#define AC_STATUSA_WSTATE0_Pos 4 /**< \brief (AC_STATUSA) Window 0 Current State */
|
||||
#define AC_STATUSA_WSTATE0_Msk (0x3u << AC_STATUSA_WSTATE0_Pos)
|
||||
#define AC_STATUSA_WSTATE0(value) ((AC_STATUSA_WSTATE0_Msk & ((value) << AC_STATUSA_WSTATE0_Pos)))
|
||||
#define AC_STATUSA_WSTATE0_ABOVE (0x0u << 4) /**< \brief (AC_STATUSA) */
|
||||
#define AC_STATUSA_WSTATE0_INSIDE (0x1u << 4) /**< \brief (AC_STATUSA) */
|
||||
#define AC_STATUSA_WSTATE0_BELOW (0x2u << 4) /**< \brief (AC_STATUSA) */
|
||||
#define AC_STATUSA_WSTATE1_Pos 6 /**< \brief (AC_STATUSA) Window 1 Current State */
|
||||
#define AC_STATUSA_WSTATE1_Msk (0x3u << AC_STATUSA_WSTATE1_Pos)
|
||||
#define AC_STATUSA_WSTATE1(value) ((AC_STATUSA_WSTATE1_Msk & ((value) << AC_STATUSA_WSTATE1_Pos)))
|
||||
#define AC_STATUSA_WSTATE1_ABOVE (0x0u << 6) /**< \brief (AC_STATUSA) */
|
||||
#define AC_STATUSA_WSTATE1_INSIDE (0x1u << 6) /**< \brief (AC_STATUSA) */
|
||||
#define AC_STATUSA_WSTATE1_BELOW (0x2u << 6) /**< \brief (AC_STATUSA) */
|
||||
#define AC_STATUSA_MASK 0xFFu /**< \brief (AC_STATUSA) MASK Register */
|
||||
|
||||
/* -------- AC_STATUSB : (AC Offset: 0x09) (R/ 8) Status B Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t READY0:1; /*!< bit: 0 Comparator 0 Ready */
|
||||
uint8_t READY1:1; /*!< bit: 1 Comparator 1 Ready */
|
||||
uint8_t READY2:1; /*!< bit: 2 Comparator 2 Ready */
|
||||
uint8_t READY3:1; /*!< bit: 3 Comparator 3 Ready */
|
||||
uint8_t :3; /*!< bit: 4.. 6 Reserved */
|
||||
uint8_t SYNCBUSY:1; /*!< bit: 7 Synchronization Busy */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} AC_STATUSB_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define AC_STATUSB_OFFSET 0x09 /**< \brief (AC_STATUSB offset) Status B Register */
|
||||
#define AC_STATUSB_RESETVALUE 0x00 /**< \brief (AC_STATUSB reset_value) Status B Register */
|
||||
|
||||
#define AC_STATUSB_READY0_Pos 0 /**< \brief (AC_STATUSB) Comparator 0 Ready */
|
||||
#define AC_STATUSB_READY0 (0x1u << AC_STATUSB_READY0_Pos)
|
||||
#define AC_STATUSB_READY1_Pos 1 /**< \brief (AC_STATUSB) Comparator 1 Ready */
|
||||
#define AC_STATUSB_READY1 (0x1u << AC_STATUSB_READY1_Pos)
|
||||
#define AC_STATUSB_READY2_Pos 2 /**< \brief (AC_STATUSB) Comparator 2 Ready */
|
||||
#define AC_STATUSB_READY2 (0x1u << AC_STATUSB_READY2_Pos)
|
||||
#define AC_STATUSB_READY3_Pos 3 /**< \brief (AC_STATUSB) Comparator 3 Ready */
|
||||
#define AC_STATUSB_READY3 (0x1u << AC_STATUSB_READY3_Pos)
|
||||
#define AC_STATUSB_SYNCBUSY_Pos 7 /**< \brief (AC_STATUSB) Synchronization Busy */
|
||||
#define AC_STATUSB_SYNCBUSY (0x1u << AC_STATUSB_SYNCBUSY_Pos)
|
||||
#define AC_STATUSB_MASK 0x8Fu /**< \brief (AC_STATUSB) MASK Register */
|
||||
|
||||
/* -------- AC_STATUSC : (AC Offset: 0x0A) (R/ 8) Status C Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t STATE0:1; /*!< bit: 0 Comparator 0 Current State */
|
||||
uint8_t STATE1:1; /*!< bit: 1 Comparator 1 Current State */
|
||||
uint8_t STATE2:1; /*!< bit: 2 Comparator 2 Current State */
|
||||
uint8_t STATE3:1; /*!< bit: 3 Comparator 3 Current State */
|
||||
uint8_t WSTATE0:2; /*!< bit: 4.. 5 Window 0 Current State */
|
||||
uint8_t WSTATE1:2; /*!< bit: 6.. 7 Window 1 Current State */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} AC_STATUSC_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define AC_STATUSC_OFFSET 0x0A /**< \brief (AC_STATUSC offset) Status C Register */
|
||||
#define AC_STATUSC_RESETVALUE 0x00 /**< \brief (AC_STATUSC reset_value) Status C Register */
|
||||
|
||||
#define AC_STATUSC_STATE0_Pos 0 /**< \brief (AC_STATUSC) Comparator 0 Current State */
|
||||
#define AC_STATUSC_STATE0 (0x1u << AC_STATUSC_STATE0_Pos)
|
||||
#define AC_STATUSC_STATE1_Pos 1 /**< \brief (AC_STATUSC) Comparator 1 Current State */
|
||||
#define AC_STATUSC_STATE1 (0x1u << AC_STATUSC_STATE1_Pos)
|
||||
#define AC_STATUSC_STATE2_Pos 2 /**< \brief (AC_STATUSC) Comparator 2 Current State */
|
||||
#define AC_STATUSC_STATE2 (0x1u << AC_STATUSC_STATE2_Pos)
|
||||
#define AC_STATUSC_STATE3_Pos 3 /**< \brief (AC_STATUSC) Comparator 3 Current State */
|
||||
#define AC_STATUSC_STATE3 (0x1u << AC_STATUSC_STATE3_Pos)
|
||||
#define AC_STATUSC_WSTATE0_Pos 4 /**< \brief (AC_STATUSC) Window 0 Current State */
|
||||
#define AC_STATUSC_WSTATE0_Msk (0x3u << AC_STATUSC_WSTATE0_Pos)
|
||||
#define AC_STATUSC_WSTATE0(value) ((AC_STATUSC_WSTATE0_Msk & ((value) << AC_STATUSC_WSTATE0_Pos)))
|
||||
#define AC_STATUSC_WSTATE0_ABOVE (0x0u << 4) /**< \brief (AC_STATUSC) */
|
||||
#define AC_STATUSC_WSTATE0_INSIDE (0x1u << 4) /**< \brief (AC_STATUSC) */
|
||||
#define AC_STATUSC_WSTATE0_BELOW (0x2u << 4) /**< \brief (AC_STATUSC) */
|
||||
#define AC_STATUSC_WSTATE1_Pos 6 /**< \brief (AC_STATUSC) Window 1 Current State */
|
||||
#define AC_STATUSC_WSTATE1_Msk (0x3u << AC_STATUSC_WSTATE1_Pos)
|
||||
#define AC_STATUSC_WSTATE1(value) ((AC_STATUSC_WSTATE1_Msk & ((value) << AC_STATUSC_WSTATE1_Pos)))
|
||||
#define AC_STATUSC_WSTATE1_ABOVE (0x0u << 6) /**< \brief (AC_STATUSC) */
|
||||
#define AC_STATUSC_WSTATE1_INSIDE (0x1u << 6) /**< \brief (AC_STATUSC) */
|
||||
#define AC_STATUSC_WSTATE1_BELOW (0x2u << 6) /**< \brief (AC_STATUSC) */
|
||||
#define AC_STATUSC_MASK 0xFFu /**< \brief (AC_STATUSC) MASK Register */
|
||||
|
||||
/* -------- AC_WINCTRL : (AC Offset: 0x0C) (R/W 8) Window Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t WEN0:1; /*!< bit: 0 Window 0 Mode Enable */
|
||||
uint8_t WINTSEL0:2; /*!< bit: 1.. 2 Window 0 Interrupt Selection */
|
||||
uint8_t :1; /*!< bit: 3 Reserved */
|
||||
uint8_t WEN1:1; /*!< bit: 4 Window 1 Mode Enable */
|
||||
uint8_t WINTSEL1:2; /*!< bit: 5.. 6 Window 1 Interrupt Selection */
|
||||
uint8_t :1; /*!< bit: 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} AC_WINCTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define AC_WINCTRL_OFFSET 0x0C /**< \brief (AC_WINCTRL offset) Window Control Register */
|
||||
#define AC_WINCTRL_RESETVALUE 0x00 /**< \brief (AC_WINCTRL reset_value) Window Control Register */
|
||||
|
||||
#define AC_WINCTRL_WEN0_Pos 0 /**< \brief (AC_WINCTRL) Window 0 Mode Enable */
|
||||
#define AC_WINCTRL_WEN0 (0x1u << AC_WINCTRL_WEN0_Pos)
|
||||
#define AC_WINCTRL_WINTSEL0_Pos 1 /**< \brief (AC_WINCTRL) Window 0 Interrupt Selection */
|
||||
#define AC_WINCTRL_WINTSEL0_Msk (0x3u << AC_WINCTRL_WINTSEL0_Pos)
|
||||
#define AC_WINCTRL_WINTSEL0(value) ((AC_WINCTRL_WINTSEL0_Msk & ((value) << AC_WINCTRL_WINTSEL0_Pos)))
|
||||
#define AC_WINCTRL_WINTSEL0_ABOVE (0x0u << 1) /**< \brief (AC_WINCTRL) */
|
||||
#define AC_WINCTRL_WINTSEL0_INSIDE (0x1u << 1) /**< \brief (AC_WINCTRL) */
|
||||
#define AC_WINCTRL_WINTSEL0_BELOW (0x2u << 1) /**< \brief (AC_WINCTRL) */
|
||||
#define AC_WINCTRL_WINTSEL0_OUTSIDE (0x3u << 1) /**< \brief (AC_WINCTRL) */
|
||||
#define AC_WINCTRL_WEN1_Pos 4 /**< \brief (AC_WINCTRL) Window 1 Mode Enable */
|
||||
#define AC_WINCTRL_WEN1 (0x1u << AC_WINCTRL_WEN1_Pos)
|
||||
#define AC_WINCTRL_WINTSEL1_Pos 5 /**< \brief (AC_WINCTRL) Window 1 Interrupt Selection */
|
||||
#define AC_WINCTRL_WINTSEL1_Msk (0x3u << AC_WINCTRL_WINTSEL1_Pos)
|
||||
#define AC_WINCTRL_WINTSEL1(value) ((AC_WINCTRL_WINTSEL1_Msk & ((value) << AC_WINCTRL_WINTSEL1_Pos)))
|
||||
#define AC_WINCTRL_WINTSEL1_ABOVE (0x0u << 5) /**< \brief (AC_WINCTRL) */
|
||||
#define AC_WINCTRL_WINTSEL1_INSIDE (0x1u << 5) /**< \brief (AC_WINCTRL) */
|
||||
#define AC_WINCTRL_WINTSEL1_BELOW (0x2u << 5) /**< \brief (AC_WINCTRL) */
|
||||
#define AC_WINCTRL_WINTSEL1_OUTSIDE (0x3u << 5) /**< \brief (AC_WINCTRL) */
|
||||
#define AC_WINCTRL_MASK 0x77u /**< \brief (AC_WINCTRL) MASK Register */
|
||||
|
||||
/* -------- AC_COMPCTRL : (AC Offset: 0x10) (R/W 32) Comparator Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t ENABLE:1; /*!< bit: 0 Enable */
|
||||
uint32_t SINGLE:1; /*!< bit: 1 Single-Shot Mode */
|
||||
uint32_t SPEED:2; /*!< bit: 2.. 3 Speed Selection */
|
||||
uint32_t :1; /*!< bit: 4 Reserved */
|
||||
uint32_t INTSEL:2; /*!< bit: 5.. 6 Interrupt Selection */
|
||||
uint32_t :1; /*!< bit: 7 Reserved */
|
||||
uint32_t MUXNEG:3; /*!< bit: 8..10 Negative Input Mux Selection */
|
||||
uint32_t :1; /*!< bit: 11 Reserved */
|
||||
uint32_t MUXPOS:2; /*!< bit: 12..13 Positive Input Mux Selection */
|
||||
uint32_t :1; /*!< bit: 14 Reserved */
|
||||
uint32_t SWAP:1; /*!< bit: 15 Swap Inputs and Invert */
|
||||
uint32_t OUT:2; /*!< bit: 16..17 Output Mode */
|
||||
uint32_t :1; /*!< bit: 18 Reserved */
|
||||
uint32_t HYST:1; /*!< bit: 19 Hysteresis Enable */
|
||||
uint32_t :4; /*!< bit: 20..23 Reserved */
|
||||
uint32_t FLEN:3; /*!< bit: 24..26 Filter Length */
|
||||
uint32_t :5; /*!< bit: 27..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} AC_COMPCTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define AC_COMPCTRL_OFFSET 0x10 /**< \brief (AC_COMPCTRL offset) Comparator Control Register */
|
||||
#define AC_COMPCTRL_RESETVALUE 0x00000000 /**< \brief (AC_COMPCTRL reset_value) Comparator Control Register */
|
||||
|
||||
#define AC_COMPCTRL_ENABLE_Pos 0 /**< \brief (AC_COMPCTRL) Enable */
|
||||
#define AC_COMPCTRL_ENABLE (0x1u << AC_COMPCTRL_ENABLE_Pos)
|
||||
#define AC_COMPCTRL_SINGLE_Pos 1 /**< \brief (AC_COMPCTRL) Single-Shot Mode */
|
||||
#define AC_COMPCTRL_SINGLE (0x1u << AC_COMPCTRL_SINGLE_Pos)
|
||||
#define AC_COMPCTRL_SPEED_Pos 2 /**< \brief (AC_COMPCTRL) Speed Selection */
|
||||
#define AC_COMPCTRL_SPEED_Msk (0x3u << AC_COMPCTRL_SPEED_Pos)
|
||||
#define AC_COMPCTRL_SPEED(value) ((AC_COMPCTRL_SPEED_Msk & ((value) << AC_COMPCTRL_SPEED_Pos)))
|
||||
#define AC_COMPCTRL_SPEED_LOWPOWER (0x0u << 2) /**< \brief (AC_COMPCTRL) */
|
||||
#define AC_COMPCTRL_SPEED_FAST (0x1u << 2) /**< \brief (AC_COMPCTRL) */
|
||||
#define AC_COMPCTRL_INTSEL_Pos 5 /**< \brief (AC_COMPCTRL) Interrupt Selection */
|
||||
#define AC_COMPCTRL_INTSEL_Msk (0x3u << AC_COMPCTRL_INTSEL_Pos)
|
||||
#define AC_COMPCTRL_INTSEL(value) ((AC_COMPCTRL_INTSEL_Msk & ((value) << AC_COMPCTRL_INTSEL_Pos)))
|
||||
#define AC_COMPCTRL_INTSEL_TOGGLE (0x0u << 5) /**< \brief (AC_COMPCTRL) */
|
||||
#define AC_COMPCTRL_INTSEL_RISING (0x1u << 5) /**< \brief (AC_COMPCTRL) */
|
||||
#define AC_COMPCTRL_INTSEL_FALLING (0x2u << 5) /**< \brief (AC_COMPCTRL) */
|
||||
#define AC_COMPCTRL_INTSEL_EOC (0x3u << 5) /**< \brief (AC_COMPCTRL) */
|
||||
#define AC_COMPCTRL_MUXNEG_Pos 8 /**< \brief (AC_COMPCTRL) Negative Input Mux Selection */
|
||||
#define AC_COMPCTRL_MUXNEG_Msk (0x7u << AC_COMPCTRL_MUXNEG_Pos)
|
||||
#define AC_COMPCTRL_MUXNEG(value) ((AC_COMPCTRL_MUXNEG_Msk & ((value) << AC_COMPCTRL_MUXNEG_Pos)))
|
||||
#define AC_COMPCTRL_MUXNEG_PIN0 (0x0u << 8) /**< \brief (AC_COMPCTRL) */
|
||||
#define AC_COMPCTRL_MUXNEG_PIN1 (0x1u << 8) /**< \brief (AC_COMPCTRL) */
|
||||
#define AC_COMPCTRL_MUXNEG_PIN2 (0x2u << 8) /**< \brief (AC_COMPCTRL) */
|
||||
#define AC_COMPCTRL_MUXNEG_PIN3 (0x3u << 8) /**< \brief (AC_COMPCTRL) */
|
||||
#define AC_COMPCTRL_MUXNEG_GND (0x4u << 8) /**< \brief (AC_COMPCTRL) */
|
||||
#define AC_COMPCTRL_MUXNEG_VSCALE (0x5u << 8) /**< \brief (AC_COMPCTRL) */
|
||||
#define AC_COMPCTRL_MUXNEG_BANDGAP (0x6u << 8) /**< \brief (AC_COMPCTRL) */
|
||||
#define AC_COMPCTRL_MUXNEG_DAC (0x7u << 8) /**< \brief (AC_COMPCTRL) */
|
||||
#define AC_COMPCTRL_MUXPOS_Pos 12 /**< \brief (AC_COMPCTRL) Positive Input Mux Selection */
|
||||
#define AC_COMPCTRL_MUXPOS_Msk (0x3u << AC_COMPCTRL_MUXPOS_Pos)
|
||||
#define AC_COMPCTRL_MUXPOS(value) ((AC_COMPCTRL_MUXPOS_Msk & ((value) << AC_COMPCTRL_MUXPOS_Pos)))
|
||||
#define AC_COMPCTRL_MUXPOS_PIN0 (0x0u << 12) /**< \brief (AC_COMPCTRL) */
|
||||
#define AC_COMPCTRL_MUXPOS_PIN1 (0x1u << 12) /**< \brief (AC_COMPCTRL) */
|
||||
#define AC_COMPCTRL_MUXPOS_PIN2 (0x2u << 12) /**< \brief (AC_COMPCTRL) */
|
||||
#define AC_COMPCTRL_MUXPOS_PIN3 (0x3u << 12) /**< \brief (AC_COMPCTRL) */
|
||||
#define AC_COMPCTRL_SWAP_Pos 15 /**< \brief (AC_COMPCTRL) Swap Inputs and Invert */
|
||||
#define AC_COMPCTRL_SWAP (0x1u << AC_COMPCTRL_SWAP_Pos)
|
||||
#define AC_COMPCTRL_OUT_Pos 16 /**< \brief (AC_COMPCTRL) Output Mode */
|
||||
#define AC_COMPCTRL_OUT_Msk (0x3u << AC_COMPCTRL_OUT_Pos)
|
||||
#define AC_COMPCTRL_OUT(value) ((AC_COMPCTRL_OUT_Msk & ((value) << AC_COMPCTRL_OUT_Pos)))
|
||||
#define AC_COMPCTRL_OUT_OFF (0x0u << 16) /**< \brief (AC_COMPCTRL) */
|
||||
#define AC_COMPCTRL_OUT_ASYNC (0x1u << 16) /**< \brief (AC_COMPCTRL) */
|
||||
#define AC_COMPCTRL_OUT_SYNC (0x2u << 16) /**< \brief (AC_COMPCTRL) */
|
||||
#define AC_COMPCTRL_HYST_Pos 19 /**< \brief (AC_COMPCTRL) Hysteresis Enable */
|
||||
#define AC_COMPCTRL_HYST (0x1u << AC_COMPCTRL_HYST_Pos)
|
||||
#define AC_COMPCTRL_FLEN_Pos 24 /**< \brief (AC_COMPCTRL) Filter Length */
|
||||
#define AC_COMPCTRL_FLEN_Msk (0x7u << AC_COMPCTRL_FLEN_Pos)
|
||||
#define AC_COMPCTRL_FLEN(value) ((AC_COMPCTRL_FLEN_Msk & ((value) << AC_COMPCTRL_FLEN_Pos)))
|
||||
#define AC_COMPCTRL_FLEN_OFF (0x0u << 24) /**< \brief (AC_COMPCTRL) */
|
||||
#define AC_COMPCTRL_FLEN_MAJ3 (0x1u << 24) /**< \brief (AC_COMPCTRL) */
|
||||
#define AC_COMPCTRL_FLEN_MAJ5 (0x2u << 24) /**< \brief (AC_COMPCTRL) */
|
||||
#define AC_COMPCTRL_MASK 0x070BB76Fu /**< \brief (AC_COMPCTRL) MASK Register */
|
||||
|
||||
/* -------- AC_SCALER : (AC Offset: 0x20) (R/W 8) Scaler Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t VALUE:6; /*!< bit: 0.. 5 Scaler Value */
|
||||
uint8_t :2; /*!< bit: 6.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} AC_SCALER_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define AC_SCALER_OFFSET 0x20 /**< \brief (AC_SCALER offset) Scaler Register */
|
||||
#define AC_SCALER_RESETVALUE 0x00 /**< \brief (AC_SCALER reset_value) Scaler Register */
|
||||
|
||||
#define AC_SCALER_VALUE_Pos 0 /**< \brief (AC_SCALER) Scaler Value */
|
||||
#define AC_SCALER_VALUE_Msk (0x3Fu << AC_SCALER_VALUE_Pos)
|
||||
#define AC_SCALER_VALUE(value) ((AC_SCALER_VALUE_Msk & ((value) << AC_SCALER_VALUE_Pos)))
|
||||
#define AC_SCALER_MASK 0x3Fu /**< \brief (AC_SCALER) MASK Register */
|
||||
|
||||
/** \brief AC hardware registers */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef struct {
|
||||
__IO AC_CTRLA_Type CTRLA; /**< \brief Offset: 0x00 (R/W 8) Control A Register */
|
||||
__O AC_CTRLB_Type CTRLB; /**< \brief Offset: 0x01 ( /W 8) Control B Register */
|
||||
__IO AC_EVCTRL_Type EVCTRL; /**< \brief Offset: 0x02 (R/W 16) Event Control Register */
|
||||
__IO AC_INTENCLR_Type INTENCLR; /**< \brief Offset: 0x04 (R/W 8) Interrupt Enable Clear Register */
|
||||
__IO AC_INTENSET_Type INTENSET; /**< \brief Offset: 0x05 (R/W 8) Interrupt Enable Set Register */
|
||||
__IO AC_INTFLAG_Type INTFLAG; /**< \brief Offset: 0x06 (R/W 8) Interrupt Flag Status and Clear Register */
|
||||
RoReg8 Reserved1[0x1];
|
||||
__I AC_STATUSA_Type STATUSA; /**< \brief Offset: 0x08 (R/ 8) Status A Register */
|
||||
__I AC_STATUSB_Type STATUSB; /**< \brief Offset: 0x09 (R/ 8) Status B Register */
|
||||
__I AC_STATUSC_Type STATUSC; /**< \brief Offset: 0x0A (R/ 8) Status C Register */
|
||||
RoReg8 Reserved2[0x1];
|
||||
__IO AC_WINCTRL_Type WINCTRL; /**< \brief Offset: 0x0C (R/W 8) Window Control Register */
|
||||
RoReg8 Reserved3[0x3];
|
||||
__IO AC_COMPCTRL_Type COMPCTRL[2]; /**< \brief Offset: 0x10 (R/W 32) Comparator Control Register [NUM_CMP] */
|
||||
RoReg8 Reserved4[0x8];
|
||||
__IO AC_SCALER_Type SCALER[2]; /**< \brief Offset: 0x20 (R/W 8) Scaler Register [NUM_CMP] */
|
||||
} Ac;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/*@}*/
|
||||
|
||||
#endif /* _SAMD20_AC_COMPONENT_ */
|
|
@ -0,0 +1,717 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Component description for ADC
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_ADC_COMPONENT_
|
||||
#define _SAMD20_ADC_COMPONENT_
|
||||
|
||||
/* ========================================================================== */
|
||||
/** SOFTWARE API DEFINITION FOR ADC */
|
||||
/* ========================================================================== */
|
||||
/** \addtogroup SAMD20_ADC Analog Digital Converter */
|
||||
/*@{*/
|
||||
|
||||
#define REV_ADC 0x110
|
||||
|
||||
/* -------- ADC_CTRLA : (ADC Offset: 0x00) (R/W 8) Control Register A -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t SWRST:1; /*!< bit: 0 Software Reset */
|
||||
uint8_t ENABLE:1; /*!< bit: 1 Enable */
|
||||
uint8_t RUNSTDBY:1; /*!< bit: 2 Run during Standby */
|
||||
uint8_t :5; /*!< bit: 3.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} ADC_CTRLA_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define ADC_CTRLA_OFFSET 0x00 /**< \brief (ADC_CTRLA offset) Control Register A */
|
||||
#define ADC_CTRLA_RESETVALUE 0x00 /**< \brief (ADC_CTRLA reset_value) Control Register A */
|
||||
|
||||
#define ADC_CTRLA_SWRST_Pos 0 /**< \brief (ADC_CTRLA) Software Reset */
|
||||
#define ADC_CTRLA_SWRST (0x1u << ADC_CTRLA_SWRST_Pos)
|
||||
#define ADC_CTRLA_ENABLE_Pos 1 /**< \brief (ADC_CTRLA) Enable */
|
||||
#define ADC_CTRLA_ENABLE (0x1u << ADC_CTRLA_ENABLE_Pos)
|
||||
#define ADC_CTRLA_RUNSTDBY_Pos 2 /**< \brief (ADC_CTRLA) Run during Standby */
|
||||
#define ADC_CTRLA_RUNSTDBY (0x1u << ADC_CTRLA_RUNSTDBY_Pos)
|
||||
#define ADC_CTRLA_MASK 0x07u /**< \brief (ADC_CTRLA) MASK Register */
|
||||
|
||||
/* -------- ADC_REFCTRL : (ADC Offset: 0x01) (R/W 8) Reference Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t REFSEL:4; /*!< bit: 0.. 3 Reference Selection */
|
||||
uint8_t :3; /*!< bit: 4.. 6 Reserved */
|
||||
uint8_t REFCOMP:1; /*!< bit: 7 Reference Buffer Offset Compensation Enable */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} ADC_REFCTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define ADC_REFCTRL_OFFSET 0x01 /**< \brief (ADC_REFCTRL offset) Reference Control Register */
|
||||
#define ADC_REFCTRL_RESETVALUE 0x00 /**< \brief (ADC_REFCTRL reset_value) Reference Control Register */
|
||||
|
||||
#define ADC_REFCTRL_REFSEL_Pos 0 /**< \brief (ADC_REFCTRL) Reference Selection */
|
||||
#define ADC_REFCTRL_REFSEL_Msk (0xFu << ADC_REFCTRL_REFSEL_Pos)
|
||||
#define ADC_REFCTRL_REFSEL(value) ((ADC_REFCTRL_REFSEL_Msk & ((value) << ADC_REFCTRL_REFSEL_Pos)))
|
||||
#define ADC_REFCTRL_REFSEL_INT1V (0x0u << 0) /**< \brief (ADC_REFCTRL) */
|
||||
#define ADC_REFCTRL_REFSEL_INTVCC0 (0x1u << 0) /**< \brief (ADC_REFCTRL) */
|
||||
#define ADC_REFCTRL_REFSEL_INTVCC1 (0x2u << 0) /**< \brief (ADC_REFCTRL) */
|
||||
#define ADC_REFCTRL_REFSEL_AREFA (0x3u << 0) /**< \brief (ADC_REFCTRL) */
|
||||
#define ADC_REFCTRL_REFSEL_AREFB (0x4u << 0) /**< \brief (ADC_REFCTRL) */
|
||||
#define ADC_REFCTRL_REFCOMP_Pos 7 /**< \brief (ADC_REFCTRL) Reference Buffer Offset Compensation Enable */
|
||||
#define ADC_REFCTRL_REFCOMP (0x1u << ADC_REFCTRL_REFCOMP_Pos)
|
||||
#define ADC_REFCTRL_MASK 0x8Fu /**< \brief (ADC_REFCTRL) MASK Register */
|
||||
|
||||
/* -------- ADC_AVGCTRL : (ADC Offset: 0x02) (R/W 8) Average Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t SAMPLENUM:4; /*!< bit: 0.. 3 Number of Samples to be Collected */
|
||||
uint8_t ADJRES:3; /*!< bit: 4.. 6 Adjusting Result / Division Coefficient */
|
||||
uint8_t :1; /*!< bit: 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} ADC_AVGCTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define ADC_AVGCTRL_OFFSET 0x02 /**< \brief (ADC_AVGCTRL offset) Average Control Register */
|
||||
#define ADC_AVGCTRL_RESETVALUE 0x00 /**< \brief (ADC_AVGCTRL reset_value) Average Control Register */
|
||||
|
||||
#define ADC_AVGCTRL_SAMPLENUM_Pos 0 /**< \brief (ADC_AVGCTRL) Number of Samples to be Collected */
|
||||
#define ADC_AVGCTRL_SAMPLENUM_Msk (0xFu << ADC_AVGCTRL_SAMPLENUM_Pos)
|
||||
#define ADC_AVGCTRL_SAMPLENUM(value) ((ADC_AVGCTRL_SAMPLENUM_Msk & ((value) << ADC_AVGCTRL_SAMPLENUM_Pos)))
|
||||
#define ADC_AVGCTRL_SAMPLENUM_1 (0x0u << 0) /**< \brief (ADC_AVGCTRL) */
|
||||
#define ADC_AVGCTRL_SAMPLENUM_2 (0x1u << 0) /**< \brief (ADC_AVGCTRL) */
|
||||
#define ADC_AVGCTRL_SAMPLENUM_4 (0x2u << 0) /**< \brief (ADC_AVGCTRL) */
|
||||
#define ADC_AVGCTRL_SAMPLENUM_8 (0x3u << 0) /**< \brief (ADC_AVGCTRL) */
|
||||
#define ADC_AVGCTRL_SAMPLENUM_16 (0x4u << 0) /**< \brief (ADC_AVGCTRL) */
|
||||
#define ADC_AVGCTRL_SAMPLENUM_32 (0x5u << 0) /**< \brief (ADC_AVGCTRL) */
|
||||
#define ADC_AVGCTRL_SAMPLENUM_64 (0x6u << 0) /**< \brief (ADC_AVGCTRL) */
|
||||
#define ADC_AVGCTRL_SAMPLENUM_128 (0x7u << 0) /**< \brief (ADC_AVGCTRL) */
|
||||
#define ADC_AVGCTRL_SAMPLENUM_256 (0x8u << 0) /**< \brief (ADC_AVGCTRL) */
|
||||
#define ADC_AVGCTRL_SAMPLENUM_512 (0x9u << 0) /**< \brief (ADC_AVGCTRL) */
|
||||
#define ADC_AVGCTRL_SAMPLENUM_1024 (0xAu << 0) /**< \brief (ADC_AVGCTRL) */
|
||||
#define ADC_AVGCTRL_ADJRES_Pos 4 /**< \brief (ADC_AVGCTRL) Adjusting Result / Division Coefficient */
|
||||
#define ADC_AVGCTRL_ADJRES_Msk (0x7u << ADC_AVGCTRL_ADJRES_Pos)
|
||||
#define ADC_AVGCTRL_ADJRES(value) ((ADC_AVGCTRL_ADJRES_Msk & ((value) << ADC_AVGCTRL_ADJRES_Pos)))
|
||||
#define ADC_AVGCTRL_MASK 0x7Fu /**< \brief (ADC_AVGCTRL) MASK Register */
|
||||
|
||||
/* -------- ADC_SAMPCTRL : (ADC Offset: 0x03) (R/W 8) Sample Time Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t SAMPLEN:6; /*!< bit: 0.. 5 Sampling Time Length */
|
||||
uint8_t :2; /*!< bit: 6.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} ADC_SAMPCTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define ADC_SAMPCTRL_OFFSET 0x03 /**< \brief (ADC_SAMPCTRL offset) Sample Time Control Register */
|
||||
#define ADC_SAMPCTRL_RESETVALUE 0x00 /**< \brief (ADC_SAMPCTRL reset_value) Sample Time Control Register */
|
||||
|
||||
#define ADC_SAMPCTRL_SAMPLEN_Pos 0 /**< \brief (ADC_SAMPCTRL) Sampling Time Length */
|
||||
#define ADC_SAMPCTRL_SAMPLEN_Msk (0x3Fu << ADC_SAMPCTRL_SAMPLEN_Pos)
|
||||
#define ADC_SAMPCTRL_SAMPLEN(value) ((ADC_SAMPCTRL_SAMPLEN_Msk & ((value) << ADC_SAMPCTRL_SAMPLEN_Pos)))
|
||||
#define ADC_SAMPCTRL_MASK 0x3Fu /**< \brief (ADC_SAMPCTRL) MASK Register */
|
||||
|
||||
/* -------- ADC_CTRLB : (ADC Offset: 0x04) (R/W 16) Control Register B -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t DIFFMODE:1; /*!< bit: 0 Differential Mode */
|
||||
uint16_t LEFTADJ:1; /*!< bit: 1 Left-Adjusted Result */
|
||||
uint16_t FREERUN:1; /*!< bit: 2 Free Running Mode */
|
||||
uint16_t CORREN:1; /*!< bit: 3 Digital Correction Logic Enable */
|
||||
uint16_t RESSEL:2; /*!< bit: 4.. 5 Conversion Result Resolution */
|
||||
uint16_t :2; /*!< bit: 6.. 7 Reserved */
|
||||
uint16_t PRESCALER:3; /*!< bit: 8..10 Prescaler Configuration */
|
||||
uint16_t :5; /*!< bit: 11..15 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} ADC_CTRLB_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define ADC_CTRLB_OFFSET 0x04 /**< \brief (ADC_CTRLB offset) Control Register B */
|
||||
#define ADC_CTRLB_RESETVALUE 0x0000 /**< \brief (ADC_CTRLB reset_value) Control Register B */
|
||||
|
||||
#define ADC_CTRLB_DIFFMODE_Pos 0 /**< \brief (ADC_CTRLB) Differential Mode */
|
||||
#define ADC_CTRLB_DIFFMODE (0x1u << ADC_CTRLB_DIFFMODE_Pos)
|
||||
#define ADC_CTRLB_LEFTADJ_Pos 1 /**< \brief (ADC_CTRLB) Left-Adjusted Result */
|
||||
#define ADC_CTRLB_LEFTADJ (0x1u << ADC_CTRLB_LEFTADJ_Pos)
|
||||
#define ADC_CTRLB_FREERUN_Pos 2 /**< \brief (ADC_CTRLB) Free Running Mode */
|
||||
#define ADC_CTRLB_FREERUN (0x1u << ADC_CTRLB_FREERUN_Pos)
|
||||
#define ADC_CTRLB_CORREN_Pos 3 /**< \brief (ADC_CTRLB) Digital Correction Logic Enable */
|
||||
#define ADC_CTRLB_CORREN (0x1u << ADC_CTRLB_CORREN_Pos)
|
||||
#define ADC_CTRLB_RESSEL_Pos 4 /**< \brief (ADC_CTRLB) Conversion Result Resolution */
|
||||
#define ADC_CTRLB_RESSEL_Msk (0x3u << ADC_CTRLB_RESSEL_Pos)
|
||||
#define ADC_CTRLB_RESSEL(value) ((ADC_CTRLB_RESSEL_Msk & ((value) << ADC_CTRLB_RESSEL_Pos)))
|
||||
#define ADC_CTRLB_RESSEL_12BIT (0x0u << 4) /**< \brief (ADC_CTRLB) */
|
||||
#define ADC_CTRLB_RESSEL_16BIT (0x1u << 4) /**< \brief (ADC_CTRLB) */
|
||||
#define ADC_CTRLB_RESSEL_10BIT (0x2u << 4) /**< \brief (ADC_CTRLB) */
|
||||
#define ADC_CTRLB_RESSEL_8BIT (0x3u << 4) /**< \brief (ADC_CTRLB) */
|
||||
#define ADC_CTRLB_PRESCALER_Pos 8 /**< \brief (ADC_CTRLB) Prescaler Configuration */
|
||||
#define ADC_CTRLB_PRESCALER_Msk (0x7u << ADC_CTRLB_PRESCALER_Pos)
|
||||
#define ADC_CTRLB_PRESCALER(value) ((ADC_CTRLB_PRESCALER_Msk & ((value) << ADC_CTRLB_PRESCALER_Pos)))
|
||||
#define ADC_CTRLB_PRESCALER_DIV4 (0x0u << 8) /**< \brief (ADC_CTRLB) */
|
||||
#define ADC_CTRLB_PRESCALER_DIV8 (0x1u << 8) /**< \brief (ADC_CTRLB) */
|
||||
#define ADC_CTRLB_PRESCALER_DIV16 (0x2u << 8) /**< \brief (ADC_CTRLB) */
|
||||
#define ADC_CTRLB_PRESCALER_DIV32 (0x3u << 8) /**< \brief (ADC_CTRLB) */
|
||||
#define ADC_CTRLB_PRESCALER_DIV64 (0x4u << 8) /**< \brief (ADC_CTRLB) */
|
||||
#define ADC_CTRLB_PRESCALER_DIV128 (0x5u << 8) /**< \brief (ADC_CTRLB) */
|
||||
#define ADC_CTRLB_PRESCALER_DIV256 (0x6u << 8) /**< \brief (ADC_CTRLB) */
|
||||
#define ADC_CTRLB_PRESCALER_DIV512 (0x7u << 8) /**< \brief (ADC_CTRLB) */
|
||||
#define ADC_CTRLB_MASK 0x073Fu /**< \brief (ADC_CTRLB) MASK Register */
|
||||
|
||||
/* -------- ADC_WINCTRL : (ADC Offset: 0x08) (R/W 8) Window Monitor Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t WINMODE:3; /*!< bit: 0.. 2 Window Monitor Mode */
|
||||
uint8_t :5; /*!< bit: 3.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} ADC_WINCTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define ADC_WINCTRL_OFFSET 0x08 /**< \brief (ADC_WINCTRL offset) Window Monitor Control Register */
|
||||
#define ADC_WINCTRL_RESETVALUE 0x00 /**< \brief (ADC_WINCTRL reset_value) Window Monitor Control Register */
|
||||
|
||||
#define ADC_WINCTRL_WINMODE_Pos 0 /**< \brief (ADC_WINCTRL) Window Monitor Mode */
|
||||
#define ADC_WINCTRL_WINMODE_Msk (0x7u << ADC_WINCTRL_WINMODE_Pos)
|
||||
#define ADC_WINCTRL_WINMODE(value) ((ADC_WINCTRL_WINMODE_Msk & ((value) << ADC_WINCTRL_WINMODE_Pos)))
|
||||
#define ADC_WINCTRL_WINMODE_DISABLE (0x0u << 0) /**< \brief (ADC_WINCTRL) */
|
||||
#define ADC_WINCTRL_WINMODE_MODE1 (0x1u << 0) /**< \brief (ADC_WINCTRL) */
|
||||
#define ADC_WINCTRL_WINMODE_MODE2 (0x2u << 0) /**< \brief (ADC_WINCTRL) */
|
||||
#define ADC_WINCTRL_WINMODE_MODE3 (0x3u << 0) /**< \brief (ADC_WINCTRL) */
|
||||
#define ADC_WINCTRL_WINMODE_MODE4 (0x4u << 0) /**< \brief (ADC_WINCTRL) */
|
||||
#define ADC_WINCTRL_MASK 0x07u /**< \brief (ADC_WINCTRL) MASK Register */
|
||||
|
||||
/* -------- ADC_SWTRIG : (ADC Offset: 0x0C) (R/W 8) Control Register B -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t FLUSH:1; /*!< bit: 0 ADC Flush */
|
||||
uint8_t START:1; /*!< bit: 1 Start ADC Conversion */
|
||||
uint8_t :6; /*!< bit: 2.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} ADC_SWTRIG_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define ADC_SWTRIG_OFFSET 0x0C /**< \brief (ADC_SWTRIG offset) Control Register B */
|
||||
#define ADC_SWTRIG_RESETVALUE 0x00 /**< \brief (ADC_SWTRIG reset_value) Control Register B */
|
||||
|
||||
#define ADC_SWTRIG_FLUSH_Pos 0 /**< \brief (ADC_SWTRIG) ADC Flush */
|
||||
#define ADC_SWTRIG_FLUSH (0x1u << ADC_SWTRIG_FLUSH_Pos)
|
||||
#define ADC_SWTRIG_START_Pos 1 /**< \brief (ADC_SWTRIG) Start ADC Conversion */
|
||||
#define ADC_SWTRIG_START (0x1u << ADC_SWTRIG_START_Pos)
|
||||
#define ADC_SWTRIG_MASK 0x03u /**< \brief (ADC_SWTRIG) MASK Register */
|
||||
|
||||
/* -------- ADC_INPUTCTRL : (ADC Offset: 0x10) (R/W 32) Input Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t MUXPOS:5; /*!< bit: 0.. 4 Positive Mux Input Selection */
|
||||
uint32_t :3; /*!< bit: 5.. 7 Reserved */
|
||||
uint32_t MUXNEG:5; /*!< bit: 8..12 Negative Mux Input Selection */
|
||||
uint32_t :3; /*!< bit: 13..15 Reserved */
|
||||
uint32_t INPUTSCAN:4; /*!< bit: 16..19 Number of Input Channels Included in Scan */
|
||||
uint32_t INPUTOFFSET:4; /*!< bit: 20..23 Positive Mux Setting Offset */
|
||||
uint32_t GAIN:4; /*!< bit: 24..27 Gain Value */
|
||||
uint32_t :4; /*!< bit: 28..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} ADC_INPUTCTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define ADC_INPUTCTRL_OFFSET 0x10 /**< \brief (ADC_INPUTCTRL offset) Input Control Register */
|
||||
#define ADC_INPUTCTRL_RESETVALUE 0x00000000 /**< \brief (ADC_INPUTCTRL reset_value) Input Control Register */
|
||||
|
||||
#define ADC_INPUTCTRL_MUXPOS_Pos 0 /**< \brief (ADC_INPUTCTRL) Positive Mux Input Selection */
|
||||
#define ADC_INPUTCTRL_MUXPOS_Msk (0x1Fu << ADC_INPUTCTRL_MUXPOS_Pos)
|
||||
#define ADC_INPUTCTRL_MUXPOS(value) ((ADC_INPUTCTRL_MUXPOS_Msk & ((value) << ADC_INPUTCTRL_MUXPOS_Pos)))
|
||||
#define ADC_INPUTCTRL_MUXPOS_PIN0 (0x0u << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXPOS_PIN1 (0x1u << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXPOS_PIN2 (0x2u << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXPOS_PIN3 (0x3u << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXPOS_PIN4 (0x4u << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXPOS_PIN5 (0x5u << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXPOS_PIN6 (0x6u << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXPOS_PIN7 (0x7u << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXPOS_PIN8 (0x8u << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXPOS_PIN9 (0x9u << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXPOS_PIN10 (0xAu << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXPOS_PIN11 (0xBu << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXPOS_PIN12 (0xCu << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXPOS_PIN13 (0xDu << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXPOS_PIN14 (0xEu << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXPOS_PIN15 (0xFu << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXPOS_PIN16 (0x10u << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXPOS_PIN17 (0x11u << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXPOS_PIN18 (0x12u << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXPOS_PIN19 (0x13u << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXPOS_PIN20 (0x14u << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXPOS_PIN21 (0x15u << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXPOS_PIN22 (0x16u << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXPOS_PIN23 (0x17u << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXPOS_TEMP (0x18u << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXPOS_BANDGAP (0x19u << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXPOS_SCALEDCOREVCC (0x1Au << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXPOS_SCALEDIOVCC (0x1Bu << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXPOS_DAC (0x1Cu << 0) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXNEG_Pos 8 /**< \brief (ADC_INPUTCTRL) Negative Mux Input Selection */
|
||||
#define ADC_INPUTCTRL_MUXNEG_Msk (0x1Fu << ADC_INPUTCTRL_MUXNEG_Pos)
|
||||
#define ADC_INPUTCTRL_MUXNEG(value) ((ADC_INPUTCTRL_MUXNEG_Msk & ((value) << ADC_INPUTCTRL_MUXNEG_Pos)))
|
||||
#define ADC_INPUTCTRL_MUXNEG_PIN0 (0x0u << 8) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXNEG_PIN1 (0x1u << 8) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXNEG_PIN2 (0x2u << 8) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXNEG_PIN3 (0x3u << 8) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXNEG_PIN4 (0x4u << 8) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXNEG_PIN5 (0x5u << 8) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXNEG_PIN6 (0x6u << 8) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXNEG_PIN7 (0x7u << 8) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXNEG_PIN8 (0x8u << 8) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXNEG_PIN9 (0x9u << 8) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXNEG_PIN10 (0xAu << 8) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXNEG_PIN11 (0xBu << 8) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXNEG_PIN12 (0xCu << 8) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXNEG_PIN13 (0xDu << 8) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXNEG_PIN14 (0xEu << 8) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXNEG_PIN15 (0xFu << 8) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXNEG_PIN16 (0x10u << 8) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXNEG_PIN17 (0x11u << 8) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXNEG_PIN18 (0x12u << 8) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXNEG_PIN19 (0x13u << 8) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXNEG_PIN20 (0x14u << 8) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXNEG_PIN21 (0x15u << 8) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXNEG_PIN22 (0x16u << 8) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXNEG_PIN23 (0x17u << 8) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXNEG_GND (0x18u << 8) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MUXNEG_IOGND (0x19u << 8) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_INPUTSCAN_Pos 16 /**< \brief (ADC_INPUTCTRL) Number of Input Channels Included in Scan */
|
||||
#define ADC_INPUTCTRL_INPUTSCAN_Msk (0xFu << ADC_INPUTCTRL_INPUTSCAN_Pos)
|
||||
#define ADC_INPUTCTRL_INPUTSCAN(value) ((ADC_INPUTCTRL_INPUTSCAN_Msk & ((value) << ADC_INPUTCTRL_INPUTSCAN_Pos)))
|
||||
#define ADC_INPUTCTRL_INPUTOFFSET_Pos 20 /**< \brief (ADC_INPUTCTRL) Positive Mux Setting Offset */
|
||||
#define ADC_INPUTCTRL_INPUTOFFSET_Msk (0xFu << ADC_INPUTCTRL_INPUTOFFSET_Pos)
|
||||
#define ADC_INPUTCTRL_INPUTOFFSET(value) ((ADC_INPUTCTRL_INPUTOFFSET_Msk & ((value) << ADC_INPUTCTRL_INPUTOFFSET_Pos)))
|
||||
#define ADC_INPUTCTRL_GAIN_Pos 24 /**< \brief (ADC_INPUTCTRL) Gain Value */
|
||||
#define ADC_INPUTCTRL_GAIN_Msk (0xFu << ADC_INPUTCTRL_GAIN_Pos)
|
||||
#define ADC_INPUTCTRL_GAIN(value) ((ADC_INPUTCTRL_GAIN_Msk & ((value) << ADC_INPUTCTRL_GAIN_Pos)))
|
||||
#define ADC_INPUTCTRL_GAIN_1X (0x0u << 24) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_GAIN_2X (0x1u << 24) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_GAIN_4X (0x2u << 24) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_GAIN_8X (0x3u << 24) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_GAIN_16X (0x4u << 24) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_GAIN_DIV2 (0xFu << 24) /**< \brief (ADC_INPUTCTRL) */
|
||||
#define ADC_INPUTCTRL_MASK 0x0FFF1F1Fu /**< \brief (ADC_INPUTCTRL) MASK Register */
|
||||
|
||||
/* -------- ADC_EVCTRL : (ADC Offset: 0x14) (R/W 8) Event Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t STARTEI:1; /*!< bit: 0 Start Conversion Event In */
|
||||
uint8_t SYNCEI:1; /*!< bit: 1 Sync Event In */
|
||||
uint8_t :2; /*!< bit: 2.. 3 Reserved */
|
||||
uint8_t RESRDYEO:1; /*!< bit: 4 Result Ready Event Out */
|
||||
uint8_t WINMONEO:1; /*!< bit: 5 Window Monitor Event Out */
|
||||
uint8_t :2; /*!< bit: 6.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} ADC_EVCTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define ADC_EVCTRL_OFFSET 0x14 /**< \brief (ADC_EVCTRL offset) Event Control Register */
|
||||
#define ADC_EVCTRL_RESETVALUE 0x00 /**< \brief (ADC_EVCTRL reset_value) Event Control Register */
|
||||
|
||||
#define ADC_EVCTRL_STARTEI_Pos 0 /**< \brief (ADC_EVCTRL) Start Conversion Event In */
|
||||
#define ADC_EVCTRL_STARTEI (0x1u << ADC_EVCTRL_STARTEI_Pos)
|
||||
#define ADC_EVCTRL_SYNCEI_Pos 1 /**< \brief (ADC_EVCTRL) Sync Event In */
|
||||
#define ADC_EVCTRL_SYNCEI (0x1u << ADC_EVCTRL_SYNCEI_Pos)
|
||||
#define ADC_EVCTRL_RESRDYEO_Pos 4 /**< \brief (ADC_EVCTRL) Result Ready Event Out */
|
||||
#define ADC_EVCTRL_RESRDYEO (0x1u << ADC_EVCTRL_RESRDYEO_Pos)
|
||||
#define ADC_EVCTRL_WINMONEO_Pos 5 /**< \brief (ADC_EVCTRL) Window Monitor Event Out */
|
||||
#define ADC_EVCTRL_WINMONEO (0x1u << ADC_EVCTRL_WINMONEO_Pos)
|
||||
#define ADC_EVCTRL_MASK 0x33u /**< \brief (ADC_EVCTRL) MASK Register */
|
||||
|
||||
/* -------- ADC_INTENCLR : (ADC Offset: 0x16) (R/W 8) Interrupt Enable Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t RESRDY:1; /*!< bit: 0 Result Ready Interrupt Disable */
|
||||
uint8_t OVERRUN:1; /*!< bit: 1 Overrun Interrupt Disable */
|
||||
uint8_t WINMON:1; /*!< bit: 2 Window Monitor Interrupt Disable */
|
||||
uint8_t SYNCRDY:1; /*!< bit: 3 Synchronisation Ready Interrupt Disable */
|
||||
uint8_t :4; /*!< bit: 4.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} ADC_INTENCLR_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define ADC_INTENCLR_OFFSET 0x16 /**< \brief (ADC_INTENCLR offset) Interrupt Enable Clear Register */
|
||||
#define ADC_INTENCLR_RESETVALUE 0x00 /**< \brief (ADC_INTENCLR reset_value) Interrupt Enable Clear Register */
|
||||
|
||||
#define ADC_INTENCLR_RESRDY_Pos 0 /**< \brief (ADC_INTENCLR) Result Ready Interrupt Disable */
|
||||
#define ADC_INTENCLR_RESRDY (0x1u << ADC_INTENCLR_RESRDY_Pos)
|
||||
#define ADC_INTENCLR_OVERRUN_Pos 1 /**< \brief (ADC_INTENCLR) Overrun Interrupt Disable */
|
||||
#define ADC_INTENCLR_OVERRUN (0x1u << ADC_INTENCLR_OVERRUN_Pos)
|
||||
#define ADC_INTENCLR_WINMON_Pos 2 /**< \brief (ADC_INTENCLR) Window Monitor Interrupt Disable */
|
||||
#define ADC_INTENCLR_WINMON (0x1u << ADC_INTENCLR_WINMON_Pos)
|
||||
#define ADC_INTENCLR_SYNCRDY_Pos 3 /**< \brief (ADC_INTENCLR) Synchronisation Ready Interrupt Disable */
|
||||
#define ADC_INTENCLR_SYNCRDY (0x1u << ADC_INTENCLR_SYNCRDY_Pos)
|
||||
#define ADC_INTENCLR_MASK 0x0Fu /**< \brief (ADC_INTENCLR) MASK Register */
|
||||
|
||||
/* -------- ADC_INTENSET : (ADC Offset: 0x17) (R/W 8) Interrupt Enable Set Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t RESRDY:1; /*!< bit: 0 Result Ready Interrupt Enable */
|
||||
uint8_t OVERRUN:1; /*!< bit: 1 Overrun Interrupt Enable */
|
||||
uint8_t WINMON:1; /*!< bit: 2 Window Monitor Interrupt Enable */
|
||||
uint8_t SYNCRDY:1; /*!< bit: 3 Synchronisation Ready Interrupt Enable */
|
||||
uint8_t :4; /*!< bit: 4.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} ADC_INTENSET_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define ADC_INTENSET_OFFSET 0x17 /**< \brief (ADC_INTENSET offset) Interrupt Enable Set Register */
|
||||
#define ADC_INTENSET_RESETVALUE 0x00 /**< \brief (ADC_INTENSET reset_value) Interrupt Enable Set Register */
|
||||
|
||||
#define ADC_INTENSET_RESRDY_Pos 0 /**< \brief (ADC_INTENSET) Result Ready Interrupt Enable */
|
||||
#define ADC_INTENSET_RESRDY (0x1u << ADC_INTENSET_RESRDY_Pos)
|
||||
#define ADC_INTENSET_OVERRUN_Pos 1 /**< \brief (ADC_INTENSET) Overrun Interrupt Enable */
|
||||
#define ADC_INTENSET_OVERRUN (0x1u << ADC_INTENSET_OVERRUN_Pos)
|
||||
#define ADC_INTENSET_WINMON_Pos 2 /**< \brief (ADC_INTENSET) Window Monitor Interrupt Enable */
|
||||
#define ADC_INTENSET_WINMON (0x1u << ADC_INTENSET_WINMON_Pos)
|
||||
#define ADC_INTENSET_SYNCRDY_Pos 3 /**< \brief (ADC_INTENSET) Synchronisation Ready Interrupt Enable */
|
||||
#define ADC_INTENSET_SYNCRDY (0x1u << ADC_INTENSET_SYNCRDY_Pos)
|
||||
#define ADC_INTENSET_MASK 0x0Fu /**< \brief (ADC_INTENSET) MASK Register */
|
||||
|
||||
/* -------- ADC_INTFLAG : (ADC Offset: 0x18) (R/W 8) Interrupt Flag Status and Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t RESRDY:1; /*!< bit: 0 Result Ready Interrupt Flag */
|
||||
uint8_t OVERRUN:1; /*!< bit: 1 Overrun Interrupt Flag */
|
||||
uint8_t WINMON:1; /*!< bit: 2 Window Monitor Interrupt Flag */
|
||||
uint8_t SYNCRDY:1; /*!< bit: 3 Synchronisation Ready Interrupt Flag */
|
||||
uint8_t :4; /*!< bit: 4.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} ADC_INTFLAG_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define ADC_INTFLAG_OFFSET 0x18 /**< \brief (ADC_INTFLAG offset) Interrupt Flag Status and Clear Register */
|
||||
#define ADC_INTFLAG_RESETVALUE 0x00 /**< \brief (ADC_INTFLAG reset_value) Interrupt Flag Status and Clear Register */
|
||||
|
||||
#define ADC_INTFLAG_RESRDY_Pos 0 /**< \brief (ADC_INTFLAG) Result Ready Interrupt Flag */
|
||||
#define ADC_INTFLAG_RESRDY (0x1u << ADC_INTFLAG_RESRDY_Pos)
|
||||
#define ADC_INTFLAG_OVERRUN_Pos 1 /**< \brief (ADC_INTFLAG) Overrun Interrupt Flag */
|
||||
#define ADC_INTFLAG_OVERRUN (0x1u << ADC_INTFLAG_OVERRUN_Pos)
|
||||
#define ADC_INTFLAG_WINMON_Pos 2 /**< \brief (ADC_INTFLAG) Window Monitor Interrupt Flag */
|
||||
#define ADC_INTFLAG_WINMON (0x1u << ADC_INTFLAG_WINMON_Pos)
|
||||
#define ADC_INTFLAG_SYNCRDY_Pos 3 /**< \brief (ADC_INTFLAG) Synchronisation Ready Interrupt Flag */
|
||||
#define ADC_INTFLAG_SYNCRDY (0x1u << ADC_INTFLAG_SYNCRDY_Pos)
|
||||
#define ADC_INTFLAG_MASK 0x0Fu /**< \brief (ADC_INTFLAG) MASK Register */
|
||||
|
||||
/* -------- ADC_STATUS : (ADC Offset: 0x19) (R/ 8) Status Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t :7; /*!< bit: 0.. 6 Reserved */
|
||||
uint8_t SYNCBUSY:1; /*!< bit: 7 Synchronisation Busy Status */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} ADC_STATUS_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define ADC_STATUS_OFFSET 0x19 /**< \brief (ADC_STATUS offset) Status Register */
|
||||
#define ADC_STATUS_RESETVALUE 0x00 /**< \brief (ADC_STATUS reset_value) Status Register */
|
||||
|
||||
#define ADC_STATUS_SYNCBUSY_Pos 7 /**< \brief (ADC_STATUS) Synchronisation Busy Status */
|
||||
#define ADC_STATUS_SYNCBUSY (0x1u << ADC_STATUS_SYNCBUSY_Pos)
|
||||
#define ADC_STATUS_MASK 0x80u /**< \brief (ADC_STATUS) MASK Register */
|
||||
|
||||
/* -------- ADC_RESULT : (ADC Offset: 0x1A) (R/ 16) Result Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t RESULT:16; /*!< bit: 0..15 Result Value */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} ADC_RESULT_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define ADC_RESULT_OFFSET 0x1A /**< \brief (ADC_RESULT offset) Result Register */
|
||||
#define ADC_RESULT_RESETVALUE 0x0000 /**< \brief (ADC_RESULT reset_value) Result Register */
|
||||
|
||||
#define ADC_RESULT_RESULT_Pos 0 /**< \brief (ADC_RESULT) Result Value */
|
||||
#define ADC_RESULT_RESULT_Msk (0xFFFFu << ADC_RESULT_RESULT_Pos)
|
||||
#define ADC_RESULT_RESULT(value) ((ADC_RESULT_RESULT_Msk & ((value) << ADC_RESULT_RESULT_Pos)))
|
||||
#define ADC_RESULT_MASK 0xFFFFu /**< \brief (ADC_RESULT) MASK Register */
|
||||
|
||||
/* -------- ADC_WINLT : (ADC Offset: 0x1C) (R/W 16) Window Monitor Lower Threshold Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t WINLT:16; /*!< bit: 0..15 Window Lower Threshold */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} ADC_WINLT_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define ADC_WINLT_OFFSET 0x1C /**< \brief (ADC_WINLT offset) Window Monitor Lower Threshold Register */
|
||||
#define ADC_WINLT_RESETVALUE 0x0000 /**< \brief (ADC_WINLT reset_value) Window Monitor Lower Threshold Register */
|
||||
|
||||
#define ADC_WINLT_WINLT_Pos 0 /**< \brief (ADC_WINLT) Window Lower Threshold */
|
||||
#define ADC_WINLT_WINLT_Msk (0xFFFFu << ADC_WINLT_WINLT_Pos)
|
||||
#define ADC_WINLT_WINLT(value) ((ADC_WINLT_WINLT_Msk & ((value) << ADC_WINLT_WINLT_Pos)))
|
||||
#define ADC_WINLT_MASK 0xFFFFu /**< \brief (ADC_WINLT) MASK Register */
|
||||
|
||||
/* -------- ADC_WINUT : (ADC Offset: 0x20) (R/W 16) Window Monitor Upper Threshold Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t WINUT:16; /*!< bit: 0..15 Window Upper Threshold */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} ADC_WINUT_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define ADC_WINUT_OFFSET 0x20 /**< \brief (ADC_WINUT offset) Window Monitor Upper Threshold Register */
|
||||
#define ADC_WINUT_RESETVALUE 0x0000 /**< \brief (ADC_WINUT reset_value) Window Monitor Upper Threshold Register */
|
||||
|
||||
#define ADC_WINUT_WINUT_Pos 0 /**< \brief (ADC_WINUT) Window Upper Threshold */
|
||||
#define ADC_WINUT_WINUT_Msk (0xFFFFu << ADC_WINUT_WINUT_Pos)
|
||||
#define ADC_WINUT_WINUT(value) ((ADC_WINUT_WINUT_Msk & ((value) << ADC_WINUT_WINUT_Pos)))
|
||||
#define ADC_WINUT_MASK 0xFFFFu /**< \brief (ADC_WINUT) MASK Register */
|
||||
|
||||
/* -------- ADC_GAINCORR : (ADC Offset: 0x24) (R/W 16) Gain Correction Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t GAINCORR:12; /*!< bit: 0..11 Gain Correction Value */
|
||||
uint16_t :4; /*!< bit: 12..15 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} ADC_GAINCORR_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define ADC_GAINCORR_OFFSET 0x24 /**< \brief (ADC_GAINCORR offset) Gain Correction Register */
|
||||
#define ADC_GAINCORR_RESETVALUE 0x0000 /**< \brief (ADC_GAINCORR reset_value) Gain Correction Register */
|
||||
|
||||
#define ADC_GAINCORR_GAINCORR_Pos 0 /**< \brief (ADC_GAINCORR) Gain Correction Value */
|
||||
#define ADC_GAINCORR_GAINCORR_Msk (0xFFFu << ADC_GAINCORR_GAINCORR_Pos)
|
||||
#define ADC_GAINCORR_GAINCORR(value) ((ADC_GAINCORR_GAINCORR_Msk & ((value) << ADC_GAINCORR_GAINCORR_Pos)))
|
||||
#define ADC_GAINCORR_MASK 0x0FFFu /**< \brief (ADC_GAINCORR) MASK Register */
|
||||
|
||||
/* -------- ADC_OFFSETCORR : (ADC Offset: 0x26) (R/W 16) Offset Correction Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t OFFSETCORR:12; /*!< bit: 0..11 Offset Correction Value */
|
||||
uint16_t :4; /*!< bit: 12..15 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} ADC_OFFSETCORR_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define ADC_OFFSETCORR_OFFSET 0x26 /**< \brief (ADC_OFFSETCORR offset) Offset Correction Register */
|
||||
#define ADC_OFFSETCORR_RESETVALUE 0x0000 /**< \brief (ADC_OFFSETCORR reset_value) Offset Correction Register */
|
||||
|
||||
#define ADC_OFFSETCORR_OFFSETCORR_Pos 0 /**< \brief (ADC_OFFSETCORR) Offset Correction Value */
|
||||
#define ADC_OFFSETCORR_OFFSETCORR_Msk (0xFFFu << ADC_OFFSETCORR_OFFSETCORR_Pos)
|
||||
#define ADC_OFFSETCORR_OFFSETCORR(value) ((ADC_OFFSETCORR_OFFSETCORR_Msk & ((value) << ADC_OFFSETCORR_OFFSETCORR_Pos)))
|
||||
#define ADC_OFFSETCORR_MASK 0x0FFFu /**< \brief (ADC_OFFSETCORR) MASK Register */
|
||||
|
||||
/* -------- ADC_CALIB : (ADC Offset: 0x28) (R/W 16) Calibration Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t LINEARITY_CAL:8; /*!< bit: 0.. 7 Linearity Calibration */
|
||||
uint16_t BIAS_CAL:3; /*!< bit: 8..10 Bias Configuration */
|
||||
uint16_t :5; /*!< bit: 11..15 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} ADC_CALIB_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define ADC_CALIB_OFFSET 0x28 /**< \brief (ADC_CALIB offset) Calibration Register */
|
||||
#define ADC_CALIB_RESETVALUE 0x0000 /**< \brief (ADC_CALIB reset_value) Calibration Register */
|
||||
|
||||
#define ADC_CALIB_LINEARITY_CAL_Pos 0 /**< \brief (ADC_CALIB) Linearity Calibration */
|
||||
#define ADC_CALIB_LINEARITY_CAL_Msk (0xFFu << ADC_CALIB_LINEARITY_CAL_Pos)
|
||||
#define ADC_CALIB_LINEARITY_CAL(value) ((ADC_CALIB_LINEARITY_CAL_Msk & ((value) << ADC_CALIB_LINEARITY_CAL_Pos)))
|
||||
#define ADC_CALIB_BIAS_CAL_Pos 8 /**< \brief (ADC_CALIB) Bias Configuration */
|
||||
#define ADC_CALIB_BIAS_CAL_Msk (0x7u << ADC_CALIB_BIAS_CAL_Pos)
|
||||
#define ADC_CALIB_BIAS_CAL(value) ((ADC_CALIB_BIAS_CAL_Msk & ((value) << ADC_CALIB_BIAS_CAL_Pos)))
|
||||
#define ADC_CALIB_MASK 0x07FFu /**< \brief (ADC_CALIB) MASK Register */
|
||||
|
||||
/* -------- ADC_DBGCTRL : (ADC Offset: 0x2A) (R/W 8) Debug Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t DBGRUN:1; /*!< bit: 0 Debug Run */
|
||||
uint8_t :7; /*!< bit: 1.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} ADC_DBGCTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define ADC_DBGCTRL_OFFSET 0x2A /**< \brief (ADC_DBGCTRL offset) Debug Register */
|
||||
#define ADC_DBGCTRL_RESETVALUE 0x00 /**< \brief (ADC_DBGCTRL reset_value) Debug Register */
|
||||
|
||||
#define ADC_DBGCTRL_DBGRUN_Pos 0 /**< \brief (ADC_DBGCTRL) Debug Run */
|
||||
#define ADC_DBGCTRL_DBGRUN (0x1u << ADC_DBGCTRL_DBGRUN_Pos)
|
||||
#define ADC_DBGCTRL_MASK 0x01u /**< \brief (ADC_DBGCTRL) MASK Register */
|
||||
|
||||
/* -------- ADC_TEST : (ADC Offset: 0x2B) (R/W 8) Test Modes Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t TEST_EN:1; /*!< bit: 0 Enable Test Mode */
|
||||
uint8_t REFPAD_EN:1; /*!< bit: 1 Connect Vrefp/n to aio33testp/n */
|
||||
uint8_t REFINT_DIS:1; /*!< bit: 2 Disable Internal Reference */
|
||||
uint8_t :5; /*!< bit: 3.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} ADC_TEST_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define ADC_TEST_OFFSET 0x2B /**< \brief (ADC_TEST offset) Test Modes Register */
|
||||
#define ADC_TEST_RESETVALUE 0x00 /**< \brief (ADC_TEST reset_value) Test Modes Register */
|
||||
|
||||
#define ADC_TEST_TEST_EN_Pos 0 /**< \brief (ADC_TEST) Enable Test Mode */
|
||||
#define ADC_TEST_TEST_EN (0x1u << ADC_TEST_TEST_EN_Pos)
|
||||
#define ADC_TEST_REFPAD_EN_Pos 1 /**< \brief (ADC_TEST) Connect Vrefp/n to aio33testp/n */
|
||||
#define ADC_TEST_REFPAD_EN (0x1u << ADC_TEST_REFPAD_EN_Pos)
|
||||
#define ADC_TEST_REFINT_DIS_Pos 2 /**< \brief (ADC_TEST) Disable Internal Reference */
|
||||
#define ADC_TEST_REFINT_DIS (0x1u << ADC_TEST_REFINT_DIS_Pos)
|
||||
#define ADC_TEST_MASK 0x07u /**< \brief (ADC_TEST) MASK Register */
|
||||
|
||||
/* -------- ADC_TESTRESULT : (ADC Offset: 0x2C) (R/W 32) Test Result Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t TESTRESULT:24; /*!< bit: 0..23 Result Directly from ADC Hard Block */
|
||||
uint32_t :8; /*!< bit: 24..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} ADC_TESTRESULT_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define ADC_TESTRESULT_OFFSET 0x2C /**< \brief (ADC_TESTRESULT offset) Test Result Register */
|
||||
#define ADC_TESTRESULT_RESETVALUE 0x00000000 /**< \brief (ADC_TESTRESULT reset_value) Test Result Register */
|
||||
|
||||
#define ADC_TESTRESULT_TESTRESULT_Pos 0 /**< \brief (ADC_TESTRESULT) Result Directly from ADC Hard Block */
|
||||
#define ADC_TESTRESULT_TESTRESULT_Msk (0xFFFFFFu << ADC_TESTRESULT_TESTRESULT_Pos)
|
||||
#define ADC_TESTRESULT_TESTRESULT(value) ((ADC_TESTRESULT_TESTRESULT_Msk & ((value) << ADC_TESTRESULT_TESTRESULT_Pos)))
|
||||
#define ADC_TESTRESULT_MASK 0x00FFFFFFu /**< \brief (ADC_TESTRESULT) MASK Register */
|
||||
|
||||
/* -------- ADC_DCFG : (ADC Offset: 0x30) (R/W 8) Device Configuration -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t CMPDELAY:1; /*!< bit: 0 Comparator Delay Control */
|
||||
uint8_t BOOSTEN:1; /*!< bit: 1 Enable the SR Booster in the Op Amp */
|
||||
uint8_t VCMPULSE:1; /*!< bit: 2 Enable VCM Pulse */
|
||||
uint8_t BIAS_OPA:1; /*!< bit: 3 Select PTAT Biasing for OPA */
|
||||
uint8_t :4; /*!< bit: 4.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} ADC_DCFG_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define ADC_DCFG_OFFSET 0x30 /**< \brief (ADC_DCFG offset) Device Configuration */
|
||||
#define ADC_DCFG_RESETVALUE 0x00 /**< \brief (ADC_DCFG reset_value) Device Configuration */
|
||||
|
||||
#define ADC_DCFG_CMPDELAY_Pos 0 /**< \brief (ADC_DCFG) Comparator Delay Control */
|
||||
#define ADC_DCFG_CMPDELAY (0x1u << ADC_DCFG_CMPDELAY_Pos)
|
||||
#define ADC_DCFG_BOOSTEN_Pos 1 /**< \brief (ADC_DCFG) Enable the SR Booster in the Op Amp */
|
||||
#define ADC_DCFG_BOOSTEN (0x1u << ADC_DCFG_BOOSTEN_Pos)
|
||||
#define ADC_DCFG_VCMPULSE_Pos 2 /**< \brief (ADC_DCFG) Enable VCM Pulse */
|
||||
#define ADC_DCFG_VCMPULSE (0x1u << ADC_DCFG_VCMPULSE_Pos)
|
||||
#define ADC_DCFG_BIAS_OPA_Pos 3 /**< \brief (ADC_DCFG) Select PTAT Biasing for OPA */
|
||||
#define ADC_DCFG_BIAS_OPA (0x1u << ADC_DCFG_BIAS_OPA_Pos)
|
||||
#define ADC_DCFG_MASK 0x0Fu /**< \brief (ADC_DCFG) MASK Register */
|
||||
|
||||
/** \brief ADC hardware registers */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef struct {
|
||||
__IO ADC_CTRLA_Type CTRLA; /**< \brief Offset: 0x00 (R/W 8) Control Register A */
|
||||
__IO ADC_REFCTRL_Type REFCTRL; /**< \brief Offset: 0x01 (R/W 8) Reference Control Register */
|
||||
__IO ADC_AVGCTRL_Type AVGCTRL; /**< \brief Offset: 0x02 (R/W 8) Average Control Register */
|
||||
__IO ADC_SAMPCTRL_Type SAMPCTRL; /**< \brief Offset: 0x03 (R/W 8) Sample Time Control Register */
|
||||
__IO ADC_CTRLB_Type CTRLB; /**< \brief Offset: 0x04 (R/W 16) Control Register B */
|
||||
RoReg8 Reserved1[0x2];
|
||||
__IO ADC_WINCTRL_Type WINCTRL; /**< \brief Offset: 0x08 (R/W 8) Window Monitor Control Register */
|
||||
RoReg8 Reserved2[0x3];
|
||||
__IO ADC_SWTRIG_Type SWTRIG; /**< \brief Offset: 0x0C (R/W 8) Control Register B */
|
||||
RoReg8 Reserved3[0x3];
|
||||
__IO ADC_INPUTCTRL_Type INPUTCTRL; /**< \brief Offset: 0x10 (R/W 32) Input Control Register */
|
||||
__IO ADC_EVCTRL_Type EVCTRL; /**< \brief Offset: 0x14 (R/W 8) Event Control Register */
|
||||
RoReg8 Reserved4[0x1];
|
||||
__IO ADC_INTENCLR_Type INTENCLR; /**< \brief Offset: 0x16 (R/W 8) Interrupt Enable Clear Register */
|
||||
__IO ADC_INTENSET_Type INTENSET; /**< \brief Offset: 0x17 (R/W 8) Interrupt Enable Set Register */
|
||||
__IO ADC_INTFLAG_Type INTFLAG; /**< \brief Offset: 0x18 (R/W 8) Interrupt Flag Status and Clear Register */
|
||||
__I ADC_STATUS_Type STATUS; /**< \brief Offset: 0x19 (R/ 8) Status Register */
|
||||
__I ADC_RESULT_Type RESULT; /**< \brief Offset: 0x1A (R/ 16) Result Register */
|
||||
__IO ADC_WINLT_Type WINLT; /**< \brief Offset: 0x1C (R/W 16) Window Monitor Lower Threshold Register */
|
||||
RoReg8 Reserved5[0x2];
|
||||
__IO ADC_WINUT_Type WINUT; /**< \brief Offset: 0x20 (R/W 16) Window Monitor Upper Threshold Register */
|
||||
RoReg8 Reserved6[0x2];
|
||||
__IO ADC_GAINCORR_Type GAINCORR; /**< \brief Offset: 0x24 (R/W 16) Gain Correction Register */
|
||||
__IO ADC_OFFSETCORR_Type OFFSETCORR; /**< \brief Offset: 0x26 (R/W 16) Offset Correction Register */
|
||||
__IO ADC_CALIB_Type CALIB; /**< \brief Offset: 0x28 (R/W 16) Calibration Register */
|
||||
__IO ADC_DBGCTRL_Type DBGCTRL; /**< \brief Offset: 0x2A (R/W 8) Debug Register */
|
||||
__IO ADC_TEST_Type TEST; /**< \brief Offset: 0x2B (R/W 8) Test Modes Register */
|
||||
__IO ADC_TESTRESULT_Type TESTRESULT; /**< \brief Offset: 0x2C (R/W 32) Test Result Register */
|
||||
__IO ADC_DCFG_Type DCFG; /**< \brief Offset: 0x30 (R/W 8) Device Configuration */
|
||||
} Adc;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/*@}*/
|
||||
|
||||
#endif /* _SAMD20_ADC_COMPONENT_ */
|
|
@ -0,0 +1,318 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Component description for DAC
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_DAC_COMPONENT_
|
||||
#define _SAMD20_DAC_COMPONENT_
|
||||
|
||||
/* ========================================================================== */
|
||||
/** SOFTWARE API DEFINITION FOR DAC */
|
||||
/* ========================================================================== */
|
||||
/** \addtogroup SAMD20_DAC Digital Analog Converter */
|
||||
/*@{*/
|
||||
|
||||
#define REV_DAC 0x101
|
||||
|
||||
/* -------- DAC_CTRLA : (DAC Offset: 0x0) (R/W 8) Control Register A -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t SWRST:1; /*!< bit: 0 Software Reset */
|
||||
uint8_t ENABLE:1; /*!< bit: 1 Enable */
|
||||
uint8_t RUNSTDBY:1; /*!< bit: 2 Run during Standby */
|
||||
uint8_t :5; /*!< bit: 3.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} DAC_CTRLA_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DAC_CTRLA_OFFSET 0x0 /**< \brief (DAC_CTRLA offset) Control Register A */
|
||||
#define DAC_CTRLA_RESETVALUE 0x00 /**< \brief (DAC_CTRLA reset_value) Control Register A */
|
||||
|
||||
#define DAC_CTRLA_SWRST_Pos 0 /**< \brief (DAC_CTRLA) Software Reset */
|
||||
#define DAC_CTRLA_SWRST (0x1u << DAC_CTRLA_SWRST_Pos)
|
||||
#define DAC_CTRLA_ENABLE_Pos 1 /**< \brief (DAC_CTRLA) Enable */
|
||||
#define DAC_CTRLA_ENABLE (0x1u << DAC_CTRLA_ENABLE_Pos)
|
||||
#define DAC_CTRLA_RUNSTDBY_Pos 2 /**< \brief (DAC_CTRLA) Run during Standby */
|
||||
#define DAC_CTRLA_RUNSTDBY (0x1u << DAC_CTRLA_RUNSTDBY_Pos)
|
||||
#define DAC_CTRLA_MASK 0x07u /**< \brief (DAC_CTRLA) MASK Register */
|
||||
|
||||
/* -------- DAC_CTRLB : (DAC Offset: 0x1) (R/W 8) Control Register B -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t EOEN:1; /*!< bit: 0 Output Buffer Enable */
|
||||
uint8_t IOEN:1; /*!< bit: 1 Internal DAC Output Channel Enabled for AC */
|
||||
uint8_t LEFTADJ:1; /*!< bit: 2 Left-Adjusted Value */
|
||||
uint8_t VPD:1; /*!< bit: 3 Voltage Pump Disable */
|
||||
uint8_t :2; /*!< bit: 4.. 5 Reserved */
|
||||
uint8_t REFSEL:2; /*!< bit: 6.. 7 Voltage Reference Select for DAC */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} DAC_CTRLB_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DAC_CTRLB_OFFSET 0x1 /**< \brief (DAC_CTRLB offset) Control Register B */
|
||||
#define DAC_CTRLB_RESETVALUE 0x00 /**< \brief (DAC_CTRLB reset_value) Control Register B */
|
||||
|
||||
#define DAC_CTRLB_EOEN_Pos 0 /**< \brief (DAC_CTRLB) Output Buffer Enable */
|
||||
#define DAC_CTRLB_EOEN (0x1u << DAC_CTRLB_EOEN_Pos)
|
||||
#define DAC_CTRLB_IOEN_Pos 1 /**< \brief (DAC_CTRLB) Internal DAC Output Channel Enabled for AC */
|
||||
#define DAC_CTRLB_IOEN (0x1u << DAC_CTRLB_IOEN_Pos)
|
||||
#define DAC_CTRLB_LEFTADJ_Pos 2 /**< \brief (DAC_CTRLB) Left-Adjusted Value */
|
||||
#define DAC_CTRLB_LEFTADJ (0x1u << DAC_CTRLB_LEFTADJ_Pos)
|
||||
#define DAC_CTRLB_VPD_Pos 3 /**< \brief (DAC_CTRLB) Voltage Pump Disable */
|
||||
#define DAC_CTRLB_VPD (0x1u << DAC_CTRLB_VPD_Pos)
|
||||
#define DAC_CTRLB_REFSEL_Pos 6 /**< \brief (DAC_CTRLB) Voltage Reference Select for DAC */
|
||||
#define DAC_CTRLB_REFSEL_Msk (0x3u << DAC_CTRLB_REFSEL_Pos)
|
||||
#define DAC_CTRLB_REFSEL(value) ((DAC_CTRLB_REFSEL_Msk & ((value) << DAC_CTRLB_REFSEL_Pos)))
|
||||
#define DAC_CTRLB_MASK 0xCFu /**< \brief (DAC_CTRLB) MASK Register */
|
||||
|
||||
/* -------- DAC_EVCTRL : (DAC Offset: 0x2) (R/W 8) Event Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t STARTEI:1; /*!< bit: 0 Start Conversion Event Input */
|
||||
uint8_t EMPTYEO:1; /*!< bit: 1 Data Buffer Empty Event Output */
|
||||
uint8_t :6; /*!< bit: 2.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} DAC_EVCTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DAC_EVCTRL_OFFSET 0x2 /**< \brief (DAC_EVCTRL offset) Event Control Register */
|
||||
#define DAC_EVCTRL_RESETVALUE 0x00 /**< \brief (DAC_EVCTRL reset_value) Event Control Register */
|
||||
|
||||
#define DAC_EVCTRL_STARTEI_Pos 0 /**< \brief (DAC_EVCTRL) Start Conversion Event Input */
|
||||
#define DAC_EVCTRL_STARTEI (0x1u << DAC_EVCTRL_STARTEI_Pos)
|
||||
#define DAC_EVCTRL_EMPTYEO_Pos 1 /**< \brief (DAC_EVCTRL) Data Buffer Empty Event Output */
|
||||
#define DAC_EVCTRL_EMPTYEO (0x1u << DAC_EVCTRL_EMPTYEO_Pos)
|
||||
#define DAC_EVCTRL_MASK 0x03u /**< \brief (DAC_EVCTRL) MASK Register */
|
||||
|
||||
/* -------- DAC_TEST : (DAC Offset: 0x3) (R/W 8) Test Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t TESTEN:1; /*!< bit: 0 Test Enable */
|
||||
uint8_t :7; /*!< bit: 1.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} DAC_TEST_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DAC_TEST_OFFSET 0x3 /**< \brief (DAC_TEST offset) Test Register */
|
||||
#define DAC_TEST_RESETVALUE 0x00 /**< \brief (DAC_TEST reset_value) Test Register */
|
||||
|
||||
#define DAC_TEST_TESTEN_Pos 0 /**< \brief (DAC_TEST) Test Enable */
|
||||
#define DAC_TEST_TESTEN (0x1u << DAC_TEST_TESTEN_Pos)
|
||||
#define DAC_TEST_MASK 0x01u /**< \brief (DAC_TEST) MASK Register */
|
||||
|
||||
/* -------- DAC_INTENCLR : (DAC Offset: 0x4) (R/W 8) Interrupt Enable Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t UNDERRUN:1; /*!< bit: 0 Underrun Interrupt Disable */
|
||||
uint8_t EMPTY:1; /*!< bit: 1 Empty Interrupt Disable */
|
||||
uint8_t SYNCRDY:1; /*!< bit: 2 Synchronization Ready Interrupt Disable */
|
||||
uint8_t :5; /*!< bit: 3.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} DAC_INTENCLR_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DAC_INTENCLR_OFFSET 0x4 /**< \brief (DAC_INTENCLR offset) Interrupt Enable Clear Register */
|
||||
#define DAC_INTENCLR_RESETVALUE 0x00 /**< \brief (DAC_INTENCLR reset_value) Interrupt Enable Clear Register */
|
||||
|
||||
#define DAC_INTENCLR_UNDERRUN_Pos 0 /**< \brief (DAC_INTENCLR) Underrun Interrupt Disable */
|
||||
#define DAC_INTENCLR_UNDERRUN (0x1u << DAC_INTENCLR_UNDERRUN_Pos)
|
||||
#define DAC_INTENCLR_EMPTY_Pos 1 /**< \brief (DAC_INTENCLR) Empty Interrupt Disable */
|
||||
#define DAC_INTENCLR_EMPTY (0x1u << DAC_INTENCLR_EMPTY_Pos)
|
||||
#define DAC_INTENCLR_SYNCRDY_Pos 2 /**< \brief (DAC_INTENCLR) Synchronization Ready Interrupt Disable */
|
||||
#define DAC_INTENCLR_SYNCRDY (0x1u << DAC_INTENCLR_SYNCRDY_Pos)
|
||||
#define DAC_INTENCLR_MASK 0x07u /**< \brief (DAC_INTENCLR) MASK Register */
|
||||
|
||||
/* -------- DAC_INTENSET : (DAC Offset: 0x5) (R/W 8) Interrupt Enable Set Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t UNDERRUN:1; /*!< bit: 0 Underrun Interrupt Enable */
|
||||
uint8_t EMPTY:1; /*!< bit: 1 Empty Interrupt Enable */
|
||||
uint8_t SYNCRDY:1; /*!< bit: 2 Synchronization Ready Interrupt Enable */
|
||||
uint8_t :5; /*!< bit: 3.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} DAC_INTENSET_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DAC_INTENSET_OFFSET 0x5 /**< \brief (DAC_INTENSET offset) Interrupt Enable Set Register */
|
||||
#define DAC_INTENSET_RESETVALUE 0x00 /**< \brief (DAC_INTENSET reset_value) Interrupt Enable Set Register */
|
||||
|
||||
#define DAC_INTENSET_UNDERRUN_Pos 0 /**< \brief (DAC_INTENSET) Underrun Interrupt Enable */
|
||||
#define DAC_INTENSET_UNDERRUN (0x1u << DAC_INTENSET_UNDERRUN_Pos)
|
||||
#define DAC_INTENSET_EMPTY_Pos 1 /**< \brief (DAC_INTENSET) Empty Interrupt Enable */
|
||||
#define DAC_INTENSET_EMPTY (0x1u << DAC_INTENSET_EMPTY_Pos)
|
||||
#define DAC_INTENSET_SYNCRDY_Pos 2 /**< \brief (DAC_INTENSET) Synchronization Ready Interrupt Enable */
|
||||
#define DAC_INTENSET_SYNCRDY (0x1u << DAC_INTENSET_SYNCRDY_Pos)
|
||||
#define DAC_INTENSET_MASK 0x07u /**< \brief (DAC_INTENSET) MASK Register */
|
||||
|
||||
/* -------- DAC_INTFLAG : (DAC Offset: 0x6) (R/W 8) Interrupt Flag Status and Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t UNDERRUN:1; /*!< bit: 0 Underrun Interrupt Flag */
|
||||
uint8_t EMPTY:1; /*!< bit: 1 Empty Interrupt Flag */
|
||||
uint8_t SYNCRDY:1; /*!< bit: 2 Synchronization Ready Interrupt Flag */
|
||||
uint8_t :5; /*!< bit: 3.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} DAC_INTFLAG_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DAC_INTFLAG_OFFSET 0x6 /**< \brief (DAC_INTFLAG offset) Interrupt Flag Status and Clear Register */
|
||||
#define DAC_INTFLAG_RESETVALUE 0x00 /**< \brief (DAC_INTFLAG reset_value) Interrupt Flag Status and Clear Register */
|
||||
|
||||
#define DAC_INTFLAG_UNDERRUN_Pos 0 /**< \brief (DAC_INTFLAG) Underrun Interrupt Flag */
|
||||
#define DAC_INTFLAG_UNDERRUN (0x1u << DAC_INTFLAG_UNDERRUN_Pos)
|
||||
#define DAC_INTFLAG_EMPTY_Pos 1 /**< \brief (DAC_INTFLAG) Empty Interrupt Flag */
|
||||
#define DAC_INTFLAG_EMPTY (0x1u << DAC_INTFLAG_EMPTY_Pos)
|
||||
#define DAC_INTFLAG_SYNCRDY_Pos 2 /**< \brief (DAC_INTFLAG) Synchronization Ready Interrupt Flag */
|
||||
#define DAC_INTFLAG_SYNCRDY (0x1u << DAC_INTFLAG_SYNCRDY_Pos)
|
||||
#define DAC_INTFLAG_MASK 0x07u /**< \brief (DAC_INTFLAG) MASK Register */
|
||||
|
||||
/* -------- DAC_STATUS : (DAC Offset: 0x7) (R/ 8) Status Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t :7; /*!< bit: 0.. 6 Reserved */
|
||||
uint8_t SYNCBUSY:1; /*!< bit: 7 Synchronization Busy */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} DAC_STATUS_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DAC_STATUS_OFFSET 0x7 /**< \brief (DAC_STATUS offset) Status Register */
|
||||
#define DAC_STATUS_RESETVALUE 0x00 /**< \brief (DAC_STATUS reset_value) Status Register */
|
||||
|
||||
#define DAC_STATUS_SYNCBUSY_Pos 7 /**< \brief (DAC_STATUS) Synchronization Busy */
|
||||
#define DAC_STATUS_SYNCBUSY (0x1u << DAC_STATUS_SYNCBUSY_Pos)
|
||||
#define DAC_STATUS_MASK 0x80u /**< \brief (DAC_STATUS) MASK Register */
|
||||
|
||||
/* -------- DAC_DATA : (DAC Offset: 0x8) (R/W 16) Data Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct { // LEFT_ADJUSTED mode
|
||||
uint16_t :6; /*!< bit: 0.. 5 Reserved */
|
||||
uint16_t DATA:10; /*!< bit: 6..15 Data to be Converted */
|
||||
} LEFT_ADJUSTED; /*!< Structure used for LEFT_ADJUSTED */
|
||||
struct { // RIGHT_ADJUSTED mode
|
||||
uint16_t DATA:10; /*!< bit: 0.. 9 Data to be converted */
|
||||
uint16_t :6; /*!< bit: 10..15 Reserved */
|
||||
} RIGHT_ADJUSTED; /*!< Structure used for RIGHT_ADJUSTED */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} DAC_DATA_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DAC_DATA_OFFSET 0x8 /**< \brief (DAC_DATA offset) Data Register */
|
||||
#define DAC_DATA_RESETVALUE 0x0000 /**< \brief (DAC_DATA reset_value) Data Register */
|
||||
|
||||
// LEFT_ADJUSTED mode
|
||||
#define DAC_DATA_LEFT_ADJUSTED_DATA_Pos 6 /**< \brief (DAC_DATA_LEFT_ADJUSTED) Data to be Converted */
|
||||
#define DAC_DATA_LEFT_ADJUSTED_DATA_Msk (0x3FFu << DAC_DATA_LEFT_ADJUSTED_DATA_Pos)
|
||||
#define DAC_DATA_LEFT_ADJUSTED_DATA(value) ((DAC_DATA_LEFT_ADJUSTED_DATA_Msk & ((value) << DAC_DATA_LEFT_ADJUSTED_DATA_Pos)))
|
||||
#define DAC_DATA_LEFT_ADJUSTED_MASK 0xFFC0u /**< \brief (DAC_DATA_LEFT_ADJUSTED) MASK Register */
|
||||
|
||||
// RIGHT_ADJUSTED mode
|
||||
#define DAC_DATA_RIGHT_ADJUSTED_DATA_Pos 0 /**< \brief (DAC_DATA_RIGHT_ADJUSTED) Data to be converted */
|
||||
#define DAC_DATA_RIGHT_ADJUSTED_DATA_Msk (0x3FFu << DAC_DATA_RIGHT_ADJUSTED_DATA_Pos)
|
||||
#define DAC_DATA_RIGHT_ADJUSTED_DATA(value) ((DAC_DATA_RIGHT_ADJUSTED_DATA_Msk & ((value) << DAC_DATA_RIGHT_ADJUSTED_DATA_Pos)))
|
||||
#define DAC_DATA_RIGHT_ADJUSTED_MASK 0x03FFu /**< \brief (DAC_DATA_RIGHT_ADJUSTED) MASK Register */
|
||||
|
||||
/* -------- DAC_DATABUF : (DAC Offset: 0xC) (R/W 16) Data Buffer Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct { // LEFT_ADJUSTED mode
|
||||
uint16_t :6; /*!< bit: 0.. 5 Reserved */
|
||||
uint16_t DATABUF:10; /*!< bit: 6..15 Data Buffer */
|
||||
} LEFT_ADJUSTED; /*!< Structure used for LEFT_ADJUSTED */
|
||||
struct { // RIGHT_ADJUSTED mode
|
||||
uint16_t DATABUF:10; /*!< bit: 0.. 9 Data Buffer */
|
||||
uint16_t :6; /*!< bit: 10..15 Reserved */
|
||||
} RIGHT_ADJUSTED; /*!< Structure used for RIGHT_ADJUSTED */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} DAC_DATABUF_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DAC_DATABUF_OFFSET 0xC /**< \brief (DAC_DATABUF offset) Data Buffer Register */
|
||||
#define DAC_DATABUF_RESETVALUE 0x0000 /**< \brief (DAC_DATABUF reset_value) Data Buffer Register */
|
||||
|
||||
// LEFT_ADJUSTED mode
|
||||
#define DAC_DATABUF_LEFT_ADJUSTED_DATABUF_Pos 6 /**< \brief (DAC_DATABUF_LEFT_ADJUSTED) Data Buffer */
|
||||
#define DAC_DATABUF_LEFT_ADJUSTED_DATABUF_Msk (0x3FFu << DAC_DATABUF_LEFT_ADJUSTED_DATABUF_Pos)
|
||||
#define DAC_DATABUF_LEFT_ADJUSTED_DATABUF(value) ((DAC_DATABUF_LEFT_ADJUSTED_DATABUF_Msk & ((value) << DAC_DATABUF_LEFT_ADJUSTED_DATABUF_Pos)))
|
||||
#define DAC_DATABUF_LEFT_ADJUSTED_MASK 0xFFC0u /**< \brief (DAC_DATABUF_LEFT_ADJUSTED) MASK Register */
|
||||
|
||||
// RIGHT_ADJUSTED mode
|
||||
#define DAC_DATABUF_RIGHT_ADJUSTED_DATABUF_Pos 0 /**< \brief (DAC_DATABUF_RIGHT_ADJUSTED) Data Buffer */
|
||||
#define DAC_DATABUF_RIGHT_ADJUSTED_DATABUF_Msk (0x3FFu << DAC_DATABUF_RIGHT_ADJUSTED_DATABUF_Pos)
|
||||
#define DAC_DATABUF_RIGHT_ADJUSTED_DATABUF(value) ((DAC_DATABUF_RIGHT_ADJUSTED_DATABUF_Msk & ((value) << DAC_DATABUF_RIGHT_ADJUSTED_DATABUF_Pos)))
|
||||
#define DAC_DATABUF_RIGHT_ADJUSTED_MASK 0x03FFu /**< \brief (DAC_DATABUF_RIGHT_ADJUSTED) MASK Register */
|
||||
|
||||
/** \brief DAC hardware registers */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef struct {
|
||||
__IO DAC_CTRLA_Type CTRLA; /**< \brief Offset: 0x0 (R/W 8) Control Register A */
|
||||
__IO DAC_CTRLB_Type CTRLB; /**< \brief Offset: 0x1 (R/W 8) Control Register B */
|
||||
__IO DAC_EVCTRL_Type EVCTRL; /**< \brief Offset: 0x2 (R/W 8) Event Control Register */
|
||||
__IO DAC_TEST_Type TEST; /**< \brief Offset: 0x3 (R/W 8) Test Register */
|
||||
__IO DAC_INTENCLR_Type INTENCLR; /**< \brief Offset: 0x4 (R/W 8) Interrupt Enable Clear Register */
|
||||
__IO DAC_INTENSET_Type INTENSET; /**< \brief Offset: 0x5 (R/W 8) Interrupt Enable Set Register */
|
||||
__IO DAC_INTFLAG_Type INTFLAG; /**< \brief Offset: 0x6 (R/W 8) Interrupt Flag Status and Clear Register */
|
||||
__I DAC_STATUS_Type STATUS; /**< \brief Offset: 0x7 (R/ 8) Status Register */
|
||||
__IO DAC_DATA_Type DATA; /**< \brief Offset: 0x8 (R/W 16) Data Register */
|
||||
RoReg8 Reserved1[0x2];
|
||||
__IO DAC_DATABUF_Type DATABUF; /**< \brief Offset: 0xC (R/W 16) Data Buffer Register */
|
||||
} Dac;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/*@}*/
|
||||
|
||||
#endif /* _SAMD20_DAC_COMPONENT_ */
|
|
@ -0,0 +1,629 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Component description for DSU
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_DSU_COMPONENT_
|
||||
#define _SAMD20_DSU_COMPONENT_
|
||||
|
||||
/* ========================================================================== */
|
||||
/** SOFTWARE API DEFINITION FOR DSU */
|
||||
/* ========================================================================== */
|
||||
/** \addtogroup SAMD20_DSU Device Service Unit */
|
||||
/*@{*/
|
||||
|
||||
#define REV_DSU 0x101
|
||||
|
||||
/* -------- DSU_CTRL : (DSU Offset: 0x0000) ( /W 8) Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t SWRST:1; /*!< bit: 0 Software Reset */
|
||||
uint8_t :1; /*!< bit: 1 Reserved */
|
||||
uint8_t CRC:1; /*!< bit: 2 Cyclic Redundancy Check */
|
||||
uint8_t MBIST:1; /*!< bit: 3 Memory BIST */
|
||||
uint8_t CE:1; /*!< bit: 4 Chip Erase */
|
||||
uint8_t :1; /*!< bit: 5 Reserved */
|
||||
uint8_t ARR:1; /*!< bit: 6 Auxiliary Row Read */
|
||||
uint8_t SMSA:1; /*!< bit: 7 Start Memory Stream Access */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} DSU_CTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DSU_CTRL_OFFSET 0x0000 /**< \brief (DSU_CTRL offset) Control Register */
|
||||
|
||||
#define DSU_CTRL_SWRST_Pos 0 /**< \brief (DSU_CTRL) Software Reset */
|
||||
#define DSU_CTRL_SWRST (0x1u << DSU_CTRL_SWRST_Pos)
|
||||
#define DSU_CTRL_CRC_Pos 2 /**< \brief (DSU_CTRL) Cyclic Redundancy Check */
|
||||
#define DSU_CTRL_CRC (0x1u << DSU_CTRL_CRC_Pos)
|
||||
#define DSU_CTRL_MBIST_Pos 3 /**< \brief (DSU_CTRL) Memory BIST */
|
||||
#define DSU_CTRL_MBIST (0x1u << DSU_CTRL_MBIST_Pos)
|
||||
#define DSU_CTRL_CE_Pos 4 /**< \brief (DSU_CTRL) Chip Erase */
|
||||
#define DSU_CTRL_CE (0x1u << DSU_CTRL_CE_Pos)
|
||||
#define DSU_CTRL_ARR_Pos 6 /**< \brief (DSU_CTRL) Auxiliary Row Read */
|
||||
#define DSU_CTRL_ARR (0x1u << DSU_CTRL_ARR_Pos)
|
||||
#define DSU_CTRL_SMSA_Pos 7 /**< \brief (DSU_CTRL) Start Memory Stream Access */
|
||||
#define DSU_CTRL_SMSA (0x1u << DSU_CTRL_SMSA_Pos)
|
||||
#define DSU_CTRL_MASK 0xDDu /**< \brief (DSU_CTRL) MASK Register */
|
||||
|
||||
/* -------- DSU_STATUSA : (DSU Offset: 0x0001) (R/W 8) Status Register A -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t DONE:1; /*!< bit: 0 Done */
|
||||
uint8_t CRSTEXT:1; /*!< bit: 1 CPU Reset Phase Extension */
|
||||
uint8_t BERR:1; /*!< bit: 2 Bus Error */
|
||||
uint8_t FAIL:1; /*!< bit: 3 Failure */
|
||||
uint8_t PERR:1; /*!< bit: 4 Protection Error */
|
||||
uint8_t :3; /*!< bit: 5.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} DSU_STATUSA_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DSU_STATUSA_OFFSET 0x0001 /**< \brief (DSU_STATUSA offset) Status Register A */
|
||||
|
||||
#define DSU_STATUSA_DONE_Pos 0 /**< \brief (DSU_STATUSA) Done */
|
||||
#define DSU_STATUSA_DONE (0x1u << DSU_STATUSA_DONE_Pos)
|
||||
#define DSU_STATUSA_CRSTEXT_Pos 1 /**< \brief (DSU_STATUSA) CPU Reset Phase Extension */
|
||||
#define DSU_STATUSA_CRSTEXT (0x1u << DSU_STATUSA_CRSTEXT_Pos)
|
||||
#define DSU_STATUSA_BERR_Pos 2 /**< \brief (DSU_STATUSA) Bus Error */
|
||||
#define DSU_STATUSA_BERR (0x1u << DSU_STATUSA_BERR_Pos)
|
||||
#define DSU_STATUSA_FAIL_Pos 3 /**< \brief (DSU_STATUSA) Failure */
|
||||
#define DSU_STATUSA_FAIL (0x1u << DSU_STATUSA_FAIL_Pos)
|
||||
#define DSU_STATUSA_PERR_Pos 4 /**< \brief (DSU_STATUSA) Protection Error */
|
||||
#define DSU_STATUSA_PERR (0x1u << DSU_STATUSA_PERR_Pos)
|
||||
#define DSU_STATUSA_MASK 0x1Fu /**< \brief (DSU_STATUSA) MASK Register */
|
||||
|
||||
/* -------- DSU_STATUSB : (DSU Offset: 0x0002) (R/ 8) Status Register B -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t PROT:1; /*!< bit: 0 Protected */
|
||||
uint8_t DBGPRES:1; /*!< bit: 1 Debugger Present */
|
||||
uint8_t DCCD:2; /*!< bit: 2.. 3 Debug Communication Channel Dirty */
|
||||
uint8_t HPE:1; /*!< bit: 4 Hot-Plugging Enable */
|
||||
uint8_t :3; /*!< bit: 5.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} DSU_STATUSB_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DSU_STATUSB_OFFSET 0x0002 /**< \brief (DSU_STATUSB offset) Status Register B */
|
||||
#define DSU_STATUSB_RESETVALUE 0x00 /**< \brief (DSU_STATUSB reset_value) Status Register B */
|
||||
|
||||
#define DSU_STATUSB_PROT_Pos 0 /**< \brief (DSU_STATUSB) Protected */
|
||||
#define DSU_STATUSB_PROT (0x1u << DSU_STATUSB_PROT_Pos)
|
||||
#define DSU_STATUSB_DBGPRES_Pos 1 /**< \brief (DSU_STATUSB) Debugger Present */
|
||||
#define DSU_STATUSB_DBGPRES (0x1u << DSU_STATUSB_DBGPRES_Pos)
|
||||
#define DSU_STATUSB_DCCD_Pos 2 /**< \brief (DSU_STATUSB) Debug Communication Channel Dirty */
|
||||
#define DSU_STATUSB_DCCD_Msk (0x3u << DSU_STATUSB_DCCD_Pos)
|
||||
#define DSU_STATUSB_DCCD(value) ((DSU_STATUSB_DCCD_Msk & ((value) << DSU_STATUSB_DCCD_Pos)))
|
||||
#define DSU_STATUSB_HPE_Pos 4 /**< \brief (DSU_STATUSB) Hot-Plugging Enable */
|
||||
#define DSU_STATUSB_HPE (0x1u << DSU_STATUSB_HPE_Pos)
|
||||
#define DSU_STATUSB_MASK 0x1Fu /**< \brief (DSU_STATUSB) MASK Register */
|
||||
|
||||
/* -------- DSU_ADDR : (DSU Offset: 0x0004) (R/W 32) Address Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t AMOD:2; /*!< bit: 0.. 1 Access Mode */
|
||||
uint32_t ADDR:30; /*!< bit: 2..31 Address */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} DSU_ADDR_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DSU_ADDR_OFFSET 0x0004 /**< \brief (DSU_ADDR offset) Address Register */
|
||||
#define DSU_ADDR_RESETVALUE 0x00000000 /**< \brief (DSU_ADDR reset_value) Address Register */
|
||||
|
||||
#define DSU_ADDR_AMOD_Pos 0 /**< \brief (DSU_ADDR) Access Mode */
|
||||
#define DSU_ADDR_AMOD_Msk (0x3u << DSU_ADDR_AMOD_Pos)
|
||||
#define DSU_ADDR_AMOD(value) ((DSU_ADDR_AMOD_Msk & ((value) << DSU_ADDR_AMOD_Pos)))
|
||||
#define DSU_ADDR_ADDR_Pos 2 /**< \brief (DSU_ADDR) Address */
|
||||
#define DSU_ADDR_ADDR_Msk (0x3FFFFFFFu << DSU_ADDR_ADDR_Pos)
|
||||
#define DSU_ADDR_ADDR(value) ((DSU_ADDR_ADDR_Msk & ((value) << DSU_ADDR_ADDR_Pos)))
|
||||
#define DSU_ADDR_MASK 0xFFFFFFFFu /**< \brief (DSU_ADDR) MASK Register */
|
||||
|
||||
/* -------- DSU_LENGTH : (DSU Offset: 0x0008) (R/W 32) Length Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t :2; /*!< bit: 0.. 1 Reserved */
|
||||
uint32_t LENGTH:30; /*!< bit: 2..31 Length */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} DSU_LENGTH_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DSU_LENGTH_OFFSET 0x0008 /**< \brief (DSU_LENGTH offset) Length Register */
|
||||
#define DSU_LENGTH_RESETVALUE 0x00000000 /**< \brief (DSU_LENGTH reset_value) Length Register */
|
||||
|
||||
#define DSU_LENGTH_LENGTH_Pos 2 /**< \brief (DSU_LENGTH) Length */
|
||||
#define DSU_LENGTH_LENGTH_Msk (0x3FFFFFFFu << DSU_LENGTH_LENGTH_Pos)
|
||||
#define DSU_LENGTH_LENGTH(value) ((DSU_LENGTH_LENGTH_Msk & ((value) << DSU_LENGTH_LENGTH_Pos)))
|
||||
#define DSU_LENGTH_MASK 0xFFFFFFFCu /**< \brief (DSU_LENGTH) MASK Register */
|
||||
|
||||
/* -------- DSU_DATA : (DSU Offset: 0x000C) (R/W 32) Data Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t DATA:32; /*!< bit: 0..31 Data */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} DSU_DATA_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DSU_DATA_OFFSET 0x000C /**< \brief (DSU_DATA offset) Data Register */
|
||||
|
||||
#define DSU_DATA_DATA_Pos 0 /**< \brief (DSU_DATA) Data */
|
||||
#define DSU_DATA_DATA_Msk (0xFFFFFFFFu << DSU_DATA_DATA_Pos)
|
||||
#define DSU_DATA_DATA(value) ((DSU_DATA_DATA_Msk & ((value) << DSU_DATA_DATA_Pos)))
|
||||
#define DSU_DATA_MASK 0xFFFFFFFFu /**< \brief (DSU_DATA) MASK Register */
|
||||
|
||||
/* -------- DSU_DCC : (DSU Offset: 0x0010) (R/W 32) Debug Communication Channel Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t DATA:32; /*!< bit: 0..31 Data */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} DSU_DCC_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DSU_DCC_OFFSET 0x0010 /**< \brief (DSU_DCC offset) Debug Communication Channel Register */
|
||||
#define DSU_DCC_RESETVALUE 0x00000000 /**< \brief (DSU_DCC reset_value) Debug Communication Channel Register */
|
||||
|
||||
#define DSU_DCC_DATA_Pos 0 /**< \brief (DSU_DCC) Data */
|
||||
#define DSU_DCC_DATA_Msk (0xFFFFFFFFu << DSU_DCC_DATA_Pos)
|
||||
#define DSU_DCC_DATA(value) ((DSU_DCC_DATA_Msk & ((value) << DSU_DCC_DATA_Pos)))
|
||||
#define DSU_DCC_MASK 0xFFFFFFFFu /**< \brief (DSU_DCC) MASK Register */
|
||||
|
||||
/* -------- DSU_DID : (DSU Offset: 0x0018) (R/ 32) Device Identification Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t DEVSEL:8; /*!< bit: 0.. 7 Device Select */
|
||||
uint32_t REVISION:4; /*!< bit: 8..11 Revision Number */
|
||||
uint32_t DIE:4; /*!< bit: 12..15 Die Number */
|
||||
uint32_t SUBFAMILY:8; /*!< bit: 16..23 Sub-Family */
|
||||
uint32_t FAMILY:4; /*!< bit: 24..27 Family */
|
||||
uint32_t PROCESSOR:4; /*!< bit: 28..31 Processor */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} DSU_DID_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DSU_DID_OFFSET 0x0018 /**< \brief (DSU_DID offset) Device Identification Register */
|
||||
#define DSU_DID_RESETVALUE 0x00000000 /**< \brief (DSU_DID reset_value) Device Identification Register */
|
||||
|
||||
#define DSU_DID_DEVSEL_Pos 0 /**< \brief (DSU_DID) Device Select */
|
||||
#define DSU_DID_DEVSEL_Msk (0xFFu << DSU_DID_DEVSEL_Pos)
|
||||
#define DSU_DID_DEVSEL(value) ((DSU_DID_DEVSEL_Msk & ((value) << DSU_DID_DEVSEL_Pos)))
|
||||
#define DSU_DID_REVISION_Pos 8 /**< \brief (DSU_DID) Revision Number */
|
||||
#define DSU_DID_REVISION_Msk (0xFu << DSU_DID_REVISION_Pos)
|
||||
#define DSU_DID_REVISION(value) ((DSU_DID_REVISION_Msk & ((value) << DSU_DID_REVISION_Pos)))
|
||||
#define DSU_DID_DIE_Pos 12 /**< \brief (DSU_DID) Die Number */
|
||||
#define DSU_DID_DIE_Msk (0xFu << DSU_DID_DIE_Pos)
|
||||
#define DSU_DID_DIE(value) ((DSU_DID_DIE_Msk & ((value) << DSU_DID_DIE_Pos)))
|
||||
#define DSU_DID_SUBFAMILY_Pos 16 /**< \brief (DSU_DID) Sub-Family */
|
||||
#define DSU_DID_SUBFAMILY_Msk (0xFFu << DSU_DID_SUBFAMILY_Pos)
|
||||
#define DSU_DID_SUBFAMILY(value) ((DSU_DID_SUBFAMILY_Msk & ((value) << DSU_DID_SUBFAMILY_Pos)))
|
||||
#define DSU_DID_FAMILY_Pos 24 /**< \brief (DSU_DID) Family */
|
||||
#define DSU_DID_FAMILY_Msk (0xFu << DSU_DID_FAMILY_Pos)
|
||||
#define DSU_DID_FAMILY(value) ((DSU_DID_FAMILY_Msk & ((value) << DSU_DID_FAMILY_Pos)))
|
||||
#define DSU_DID_PROCESSOR_Pos 28 /**< \brief (DSU_DID) Processor */
|
||||
#define DSU_DID_PROCESSOR_Msk (0xFu << DSU_DID_PROCESSOR_Pos)
|
||||
#define DSU_DID_PROCESSOR(value) ((DSU_DID_PROCESSOR_Msk & ((value) << DSU_DID_PROCESSOR_Pos)))
|
||||
#define DSU_DID_MASK 0xFFFFFFFFu /**< \brief (DSU_DID) MASK Register */
|
||||
|
||||
/* -------- DSU_DCFG : (DSU Offset: 0x00F0) (R/W 32) Device Configuration Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t DCFG:32; /*!< bit: 0..31 Device Configuration */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} DSU_DCFG_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DSU_DCFG_OFFSET 0x00F0 /**< \brief (DSU_DCFG offset) Device Configuration Register */
|
||||
#define DSU_DCFG_RESETVALUE 0x00000000 /**< \brief (DSU_DCFG reset_value) Device Configuration Register */
|
||||
|
||||
#define DSU_DCFG_DCFG_Pos 0 /**< \brief (DSU_DCFG) Device Configuration */
|
||||
#define DSU_DCFG_DCFG_Msk (0xFFFFFFFFu << DSU_DCFG_DCFG_Pos)
|
||||
#define DSU_DCFG_DCFG(value) ((DSU_DCFG_DCFG_Msk & ((value) << DSU_DCFG_DCFG_Pos)))
|
||||
#define DSU_DCFG_MASK 0xFFFFFFFFu /**< \brief (DSU_DCFG) MASK Register */
|
||||
|
||||
/* -------- DSU_UPTM : (DSU Offset: 0x00F8) (R/W 32) UnProtected Test Mode Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t UPTM:32; /*!< bit: 0..31 Un-Protected Test Mode */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} DSU_UPTM_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DSU_UPTM_OFFSET 0x00F8 /**< \brief (DSU_UPTM offset) UnProtected Test Mode Register */
|
||||
#define DSU_UPTM_RESETVALUE 0x00000000 /**< \brief (DSU_UPTM reset_value) UnProtected Test Mode Register */
|
||||
|
||||
#define DSU_UPTM_UPTM_Pos 0 /**< \brief (DSU_UPTM) Un-Protected Test Mode */
|
||||
#define DSU_UPTM_UPTM_Msk (0xFFFFFFFFu << DSU_UPTM_UPTM_Pos)
|
||||
#define DSU_UPTM_UPTM(value) ((DSU_UPTM_UPTM_Msk & ((value) << DSU_UPTM_UPTM_Pos)))
|
||||
#define DSU_UPTM_MASK 0xFFFFFFFFu /**< \brief (DSU_UPTM) MASK Register */
|
||||
|
||||
/* -------- DSU_TESTMODE : (DSU Offset: 0x00FC) (R/W 32) Test Mode Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t TESTMODE:32; /*!< bit: 0..31 Test Mode */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} DSU_TESTMODE_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DSU_TESTMODE_OFFSET 0x00FC /**< \brief (DSU_TESTMODE offset) Test Mode Register */
|
||||
#define DSU_TESTMODE_RESETVALUE 0x00000000 /**< \brief (DSU_TESTMODE reset_value) Test Mode Register */
|
||||
|
||||
#define DSU_TESTMODE_TESTMODE_Pos 0 /**< \brief (DSU_TESTMODE) Test Mode */
|
||||
#define DSU_TESTMODE_TESTMODE_Msk (0xFFFFFFFFu << DSU_TESTMODE_TESTMODE_Pos)
|
||||
#define DSU_TESTMODE_TESTMODE(value) ((DSU_TESTMODE_TESTMODE_Msk & ((value) << DSU_TESTMODE_TESTMODE_Pos)))
|
||||
#define DSU_TESTMODE_MASK 0xFFFFFFFFu /**< \brief (DSU_TESTMODE) MASK Register */
|
||||
|
||||
/* -------- DSU_ENTRY : (DSU Offset: 0x1000) (R/ 32) CoreSight ROM Table Entry Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t EPRES:1; /*!< bit: 0 Entry Present */
|
||||
uint32_t FMT:1; /*!< bit: 1 Format */
|
||||
uint32_t :10; /*!< bit: 2..11 Reserved */
|
||||
uint32_t ADDOFF:20; /*!< bit: 12..31 Address Offset */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} DSU_ENTRY_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DSU_ENTRY_OFFSET 0x1000 /**< \brief (DSU_ENTRY offset) CoreSight ROM Table Entry Register */
|
||||
|
||||
#define DSU_ENTRY_EPRES_Pos 0 /**< \brief (DSU_ENTRY) Entry Present */
|
||||
#define DSU_ENTRY_EPRES (0x1u << DSU_ENTRY_EPRES_Pos)
|
||||
#define DSU_ENTRY_FMT_Pos 1 /**< \brief (DSU_ENTRY) Format */
|
||||
#define DSU_ENTRY_FMT (0x1u << DSU_ENTRY_FMT_Pos)
|
||||
#define DSU_ENTRY_ADDOFF_Pos 12 /**< \brief (DSU_ENTRY) Address Offset */
|
||||
#define DSU_ENTRY_ADDOFF_Msk (0xFFFFFu << DSU_ENTRY_ADDOFF_Pos)
|
||||
#define DSU_ENTRY_ADDOFF(value) ((DSU_ENTRY_ADDOFF_Msk & ((value) << DSU_ENTRY_ADDOFF_Pos)))
|
||||
#define DSU_ENTRY_MASK 0xFFFFF003u /**< \brief (DSU_ENTRY) MASK Register */
|
||||
|
||||
/* -------- DSU_END : (DSU Offset: 0x1008) (R/ 32) CoreSight ROM Table End Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t END:32; /*!< bit: 0..31 End Marker */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} DSU_END_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DSU_END_OFFSET 0x1008 /**< \brief (DSU_END offset) CoreSight ROM Table End Register */
|
||||
#define DSU_END_RESETVALUE 0x00000000 /**< \brief (DSU_END reset_value) CoreSight ROM Table End Register */
|
||||
|
||||
#define DSU_END_END_Pos 0 /**< \brief (DSU_END) End Marker */
|
||||
#define DSU_END_END_Msk (0xFFFFFFFFu << DSU_END_END_Pos)
|
||||
#define DSU_END_END(value) ((DSU_END_END_Msk & ((value) << DSU_END_END_Pos)))
|
||||
#define DSU_END_MASK 0xFFFFFFFFu /**< \brief (DSU_END) MASK Register */
|
||||
|
||||
/* -------- DSU_MEMTYPE : (DSU Offset: 0x1FCC) (R/ 32) CoreSight ROM Table Memory Type Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t SMEMP:1; /*!< bit: 0 System Memory Present */
|
||||
uint32_t :31; /*!< bit: 1..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} DSU_MEMTYPE_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DSU_MEMTYPE_OFFSET 0x1FCC /**< \brief (DSU_MEMTYPE offset) CoreSight ROM Table Memory Type Register */
|
||||
|
||||
#define DSU_MEMTYPE_SMEMP_Pos 0 /**< \brief (DSU_MEMTYPE) System Memory Present */
|
||||
#define DSU_MEMTYPE_SMEMP (0x1u << DSU_MEMTYPE_SMEMP_Pos)
|
||||
#define DSU_MEMTYPE_MASK 0x00000001u /**< \brief (DSU_MEMTYPE) MASK Register */
|
||||
|
||||
/* -------- DSU_PID4 : (DSU Offset: 0x1FD0) (R/ 32) Peripheral Identification Register 4 -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t JEPCC:4; /*!< bit: 0.. 3 JEP-106 Continuation Code */
|
||||
uint32_t FKBC:4; /*!< bit: 4.. 7 4kB Count */
|
||||
uint32_t :24; /*!< bit: 8..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} DSU_PID4_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DSU_PID4_OFFSET 0x1FD0 /**< \brief (DSU_PID4 offset) Peripheral Identification Register 4 */
|
||||
|
||||
#define DSU_PID4_JEPCC_Pos 0 /**< \brief (DSU_PID4) JEP-106 Continuation Code */
|
||||
#define DSU_PID4_JEPCC_Msk (0xFu << DSU_PID4_JEPCC_Pos)
|
||||
#define DSU_PID4_JEPCC(value) ((DSU_PID4_JEPCC_Msk & ((value) << DSU_PID4_JEPCC_Pos)))
|
||||
#define DSU_PID4_FKBC_Pos 4 /**< \brief (DSU_PID4) 4kB Count */
|
||||
#define DSU_PID4_FKBC_Msk (0xFu << DSU_PID4_FKBC_Pos)
|
||||
#define DSU_PID4_FKBC(value) ((DSU_PID4_FKBC_Msk & ((value) << DSU_PID4_FKBC_Pos)))
|
||||
#define DSU_PID4_MASK 0x000000FFu /**< \brief (DSU_PID4) MASK Register */
|
||||
|
||||
/* -------- DSU_PID5 : (DSU Offset: 0x1FD4) (R/ 32) Peripheral Identification Register 5 -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} DSU_PID5_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DSU_PID5_OFFSET 0x1FD4 /**< \brief (DSU_PID5 offset) Peripheral Identification Register 5 */
|
||||
#define DSU_PID5_MASK 0x00000000u /**< \brief (DSU_PID5) MASK Register */
|
||||
|
||||
/* -------- DSU_PID6 : (DSU Offset: 0x1FD8) (R/ 32) Peripheral Identification Register 6 -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} DSU_PID6_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DSU_PID6_OFFSET 0x1FD8 /**< \brief (DSU_PID6 offset) Peripheral Identification Register 6 */
|
||||
#define DSU_PID6_MASK 0x00000000u /**< \brief (DSU_PID6) MASK Register */
|
||||
|
||||
/* -------- DSU_PID7 : (DSU Offset: 0x1FDC) (R/ 32) Peripheral Identification Register 7 -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} DSU_PID7_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DSU_PID7_OFFSET 0x1FDC /**< \brief (DSU_PID7 offset) Peripheral Identification Register 7 */
|
||||
#define DSU_PID7_MASK 0x00000000u /**< \brief (DSU_PID7) MASK Register */
|
||||
|
||||
/* -------- DSU_PID0 : (DSU Offset: 0x1FE0) (R/ 32) Peripheral Identification Register 0 -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t PARTNBL:8; /*!< bit: 0.. 7 Part Number Low */
|
||||
uint32_t :24; /*!< bit: 8..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} DSU_PID0_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DSU_PID0_OFFSET 0x1FE0 /**< \brief (DSU_PID0 offset) Peripheral Identification Register 0 */
|
||||
|
||||
#define DSU_PID0_PARTNBL_Pos 0 /**< \brief (DSU_PID0) Part Number Low */
|
||||
#define DSU_PID0_PARTNBL_Msk (0xFFu << DSU_PID0_PARTNBL_Pos)
|
||||
#define DSU_PID0_PARTNBL(value) ((DSU_PID0_PARTNBL_Msk & ((value) << DSU_PID0_PARTNBL_Pos)))
|
||||
#define DSU_PID0_MASK 0x000000FFu /**< \brief (DSU_PID0) MASK Register */
|
||||
|
||||
/* -------- DSU_PID1 : (DSU Offset: 0x1FE4) (R/ 32) Peripheral Identification Register 1 -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t PARTNBH:4; /*!< bit: 0.. 3 Part Number High */
|
||||
uint32_t JEPIDCL:4; /*!< bit: 4.. 7 JEP-106 Identity Code Low */
|
||||
uint32_t :24; /*!< bit: 8..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} DSU_PID1_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DSU_PID1_OFFSET 0x1FE4 /**< \brief (DSU_PID1 offset) Peripheral Identification Register 1 */
|
||||
|
||||
#define DSU_PID1_PARTNBH_Pos 0 /**< \brief (DSU_PID1) Part Number High */
|
||||
#define DSU_PID1_PARTNBH_Msk (0xFu << DSU_PID1_PARTNBH_Pos)
|
||||
#define DSU_PID1_PARTNBH(value) ((DSU_PID1_PARTNBH_Msk & ((value) << DSU_PID1_PARTNBH_Pos)))
|
||||
#define DSU_PID1_JEPIDCL_Pos 4 /**< \brief (DSU_PID1) JEP-106 Identity Code Low */
|
||||
#define DSU_PID1_JEPIDCL_Msk (0xFu << DSU_PID1_JEPIDCL_Pos)
|
||||
#define DSU_PID1_JEPIDCL(value) ((DSU_PID1_JEPIDCL_Msk & ((value) << DSU_PID1_JEPIDCL_Pos)))
|
||||
#define DSU_PID1_MASK 0x000000FFu /**< \brief (DSU_PID1) MASK Register */
|
||||
|
||||
/* -------- DSU_PID2 : (DSU Offset: 0x1FE8) (R/ 32) Peripheral Identification Register 2 -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t JEPIDCH:3; /*!< bit: 0.. 2 JEP-106 Identity Code High */
|
||||
uint32_t JEPU:1; /*!< bit: 3 JEP-106 Identity Code is Used */
|
||||
uint32_t REVISION:4; /*!< bit: 4.. 7 Revision Number */
|
||||
uint32_t :24; /*!< bit: 8..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} DSU_PID2_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DSU_PID2_OFFSET 0x1FE8 /**< \brief (DSU_PID2 offset) Peripheral Identification Register 2 */
|
||||
|
||||
#define DSU_PID2_JEPIDCH_Pos 0 /**< \brief (DSU_PID2) JEP-106 Identity Code High */
|
||||
#define DSU_PID2_JEPIDCH_Msk (0x7u << DSU_PID2_JEPIDCH_Pos)
|
||||
#define DSU_PID2_JEPIDCH(value) ((DSU_PID2_JEPIDCH_Msk & ((value) << DSU_PID2_JEPIDCH_Pos)))
|
||||
#define DSU_PID2_JEPU_Pos 3 /**< \brief (DSU_PID2) JEP-106 Identity Code is Used */
|
||||
#define DSU_PID2_JEPU (0x1u << DSU_PID2_JEPU_Pos)
|
||||
#define DSU_PID2_REVISION_Pos 4 /**< \brief (DSU_PID2) Revision Number */
|
||||
#define DSU_PID2_REVISION_Msk (0xFu << DSU_PID2_REVISION_Pos)
|
||||
#define DSU_PID2_REVISION(value) ((DSU_PID2_REVISION_Msk & ((value) << DSU_PID2_REVISION_Pos)))
|
||||
#define DSU_PID2_MASK 0x000000FFu /**< \brief (DSU_PID2) MASK Register */
|
||||
|
||||
/* -------- DSU_PID3 : (DSU Offset: 0x1FEC) (R/ 32) Peripheral Identification Register 3 -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t CUSMOD:4; /*!< bit: 0.. 3 Customer Mode */
|
||||
uint32_t REVAND:4; /*!< bit: 4.. 7 Revision Number */
|
||||
uint32_t :24; /*!< bit: 8..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} DSU_PID3_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DSU_PID3_OFFSET 0x1FEC /**< \brief (DSU_PID3 offset) Peripheral Identification Register 3 */
|
||||
|
||||
#define DSU_PID3_CUSMOD_Pos 0 /**< \brief (DSU_PID3) Customer Mode */
|
||||
#define DSU_PID3_CUSMOD_Msk (0xFu << DSU_PID3_CUSMOD_Pos)
|
||||
#define DSU_PID3_CUSMOD(value) ((DSU_PID3_CUSMOD_Msk & ((value) << DSU_PID3_CUSMOD_Pos)))
|
||||
#define DSU_PID3_REVAND_Pos 4 /**< \brief (DSU_PID3) Revision Number */
|
||||
#define DSU_PID3_REVAND_Msk (0xFu << DSU_PID3_REVAND_Pos)
|
||||
#define DSU_PID3_REVAND(value) ((DSU_PID3_REVAND_Msk & ((value) << DSU_PID3_REVAND_Pos)))
|
||||
#define DSU_PID3_MASK 0x000000FFu /**< \brief (DSU_PID3) MASK Register */
|
||||
|
||||
/* -------- DSU_CID0 : (DSU Offset: 0x1FF0) (R/ 32) Component Identification Register 0 -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t PREAMBLEB0:8; /*!< bit: 0.. 7 Preamble Byte 0 */
|
||||
uint32_t :24; /*!< bit: 8..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} DSU_CID0_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DSU_CID0_OFFSET 0x1FF0 /**< \brief (DSU_CID0 offset) Component Identification Register 0 */
|
||||
#define DSU_CID0_RESETVALUE 0x00000000 /**< \brief (DSU_CID0 reset_value) Component Identification Register 0 */
|
||||
|
||||
#define DSU_CID0_PREAMBLEB0_Pos 0 /**< \brief (DSU_CID0) Preamble Byte 0 */
|
||||
#define DSU_CID0_PREAMBLEB0_Msk (0xFFu << DSU_CID0_PREAMBLEB0_Pos)
|
||||
#define DSU_CID0_PREAMBLEB0(value) ((DSU_CID0_PREAMBLEB0_Msk & ((value) << DSU_CID0_PREAMBLEB0_Pos)))
|
||||
#define DSU_CID0_MASK 0x000000FFu /**< \brief (DSU_CID0) MASK Register */
|
||||
|
||||
/* -------- DSU_CID1 : (DSU Offset: 0x1FF4) (R/ 32) Component Identification Register 1 -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t PREAMBLE:4; /*!< bit: 0.. 3 Preamble Byte 1 */
|
||||
uint32_t CCLASS:4; /*!< bit: 4.. 7 Component Class */
|
||||
uint32_t :24; /*!< bit: 8..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} DSU_CID1_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DSU_CID1_OFFSET 0x1FF4 /**< \brief (DSU_CID1 offset) Component Identification Register 1 */
|
||||
#define DSU_CID1_RESETVALUE 0x00000000 /**< \brief (DSU_CID1 reset_value) Component Identification Register 1 */
|
||||
|
||||
#define DSU_CID1_PREAMBLE_Pos 0 /**< \brief (DSU_CID1) Preamble Byte 1 */
|
||||
#define DSU_CID1_PREAMBLE_Msk (0xFu << DSU_CID1_PREAMBLE_Pos)
|
||||
#define DSU_CID1_PREAMBLE(value) ((DSU_CID1_PREAMBLE_Msk & ((value) << DSU_CID1_PREAMBLE_Pos)))
|
||||
#define DSU_CID1_CCLASS_Pos 4 /**< \brief (DSU_CID1) Component Class */
|
||||
#define DSU_CID1_CCLASS_Msk (0xFu << DSU_CID1_CCLASS_Pos)
|
||||
#define DSU_CID1_CCLASS(value) ((DSU_CID1_CCLASS_Msk & ((value) << DSU_CID1_CCLASS_Pos)))
|
||||
#define DSU_CID1_MASK 0x000000FFu /**< \brief (DSU_CID1) MASK Register */
|
||||
|
||||
/* -------- DSU_CID2 : (DSU Offset: 0x1FF8) (R/ 32) Component Identification Register 2 -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t PREAMBLEB2:8; /*!< bit: 0.. 7 Preamble Byte 2 */
|
||||
uint32_t :24; /*!< bit: 8..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} DSU_CID2_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DSU_CID2_OFFSET 0x1FF8 /**< \brief (DSU_CID2 offset) Component Identification Register 2 */
|
||||
#define DSU_CID2_RESETVALUE 0x00000000 /**< \brief (DSU_CID2 reset_value) Component Identification Register 2 */
|
||||
|
||||
#define DSU_CID2_PREAMBLEB2_Pos 0 /**< \brief (DSU_CID2) Preamble Byte 2 */
|
||||
#define DSU_CID2_PREAMBLEB2_Msk (0xFFu << DSU_CID2_PREAMBLEB2_Pos)
|
||||
#define DSU_CID2_PREAMBLEB2(value) ((DSU_CID2_PREAMBLEB2_Msk & ((value) << DSU_CID2_PREAMBLEB2_Pos)))
|
||||
#define DSU_CID2_MASK 0x000000FFu /**< \brief (DSU_CID2) MASK Register */
|
||||
|
||||
/* -------- DSU_CID3 : (DSU Offset: 0x1FFC) (R/ 32) Component Identification Register 3 -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t PREAMBLEB3:8; /*!< bit: 0.. 7 Preamble Byte 3 */
|
||||
uint32_t :24; /*!< bit: 8..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} DSU_CID3_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define DSU_CID3_OFFSET 0x1FFC /**< \brief (DSU_CID3 offset) Component Identification Register 3 */
|
||||
#define DSU_CID3_RESETVALUE 0x00000000 /**< \brief (DSU_CID3 reset_value) Component Identification Register 3 */
|
||||
|
||||
#define DSU_CID3_PREAMBLEB3_Pos 0 /**< \brief (DSU_CID3) Preamble Byte 3 */
|
||||
#define DSU_CID3_PREAMBLEB3_Msk (0xFFu << DSU_CID3_PREAMBLEB3_Pos)
|
||||
#define DSU_CID3_PREAMBLEB3(value) ((DSU_CID3_PREAMBLEB3_Msk & ((value) << DSU_CID3_PREAMBLEB3_Pos)))
|
||||
#define DSU_CID3_MASK 0x000000FFu /**< \brief (DSU_CID3) MASK Register */
|
||||
|
||||
/** \brief DSU hardware registers */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef struct {
|
||||
__O DSU_CTRL_Type CTRL; /**< \brief Offset: 0x0000 ( /W 8) Control Register */
|
||||
__IO DSU_STATUSA_Type STATUSA; /**< \brief Offset: 0x0001 (R/W 8) Status Register A */
|
||||
__I DSU_STATUSB_Type STATUSB; /**< \brief Offset: 0x0002 (R/ 8) Status Register B */
|
||||
RoReg8 Reserved1[0x1];
|
||||
__IO DSU_ADDR_Type ADDR; /**< \brief Offset: 0x0004 (R/W 32) Address Register */
|
||||
__IO DSU_LENGTH_Type LENGTH; /**< \brief Offset: 0x0008 (R/W 32) Length Register */
|
||||
__IO DSU_DATA_Type DATA; /**< \brief Offset: 0x000C (R/W 32) Data Register */
|
||||
__IO DSU_DCC_Type DCC[2]; /**< \brief Offset: 0x0010 (R/W 32) Debug Communication Channel Register */
|
||||
__I DSU_DID_Type DID; /**< \brief Offset: 0x0018 (R/ 32) Device Identification Register */
|
||||
RoReg8 Reserved2[0xD4];
|
||||
__IO DSU_DCFG_Type DCFG[2]; /**< \brief Offset: 0x00F0 (R/W 32) Device Configuration Register */
|
||||
__IO DSU_UPTM_Type UPTM; /**< \brief Offset: 0x00F8 (R/W 32) UnProtected Test Mode Register */
|
||||
__IO DSU_TESTMODE_Type TESTMODE; /**< \brief Offset: 0x00FC (R/W 32) Test Mode Register */
|
||||
RoReg8 Reserved3[0xF00];
|
||||
__I DSU_ENTRY_Type ENTRY[2]; /**< \brief Offset: 0x1000 (R/ 32) CoreSight ROM Table Entry Register */
|
||||
__I DSU_END_Type END; /**< \brief Offset: 0x1008 (R/ 32) CoreSight ROM Table End Register */
|
||||
RoReg8 Reserved4[0xFC0];
|
||||
__I DSU_MEMTYPE_Type MEMTYPE; /**< \brief Offset: 0x1FCC (R/ 32) CoreSight ROM Table Memory Type Register */
|
||||
__I DSU_PID4_Type PID4; /**< \brief Offset: 0x1FD0 (R/ 32) Peripheral Identification Register 4 */
|
||||
__I DSU_PID5_Type PID5; /**< \brief Offset: 0x1FD4 (R/ 32) Peripheral Identification Register 5 */
|
||||
__I DSU_PID6_Type PID6; /**< \brief Offset: 0x1FD8 (R/ 32) Peripheral Identification Register 6 */
|
||||
__I DSU_PID7_Type PID7; /**< \brief Offset: 0x1FDC (R/ 32) Peripheral Identification Register 7 */
|
||||
__I DSU_PID0_Type PID0; /**< \brief Offset: 0x1FE0 (R/ 32) Peripheral Identification Register 0 */
|
||||
__I DSU_PID1_Type PID1; /**< \brief Offset: 0x1FE4 (R/ 32) Peripheral Identification Register 1 */
|
||||
__I DSU_PID2_Type PID2; /**< \brief Offset: 0x1FE8 (R/ 32) Peripheral Identification Register 2 */
|
||||
__I DSU_PID3_Type PID3; /**< \brief Offset: 0x1FEC (R/ 32) Peripheral Identification Register 3 */
|
||||
__I DSU_CID0_Type CID0; /**< \brief Offset: 0x1FF0 (R/ 32) Component Identification Register 0 */
|
||||
__I DSU_CID1_Type CID1; /**< \brief Offset: 0x1FF4 (R/ 32) Component Identification Register 1 */
|
||||
__I DSU_CID2_Type CID2; /**< \brief Offset: 0x1FF8 (R/ 32) Component Identification Register 2 */
|
||||
__I DSU_CID3_Type CID3; /**< \brief Offset: 0x1FFC (R/ 32) Component Identification Register 3 */
|
||||
} Dsu;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/*@}*/
|
||||
|
||||
#endif /* _SAMD20_DSU_COMPONENT_ */
|
|
@ -0,0 +1,370 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Component description for EIC
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_EIC_COMPONENT_
|
||||
#define _SAMD20_EIC_COMPONENT_
|
||||
|
||||
/* ========================================================================== */
|
||||
/** SOFTWARE API DEFINITION FOR EIC */
|
||||
/* ========================================================================== */
|
||||
/** \addtogroup SAMD20_EIC External Interrupt Controller */
|
||||
/*@{*/
|
||||
|
||||
#define REV_EIC 0x101
|
||||
|
||||
/* -------- EIC_CTRL : (EIC Offset: 0x00) (R/W 8) Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t SWRST:1; /*!< bit: 0 Software Reset */
|
||||
uint8_t ENABLE:1; /*!< bit: 1 Enable */
|
||||
uint8_t :6; /*!< bit: 2.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} EIC_CTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define EIC_CTRL_OFFSET 0x00 /**< \brief (EIC_CTRL offset) Control Register */
|
||||
#define EIC_CTRL_RESETVALUE 0x00 /**< \brief (EIC_CTRL reset_value) Control Register */
|
||||
|
||||
#define EIC_CTRL_SWRST_Pos 0 /**< \brief (EIC_CTRL) Software Reset */
|
||||
#define EIC_CTRL_SWRST (0x1u << EIC_CTRL_SWRST_Pos)
|
||||
#define EIC_CTRL_ENABLE_Pos 1 /**< \brief (EIC_CTRL) Enable */
|
||||
#define EIC_CTRL_ENABLE (0x1u << EIC_CTRL_ENABLE_Pos)
|
||||
#define EIC_CTRL_MASK 0x03u /**< \brief (EIC_CTRL) MASK Register */
|
||||
|
||||
/* -------- EIC_STATUS : (EIC Offset: 0x01) (R/ 8) Status Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t :7; /*!< bit: 0.. 6 Reserved */
|
||||
uint8_t SYNCBUSY:1; /*!< bit: 7 Sync Busy */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} EIC_STATUS_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define EIC_STATUS_OFFSET 0x01 /**< \brief (EIC_STATUS offset) Status Register */
|
||||
#define EIC_STATUS_RESETVALUE 0x00 /**< \brief (EIC_STATUS reset_value) Status Register */
|
||||
|
||||
#define EIC_STATUS_SYNCBUSY_Pos 7 /**< \brief (EIC_STATUS) Sync Busy */
|
||||
#define EIC_STATUS_SYNCBUSY (0x1u << EIC_STATUS_SYNCBUSY_Pos)
|
||||
#define EIC_STATUS_MASK 0x80u /**< \brief (EIC_STATUS) MASK Register */
|
||||
|
||||
/* -------- EIC_NMICTRL : (EIC Offset: 0x02) (R/W 8) NMI Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t NMISENSE:3; /*!< bit: 0.. 2 NMI Input Sense Configuration */
|
||||
uint8_t NMIFILTEN:1; /*!< bit: 3 NMI Filter Enable */
|
||||
uint8_t :4; /*!< bit: 4.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} EIC_NMICTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define EIC_NMICTRL_OFFSET 0x02 /**< \brief (EIC_NMICTRL offset) NMI Control Register */
|
||||
#define EIC_NMICTRL_RESETVALUE 0x00 /**< \brief (EIC_NMICTRL reset_value) NMI Control Register */
|
||||
|
||||
#define EIC_NMICTRL_NMISENSE_Pos 0 /**< \brief (EIC_NMICTRL) NMI Input Sense Configuration */
|
||||
#define EIC_NMICTRL_NMISENSE_Msk (0x7u << EIC_NMICTRL_NMISENSE_Pos)
|
||||
#define EIC_NMICTRL_NMISENSE(value) ((EIC_NMICTRL_NMISENSE_Msk & ((value) << EIC_NMICTRL_NMISENSE_Pos)))
|
||||
#define EIC_NMICTRL_NMISENSE_NONE (0x0u << 0) /**< \brief (EIC_NMICTRL) No detection */
|
||||
#define EIC_NMICTRL_NMISENSE_RISE (0x1u << 0) /**< \brief (EIC_NMICTRL) Rising edge detection */
|
||||
#define EIC_NMICTRL_NMISENSE_FALL (0x2u << 0) /**< \brief (EIC_NMICTRL) Falling edge detection */
|
||||
#define EIC_NMICTRL_NMISENSE_BOTH (0x3u << 0) /**< \brief (EIC_NMICTRL) Both edges detection */
|
||||
#define EIC_NMICTRL_NMISENSE_HIGH (0x4u << 0) /**< \brief (EIC_NMICTRL) High level detection */
|
||||
#define EIC_NMICTRL_NMISENSE_LOW (0x5u << 0) /**< \brief (EIC_NMICTRL) Low level detection */
|
||||
#define EIC_NMICTRL_NMIFILTEN_Pos 3 /**< \brief (EIC_NMICTRL) NMI Filter Enable */
|
||||
#define EIC_NMICTRL_NMIFILTEN (0x1u << EIC_NMICTRL_NMIFILTEN_Pos)
|
||||
#define EIC_NMICTRL_MASK 0x0Fu /**< \brief (EIC_NMICTRL) MASK Register */
|
||||
|
||||
/* -------- EIC_NMIFLAG : (EIC Offset: 0x03) (R/W 8) NMI Interrupt Flag Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t NMI:1; /*!< bit: 0 NMI Interrupt Flag */
|
||||
uint8_t :7; /*!< bit: 1.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} EIC_NMIFLAG_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define EIC_NMIFLAG_OFFSET 0x03 /**< \brief (EIC_NMIFLAG offset) NMI Interrupt Flag Register */
|
||||
#define EIC_NMIFLAG_RESETVALUE 0x00 /**< \brief (EIC_NMIFLAG reset_value) NMI Interrupt Flag Register */
|
||||
|
||||
#define EIC_NMIFLAG_NMI_Pos 0 /**< \brief (EIC_NMIFLAG) NMI Interrupt Flag */
|
||||
#define EIC_NMIFLAG_NMI (0x1u << EIC_NMIFLAG_NMI_Pos)
|
||||
#define EIC_NMIFLAG_MASK 0x01u /**< \brief (EIC_NMIFLAG) MASK Register */
|
||||
|
||||
/* -------- EIC_EVCTRL : (EIC Offset: 0x04) (R/W 32) Event Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t EXTINTEO:32; /*!< bit: 0..31 External Interrupt Event Output Enable */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} EIC_EVCTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define EIC_EVCTRL_OFFSET 0x04 /**< \brief (EIC_EVCTRL offset) Event Control Register */
|
||||
#define EIC_EVCTRL_RESETVALUE 0x00000000 /**< \brief (EIC_EVCTRL reset_value) Event Control Register */
|
||||
|
||||
#define EIC_EVCTRL_EXTINTEO_Pos 0 /**< \brief (EIC_EVCTRL) External Interrupt Event Output Enable */
|
||||
#define EIC_EVCTRL_EXTINTEO_Msk (0xFFFFFFFFu << EIC_EVCTRL_EXTINTEO_Pos)
|
||||
#define EIC_EVCTRL_EXTINTEO(value) ((EIC_EVCTRL_EXTINTEO_Msk & ((value) << EIC_EVCTRL_EXTINTEO_Pos)))
|
||||
#define EIC_EVCTRL_MASK 0xFFFFFFFFu /**< \brief (EIC_EVCTRL) MASK Register */
|
||||
|
||||
/* -------- EIC_INTENCLR : (EIC Offset: 0x08) (R/W 32) Interrupt Enable Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t EXTINT:16; /*!< bit: 0..15 External Interrupt Disable */
|
||||
uint32_t :16; /*!< bit: 16..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} EIC_INTENCLR_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define EIC_INTENCLR_OFFSET 0x08 /**< \brief (EIC_INTENCLR offset) Interrupt Enable Clear Register */
|
||||
#define EIC_INTENCLR_RESETVALUE 0x00000000 /**< \brief (EIC_INTENCLR reset_value) Interrupt Enable Clear Register */
|
||||
|
||||
#define EIC_INTENCLR_EXTINT_Pos 0 /**< \brief (EIC_INTENCLR) External Interrupt Disable */
|
||||
#define EIC_INTENCLR_EXTINT_Msk (0xFFFFu << EIC_INTENCLR_EXTINT_Pos)
|
||||
#define EIC_INTENCLR_EXTINT(value) ((EIC_INTENCLR_EXTINT_Msk & ((value) << EIC_INTENCLR_EXTINT_Pos)))
|
||||
#define EIC_INTENCLR_MASK 0x0000FFFFu /**< \brief (EIC_INTENCLR) MASK Register */
|
||||
|
||||
/* -------- EIC_INTENSET : (EIC Offset: 0x0C) (R/W 32) Interrupt Enable Set Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t EXTINT:16; /*!< bit: 0..15 External Interrupt Disable */
|
||||
uint32_t :16; /*!< bit: 16..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} EIC_INTENSET_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define EIC_INTENSET_OFFSET 0x0C /**< \brief (EIC_INTENSET offset) Interrupt Enable Set Register */
|
||||
#define EIC_INTENSET_RESETVALUE 0x00000000 /**< \brief (EIC_INTENSET reset_value) Interrupt Enable Set Register */
|
||||
|
||||
#define EIC_INTENSET_EXTINT_Pos 0 /**< \brief (EIC_INTENSET) External Interrupt Disable */
|
||||
#define EIC_INTENSET_EXTINT_Msk (0xFFFFu << EIC_INTENSET_EXTINT_Pos)
|
||||
#define EIC_INTENSET_EXTINT(value) ((EIC_INTENSET_EXTINT_Msk & ((value) << EIC_INTENSET_EXTINT_Pos)))
|
||||
#define EIC_INTENSET_MASK 0x0000FFFFu /**< \brief (EIC_INTENSET) MASK Register */
|
||||
|
||||
/* -------- EIC_INTFLAG : (EIC Offset: 0x10) (R/W 32) Interrupt Flag Status and Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t EXTINT:16; /*!< bit: 0..15 External Interrupt Flag */
|
||||
uint32_t :16; /*!< bit: 16..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} EIC_INTFLAG_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define EIC_INTFLAG_OFFSET 0x10 /**< \brief (EIC_INTFLAG offset) Interrupt Flag Status and Clear Register */
|
||||
#define EIC_INTFLAG_RESETVALUE 0x00000000 /**< \brief (EIC_INTFLAG reset_value) Interrupt Flag Status and Clear Register */
|
||||
|
||||
#define EIC_INTFLAG_EXTINT_Pos 0 /**< \brief (EIC_INTFLAG) External Interrupt Flag */
|
||||
#define EIC_INTFLAG_EXTINT_Msk (0xFFFFu << EIC_INTFLAG_EXTINT_Pos)
|
||||
#define EIC_INTFLAG_EXTINT(value) ((EIC_INTFLAG_EXTINT_Msk & ((value) << EIC_INTFLAG_EXTINT_Pos)))
|
||||
#define EIC_INTFLAG_MASK 0x0000FFFFu /**< \brief (EIC_INTFLAG) MASK Register */
|
||||
|
||||
/* -------- EIC_WAKEUP : (EIC Offset: 0x14) (R/W 32) Wake-up Enable Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t WAKEUPEN:16; /*!< bit: 0..15 External Interrupt Wake-Up Enable */
|
||||
uint32_t :16; /*!< bit: 16..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} EIC_WAKEUP_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define EIC_WAKEUP_OFFSET 0x14 /**< \brief (EIC_WAKEUP offset) Wake-up Enable Register */
|
||||
#define EIC_WAKEUP_RESETVALUE 0x00000000 /**< \brief (EIC_WAKEUP reset_value) Wake-up Enable Register */
|
||||
|
||||
#define EIC_WAKEUP_WAKEUPEN_Pos 0 /**< \brief (EIC_WAKEUP) External Interrupt Wake-Up Enable */
|
||||
#define EIC_WAKEUP_WAKEUPEN_Msk (0xFFFFu << EIC_WAKEUP_WAKEUPEN_Pos)
|
||||
#define EIC_WAKEUP_WAKEUPEN(value) ((EIC_WAKEUP_WAKEUPEN_Msk & ((value) << EIC_WAKEUP_WAKEUPEN_Pos)))
|
||||
#define EIC_WAKEUP_MASK 0x0000FFFFu /**< \brief (EIC_WAKEUP) MASK Register */
|
||||
|
||||
/* -------- EIC_CONFIG : (EIC Offset: 0x18) (R/W 32) Config Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t SENSE0:3; /*!< bit: 0.. 2 Input Sense Configuration 0 */
|
||||
uint32_t FILTEN0:1; /*!< bit: 3 Filter Enable 0 */
|
||||
uint32_t SENSE1:3; /*!< bit: 4.. 6 Input Sense Configuration 1 */
|
||||
uint32_t FILTEN1:1; /*!< bit: 7 Filter Enable 1 */
|
||||
uint32_t SENSE2:3; /*!< bit: 8..10 Input Sense Configuration 2 */
|
||||
uint32_t FILTEN2:1; /*!< bit: 11 Filter Enable 2 */
|
||||
uint32_t SENSE3:3; /*!< bit: 12..14 Input Sense Configuration 3 */
|
||||
uint32_t FILTEN3:1; /*!< bit: 15 Filter Enable 3 */
|
||||
uint32_t SENSE4:3; /*!< bit: 16..18 Input Sense Configuration 4 */
|
||||
uint32_t FILTEN4:1; /*!< bit: 19 Filter Enable 4 */
|
||||
uint32_t SENSE5:3; /*!< bit: 20..22 Input Sense Configuration 5 */
|
||||
uint32_t FILTEN5:1; /*!< bit: 23 Filter Enable 5 */
|
||||
uint32_t SENSE6:3; /*!< bit: 24..26 Input Sense Configuration 6 */
|
||||
uint32_t FILTEN6:1; /*!< bit: 27 Filter Enable 6 */
|
||||
uint32_t SENSE7:3; /*!< bit: 28..30 Input Sense Configuration 7 */
|
||||
uint32_t FILTEN7:1; /*!< bit: 31 Filter Enable 7 */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} EIC_CONFIG_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define EIC_CONFIG_OFFSET 0x18 /**< \brief (EIC_CONFIG offset) Config Register */
|
||||
#define EIC_CONFIG_RESETVALUE 0x00000000 /**< \brief (EIC_CONFIG reset_value) Config Register */
|
||||
|
||||
#define EIC_CONFIG_SENSE0_Pos 0 /**< \brief (EIC_CONFIG) Input Sense Configuration 0 */
|
||||
#define EIC_CONFIG_SENSE0_Msk (0x7u << EIC_CONFIG_SENSE0_Pos)
|
||||
#define EIC_CONFIG_SENSE0(value) ((EIC_CONFIG_SENSE0_Msk & ((value) << EIC_CONFIG_SENSE0_Pos)))
|
||||
#define EIC_CONFIG_SENSE0_NONE (0x0u << 0) /**< \brief (EIC_CONFIG) No detection */
|
||||
#define EIC_CONFIG_SENSE0_RISE (0x1u << 0) /**< \brief (EIC_CONFIG) Rising edge detection */
|
||||
#define EIC_CONFIG_SENSE0_FALL (0x2u << 0) /**< \brief (EIC_CONFIG) Falling edge detection */
|
||||
#define EIC_CONFIG_SENSE0_BOTH (0x3u << 0) /**< \brief (EIC_CONFIG) Both edges detection */
|
||||
#define EIC_CONFIG_SENSE0_HIGH (0x4u << 0) /**< \brief (EIC_CONFIG) High level detection */
|
||||
#define EIC_CONFIG_SENSE0_LOW (0x5u << 0) /**< \brief (EIC_CONFIG) Low level detection */
|
||||
#define EIC_CONFIG_FILTEN0_Pos 3 /**< \brief (EIC_CONFIG) Filter Enable 0 */
|
||||
#define EIC_CONFIG_FILTEN0 (0x1u << EIC_CONFIG_FILTEN0_Pos)
|
||||
#define EIC_CONFIG_SENSE1_Pos 4 /**< \brief (EIC_CONFIG) Input Sense Configuration 1 */
|
||||
#define EIC_CONFIG_SENSE1_Msk (0x7u << EIC_CONFIG_SENSE1_Pos)
|
||||
#define EIC_CONFIG_SENSE1(value) ((EIC_CONFIG_SENSE1_Msk & ((value) << EIC_CONFIG_SENSE1_Pos)))
|
||||
#define EIC_CONFIG_SENSE1_NONE (0x0u << 4) /**< \brief (EIC_CONFIG) No detection */
|
||||
#define EIC_CONFIG_SENSE1_RISE (0x1u << 4) /**< \brief (EIC_CONFIG) Rising edge detection */
|
||||
#define EIC_CONFIG_SENSE1_FALL (0x2u << 4) /**< \brief (EIC_CONFIG) Falling edge detection */
|
||||
#define EIC_CONFIG_SENSE1_BOTH (0x3u << 4) /**< \brief (EIC_CONFIG) Both edges detection */
|
||||
#define EIC_CONFIG_SENSE1_HIGH (0x4u << 4) /**< \brief (EIC_CONFIG) High level detection */
|
||||
#define EIC_CONFIG_SENSE1_LOW (0x5u << 4) /**< \brief (EIC_CONFIG) Low level detection */
|
||||
#define EIC_CONFIG_FILTEN1_Pos 7 /**< \brief (EIC_CONFIG) Filter Enable 1 */
|
||||
#define EIC_CONFIG_FILTEN1 (0x1u << EIC_CONFIG_FILTEN1_Pos)
|
||||
#define EIC_CONFIG_SENSE2_Pos 8 /**< \brief (EIC_CONFIG) Input Sense Configuration 2 */
|
||||
#define EIC_CONFIG_SENSE2_Msk (0x7u << EIC_CONFIG_SENSE2_Pos)
|
||||
#define EIC_CONFIG_SENSE2(value) ((EIC_CONFIG_SENSE2_Msk & ((value) << EIC_CONFIG_SENSE2_Pos)))
|
||||
#define EIC_CONFIG_SENSE2_NONE (0x0u << 8) /**< \brief (EIC_CONFIG) No detection */
|
||||
#define EIC_CONFIG_SENSE2_RISE (0x1u << 8) /**< \brief (EIC_CONFIG) Rising edge detection */
|
||||
#define EIC_CONFIG_SENSE2_FALL (0x2u << 8) /**< \brief (EIC_CONFIG) Falling edge detection */
|
||||
#define EIC_CONFIG_SENSE2_BOTH (0x3u << 8) /**< \brief (EIC_CONFIG) Both edges detection */
|
||||
#define EIC_CONFIG_SENSE2_HIGH (0x4u << 8) /**< \brief (EIC_CONFIG) High level detection */
|
||||
#define EIC_CONFIG_SENSE2_LOW (0x5u << 8) /**< \brief (EIC_CONFIG) Low level detection */
|
||||
#define EIC_CONFIG_FILTEN2_Pos 11 /**< \brief (EIC_CONFIG) Filter Enable 2 */
|
||||
#define EIC_CONFIG_FILTEN2 (0x1u << EIC_CONFIG_FILTEN2_Pos)
|
||||
#define EIC_CONFIG_SENSE3_Pos 12 /**< \brief (EIC_CONFIG) Input Sense Configuration 3 */
|
||||
#define EIC_CONFIG_SENSE3_Msk (0x7u << EIC_CONFIG_SENSE3_Pos)
|
||||
#define EIC_CONFIG_SENSE3(value) ((EIC_CONFIG_SENSE3_Msk & ((value) << EIC_CONFIG_SENSE3_Pos)))
|
||||
#define EIC_CONFIG_SENSE3_NONE (0x0u << 12) /**< \brief (EIC_CONFIG) No detection */
|
||||
#define EIC_CONFIG_SENSE3_RISE (0x1u << 12) /**< \brief (EIC_CONFIG) Rising edge detection */
|
||||
#define EIC_CONFIG_SENSE3_FALL (0x2u << 12) /**< \brief (EIC_CONFIG) Falling edge detection */
|
||||
#define EIC_CONFIG_SENSE3_BOTH (0x3u << 12) /**< \brief (EIC_CONFIG) Both edges detection */
|
||||
#define EIC_CONFIG_SENSE3_HIGH (0x4u << 12) /**< \brief (EIC_CONFIG) High level detection */
|
||||
#define EIC_CONFIG_SENSE3_LOW (0x5u << 12) /**< \brief (EIC_CONFIG) Low level detection */
|
||||
#define EIC_CONFIG_FILTEN3_Pos 15 /**< \brief (EIC_CONFIG) Filter Enable 3 */
|
||||
#define EIC_CONFIG_FILTEN3 (0x1u << EIC_CONFIG_FILTEN3_Pos)
|
||||
#define EIC_CONFIG_SENSE4_Pos 16 /**< \brief (EIC_CONFIG) Input Sense Configuration 4 */
|
||||
#define EIC_CONFIG_SENSE4_Msk (0x7u << EIC_CONFIG_SENSE4_Pos)
|
||||
#define EIC_CONFIG_SENSE4(value) ((EIC_CONFIG_SENSE4_Msk & ((value) << EIC_CONFIG_SENSE4_Pos)))
|
||||
#define EIC_CONFIG_SENSE4_NONE (0x0u << 16) /**< \brief (EIC_CONFIG) No detection */
|
||||
#define EIC_CONFIG_SENSE4_RISE (0x1u << 16) /**< \brief (EIC_CONFIG) Rising edge detection */
|
||||
#define EIC_CONFIG_SENSE4_FALL (0x2u << 16) /**< \brief (EIC_CONFIG) Falling edge detection */
|
||||
#define EIC_CONFIG_SENSE4_BOTH (0x3u << 16) /**< \brief (EIC_CONFIG) Both edges detection */
|
||||
#define EIC_CONFIG_SENSE4_HIGH (0x4u << 16) /**< \brief (EIC_CONFIG) High level detection */
|
||||
#define EIC_CONFIG_SENSE4_LOW (0x5u << 16) /**< \brief (EIC_CONFIG) Low level detection */
|
||||
#define EIC_CONFIG_FILTEN4_Pos 19 /**< \brief (EIC_CONFIG) Filter Enable 4 */
|
||||
#define EIC_CONFIG_FILTEN4 (0x1u << EIC_CONFIG_FILTEN4_Pos)
|
||||
#define EIC_CONFIG_SENSE5_Pos 20 /**< \brief (EIC_CONFIG) Input Sense Configuration 5 */
|
||||
#define EIC_CONFIG_SENSE5_Msk (0x7u << EIC_CONFIG_SENSE5_Pos)
|
||||
#define EIC_CONFIG_SENSE5(value) ((EIC_CONFIG_SENSE5_Msk & ((value) << EIC_CONFIG_SENSE5_Pos)))
|
||||
#define EIC_CONFIG_SENSE5_NONE (0x0u << 20) /**< \brief (EIC_CONFIG) No detection */
|
||||
#define EIC_CONFIG_SENSE5_RISE (0x1u << 20) /**< \brief (EIC_CONFIG) Rising edge detection */
|
||||
#define EIC_CONFIG_SENSE5_FALL (0x2u << 20) /**< \brief (EIC_CONFIG) Falling edge detection */
|
||||
#define EIC_CONFIG_SENSE5_BOTH (0x3u << 20) /**< \brief (EIC_CONFIG) Both edges detection */
|
||||
#define EIC_CONFIG_SENSE5_HIGH (0x4u << 20) /**< \brief (EIC_CONFIG) High level detection */
|
||||
#define EIC_CONFIG_SENSE5_LOW (0x5u << 20) /**< \brief (EIC_CONFIG) Low level detection */
|
||||
#define EIC_CONFIG_FILTEN5_Pos 23 /**< \brief (EIC_CONFIG) Filter Enable 5 */
|
||||
#define EIC_CONFIG_FILTEN5 (0x1u << EIC_CONFIG_FILTEN5_Pos)
|
||||
#define EIC_CONFIG_SENSE6_Pos 24 /**< \brief (EIC_CONFIG) Input Sense Configuration 6 */
|
||||
#define EIC_CONFIG_SENSE6_Msk (0x7u << EIC_CONFIG_SENSE6_Pos)
|
||||
#define EIC_CONFIG_SENSE6(value) ((EIC_CONFIG_SENSE6_Msk & ((value) << EIC_CONFIG_SENSE6_Pos)))
|
||||
#define EIC_CONFIG_SENSE6_NONE (0x0u << 24) /**< \brief (EIC_CONFIG) No detection */
|
||||
#define EIC_CONFIG_SENSE6_RISE (0x1u << 24) /**< \brief (EIC_CONFIG) Rising edge detection */
|
||||
#define EIC_CONFIG_SENSE6_FALL (0x2u << 24) /**< \brief (EIC_CONFIG) Falling edge detection */
|
||||
#define EIC_CONFIG_SENSE6_BOTH (0x3u << 24) /**< \brief (EIC_CONFIG) Both edges detection */
|
||||
#define EIC_CONFIG_SENSE6_HIGH (0x4u << 24) /**< \brief (EIC_CONFIG) High level detection */
|
||||
#define EIC_CONFIG_SENSE6_LOW (0x5u << 24) /**< \brief (EIC_CONFIG) Low level detection */
|
||||
#define EIC_CONFIG_FILTEN6_Pos 27 /**< \brief (EIC_CONFIG) Filter Enable 6 */
|
||||
#define EIC_CONFIG_FILTEN6 (0x1u << EIC_CONFIG_FILTEN6_Pos)
|
||||
#define EIC_CONFIG_SENSE7_Pos 28 /**< \brief (EIC_CONFIG) Input Sense Configuration 7 */
|
||||
#define EIC_CONFIG_SENSE7_Msk (0x7u << EIC_CONFIG_SENSE7_Pos)
|
||||
#define EIC_CONFIG_SENSE7(value) ((EIC_CONFIG_SENSE7_Msk & ((value) << EIC_CONFIG_SENSE7_Pos)))
|
||||
#define EIC_CONFIG_SENSE7_NONE (0x0u << 28) /**< \brief (EIC_CONFIG) No detection */
|
||||
#define EIC_CONFIG_SENSE7_RISE (0x1u << 28) /**< \brief (EIC_CONFIG) Rising edge detection */
|
||||
#define EIC_CONFIG_SENSE7_FALL (0x2u << 28) /**< \brief (EIC_CONFIG) Falling edge detection */
|
||||
#define EIC_CONFIG_SENSE7_BOTH (0x3u << 28) /**< \brief (EIC_CONFIG) Both edges detection */
|
||||
#define EIC_CONFIG_SENSE7_HIGH (0x4u << 28) /**< \brief (EIC_CONFIG) High level detection */
|
||||
#define EIC_CONFIG_SENSE7_LOW (0x5u << 28) /**< \brief (EIC_CONFIG) Low level detection */
|
||||
#define EIC_CONFIG_FILTEN7_Pos 31 /**< \brief (EIC_CONFIG) Filter Enable 7 */
|
||||
#define EIC_CONFIG_FILTEN7 (0x1u << EIC_CONFIG_FILTEN7_Pos)
|
||||
#define EIC_CONFIG_MASK 0xFFFFFFFFu /**< \brief (EIC_CONFIG) MASK Register */
|
||||
|
||||
/** \brief EIC hardware registers */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef struct {
|
||||
__IO EIC_CTRL_Type CTRL; /**< \brief Offset: 0x00 (R/W 8) Control Register */
|
||||
__I EIC_STATUS_Type STATUS; /**< \brief Offset: 0x01 (R/ 8) Status Register */
|
||||
__IO EIC_NMICTRL_Type NMICTRL; /**< \brief Offset: 0x02 (R/W 8) NMI Control Register */
|
||||
__IO EIC_NMIFLAG_Type NMIFLAG; /**< \brief Offset: 0x03 (R/W 8) NMI Interrupt Flag Register */
|
||||
__IO EIC_EVCTRL_Type EVCTRL; /**< \brief Offset: 0x04 (R/W 32) Event Control Register */
|
||||
__IO EIC_INTENCLR_Type INTENCLR; /**< \brief Offset: 0x08 (R/W 32) Interrupt Enable Clear Register */
|
||||
__IO EIC_INTENSET_Type INTENSET; /**< \brief Offset: 0x0C (R/W 32) Interrupt Enable Set Register */
|
||||
__IO EIC_INTFLAG_Type INTFLAG; /**< \brief Offset: 0x10 (R/W 32) Interrupt Flag Status and Clear Register */
|
||||
__IO EIC_WAKEUP_Type WAKEUP; /**< \brief Offset: 0x14 (R/W 32) Wake-up Enable Register */
|
||||
__IO EIC_CONFIG_Type CONFIG[2]; /**< \brief Offset: 0x18 (R/W 32) Config Register [NUMBER_OF_CONFIG_REGS] */
|
||||
} Eic;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/*@}*/
|
||||
|
||||
#endif /* _SAMD20_EIC_COMPONENT_ */
|
|
@ -0,0 +1,406 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Component description for EVSYS
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_EVSYS_COMPONENT_
|
||||
#define _SAMD20_EVSYS_COMPONENT_
|
||||
|
||||
/* ========================================================================== */
|
||||
/** SOFTWARE API DEFINITION FOR EVSYS */
|
||||
/* ========================================================================== */
|
||||
/** \addtogroup SAMD20_EVSYS Event System Interface */
|
||||
/*@{*/
|
||||
|
||||
#define REV_EVSYS 0x100
|
||||
|
||||
/* -------- EVSYS_CTRL : (EVSYS Offset: 0x00) ( /W 8) Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t SWRST:1; /*!< bit: 0 Software Reset */
|
||||
uint8_t :3; /*!< bit: 1.. 3 Reserved */
|
||||
uint8_t GCLKREQ:1; /*!< bit: 4 Generic Clock Request */
|
||||
uint8_t :3; /*!< bit: 5.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} EVSYS_CTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define EVSYS_CTRL_OFFSET 0x00 /**< \brief (EVSYS_CTRL offset) Control Register */
|
||||
#define EVSYS_CTRL_RESETVALUE 0x00 /**< \brief (EVSYS_CTRL reset_value) Control Register */
|
||||
|
||||
#define EVSYS_CTRL_SWRST_Pos 0 /**< \brief (EVSYS_CTRL) Software Reset */
|
||||
#define EVSYS_CTRL_SWRST (0x1u << EVSYS_CTRL_SWRST_Pos)
|
||||
#define EVSYS_CTRL_GCLKREQ_Pos 4 /**< \brief (EVSYS_CTRL) Generic Clock Request */
|
||||
#define EVSYS_CTRL_GCLKREQ (0x1u << EVSYS_CTRL_GCLKREQ_Pos)
|
||||
#define EVSYS_CTRL_MASK 0x11u /**< \brief (EVSYS_CTRL) MASK Register */
|
||||
|
||||
/* -------- EVSYS_CHANNEL : (EVSYS Offset: 0x04) (R/W 32) Channel Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t CHANNEL:8; /*!< bit: 0.. 7 Channel Selection */
|
||||
uint32_t SWEVT:1; /*!< bit: 8 Software Event */
|
||||
uint32_t :7; /*!< bit: 9..15 Reserved */
|
||||
uint32_t EVGEN:8; /*!< bit: 16..23 Event Generator Selection */
|
||||
uint32_t PATH:2; /*!< bit: 24..25 Path Selection */
|
||||
uint32_t EDGSEL:2; /*!< bit: 26..27 Edge Selection */
|
||||
uint32_t :4; /*!< bit: 28..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} EVSYS_CHANNEL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define EVSYS_CHANNEL_OFFSET 0x04 /**< \brief (EVSYS_CHANNEL offset) Channel Register */
|
||||
#define EVSYS_CHANNEL_RESETVALUE 0x00000000 /**< \brief (EVSYS_CHANNEL reset_value) Channel Register */
|
||||
|
||||
#define EVSYS_CHANNEL_CHANNEL_Pos 0 /**< \brief (EVSYS_CHANNEL) Channel Selection */
|
||||
#define EVSYS_CHANNEL_CHANNEL_Msk (0xFFu << EVSYS_CHANNEL_CHANNEL_Pos)
|
||||
#define EVSYS_CHANNEL_CHANNEL(value) ((EVSYS_CHANNEL_CHANNEL_Msk & ((value) << EVSYS_CHANNEL_CHANNEL_Pos)))
|
||||
#define EVSYS_CHANNEL_SWEVT_Pos 8 /**< \brief (EVSYS_CHANNEL) Software Event */
|
||||
#define EVSYS_CHANNEL_SWEVT (0x1u << EVSYS_CHANNEL_SWEVT_Pos)
|
||||
#define EVSYS_CHANNEL_EVGEN_Pos 16 /**< \brief (EVSYS_CHANNEL) Event Generator Selection */
|
||||
#define EVSYS_CHANNEL_EVGEN_Msk (0xFFu << EVSYS_CHANNEL_EVGEN_Pos)
|
||||
#define EVSYS_CHANNEL_EVGEN(value) ((EVSYS_CHANNEL_EVGEN_Msk & ((value) << EVSYS_CHANNEL_EVGEN_Pos)))
|
||||
#define EVSYS_CHANNEL_PATH_Pos 24 /**< \brief (EVSYS_CHANNEL) Path Selection */
|
||||
#define EVSYS_CHANNEL_PATH_Msk (0x3u << EVSYS_CHANNEL_PATH_Pos)
|
||||
#define EVSYS_CHANNEL_PATH(value) ((EVSYS_CHANNEL_PATH_Msk & ((value) << EVSYS_CHANNEL_PATH_Pos)))
|
||||
#define EVSYS_CHANNEL_PATH_SYNCHRONOUS (0x0u << 24) /**< \brief (EVSYS_CHANNEL) Synchronous path */
|
||||
#define EVSYS_CHANNEL_PATH_RESYNCHRONIZED (0x1u << 24) /**< \brief (EVSYS_CHANNEL) Resynchronized path */
|
||||
#define EVSYS_CHANNEL_PATH_ASYNCHRONOUS (0x2u << 24) /**< \brief (EVSYS_CHANNEL) Asynchronous path */
|
||||
#define EVSYS_CHANNEL_EDGSEL_Pos 26 /**< \brief (EVSYS_CHANNEL) Edge Selection */
|
||||
#define EVSYS_CHANNEL_EDGSEL_Msk (0x3u << EVSYS_CHANNEL_EDGSEL_Pos)
|
||||
#define EVSYS_CHANNEL_EDGSEL(value) ((EVSYS_CHANNEL_EDGSEL_Msk & ((value) << EVSYS_CHANNEL_EDGSEL_Pos)))
|
||||
#define EVSYS_CHANNEL_EDGSEL_NO_EVT_OUTPUT (0x0u << 26) /**< \brief (EVSYS_CHANNEL) No Event Output */
|
||||
#define EVSYS_CHANNEL_EDGSEL_RISING_EDGE (0x1u << 26) /**< \brief (EVSYS_CHANNEL) Event detection on the rising edge */
|
||||
#define EVSYS_CHANNEL_EDGSEL_FALLING_EDGE (0x2u << 26) /**< \brief (EVSYS_CHANNEL) Event detection on the falling edge */
|
||||
#define EVSYS_CHANNEL_EDGSEL_BOTH_EDGE (0x3u << 26) /**< \brief (EVSYS_CHANNEL) Event detection on both rising/falling edge */
|
||||
#define EVSYS_CHANNEL_MASK 0x0FFF01FFu /**< \brief (EVSYS_CHANNEL) MASK Register */
|
||||
|
||||
/* -------- EVSYS_USER : (EVSYS Offset: 0x08) (R/W 16) User Mux Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t USER:8; /*!< bit: 0.. 7 User Mux Selection */
|
||||
uint16_t CHANNEL:8; /*!< bit: 8..15 Channel Event Selection */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} EVSYS_USER_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define EVSYS_USER_OFFSET 0x08 /**< \brief (EVSYS_USER offset) User Mux Register */
|
||||
#define EVSYS_USER_RESETVALUE 0x0000 /**< \brief (EVSYS_USER reset_value) User Mux Register */
|
||||
|
||||
#define EVSYS_USER_USER_Pos 0 /**< \brief (EVSYS_USER) User Mux Selection */
|
||||
#define EVSYS_USER_USER_Msk (0xFFu << EVSYS_USER_USER_Pos)
|
||||
#define EVSYS_USER_USER(value) ((EVSYS_USER_USER_Msk & ((value) << EVSYS_USER_USER_Pos)))
|
||||
#define EVSYS_USER_CHANNEL_Pos 8 /**< \brief (EVSYS_USER) Channel Event Selection */
|
||||
#define EVSYS_USER_CHANNEL_Msk (0xFFu << EVSYS_USER_CHANNEL_Pos)
|
||||
#define EVSYS_USER_CHANNEL(value) ((EVSYS_USER_CHANNEL_Msk & ((value) << EVSYS_USER_CHANNEL_Pos)))
|
||||
#define EVSYS_USER_MASK 0xFFFFu /**< \brief (EVSYS_USER) MASK Register */
|
||||
|
||||
/* -------- EVSYS_CHSTATUS : (EVSYS Offset: 0x0C) (R/ 32) Channel Status Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t USRRDY0:8; /*!< bit: 0.. 7 User Ready for Channels 0 to 7 (modulo 16) */
|
||||
uint32_t CHBUSY0:8; /*!< bit: 8..15 Channels Busy 0 to 7 (modulo 16) */
|
||||
uint32_t USRRDY1:8; /*!< bit: 16..23 User Ready for Channels 8 to 15 (modulo 16) */
|
||||
uint32_t CHBUSY1:8; /*!< bit: 24..31 Channels Busy 8 to 15 (modulo 16) */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} EVSYS_CHSTATUS_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define EVSYS_CHSTATUS_OFFSET 0x0C /**< \brief (EVSYS_CHSTATUS offset) Channel Status Register */
|
||||
#define EVSYS_CHSTATUS_RESETVALUE 0x00000000 /**< \brief (EVSYS_CHSTATUS reset_value) Channel Status Register */
|
||||
|
||||
#define EVSYS_CHSTATUS_USRRDY0_Pos 0 /**< \brief (EVSYS_CHSTATUS) User Ready for Channels 0 to 7 (modulo 16) */
|
||||
#define EVSYS_CHSTATUS_USRRDY0_Msk (0xFFu << EVSYS_CHSTATUS_USRRDY0_Pos)
|
||||
#define EVSYS_CHSTATUS_USRRDY0(value) ((EVSYS_CHSTATUS_USRRDY0_Msk & ((value) << EVSYS_CHSTATUS_USRRDY0_Pos)))
|
||||
#define EVSYS_CHSTATUS_USRRDY0_USRRDY0 (0x1u << 0) /**< \brief (EVSYS_CHSTATUS) User ready for Channel 0 */
|
||||
#define EVSYS_CHSTATUS_USRRDY0_USRRDY1 (0x2u << 0) /**< \brief (EVSYS_CHSTATUS) User ready for Channel 1 */
|
||||
#define EVSYS_CHSTATUS_USRRDY0_USRRDY2 (0x4u << 0) /**< \brief (EVSYS_CHSTATUS) User ready for Channel 2 */
|
||||
#define EVSYS_CHSTATUS_USRRDY0_USRRDY3 (0x8u << 0) /**< \brief (EVSYS_CHSTATUS) User ready for Channel 3 */
|
||||
#define EVSYS_CHSTATUS_USRRDY0_USRRDY4 (0x10u << 0) /**< \brief (EVSYS_CHSTATUS) User ready for Channel 4 */
|
||||
#define EVSYS_CHSTATUS_USRRDY0_USRRDY5 (0x20u << 0) /**< \brief (EVSYS_CHSTATUS) User ready for Channel 5 */
|
||||
#define EVSYS_CHSTATUS_USRRDY0_USRRDY6 (0x40u << 0) /**< \brief (EVSYS_CHSTATUS) User ready for Channel 6 */
|
||||
#define EVSYS_CHSTATUS_USRRDY0_USRRDY7 (0x80u << 0) /**< \brief (EVSYS_CHSTATUS) User ready for Channel 7 */
|
||||
#define EVSYS_CHSTATUS_CHBUSY0_Pos 8 /**< \brief (EVSYS_CHSTATUS) Channels Busy 0 to 7 (modulo 16) */
|
||||
#define EVSYS_CHSTATUS_CHBUSY0_Msk (0xFFu << EVSYS_CHSTATUS_CHBUSY0_Pos)
|
||||
#define EVSYS_CHSTATUS_CHBUSY0(value) ((EVSYS_CHSTATUS_CHBUSY0_Msk & ((value) << EVSYS_CHSTATUS_CHBUSY0_Pos)))
|
||||
#define EVSYS_CHSTATUS_CHBUSY0_CHBUSY0 (0x1u << 8) /**< \brief (EVSYS_CHSTATUS) Channel 0 busy */
|
||||
#define EVSYS_CHSTATUS_CHBUSY0_CHBUSY1 (0x2u << 8) /**< \brief (EVSYS_CHSTATUS) Channel 1 busy */
|
||||
#define EVSYS_CHSTATUS_CHBUSY0_CHBUSY2 (0x4u << 8) /**< \brief (EVSYS_CHSTATUS) Channel 2 busy */
|
||||
#define EVSYS_CHSTATUS_CHBUSY0_CHBUSY3 (0x8u << 8) /**< \brief (EVSYS_CHSTATUS) Channel 3 busy */
|
||||
#define EVSYS_CHSTATUS_CHBUSY0_CHBUSY4 (0x10u << 8) /**< \brief (EVSYS_CHSTATUS) Channel 4 busy */
|
||||
#define EVSYS_CHSTATUS_CHBUSY0_CHBUSY5 (0x20u << 8) /**< \brief (EVSYS_CHSTATUS) Channel 5 busy */
|
||||
#define EVSYS_CHSTATUS_CHBUSY0_CHBUSY6 (0x40u << 8) /**< \brief (EVSYS_CHSTATUS) Channel 6 busy */
|
||||
#define EVSYS_CHSTATUS_CHBUSY0_CHBUSY7 (0x80u << 8) /**< \brief (EVSYS_CHSTATUS) Channel 7 busy */
|
||||
#define EVSYS_CHSTATUS_USRRDY1_Pos 16 /**< \brief (EVSYS_CHSTATUS) User Ready for Channels 8 to 15 (modulo 16) */
|
||||
#define EVSYS_CHSTATUS_USRRDY1_Msk (0xFFu << EVSYS_CHSTATUS_USRRDY1_Pos)
|
||||
#define EVSYS_CHSTATUS_USRRDY1(value) ((EVSYS_CHSTATUS_USRRDY1_Msk & ((value) << EVSYS_CHSTATUS_USRRDY1_Pos)))
|
||||
#define EVSYS_CHSTATUS_USRRDY1_USRRDY8 (0x1u << 16) /**< \brief (EVSYS_CHSTATUS) User ready for Channel 8 */
|
||||
#define EVSYS_CHSTATUS_USRRDY1_USRRDY9 (0x2u << 16) /**< \brief (EVSYS_CHSTATUS) User ready for Channel 9 */
|
||||
#define EVSYS_CHSTATUS_USRRDY1_USRRDY10 (0x4u << 16) /**< \brief (EVSYS_CHSTATUS) User ready for Channel 10 */
|
||||
#define EVSYS_CHSTATUS_USRRDY1_USRRDY11 (0x8u << 16) /**< \brief (EVSYS_CHSTATUS) User ready for Channel 11 */
|
||||
#define EVSYS_CHSTATUS_USRRDY1_USRRDY12 (0x10u << 16) /**< \brief (EVSYS_CHSTATUS) User ready for Channel 12 */
|
||||
#define EVSYS_CHSTATUS_USRRDY1_USRRDY13 (0x20u << 16) /**< \brief (EVSYS_CHSTATUS) User ready for Channel 13 */
|
||||
#define EVSYS_CHSTATUS_USRRDY1_USRRDY14 (0x40u << 16) /**< \brief (EVSYS_CHSTATUS) User ready for Channel 14 */
|
||||
#define EVSYS_CHSTATUS_USRRDY1_USRRDY15 (0x80u << 16) /**< \brief (EVSYS_CHSTATUS) User ready for Channel 15 */
|
||||
#define EVSYS_CHSTATUS_CHBUSY1_Pos 24 /**< \brief (EVSYS_CHSTATUS) Channels Busy 8 to 15 (modulo 16) */
|
||||
#define EVSYS_CHSTATUS_CHBUSY1_Msk (0xFFu << EVSYS_CHSTATUS_CHBUSY1_Pos)
|
||||
#define EVSYS_CHSTATUS_CHBUSY1(value) ((EVSYS_CHSTATUS_CHBUSY1_Msk & ((value) << EVSYS_CHSTATUS_CHBUSY1_Pos)))
|
||||
#define EVSYS_CHSTATUS_CHBUSY1_CHBUSY8 (0x1u << 24) /**< \brief (EVSYS_CHSTATUS) Channel 8 busy */
|
||||
#define EVSYS_CHSTATUS_CHBUSY1_CHBUSY9 (0x2u << 24) /**< \brief (EVSYS_CHSTATUS) Channel 9 busy */
|
||||
#define EVSYS_CHSTATUS_CHBUSY1_CHBUSY10 (0x4u << 24) /**< \brief (EVSYS_CHSTATUS) Channel 10 busy */
|
||||
#define EVSYS_CHSTATUS_CHBUSY1_CHBUSY11 (0x8u << 24) /**< \brief (EVSYS_CHSTATUS) Channel 11 busy */
|
||||
#define EVSYS_CHSTATUS_CHBUSY1_CHBUSY12 (0x10u << 24) /**< \brief (EVSYS_CHSTATUS) Channel 12 busy */
|
||||
#define EVSYS_CHSTATUS_CHBUSY1_CHBUSY13 (0x20u << 24) /**< \brief (EVSYS_CHSTATUS) Channel 13 busy */
|
||||
#define EVSYS_CHSTATUS_CHBUSY1_CHBUSY14 (0x40u << 24) /**< \brief (EVSYS_CHSTATUS) Channel 14 busy */
|
||||
#define EVSYS_CHSTATUS_CHBUSY1_CHBUSY15 (0x80u << 24) /**< \brief (EVSYS_CHSTATUS) Channel 15 busy */
|
||||
#define EVSYS_CHSTATUS_MASK 0xFFFFFFFFu /**< \brief (EVSYS_CHSTATUS) MASK Register */
|
||||
|
||||
/* -------- EVSYS_INTENCLR : (EVSYS Offset: 0x10) (R/W 32) Interrupt Enable Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t OVR0:8; /*!< bit: 0.. 7 Overrun Interrupt Disable for Channels 0 to 7 (modulo 16) */
|
||||
uint32_t EVD0:8; /*!< bit: 8..15 Event Detection Interrupt Disable for Channels 0 to 7 (modulo 16) */
|
||||
uint32_t OVR1:8; /*!< bit: 16..23 Overrun Interrupt Disable for Channels 8 to 15 (modulo 16) */
|
||||
uint32_t EVD1:8; /*!< bit: 24..31 Event Detection Interrupt Disable for Channels 8 to 15 (modulo 16) */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} EVSYS_INTENCLR_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define EVSYS_INTENCLR_OFFSET 0x10 /**< \brief (EVSYS_INTENCLR offset) Interrupt Enable Clear Register */
|
||||
#define EVSYS_INTENCLR_RESETVALUE 0x00000000 /**< \brief (EVSYS_INTENCLR reset_value) Interrupt Enable Clear Register */
|
||||
|
||||
#define EVSYS_INTENCLR_OVR0_Pos 0 /**< \brief (EVSYS_INTENCLR) Overrun Interrupt Disable for Channels 0 to 7 (modulo 16) */
|
||||
#define EVSYS_INTENCLR_OVR0_Msk (0xFFu << EVSYS_INTENCLR_OVR0_Pos)
|
||||
#define EVSYS_INTENCLR_OVR0(value) ((EVSYS_INTENCLR_OVR0_Msk & ((value) << EVSYS_INTENCLR_OVR0_Pos)))
|
||||
#define EVSYS_INTENCLR_OVR0_OVR0 (0x1u << 0) /**< \brief (EVSYS_INTENCLR) Overrun detected on Channel 0 */
|
||||
#define EVSYS_INTENCLR_OVR0_OVR1 (0x2u << 0) /**< \brief (EVSYS_INTENCLR) Overrun detected on Channel 1 */
|
||||
#define EVSYS_INTENCLR_OVR0_OVR2 (0x4u << 0) /**< \brief (EVSYS_INTENCLR) Overrun detected on Channel 2 */
|
||||
#define EVSYS_INTENCLR_OVR0_OVR3 (0x8u << 0) /**< \brief (EVSYS_INTENCLR) Overrun detected on Channel 3 */
|
||||
#define EVSYS_INTENCLR_OVR0_OVR4 (0x10u << 0) /**< \brief (EVSYS_INTENCLR) Overrun detected on Channel 4 */
|
||||
#define EVSYS_INTENCLR_OVR0_OVR5 (0x20u << 0) /**< \brief (EVSYS_INTENCLR) Overrun detected on Channel 5 */
|
||||
#define EVSYS_INTENCLR_OVR0_OVR6 (0x40u << 0) /**< \brief (EVSYS_INTENCLR) Overrun detected on Channel 6 */
|
||||
#define EVSYS_INTENCLR_OVR0_OVR7 (0x80u << 0) /**< \brief (EVSYS_INTENCLR) Overrun detected on Channel 7 */
|
||||
#define EVSYS_INTENCLR_EVD0_Pos 8 /**< \brief (EVSYS_INTENCLR) Event Detection Interrupt Disable for Channels 0 to 7 (modulo 16) */
|
||||
#define EVSYS_INTENCLR_EVD0_Msk (0xFFu << EVSYS_INTENCLR_EVD0_Pos)
|
||||
#define EVSYS_INTENCLR_EVD0(value) ((EVSYS_INTENCLR_EVD0_Msk & ((value) << EVSYS_INTENCLR_EVD0_Pos)))
|
||||
#define EVSYS_INTENCLR_EVD0_EVD0 (0x1u << 8) /**< \brief (EVSYS_INTENCLR) Event detected on Channel 0 */
|
||||
#define EVSYS_INTENCLR_EVD0_EVD1 (0x2u << 8) /**< \brief (EVSYS_INTENCLR) Event detected on Channel 1 */
|
||||
#define EVSYS_INTENCLR_EVD0_EVD2 (0x4u << 8) /**< \brief (EVSYS_INTENCLR) Event detected on Channel 2 */
|
||||
#define EVSYS_INTENCLR_EVD0_EVD3 (0x8u << 8) /**< \brief (EVSYS_INTENCLR) Event detected on Channel 3 */
|
||||
#define EVSYS_INTENCLR_EVD0_EVD4 (0x10u << 8) /**< \brief (EVSYS_INTENCLR) Event detected on Channel 4 */
|
||||
#define EVSYS_INTENCLR_EVD0_EVD5 (0x20u << 8) /**< \brief (EVSYS_INTENCLR) Event detected on Channel 5 */
|
||||
#define EVSYS_INTENCLR_EVD0_EVD6 (0x40u << 8) /**< \brief (EVSYS_INTENCLR) Event detected on Channel 6 */
|
||||
#define EVSYS_INTENCLR_EVD0_EVD7 (0x80u << 8) /**< \brief (EVSYS_INTENCLR) Event detected on Channel 7 */
|
||||
#define EVSYS_INTENCLR_OVR1_Pos 16 /**< \brief (EVSYS_INTENCLR) Overrun Interrupt Disable for Channels 8 to 15 (modulo 16) */
|
||||
#define EVSYS_INTENCLR_OVR1_Msk (0xFFu << EVSYS_INTENCLR_OVR1_Pos)
|
||||
#define EVSYS_INTENCLR_OVR1(value) ((EVSYS_INTENCLR_OVR1_Msk & ((value) << EVSYS_INTENCLR_OVR1_Pos)))
|
||||
#define EVSYS_INTENCLR_OVR1_OVR8 (0x1u << 16) /**< \brief (EVSYS_INTENCLR) Overrun detected on Channel 8 */
|
||||
#define EVSYS_INTENCLR_OVR1_OVR9 (0x2u << 16) /**< \brief (EVSYS_INTENCLR) Overrun detected on Channel 9 */
|
||||
#define EVSYS_INTENCLR_OVR1_OVR10 (0x4u << 16) /**< \brief (EVSYS_INTENCLR) Overrun detected on Channel 10 */
|
||||
#define EVSYS_INTENCLR_OVR1_OVR11 (0x8u << 16) /**< \brief (EVSYS_INTENCLR) Overrun detected on Channel 11 */
|
||||
#define EVSYS_INTENCLR_OVR1_OVR12 (0x10u << 16) /**< \brief (EVSYS_INTENCLR) Overrun detected on Channel 12 */
|
||||
#define EVSYS_INTENCLR_OVR1_OVR13 (0x20u << 16) /**< \brief (EVSYS_INTENCLR) Overrun detected on Channel 13 */
|
||||
#define EVSYS_INTENCLR_OVR1_OVR14 (0x40u << 16) /**< \brief (EVSYS_INTENCLR) Overrun detected on Channel 14 */
|
||||
#define EVSYS_INTENCLR_OVR1_OVR15 (0x80u << 16) /**< \brief (EVSYS_INTENCLR) Overrun detected on Channel 15 */
|
||||
#define EVSYS_INTENCLR_EVD1_Pos 24 /**< \brief (EVSYS_INTENCLR) Event Detection Interrupt Disable for Channels 8 to 15 (modulo 16) */
|
||||
#define EVSYS_INTENCLR_EVD1_Msk (0xFFu << EVSYS_INTENCLR_EVD1_Pos)
|
||||
#define EVSYS_INTENCLR_EVD1(value) ((EVSYS_INTENCLR_EVD1_Msk & ((value) << EVSYS_INTENCLR_EVD1_Pos)))
|
||||
#define EVSYS_INTENCLR_EVD1_EVD8 (0x1u << 24) /**< \brief (EVSYS_INTENCLR) Event detected on Channel 8 */
|
||||
#define EVSYS_INTENCLR_EVD1_EVD9 (0x2u << 24) /**< \brief (EVSYS_INTENCLR) Event detected on Channel 9 */
|
||||
#define EVSYS_INTENCLR_EVD1_EVD10 (0x4u << 24) /**< \brief (EVSYS_INTENCLR) Event detected on Channel 10 */
|
||||
#define EVSYS_INTENCLR_EVD1_EVD11 (0x8u << 24) /**< \brief (EVSYS_INTENCLR) Event detected on Channel 11 */
|
||||
#define EVSYS_INTENCLR_EVD1_EVD12 (0x10u << 24) /**< \brief (EVSYS_INTENCLR) Event detected on Channel 12 */
|
||||
#define EVSYS_INTENCLR_EVD1_EVD13 (0x20u << 24) /**< \brief (EVSYS_INTENCLR) Event detected on Channel 13 */
|
||||
#define EVSYS_INTENCLR_EVD1_EVD14 (0x40u << 24) /**< \brief (EVSYS_INTENCLR) Event detected on Channel 14 */
|
||||
#define EVSYS_INTENCLR_EVD1_EVD15 (0x80u << 24) /**< \brief (EVSYS_INTENCLR) Event detected on Channel 15 */
|
||||
#define EVSYS_INTENCLR_MASK 0xFFFFFFFFu /**< \brief (EVSYS_INTENCLR) MASK Register */
|
||||
|
||||
/* -------- EVSYS_INTENSET : (EVSYS Offset: 0x14) (R/W 32) Interrupt Enable Set Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t OVR0:8; /*!< bit: 0.. 7 Overrun Interrupt Enable for Channels 0 to 7 (modulo 16) */
|
||||
uint32_t EVD0:8; /*!< bit: 8..15 Event Detection Interrupt Enable for Channels 0 to 7 (modulo 16) */
|
||||
uint32_t OVR1:8; /*!< bit: 16..23 Overrun Interrupt Enable for Channels 8 to 15 (modulo 16) */
|
||||
uint32_t EVD1:8; /*!< bit: 24..31 Event Detection Interrupt Enable for Channels 8 to 15 (modulo 16) */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} EVSYS_INTENSET_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define EVSYS_INTENSET_OFFSET 0x14 /**< \brief (EVSYS_INTENSET offset) Interrupt Enable Set Register */
|
||||
#define EVSYS_INTENSET_RESETVALUE 0x00000000 /**< \brief (EVSYS_INTENSET reset_value) Interrupt Enable Set Register */
|
||||
|
||||
#define EVSYS_INTENSET_OVR0_Pos 0 /**< \brief (EVSYS_INTENSET) Overrun Interrupt Enable for Channels 0 to 7 (modulo 16) */
|
||||
#define EVSYS_INTENSET_OVR0_Msk (0xFFu << EVSYS_INTENSET_OVR0_Pos)
|
||||
#define EVSYS_INTENSET_OVR0(value) ((EVSYS_INTENSET_OVR0_Msk & ((value) << EVSYS_INTENSET_OVR0_Pos)))
|
||||
#define EVSYS_INTENSET_OVR0_OVR0 (0x1u << 0) /**< \brief (EVSYS_INTENSET) Overrun detected on Channel 0 */
|
||||
#define EVSYS_INTENSET_OVR0_OVR1 (0x2u << 0) /**< \brief (EVSYS_INTENSET) Overrun detected on Channel 1 */
|
||||
#define EVSYS_INTENSET_OVR0_OVR2 (0x4u << 0) /**< \brief (EVSYS_INTENSET) Overrun detected on Channel 2 */
|
||||
#define EVSYS_INTENSET_OVR0_OVR3 (0x8u << 0) /**< \brief (EVSYS_INTENSET) Overrun detected on Channel 3 */
|
||||
#define EVSYS_INTENSET_OVR0_OVR4 (0x10u << 0) /**< \brief (EVSYS_INTENSET) Overrun detected on Channel 4 */
|
||||
#define EVSYS_INTENSET_OVR0_OVR5 (0x20u << 0) /**< \brief (EVSYS_INTENSET) Overrun detected on Channel 5 */
|
||||
#define EVSYS_INTENSET_OVR0_OVR6 (0x40u << 0) /**< \brief (EVSYS_INTENSET) Overrun detected on Channel 6 */
|
||||
#define EVSYS_INTENSET_OVR0_OVR7 (0x80u << 0) /**< \brief (EVSYS_INTENSET) Overrun detected on Channel 7 */
|
||||
#define EVSYS_INTENSET_EVD0_Pos 8 /**< \brief (EVSYS_INTENSET) Event Detection Interrupt Enable for Channels 0 to 7 (modulo 16) */
|
||||
#define EVSYS_INTENSET_EVD0_Msk (0xFFu << EVSYS_INTENSET_EVD0_Pos)
|
||||
#define EVSYS_INTENSET_EVD0(value) ((EVSYS_INTENSET_EVD0_Msk & ((value) << EVSYS_INTENSET_EVD0_Pos)))
|
||||
#define EVSYS_INTENSET_EVD0_EVD0 (0x1u << 8) /**< \brief (EVSYS_INTENSET) Event detected on Channel 0 */
|
||||
#define EVSYS_INTENSET_EVD0_EVD1 (0x2u << 8) /**< \brief (EVSYS_INTENSET) Event detected on Channel 1 */
|
||||
#define EVSYS_INTENSET_EVD0_EVD2 (0x4u << 8) /**< \brief (EVSYS_INTENSET) Event detected on Channel 2 */
|
||||
#define EVSYS_INTENSET_EVD0_EVD3 (0x8u << 8) /**< \brief (EVSYS_INTENSET) Event detected on Channel 3 */
|
||||
#define EVSYS_INTENSET_EVD0_EVD4 (0x10u << 8) /**< \brief (EVSYS_INTENSET) Event detected on Channel 4 */
|
||||
#define EVSYS_INTENSET_EVD0_EVD5 (0x20u << 8) /**< \brief (EVSYS_INTENSET) Event detected on Channel 5 */
|
||||
#define EVSYS_INTENSET_EVD0_EVD6 (0x40u << 8) /**< \brief (EVSYS_INTENSET) Event detected on Channel 6 */
|
||||
#define EVSYS_INTENSET_EVD0_EVD7 (0x80u << 8) /**< \brief (EVSYS_INTENSET) Event detected on Channel 7 */
|
||||
#define EVSYS_INTENSET_OVR1_Pos 16 /**< \brief (EVSYS_INTENSET) Overrun Interrupt Enable for Channels 8 to 15 (modulo 16) */
|
||||
#define EVSYS_INTENSET_OVR1_Msk (0xFFu << EVSYS_INTENSET_OVR1_Pos)
|
||||
#define EVSYS_INTENSET_OVR1(value) ((EVSYS_INTENSET_OVR1_Msk & ((value) << EVSYS_INTENSET_OVR1_Pos)))
|
||||
#define EVSYS_INTENSET_OVR1_OVR8 (0x1u << 16) /**< \brief (EVSYS_INTENSET) Overrun detected on Channel 8 */
|
||||
#define EVSYS_INTENSET_OVR1_OVR9 (0x2u << 16) /**< \brief (EVSYS_INTENSET) Overrun detected on Channel 9 */
|
||||
#define EVSYS_INTENSET_OVR1_OVR10 (0x4u << 16) /**< \brief (EVSYS_INTENSET) Overrun detected on Channel 10 */
|
||||
#define EVSYS_INTENSET_OVR1_OVR11 (0x8u << 16) /**< \brief (EVSYS_INTENSET) Overrun detected on Channel 11 */
|
||||
#define EVSYS_INTENSET_OVR1_OVR12 (0x10u << 16) /**< \brief (EVSYS_INTENSET) Overrun detected on Channel 12 */
|
||||
#define EVSYS_INTENSET_OVR1_OVR13 (0x20u << 16) /**< \brief (EVSYS_INTENSET) Overrun detected on Channel 13 */
|
||||
#define EVSYS_INTENSET_OVR1_OVR14 (0x40u << 16) /**< \brief (EVSYS_INTENSET) Overrun detected on Channel 14 */
|
||||
#define EVSYS_INTENSET_OVR1_OVR15 (0x80u << 16) /**< \brief (EVSYS_INTENSET) Overrun detected on Channel 15 */
|
||||
#define EVSYS_INTENSET_EVD1_Pos 24 /**< \brief (EVSYS_INTENSET) Event Detection Interrupt Enable for Channels 8 to 15 (modulo 16) */
|
||||
#define EVSYS_INTENSET_EVD1_Msk (0xFFu << EVSYS_INTENSET_EVD1_Pos)
|
||||
#define EVSYS_INTENSET_EVD1(value) ((EVSYS_INTENSET_EVD1_Msk & ((value) << EVSYS_INTENSET_EVD1_Pos)))
|
||||
#define EVSYS_INTENSET_EVD1_EVD8 (0x1u << 24) /**< \brief (EVSYS_INTENSET) Event detected on Channel 8 */
|
||||
#define EVSYS_INTENSET_EVD1_EVD9 (0x2u << 24) /**< \brief (EVSYS_INTENSET) Event detected on Channel 9 */
|
||||
#define EVSYS_INTENSET_EVD1_EVD10 (0x4u << 24) /**< \brief (EVSYS_INTENSET) Event detected on Channel 10 */
|
||||
#define EVSYS_INTENSET_EVD1_EVD11 (0x8u << 24) /**< \brief (EVSYS_INTENSET) Event detected on Channel 11 */
|
||||
#define EVSYS_INTENSET_EVD1_EVD12 (0x10u << 24) /**< \brief (EVSYS_INTENSET) Event detected on Channel 12 */
|
||||
#define EVSYS_INTENSET_EVD1_EVD13 (0x20u << 24) /**< \brief (EVSYS_INTENSET) Event detected on Channel 13 */
|
||||
#define EVSYS_INTENSET_EVD1_EVD14 (0x40u << 24) /**< \brief (EVSYS_INTENSET) Event detected on Channel 14 */
|
||||
#define EVSYS_INTENSET_EVD1_EVD15 (0x80u << 24) /**< \brief (EVSYS_INTENSET) Event detected on Channel 15 */
|
||||
#define EVSYS_INTENSET_MASK 0xFFFFFFFFu /**< \brief (EVSYS_INTENSET) MASK Register */
|
||||
|
||||
/* -------- EVSYS_INTFLAG : (EVSYS Offset: 0x18) (R/W 32) Interrupt Flag Status and Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t OVR0:8; /*!< bit: 0.. 7 Overrun Interrupt Flag for Channels 0 to 7 (modulo 16) */
|
||||
uint32_t EVD0:8; /*!< bit: 8..15 Event Detection Interrupt Flag for Channels 0 to 7 (modulo 16) */
|
||||
uint32_t OVR1:8; /*!< bit: 16..23 Overrun Interrupt Flag for Channels 8 to 15 (modulo 16) */
|
||||
uint32_t EVD1:8; /*!< bit: 24..31 Event Detection Interrupt Flag for Channels 8 to 15 (modulo 16) */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} EVSYS_INTFLAG_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define EVSYS_INTFLAG_OFFSET 0x18 /**< \brief (EVSYS_INTFLAG offset) Interrupt Flag Status and Clear Register */
|
||||
#define EVSYS_INTFLAG_RESETVALUE 0x00000000 /**< \brief (EVSYS_INTFLAG reset_value) Interrupt Flag Status and Clear Register */
|
||||
|
||||
#define EVSYS_INTFLAG_OVR0_Pos 0 /**< \brief (EVSYS_INTFLAG) Overrun Interrupt Flag for Channels 0 to 7 (modulo 16) */
|
||||
#define EVSYS_INTFLAG_OVR0_Msk (0xFFu << EVSYS_INTFLAG_OVR0_Pos)
|
||||
#define EVSYS_INTFLAG_OVR0(value) ((EVSYS_INTFLAG_OVR0_Msk & ((value) << EVSYS_INTFLAG_OVR0_Pos)))
|
||||
#define EVSYS_INTFLAG_OVR0_OVR0 (0x1u << 0) /**< \brief (EVSYS_INTFLAG) Overrun detected on Channel 0 */
|
||||
#define EVSYS_INTFLAG_OVR0_OVR1 (0x2u << 0) /**< \brief (EVSYS_INTFLAG) Overrun detected on Channel 1 */
|
||||
#define EVSYS_INTFLAG_OVR0_OVR2 (0x4u << 0) /**< \brief (EVSYS_INTFLAG) Overrun detected on Channel 2 */
|
||||
#define EVSYS_INTFLAG_OVR0_OVR3 (0x8u << 0) /**< \brief (EVSYS_INTFLAG) Overrun detected on Channel 3 */
|
||||
#define EVSYS_INTFLAG_OVR0_OVR4 (0x10u << 0) /**< \brief (EVSYS_INTFLAG) Overrun detected on Channel 4 */
|
||||
#define EVSYS_INTFLAG_OVR0_OVR5 (0x20u << 0) /**< \brief (EVSYS_INTFLAG) Overrun detected on Channel 5 */
|
||||
#define EVSYS_INTFLAG_OVR0_OVR6 (0x40u << 0) /**< \brief (EVSYS_INTFLAG) Overrun detected on Channel 6 */
|
||||
#define EVSYS_INTFLAG_OVR0_OVR7 (0x80u << 0) /**< \brief (EVSYS_INTFLAG) Overrun detected on Channel 7 */
|
||||
#define EVSYS_INTFLAG_EVD0_Pos 8 /**< \brief (EVSYS_INTFLAG) Event Detection Interrupt Flag for Channels 0 to 7 (modulo 16) */
|
||||
#define EVSYS_INTFLAG_EVD0_Msk (0xFFu << EVSYS_INTFLAG_EVD0_Pos)
|
||||
#define EVSYS_INTFLAG_EVD0(value) ((EVSYS_INTFLAG_EVD0_Msk & ((value) << EVSYS_INTFLAG_EVD0_Pos)))
|
||||
#define EVSYS_INTFLAG_EVD0_EVD0 (0x1u << 8) /**< \brief (EVSYS_INTFLAG) Event detected on Channel 0 */
|
||||
#define EVSYS_INTFLAG_EVD0_EVD1 (0x2u << 8) /**< \brief (EVSYS_INTFLAG) Event detected on Channel 1 */
|
||||
#define EVSYS_INTFLAG_EVD0_EVD2 (0x4u << 8) /**< \brief (EVSYS_INTFLAG) Event detected on Channel 2 */
|
||||
#define EVSYS_INTFLAG_EVD0_EVD3 (0x8u << 8) /**< \brief (EVSYS_INTFLAG) Event detected on Channel 3 */
|
||||
#define EVSYS_INTFLAG_EVD0_EVD4 (0x10u << 8) /**< \brief (EVSYS_INTFLAG) Event detected on Channel 4 */
|
||||
#define EVSYS_INTFLAG_EVD0_EVD5 (0x20u << 8) /**< \brief (EVSYS_INTFLAG) Event detected on Channel 5 */
|
||||
#define EVSYS_INTFLAG_EVD0_EVD6 (0x40u << 8) /**< \brief (EVSYS_INTFLAG) Event detected on Channel 6 */
|
||||
#define EVSYS_INTFLAG_EVD0_EVD7 (0x80u << 8) /**< \brief (EVSYS_INTFLAG) Event detected on Channel 7 */
|
||||
#define EVSYS_INTFLAG_OVR1_Pos 16 /**< \brief (EVSYS_INTFLAG) Overrun Interrupt Flag for Channels 8 to 15 (modulo 16) */
|
||||
#define EVSYS_INTFLAG_OVR1_Msk (0xFFu << EVSYS_INTFLAG_OVR1_Pos)
|
||||
#define EVSYS_INTFLAG_OVR1(value) ((EVSYS_INTFLAG_OVR1_Msk & ((value) << EVSYS_INTFLAG_OVR1_Pos)))
|
||||
#define EVSYS_INTFLAG_OVR1_OVR8 (0x1u << 16) /**< \brief (EVSYS_INTFLAG) Overrun detected on Channel 8 */
|
||||
#define EVSYS_INTFLAG_OVR1_OVR9 (0x2u << 16) /**< \brief (EVSYS_INTFLAG) Overrun detected on Channel 9 */
|
||||
#define EVSYS_INTFLAG_OVR1_OVR10 (0x4u << 16) /**< \brief (EVSYS_INTFLAG) Overrun detected on Channel 10 */
|
||||
#define EVSYS_INTFLAG_OVR1_OVR11 (0x8u << 16) /**< \brief (EVSYS_INTFLAG) Overrun detected on Channel 11 */
|
||||
#define EVSYS_INTFLAG_OVR1_OVR12 (0x10u << 16) /**< \brief (EVSYS_INTFLAG) Overrun detected on Channel 12 */
|
||||
#define EVSYS_INTFLAG_OVR1_OVR13 (0x20u << 16) /**< \brief (EVSYS_INTFLAG) Overrun detected on Channel 13 */
|
||||
#define EVSYS_INTFLAG_OVR1_OVR14 (0x40u << 16) /**< \brief (EVSYS_INTFLAG) Overrun detected on Channel 14 */
|
||||
#define EVSYS_INTFLAG_OVR1_OVR15 (0x80u << 16) /**< \brief (EVSYS_INTFLAG) Overrun detected on Channel 15 */
|
||||
#define EVSYS_INTFLAG_EVD1_Pos 24 /**< \brief (EVSYS_INTFLAG) Event Detection Interrupt Flag for Channels 8 to 15 (modulo 16) */
|
||||
#define EVSYS_INTFLAG_EVD1_Msk (0xFFu << EVSYS_INTFLAG_EVD1_Pos)
|
||||
#define EVSYS_INTFLAG_EVD1(value) ((EVSYS_INTFLAG_EVD1_Msk & ((value) << EVSYS_INTFLAG_EVD1_Pos)))
|
||||
#define EVSYS_INTFLAG_EVD1_EVD8 (0x1u << 24) /**< \brief (EVSYS_INTFLAG) Event detected on Channel 8 */
|
||||
#define EVSYS_INTFLAG_EVD1_EVD9 (0x2u << 24) /**< \brief (EVSYS_INTFLAG) Event detected on Channel 9 */
|
||||
#define EVSYS_INTFLAG_EVD1_EVD10 (0x4u << 24) /**< \brief (EVSYS_INTFLAG) Event detected on Channel 10 */
|
||||
#define EVSYS_INTFLAG_EVD1_EVD11 (0x8u << 24) /**< \brief (EVSYS_INTFLAG) Event detected on Channel 11 */
|
||||
#define EVSYS_INTFLAG_EVD1_EVD12 (0x10u << 24) /**< \brief (EVSYS_INTFLAG) Event detected on Channel 12 */
|
||||
#define EVSYS_INTFLAG_EVD1_EVD13 (0x20u << 24) /**< \brief (EVSYS_INTFLAG) Event detected on Channel 13 */
|
||||
#define EVSYS_INTFLAG_EVD1_EVD14 (0x40u << 24) /**< \brief (EVSYS_INTFLAG) Event detected on Channel 14 */
|
||||
#define EVSYS_INTFLAG_EVD1_EVD15 (0x80u << 24) /**< \brief (EVSYS_INTFLAG) Event detected on Channel 15 */
|
||||
#define EVSYS_INTFLAG_MASK 0xFFFFFFFFu /**< \brief (EVSYS_INTFLAG) MASK Register */
|
||||
|
||||
/** \brief EVSYS hardware registers */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef struct {
|
||||
__O EVSYS_CTRL_Type CTRL; /**< \brief Offset: 0x00 ( /W 8) Control Register */
|
||||
RoReg8 Reserved1[0x3];
|
||||
__IO EVSYS_CHANNEL_Type CHANNEL; /**< \brief Offset: 0x04 (R/W 32) Channel Register */
|
||||
__IO EVSYS_USER_Type USER; /**< \brief Offset: 0x08 (R/W 16) User Mux Register */
|
||||
RoReg8 Reserved2[0x2];
|
||||
__I EVSYS_CHSTATUS_Type CHSTATUS; /**< \brief Offset: 0x0C (R/ 32) Channel Status Register */
|
||||
__IO EVSYS_INTENCLR_Type INTENCLR; /**< \brief Offset: 0x10 (R/W 32) Interrupt Enable Clear Register */
|
||||
__IO EVSYS_INTENSET_Type INTENSET; /**< \brief Offset: 0x14 (R/W 32) Interrupt Enable Set Register */
|
||||
__IO EVSYS_INTFLAG_Type INTFLAG; /**< \brief Offset: 0x18 (R/W 32) Interrupt Flag Status and Clear Register */
|
||||
} Evsys;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/*@}*/
|
||||
|
||||
#endif /* _SAMD20_EVSYS_COMPONENT_ */
|
|
@ -0,0 +1,201 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Component description for GCLK
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_GCLK_COMPONENT_
|
||||
#define _SAMD20_GCLK_COMPONENT_
|
||||
|
||||
/* ========================================================================== */
|
||||
/** SOFTWARE API DEFINITION FOR GCLK */
|
||||
/* ========================================================================== */
|
||||
/** \addtogroup SAMD20_GCLK Generic Clock Generator */
|
||||
/*@{*/
|
||||
|
||||
#define REV_GCLK 0x200
|
||||
|
||||
/* -------- GCLK_CTRL : (GCLK Offset: 0x0) (R/W 8) Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t SWRST:1; /*!< bit: 0 Software Reset */
|
||||
uint8_t :7; /*!< bit: 1.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} GCLK_CTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define GCLK_CTRL_OFFSET 0x0 /**< \brief (GCLK_CTRL offset) Control Register */
|
||||
#define GCLK_CTRL_RESETVALUE 0x00 /**< \brief (GCLK_CTRL reset_value) Control Register */
|
||||
|
||||
#define GCLK_CTRL_SWRST_Pos 0 /**< \brief (GCLK_CTRL) Software Reset */
|
||||
#define GCLK_CTRL_SWRST (0x1u << GCLK_CTRL_SWRST_Pos)
|
||||
#define GCLK_CTRL_MASK 0x01u /**< \brief (GCLK_CTRL) MASK Register */
|
||||
|
||||
/* -------- GCLK_STATUS : (GCLK Offset: 0x1) (R/ 8) Status Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t :7; /*!< bit: 0.. 6 Reserved */
|
||||
uint8_t SYNCBUSY:1; /*!< bit: 7 Synchronization Busy */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} GCLK_STATUS_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define GCLK_STATUS_OFFSET 0x1 /**< \brief (GCLK_STATUS offset) Status Register */
|
||||
#define GCLK_STATUS_RESETVALUE 0x00 /**< \brief (GCLK_STATUS reset_value) Status Register */
|
||||
|
||||
#define GCLK_STATUS_SYNCBUSY_Pos 7 /**< \brief (GCLK_STATUS) Synchronization Busy */
|
||||
#define GCLK_STATUS_SYNCBUSY (0x1u << GCLK_STATUS_SYNCBUSY_Pos)
|
||||
#define GCLK_STATUS_MASK 0x80u /**< \brief (GCLK_STATUS) MASK Register */
|
||||
|
||||
/* -------- GCLK_CLKCTRL : (GCLK Offset: 0x2) (R/W 16) Generic Clock Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t ID:6; /*!< bit: 0.. 5 Generic Clock Selection */
|
||||
uint16_t :2; /*!< bit: 6.. 7 Reserved */
|
||||
uint16_t GEN:4; /*!< bit: 8..11 Generic Clock Generator Select */
|
||||
uint16_t :2; /*!< bit: 12..13 Reserved */
|
||||
uint16_t CLKEN:1; /*!< bit: 14 Clock Enable */
|
||||
uint16_t WRTLOCK:1; /*!< bit: 15 Write Lock */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} GCLK_CLKCTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define GCLK_CLKCTRL_OFFSET 0x2 /**< \brief (GCLK_CLKCTRL offset) Generic Clock Control Register */
|
||||
#define GCLK_CLKCTRL_RESETVALUE 0x0000 /**< \brief (GCLK_CLKCTRL reset_value) Generic Clock Control Register */
|
||||
|
||||
#define GCLK_CLKCTRL_ID_Pos 0 /**< \brief (GCLK_CLKCTRL) Generic Clock Selection */
|
||||
#define GCLK_CLKCTRL_ID_Msk (0x3Fu << GCLK_CLKCTRL_ID_Pos)
|
||||
#define GCLK_CLKCTRL_ID(value) ((GCLK_CLKCTRL_ID_Msk & ((value) << GCLK_CLKCTRL_ID_Pos)))
|
||||
#define GCLK_CLKCTRL_GEN_Pos 8 /**< \brief (GCLK_CLKCTRL) Generic Clock Generator Select */
|
||||
#define GCLK_CLKCTRL_GEN_Msk (0xFu << GCLK_CLKCTRL_GEN_Pos)
|
||||
#define GCLK_CLKCTRL_GEN(value) ((GCLK_CLKCTRL_GEN_Msk & ((value) << GCLK_CLKCTRL_GEN_Pos)))
|
||||
#define GCLK_CLKCTRL_CLKEN_Pos 14 /**< \brief (GCLK_CLKCTRL) Clock Enable */
|
||||
#define GCLK_CLKCTRL_CLKEN (0x1u << GCLK_CLKCTRL_CLKEN_Pos)
|
||||
#define GCLK_CLKCTRL_WRTLOCK_Pos 15 /**< \brief (GCLK_CLKCTRL) Write Lock */
|
||||
#define GCLK_CLKCTRL_WRTLOCK (0x1u << GCLK_CLKCTRL_WRTLOCK_Pos)
|
||||
#define GCLK_CLKCTRL_MASK 0xCF3Fu /**< \brief (GCLK_CLKCTRL) MASK Register */
|
||||
|
||||
/* -------- GCLK_GENCTRL : (GCLK Offset: 0x4) (R/W 32) Generic Clock Generator Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t ID:4; /*!< bit: 0.. 3 Generic Clock Generator Selection */
|
||||
uint32_t :4; /*!< bit: 4.. 7 Reserved */
|
||||
uint32_t SRC:5; /*!< bit: 8..12 Clock Source Select */
|
||||
uint32_t :3; /*!< bit: 13..15 Reserved */
|
||||
uint32_t GENEN:1; /*!< bit: 16 Generic Clock Generator Enable */
|
||||
uint32_t IDC:1; /*!< bit: 17 Improve Duty Cycle */
|
||||
uint32_t OOV:1; /*!< bit: 18 Output Off Value */
|
||||
uint32_t OE:1; /*!< bit: 19 Output Enable */
|
||||
uint32_t DIVSEL:1; /*!< bit: 20 Divide Selection */
|
||||
uint32_t RUNSTDBY:1; /*!< bit: 21 Run during Standby */
|
||||
uint32_t :10; /*!< bit: 22..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} GCLK_GENCTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define GCLK_GENCTRL_OFFSET 0x4 /**< \brief (GCLK_GENCTRL offset) Generic Clock Generator Control Register */
|
||||
#define GCLK_GENCTRL_RESETVALUE 0x00000000 /**< \brief (GCLK_GENCTRL reset_value) Generic Clock Generator Control Register */
|
||||
|
||||
#define GCLK_GENCTRL_ID_Pos 0 /**< \brief (GCLK_GENCTRL) Generic Clock Generator Selection */
|
||||
#define GCLK_GENCTRL_ID_Msk (0xFu << GCLK_GENCTRL_ID_Pos)
|
||||
#define GCLK_GENCTRL_ID(value) ((GCLK_GENCTRL_ID_Msk & ((value) << GCLK_GENCTRL_ID_Pos)))
|
||||
#define GCLK_GENCTRL_SRC_Pos 8 /**< \brief (GCLK_GENCTRL) Clock Source Select */
|
||||
#define GCLK_GENCTRL_SRC_Msk (0x1Fu << GCLK_GENCTRL_SRC_Pos)
|
||||
#define GCLK_GENCTRL_SRC(value) ((GCLK_GENCTRL_SRC_Msk & ((value) << GCLK_GENCTRL_SRC_Pos)))
|
||||
#define GCLK_GENCTRL_GENEN_Pos 16 /**< \brief (GCLK_GENCTRL) Generic Clock Generator Enable */
|
||||
#define GCLK_GENCTRL_GENEN (0x1u << GCLK_GENCTRL_GENEN_Pos)
|
||||
#define GCLK_GENCTRL_IDC_Pos 17 /**< \brief (GCLK_GENCTRL) Improve Duty Cycle */
|
||||
#define GCLK_GENCTRL_IDC (0x1u << GCLK_GENCTRL_IDC_Pos)
|
||||
#define GCLK_GENCTRL_OOV_Pos 18 /**< \brief (GCLK_GENCTRL) Output Off Value */
|
||||
#define GCLK_GENCTRL_OOV (0x1u << GCLK_GENCTRL_OOV_Pos)
|
||||
#define GCLK_GENCTRL_OE_Pos 19 /**< \brief (GCLK_GENCTRL) Output Enable */
|
||||
#define GCLK_GENCTRL_OE (0x1u << GCLK_GENCTRL_OE_Pos)
|
||||
#define GCLK_GENCTRL_DIVSEL_Pos 20 /**< \brief (GCLK_GENCTRL) Divide Selection */
|
||||
#define GCLK_GENCTRL_DIVSEL (0x1u << GCLK_GENCTRL_DIVSEL_Pos)
|
||||
#define GCLK_GENCTRL_RUNSTDBY_Pos 21 /**< \brief (GCLK_GENCTRL) Run during Standby */
|
||||
#define GCLK_GENCTRL_RUNSTDBY (0x1u << GCLK_GENCTRL_RUNSTDBY_Pos)
|
||||
#define GCLK_GENCTRL_MASK 0x003F1F0Fu /**< \brief (GCLK_GENCTRL) MASK Register */
|
||||
|
||||
/* -------- GCLK_GENDIV : (GCLK Offset: 0x8) (R/W 32) Generic Clock Generator Division Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t ID:4; /*!< bit: 0.. 3 Generic Clock Generator Selection */
|
||||
uint32_t :4; /*!< bit: 4.. 7 Reserved */
|
||||
uint32_t DIV:16; /*!< bit: 8..23 Division Factor */
|
||||
uint32_t :8; /*!< bit: 24..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} GCLK_GENDIV_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define GCLK_GENDIV_OFFSET 0x8 /**< \brief (GCLK_GENDIV offset) Generic Clock Generator Division Register */
|
||||
#define GCLK_GENDIV_RESETVALUE 0x00000000 /**< \brief (GCLK_GENDIV reset_value) Generic Clock Generator Division Register */
|
||||
|
||||
#define GCLK_GENDIV_ID_Pos 0 /**< \brief (GCLK_GENDIV) Generic Clock Generator Selection */
|
||||
#define GCLK_GENDIV_ID_Msk (0xFu << GCLK_GENDIV_ID_Pos)
|
||||
#define GCLK_GENDIV_ID(value) ((GCLK_GENDIV_ID_Msk & ((value) << GCLK_GENDIV_ID_Pos)))
|
||||
#define GCLK_GENDIV_DIV_Pos 8 /**< \brief (GCLK_GENDIV) Division Factor */
|
||||
#define GCLK_GENDIV_DIV_Msk (0xFFFFu << GCLK_GENDIV_DIV_Pos)
|
||||
#define GCLK_GENDIV_DIV(value) ((GCLK_GENDIV_DIV_Msk & ((value) << GCLK_GENDIV_DIV_Pos)))
|
||||
#define GCLK_GENDIV_MASK 0x00FFFF0Fu /**< \brief (GCLK_GENDIV) MASK Register */
|
||||
|
||||
/** \brief GCLK hardware registers */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef struct {
|
||||
__IO GCLK_CTRL_Type CTRL; /**< \brief Offset: 0x0 (R/W 8) Control Register */
|
||||
__I GCLK_STATUS_Type STATUS; /**< \brief Offset: 0x1 (R/ 8) Status Register */
|
||||
__IO GCLK_CLKCTRL_Type CLKCTRL; /**< \brief Offset: 0x2 (R/W 16) Generic Clock Control Register */
|
||||
__IO GCLK_GENCTRL_Type GENCTRL; /**< \brief Offset: 0x4 (R/W 32) Generic Clock Generator Control Register */
|
||||
__IO GCLK_GENDIV_Type GENDIV; /**< \brief Offset: 0x8 (R/W 32) Generic Clock Generator Division Register */
|
||||
} Gclk;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/*@}*/
|
||||
|
||||
#endif /* _SAMD20_GCLK_COMPONENT_ */
|
|
@ -0,0 +1,507 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Component description for NVMCTRL
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_NVMCTRL_COMPONENT_
|
||||
#define _SAMD20_NVMCTRL_COMPONENT_
|
||||
|
||||
/* ========================================================================== */
|
||||
/** SOFTWARE API DEFINITION FOR NVMCTRL */
|
||||
/* ========================================================================== */
|
||||
/** \addtogroup SAMD20_NVMCTRL Non-Volatile Memory Controller */
|
||||
/*@{*/
|
||||
|
||||
#define REV_NVMCTRL 0x102
|
||||
|
||||
/* -------- NVMCTRL_CTRLA : (NVMCTRL Offset: 0x00) (R/W 16) NVM Control Register A -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t CMD:7; /*!< bit: 0.. 6 Command */
|
||||
uint16_t :1; /*!< bit: 7 Reserved */
|
||||
uint16_t CMDEX:8; /*!< bit: 8..15 Command Execution */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} NVMCTRL_CTRLA_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define NVMCTRL_CTRLA_OFFSET 0x00 /**< \brief (NVMCTRL_CTRLA offset) NVM Control Register A */
|
||||
#define NVMCTRL_CTRLA_RESETVALUE 0x0000 /**< \brief (NVMCTRL_CTRLA reset_value) NVM Control Register A */
|
||||
|
||||
#define NVMCTRL_CTRLA_CMD_Pos 0 /**< \brief (NVMCTRL_CTRLA) Command */
|
||||
#define NVMCTRL_CTRLA_CMD_Msk (0x7Fu << NVMCTRL_CTRLA_CMD_Pos)
|
||||
#define NVMCTRL_CTRLA_CMD(value) ((NVMCTRL_CTRLA_CMD_Msk & ((value) << NVMCTRL_CTRLA_CMD_Pos)))
|
||||
#define NVMCTRL_CTRLA_CMD_ER (0x2u << 0) /**< \brief (NVMCTRL_CTRLA) Erase Row */
|
||||
#define NVMCTRL_CTRLA_CMD_WP (0x4u << 0) /**< \brief (NVMCTRL_CTRLA) Write Page */
|
||||
#define NVMCTRL_CTRLA_CMD_EAR (0x5u << 0) /**< \brief (NVMCTRL_CTRLA) Erase Auxiliary Row */
|
||||
#define NVMCTRL_CTRLA_CMD_WAP (0x6u << 0) /**< \brief (NVMCTRL_CTRLA) Write Auxiliary Row */
|
||||
#define NVMCTRL_CTRLA_CMD_SF (0xAu << 0) /**< \brief (NVMCTRL_CTRLA) Security Flow Command */
|
||||
#define NVMCTRL_CTRLA_CMD_WL (0xFu << 0) /**< \brief (NVMCTRL_CTRLA) Write lockbits */
|
||||
#define NVMCTRL_CTRLA_CMD_LR (0x40u << 0) /**< \brief (NVMCTRL_CTRLA) Lock Region */
|
||||
#define NVMCTRL_CTRLA_CMD_UR (0x41u << 0) /**< \brief (NVMCTRL_CTRLA) Unlock Region */
|
||||
#define NVMCTRL_CTRLA_CMD_SPRM (0x42u << 0) /**< \brief (NVMCTRL_CTRLA) Set Power Reduction Mode */
|
||||
#define NVMCTRL_CTRLA_CMD_CPRM (0x43u << 0) /**< \brief (NVMCTRL_CTRLA) Clear Power Reduction Mode */
|
||||
#define NVMCTRL_CTRLA_CMD_PBC (0x44u << 0) /**< \brief (NVMCTRL_CTRLA) Page Buffer Clear */
|
||||
#define NVMCTRL_CTRLA_CMD_SSB (0x45u << 0) /**< \brief (NVMCTRL_CTRLA) Set Security Bit */
|
||||
#define NVMCTRL_CTRLA_CMD_SMR (0x54u << 0) /**< \brief (NVMCTRL_CTRLA) State Machine Reset */
|
||||
#define NVMCTRL_CTRLA_CMDEX_Pos 8 /**< \brief (NVMCTRL_CTRLA) Command Execution */
|
||||
#define NVMCTRL_CTRLA_CMDEX_Msk (0xFFu << NVMCTRL_CTRLA_CMDEX_Pos)
|
||||
#define NVMCTRL_CTRLA_CMDEX(value) ((NVMCTRL_CTRLA_CMDEX_Msk & ((value) << NVMCTRL_CTRLA_CMDEX_Pos)))
|
||||
#define NVMCTRL_CTRLA_CMDEX_KEY (0xA5u << 8) /**< \brief (NVMCTRL_CTRLA) Execution Key */
|
||||
#define NVMCTRL_CTRLA_MASK 0xFF7Fu /**< \brief (NVMCTRL_CTRLA) MASK Register */
|
||||
|
||||
/* -------- NVMCTRL_CTRLB : (NVMCTRL Offset: 0x04) (R/W 32) NVM Control Register B -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t :1; /*!< bit: 0 Reserved */
|
||||
uint32_t RWS:4; /*!< bit: 1.. 4 NVM Read Wait States */
|
||||
uint32_t :2; /*!< bit: 5.. 6 Reserved */
|
||||
uint32_t MANW:1; /*!< bit: 7 Manual Write */
|
||||
uint32_t SLEEPPRM:2; /*!< bit: 8.. 9 Power Reduction Mode during Sleep */
|
||||
uint32_t :6; /*!< bit: 10..15 Reserved */
|
||||
uint32_t READMODE:2; /*!< bit: 16..17 NVMCTRL Read Mode */
|
||||
uint32_t CACHEDIS:1; /*!< bit: 18 Cache Disable */
|
||||
uint32_t :13; /*!< bit: 19..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} NVMCTRL_CTRLB_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define NVMCTRL_CTRLB_OFFSET 0x04 /**< \brief (NVMCTRL_CTRLB offset) NVM Control Register B */
|
||||
#define NVMCTRL_CTRLB_RESETVALUE 0x00000000 /**< \brief (NVMCTRL_CTRLB reset_value) NVM Control Register B */
|
||||
|
||||
#define NVMCTRL_CTRLB_RWS_Pos 1 /**< \brief (NVMCTRL_CTRLB) NVM Read Wait States */
|
||||
#define NVMCTRL_CTRLB_RWS_Msk (0xFu << NVMCTRL_CTRLB_RWS_Pos)
|
||||
#define NVMCTRL_CTRLB_RWS(value) ((NVMCTRL_CTRLB_RWS_Msk & ((value) << NVMCTRL_CTRLB_RWS_Pos)))
|
||||
#define NVMCTRL_CTRLB_RWS_SINGLE (0x0u << 1) /**< \brief (NVMCTRL_CTRLB) Single Auto Wait State */
|
||||
#define NVMCTRL_CTRLB_RWS_HALF (0x1u << 1) /**< \brief (NVMCTRL_CTRLB) Half Auto Wait State */
|
||||
#define NVMCTRL_CTRLB_RWS_DUAL (0x2u << 1) /**< \brief (NVMCTRL_CTRLB) Dual Auto Wait State */
|
||||
#define NVMCTRL_CTRLB_MANW_Pos 7 /**< \brief (NVMCTRL_CTRLB) Manual Write */
|
||||
#define NVMCTRL_CTRLB_MANW (0x1u << NVMCTRL_CTRLB_MANW_Pos)
|
||||
#define NVMCTRL_CTRLB_SLEEPPRM_Pos 8 /**< \brief (NVMCTRL_CTRLB) Power Reduction Mode during Sleep */
|
||||
#define NVMCTRL_CTRLB_SLEEPPRM_Msk (0x3u << NVMCTRL_CTRLB_SLEEPPRM_Pos)
|
||||
#define NVMCTRL_CTRLB_SLEEPPRM(value) ((NVMCTRL_CTRLB_SLEEPPRM_Msk & ((value) << NVMCTRL_CTRLB_SLEEPPRM_Pos)))
|
||||
#define NVMCTRL_CTRLB_SLEEPPRM_WAKEONACCESS (0x0u << 8) /**< \brief (NVMCTRL_CTRLB) Wake on first access. */
|
||||
#define NVMCTRL_CTRLB_SLEEPPRM_WAKEUPINSTANT (0x1u << 8) /**< \brief (NVMCTRL_CTRLB) Wake on sleep exit. */
|
||||
#define NVMCTRL_CTRLB_SLEEPPRM_DISABLED (0x3u << 8) /**< \brief (NVMCTRL_CTRLB) Auto power reduction disabled. */
|
||||
#define NVMCTRL_CTRLB_READMODE_Pos 16 /**< \brief (NVMCTRL_CTRLB) NVMCTRL Read Mode */
|
||||
#define NVMCTRL_CTRLB_READMODE_Msk (0x3u << NVMCTRL_CTRLB_READMODE_Pos)
|
||||
#define NVMCTRL_CTRLB_READMODE(value) ((NVMCTRL_CTRLB_READMODE_Msk & ((value) << NVMCTRL_CTRLB_READMODE_Pos)))
|
||||
#define NVMCTRL_CTRLB_CACHEDIS_Pos 18 /**< \brief (NVMCTRL_CTRLB) Cache Disable */
|
||||
#define NVMCTRL_CTRLB_CACHEDIS (0x1u << NVMCTRL_CTRLB_CACHEDIS_Pos)
|
||||
#define NVMCTRL_CTRLB_MASK 0x0007039Eu /**< \brief (NVMCTRL_CTRLB) MASK Register */
|
||||
|
||||
/* -------- NVMCTRL_PARAM : (NVMCTRL Offset: 0x08) (R/W 32) Parameter Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t NVMP:16; /*!< bit: 0..15 NVM Pages */
|
||||
uint32_t PSZ:3; /*!< bit: 16..18 Page Size */
|
||||
uint32_t :13; /*!< bit: 19..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} NVMCTRL_PARAM_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define NVMCTRL_PARAM_OFFSET 0x08 /**< \brief (NVMCTRL_PARAM offset) Parameter Register */
|
||||
#define NVMCTRL_PARAM_RESETVALUE 0x00000000 /**< \brief (NVMCTRL_PARAM reset_value) Parameter Register */
|
||||
|
||||
#define NVMCTRL_PARAM_NVMP_Pos 0 /**< \brief (NVMCTRL_PARAM) NVM Pages */
|
||||
#define NVMCTRL_PARAM_NVMP_Msk (0xFFFFu << NVMCTRL_PARAM_NVMP_Pos)
|
||||
#define NVMCTRL_PARAM_NVMP(value) ((NVMCTRL_PARAM_NVMP_Msk & ((value) << NVMCTRL_PARAM_NVMP_Pos)))
|
||||
#define NVMCTRL_PARAM_PSZ_Pos 16 /**< \brief (NVMCTRL_PARAM) Page Size */
|
||||
#define NVMCTRL_PARAM_PSZ_Msk (0x7u << NVMCTRL_PARAM_PSZ_Pos)
|
||||
#define NVMCTRL_PARAM_PSZ(value) ((NVMCTRL_PARAM_PSZ_Msk & ((value) << NVMCTRL_PARAM_PSZ_Pos)))
|
||||
#define NVMCTRL_PARAM_MASK 0x0007FFFFu /**< \brief (NVMCTRL_PARAM) MASK Register */
|
||||
|
||||
/* -------- NVMCTRL_INTENCLR : (NVMCTRL Offset: 0x0C) (R/W 8) Interrupt Enable Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t READY:1; /*!< bit: 0 NVM Ready Interrupt Disable */
|
||||
uint8_t ERROR:1; /*!< bit: 1 Error Interrupt Disable */
|
||||
uint8_t :6; /*!< bit: 2.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} NVMCTRL_INTENCLR_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define NVMCTRL_INTENCLR_OFFSET 0x0C /**< \brief (NVMCTRL_INTENCLR offset) Interrupt Enable Clear Register */
|
||||
#define NVMCTRL_INTENCLR_RESETVALUE 0x00 /**< \brief (NVMCTRL_INTENCLR reset_value) Interrupt Enable Clear Register */
|
||||
|
||||
#define NVMCTRL_INTENCLR_READY_Pos 0 /**< \brief (NVMCTRL_INTENCLR) NVM Ready Interrupt Disable */
|
||||
#define NVMCTRL_INTENCLR_READY (0x1u << NVMCTRL_INTENCLR_READY_Pos)
|
||||
#define NVMCTRL_INTENCLR_ERROR_Pos 1 /**< \brief (NVMCTRL_INTENCLR) Error Interrupt Disable */
|
||||
#define NVMCTRL_INTENCLR_ERROR (0x1u << NVMCTRL_INTENCLR_ERROR_Pos)
|
||||
#define NVMCTRL_INTENCLR_MASK 0x03u /**< \brief (NVMCTRL_INTENCLR) MASK Register */
|
||||
|
||||
/* -------- NVMCTRL_INTENSET : (NVMCTRL Offset: 0x10) (R/W 8) Interrupt Enable Set Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t READY:1; /*!< bit: 0 NVM Ready Interrupt Enable */
|
||||
uint8_t ERROR:1; /*!< bit: 1 Error Interrupt Enable */
|
||||
uint8_t :6; /*!< bit: 2.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} NVMCTRL_INTENSET_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define NVMCTRL_INTENSET_OFFSET 0x10 /**< \brief (NVMCTRL_INTENSET offset) Interrupt Enable Set Register */
|
||||
#define NVMCTRL_INTENSET_RESETVALUE 0x00 /**< \brief (NVMCTRL_INTENSET reset_value) Interrupt Enable Set Register */
|
||||
|
||||
#define NVMCTRL_INTENSET_READY_Pos 0 /**< \brief (NVMCTRL_INTENSET) NVM Ready Interrupt Enable */
|
||||
#define NVMCTRL_INTENSET_READY (0x1u << NVMCTRL_INTENSET_READY_Pos)
|
||||
#define NVMCTRL_INTENSET_ERROR_Pos 1 /**< \brief (NVMCTRL_INTENSET) Error Interrupt Enable */
|
||||
#define NVMCTRL_INTENSET_ERROR (0x1u << NVMCTRL_INTENSET_ERROR_Pos)
|
||||
#define NVMCTRL_INTENSET_MASK 0x03u /**< \brief (NVMCTRL_INTENSET) MASK Register */
|
||||
|
||||
/* -------- NVMCTRL_INTFLAG : (NVMCTRL Offset: 0x14) (R/W 8) Interrupt Flag Status and Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t READY:1; /*!< bit: 0 NVM Ready Interrupt Flag */
|
||||
uint8_t ERROR:1; /*!< bit: 1 Error Interrupt Flag */
|
||||
uint8_t :6; /*!< bit: 2.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} NVMCTRL_INTFLAG_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define NVMCTRL_INTFLAG_OFFSET 0x14 /**< \brief (NVMCTRL_INTFLAG offset) Interrupt Flag Status and Clear Register */
|
||||
#define NVMCTRL_INTFLAG_RESETVALUE 0x00 /**< \brief (NVMCTRL_INTFLAG reset_value) Interrupt Flag Status and Clear Register */
|
||||
|
||||
#define NVMCTRL_INTFLAG_READY_Pos 0 /**< \brief (NVMCTRL_INTFLAG) NVM Ready Interrupt Flag */
|
||||
#define NVMCTRL_INTFLAG_READY (0x1u << NVMCTRL_INTFLAG_READY_Pos)
|
||||
#define NVMCTRL_INTFLAG_ERROR_Pos 1 /**< \brief (NVMCTRL_INTFLAG) Error Interrupt Flag */
|
||||
#define NVMCTRL_INTFLAG_ERROR (0x1u << NVMCTRL_INTFLAG_ERROR_Pos)
|
||||
#define NVMCTRL_INTFLAG_MASK 0x03u /**< \brief (NVMCTRL_INTFLAG) MASK Register */
|
||||
|
||||
/* -------- NVMCTRL_STATUS : (NVMCTRL Offset: 0x18) (R/W 16) Status Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t PRM:1; /*!< bit: 0 Power Reduction Mode */
|
||||
uint16_t LOAD:1; /*!< bit: 1 NVM Page Buffer Active Loading */
|
||||
uint16_t PROGE:1; /*!< bit: 2 Programming Error Status */
|
||||
uint16_t LOCKE:1; /*!< bit: 3 Lock Error Status */
|
||||
uint16_t NVME:1; /*!< bit: 4 NVM Error */
|
||||
uint16_t :3; /*!< bit: 5.. 7 Reserved */
|
||||
uint16_t SB:1; /*!< bit: 8 Security Bit Status */
|
||||
uint16_t :7; /*!< bit: 9..15 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} NVMCTRL_STATUS_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define NVMCTRL_STATUS_OFFSET 0x18 /**< \brief (NVMCTRL_STATUS offset) Status Register */
|
||||
#define NVMCTRL_STATUS_RESETVALUE 0x0000 /**< \brief (NVMCTRL_STATUS reset_value) Status Register */
|
||||
|
||||
#define NVMCTRL_STATUS_PRM_Pos 0 /**< \brief (NVMCTRL_STATUS) Power Reduction Mode */
|
||||
#define NVMCTRL_STATUS_PRM (0x1u << NVMCTRL_STATUS_PRM_Pos)
|
||||
#define NVMCTRL_STATUS_LOAD_Pos 1 /**< \brief (NVMCTRL_STATUS) NVM Page Buffer Active Loading */
|
||||
#define NVMCTRL_STATUS_LOAD (0x1u << NVMCTRL_STATUS_LOAD_Pos)
|
||||
#define NVMCTRL_STATUS_PROGE_Pos 2 /**< \brief (NVMCTRL_STATUS) Programming Error Status */
|
||||
#define NVMCTRL_STATUS_PROGE (0x1u << NVMCTRL_STATUS_PROGE_Pos)
|
||||
#define NVMCTRL_STATUS_LOCKE_Pos 3 /**< \brief (NVMCTRL_STATUS) Lock Error Status */
|
||||
#define NVMCTRL_STATUS_LOCKE (0x1u << NVMCTRL_STATUS_LOCKE_Pos)
|
||||
#define NVMCTRL_STATUS_NVME_Pos 4 /**< \brief (NVMCTRL_STATUS) NVM Error */
|
||||
#define NVMCTRL_STATUS_NVME (0x1u << NVMCTRL_STATUS_NVME_Pos)
|
||||
#define NVMCTRL_STATUS_SB_Pos 8 /**< \brief (NVMCTRL_STATUS) Security Bit Status */
|
||||
#define NVMCTRL_STATUS_SB (0x1u << NVMCTRL_STATUS_SB_Pos)
|
||||
#define NVMCTRL_STATUS_MASK 0x011Fu /**< \brief (NVMCTRL_STATUS) MASK Register */
|
||||
|
||||
/* -------- NVMCTRL_ADDR : (NVMCTRL Offset: 0x1C) (R/W 32) Address Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t ADDR:22; /*!< bit: 0..21 NVM Address */
|
||||
uint32_t :10; /*!< bit: 22..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} NVMCTRL_ADDR_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define NVMCTRL_ADDR_OFFSET 0x1C /**< \brief (NVMCTRL_ADDR offset) Address Register */
|
||||
#define NVMCTRL_ADDR_RESETVALUE 0x00000000 /**< \brief (NVMCTRL_ADDR reset_value) Address Register */
|
||||
|
||||
#define NVMCTRL_ADDR_ADDR_Pos 0 /**< \brief (NVMCTRL_ADDR) NVM Address */
|
||||
#define NVMCTRL_ADDR_ADDR_Msk (0x3FFFFFu << NVMCTRL_ADDR_ADDR_Pos)
|
||||
#define NVMCTRL_ADDR_ADDR(value) ((NVMCTRL_ADDR_ADDR_Msk & ((value) << NVMCTRL_ADDR_ADDR_Pos)))
|
||||
#define NVMCTRL_ADDR_MASK 0x003FFFFFu /**< \brief (NVMCTRL_ADDR) MASK Register */
|
||||
|
||||
/* -------- NVMCTRL_LOCK : (NVMCTRL Offset: 0x20) (R/W 16) Lock Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t LOCK:16; /*!< bit: 0..15 Region Lock Bits */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} NVMCTRL_LOCK_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define NVMCTRL_LOCK_OFFSET 0x20 /**< \brief (NVMCTRL_LOCK offset) Lock Register */
|
||||
#define NVMCTRL_LOCK_RESETVALUE 0x0000 /**< \brief (NVMCTRL_LOCK reset_value) Lock Register */
|
||||
|
||||
#define NVMCTRL_LOCK_LOCK_Pos 0 /**< \brief (NVMCTRL_LOCK) Region Lock Bits */
|
||||
#define NVMCTRL_LOCK_LOCK_Msk (0xFFFFu << NVMCTRL_LOCK_LOCK_Pos)
|
||||
#define NVMCTRL_LOCK_LOCK(value) ((NVMCTRL_LOCK_LOCK_Msk & ((value) << NVMCTRL_LOCK_LOCK_Pos)))
|
||||
#define NVMCTRL_LOCK_MASK 0xFFFFu /**< \brief (NVMCTRL_LOCK) MASK Register */
|
||||
|
||||
/** \brief NVMCTRL hardware registers */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef struct {
|
||||
__IO NVMCTRL_CTRLA_Type CTRLA; /**< \brief Offset: 0x00 (R/W 16) NVM Control Register A */
|
||||
RoReg8 Reserved1[0x2];
|
||||
__IO NVMCTRL_CTRLB_Type CTRLB; /**< \brief Offset: 0x04 (R/W 32) NVM Control Register B */
|
||||
__IO NVMCTRL_PARAM_Type PARAM; /**< \brief Offset: 0x08 (R/W 32) Parameter Register */
|
||||
__IO NVMCTRL_INTENCLR_Type INTENCLR; /**< \brief Offset: 0x0C (R/W 8) Interrupt Enable Clear Register */
|
||||
RoReg8 Reserved2[0x3];
|
||||
__IO NVMCTRL_INTENSET_Type INTENSET; /**< \brief Offset: 0x10 (R/W 8) Interrupt Enable Set Register */
|
||||
RoReg8 Reserved3[0x3];
|
||||
__IO NVMCTRL_INTFLAG_Type INTFLAG; /**< \brief Offset: 0x14 (R/W 8) Interrupt Flag Status and Clear Register */
|
||||
RoReg8 Reserved4[0x3];
|
||||
__IO NVMCTRL_STATUS_Type STATUS; /**< \brief Offset: 0x18 (R/W 16) Status Register */
|
||||
RoReg8 Reserved5[0x2];
|
||||
__IO NVMCTRL_ADDR_Type ADDR; /**< \brief Offset: 0x1C (R/W 32) Address Register */
|
||||
__IO NVMCTRL_LOCK_Type LOCK; /**< \brief Offset: 0x20 (R/W 16) Lock Register */
|
||||
} Nvmctrl;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/*@}*/
|
||||
|
||||
/* ************************************************************************** */
|
||||
/** SOFTWARE PERIPHERAL API DEFINITION FOR NON-VOLATILE FUSES */
|
||||
/* ************************************************************************** */
|
||||
/** \addtogroup fuses_api Peripheral Software API */
|
||||
/*@{*/
|
||||
|
||||
|
||||
#define ADC_FUSES_BIASCAL_ADDR (NVMCTRL_OTP4 + 4)
|
||||
#define ADC_FUSES_BIASCAL_Pos 3 /**< \brief (NVMCTRL_OTP4) ADC Bias Calibration */
|
||||
#define ADC_FUSES_BIASCAL_Msk (0x7u << ADC_FUSES_BIASCAL_Pos)
|
||||
#define ADC_FUSES_BIASCAL(value) ((ADC_FUSES_BIASCAL_Msk & ((value) << ADC_FUSES_BIASCAL_Pos)))
|
||||
|
||||
#define ADC_FUSES_BIAS_OPA_ADDR (NVMCTRL_OTP2 + 4)
|
||||
#define ADC_FUSES_BIAS_OPA_Pos 19 /**< \brief (NVMCTRL_OTP2) ADC OPA Bias */
|
||||
#define ADC_FUSES_BIAS_OPA_Msk (0x1u << ADC_FUSES_BIAS_OPA_Pos)
|
||||
|
||||
#define ADC_FUSES_BOOSTEN_ADDR (NVMCTRL_OTP2 + 4)
|
||||
#define ADC_FUSES_BOOSTEN_Pos 17 /**< \brief (NVMCTRL_OTP2) ADC Boost Enable */
|
||||
#define ADC_FUSES_BOOSTEN_Msk (0x1u << ADC_FUSES_BOOSTEN_Pos)
|
||||
|
||||
#define ADC_FUSES_CMPDELAY_ADDR (NVMCTRL_OTP2 + 4)
|
||||
#define ADC_FUSES_CMPDELAY_Pos 16 /**< \brief (NVMCTRL_OTP2) ADC Comparator Delay */
|
||||
#define ADC_FUSES_CMPDELAY_Msk (0x1u << ADC_FUSES_CMPDELAY_Pos)
|
||||
|
||||
#define ADC_FUSES_DCFG_ADDR (NVMCTRL_OTP2 + 4)
|
||||
#define ADC_FUSES_DCFG_Pos 16 /**< \brief (NVMCTRL_OTP2) ADC Device Configuration */
|
||||
#define ADC_FUSES_DCFG_Msk (0xFu << ADC_FUSES_DCFG_Pos)
|
||||
#define ADC_FUSES_DCFG(value) ((ADC_FUSES_DCFG_Msk & ((value) << ADC_FUSES_DCFG_Pos)))
|
||||
|
||||
#define ADC_FUSES_GAINCORR_ADDR NVMCTRL_OTP4
|
||||
#define ADC_FUSES_GAINCORR_Pos 3 /**< \brief (NVMCTRL_OTP4) ADC Gain Correction */
|
||||
#define ADC_FUSES_GAINCORR_Msk (0xFFFu << ADC_FUSES_GAINCORR_Pos)
|
||||
#define ADC_FUSES_GAINCORR(value) ((ADC_FUSES_GAINCORR_Msk & ((value) << ADC_FUSES_GAINCORR_Pos)))
|
||||
|
||||
#define ADC_FUSES_LINEARITY_0_ADDR NVMCTRL_OTP4
|
||||
#define ADC_FUSES_LINEARITY_0_Pos 27 /**< \brief (NVMCTRL_OTP4) ADC Linearity bits 4:0 */
|
||||
#define ADC_FUSES_LINEARITY_0_Msk (0x1Fu << ADC_FUSES_LINEARITY_0_Pos)
|
||||
#define ADC_FUSES_LINEARITY_0(value) ((ADC_FUSES_LINEARITY_0_Msk & ((value) << ADC_FUSES_LINEARITY_0_Pos)))
|
||||
|
||||
#define ADC_FUSES_LINEARITY_1_ADDR (NVMCTRL_OTP4 + 4)
|
||||
#define ADC_FUSES_LINEARITY_1_Pos 0 /**< \brief (NVMCTRL_OTP4) ADC Linearity bits 7:5 */
|
||||
#define ADC_FUSES_LINEARITY_1_Msk (0x7u << ADC_FUSES_LINEARITY_1_Pos)
|
||||
#define ADC_FUSES_LINEARITY_1(value) ((ADC_FUSES_LINEARITY_1_Msk & ((value) << ADC_FUSES_LINEARITY_1_Pos)))
|
||||
|
||||
#define ADC_FUSES_OFFSETCORR_ADDR NVMCTRL_OTP4
|
||||
#define ADC_FUSES_OFFSETCORR_Pos 15 /**< \brief (NVMCTRL_OTP4) ADC Offset Correction */
|
||||
#define ADC_FUSES_OFFSETCORR_Msk (0xFFFu << ADC_FUSES_OFFSETCORR_Pos)
|
||||
#define ADC_FUSES_OFFSETCORR(value) ((ADC_FUSES_OFFSETCORR_Msk & ((value) << ADC_FUSES_OFFSETCORR_Pos)))
|
||||
|
||||
#define ADC_FUSES_VCMPULSE_ADDR (NVMCTRL_OTP2 + 4)
|
||||
#define ADC_FUSES_VCMPULSE_Pos 18 /**< \brief (NVMCTRL_OTP2) ADC VCM Pulse */
|
||||
#define ADC_FUSES_VCMPULSE_Msk (0x1u << ADC_FUSES_VCMPULSE_Pos)
|
||||
|
||||
#define DSU_FUSES_DCFG0_ADDR NVMCTRL_OTP2
|
||||
#define DSU_FUSES_DCFG0_Pos 0 /**< \brief (NVMCTRL_OTP2) Device Configuration 0 */
|
||||
#define DSU_FUSES_DCFG0_Msk (0xFFFFFFFFu << DSU_FUSES_DCFG0_Pos)
|
||||
#define DSU_FUSES_DCFG0(value) ((DSU_FUSES_DCFG0_Msk & ((value) << DSU_FUSES_DCFG0_Pos)))
|
||||
|
||||
#define DSU_FUSES_DCFG1_ADDR (NVMCTRL_OTP2 + 4)
|
||||
#define DSU_FUSES_DCFG1_Pos 0 /**< \brief (NVMCTRL_OTP2) Device Configuration 1 */
|
||||
#define DSU_FUSES_DCFG1_Msk (0xFFFFFFFFu << DSU_FUSES_DCFG1_Pos)
|
||||
#define DSU_FUSES_DCFG1(value) ((DSU_FUSES_DCFG1_Msk & ((value) << DSU_FUSES_DCFG1_Pos)))
|
||||
|
||||
#define DSU_FUSES_DEV_FAMILY_CFG_0_ADDR NVMCTRL_OTP2
|
||||
#define DSU_FUSES_DEV_FAMILY_CFG_0_Pos 5 /**< \brief (NVMCTRL_OTP2) Device Family Configuration bits 26:0 */
|
||||
#define DSU_FUSES_DEV_FAMILY_CFG_0_Msk (0x7FFFFFFu << DSU_FUSES_DEV_FAMILY_CFG_0_Pos)
|
||||
#define DSU_FUSES_DEV_FAMILY_CFG_0(value) ((DSU_FUSES_DEV_FAMILY_CFG_0_Msk & ((value) << DSU_FUSES_DEV_FAMILY_CFG_0_Pos)))
|
||||
|
||||
#define DSU_FUSES_DEV_FAMILY_CFG_1_ADDR (NVMCTRL_OTP2 + 4)
|
||||
#define DSU_FUSES_DEV_FAMILY_CFG_1_Pos 0 /**< \brief (NVMCTRL_OTP2) Device Family Configuration bits 42:27 */
|
||||
#define DSU_FUSES_DEV_FAMILY_CFG_1_Msk (0xFFFFu << DSU_FUSES_DEV_FAMILY_CFG_1_Pos)
|
||||
#define DSU_FUSES_DEV_FAMILY_CFG_1(value) ((DSU_FUSES_DEV_FAMILY_CFG_1_Msk & ((value) << DSU_FUSES_DEV_FAMILY_CFG_1_Pos)))
|
||||
|
||||
#define DSU_FUSES_DID_DEVSEL_ADDR NVMCTRL_OTP2
|
||||
#define DSU_FUSES_DID_DEVSEL_Pos 0 /**< \brief (NVMCTRL_OTP2) Device Number */
|
||||
#define DSU_FUSES_DID_DEVSEL_Msk (0x1Fu << DSU_FUSES_DID_DEVSEL_Pos)
|
||||
#define DSU_FUSES_DID_DEVSEL(value) ((DSU_FUSES_DID_DEVSEL_Msk & ((value) << DSU_FUSES_DID_DEVSEL_Pos)))
|
||||
|
||||
#define DSU_FUSES_RAM_BIAS_ADDR (NVMCTRL_OTP2 + 4)
|
||||
#define DSU_FUSES_RAM_BIAS_Pos 20 /**< \brief (NVMCTRL_OTP2) RAM Bias */
|
||||
#define DSU_FUSES_RAM_BIAS_Msk (0x3u << DSU_FUSES_RAM_BIAS_Pos)
|
||||
#define DSU_FUSES_RAM_BIAS(value) ((DSU_FUSES_RAM_BIAS_Msk & ((value) << DSU_FUSES_RAM_BIAS_Pos)))
|
||||
|
||||
#define DSU_FUSES_RAM_READ_MARGIN_ADDR (NVMCTRL_OTP2 + 4)
|
||||
#define DSU_FUSES_RAM_READ_MARGIN_Pos 22 /**< \brief (NVMCTRL_OTP2) RAM Read Margin */
|
||||
#define DSU_FUSES_RAM_READ_MARGIN_Msk (0xFu << DSU_FUSES_RAM_READ_MARGIN_Pos)
|
||||
#define DSU_FUSES_RAM_READ_MARGIN(value) ((DSU_FUSES_RAM_READ_MARGIN_Msk & ((value) << DSU_FUSES_RAM_READ_MARGIN_Pos)))
|
||||
|
||||
#define NVMCTRL_FUSES_BOOTPROT_ADDR NVMCTRL_USER
|
||||
#define NVMCTRL_FUSES_BOOTPROT_Pos 0 /**< \brief (NVMCTRL_USER) Bootloader Size */
|
||||
#define NVMCTRL_FUSES_BOOTPROT_Msk (0x7u << NVMCTRL_FUSES_BOOTPROT_Pos)
|
||||
#define NVMCTRL_FUSES_BOOTPROT(value) ((NVMCTRL_FUSES_BOOTPROT_Msk & ((value) << NVMCTRL_FUSES_BOOTPROT_Pos)))
|
||||
|
||||
#define NVMCTRL_FUSES_EEPROM_SIZE_ADDR NVMCTRL_USER
|
||||
#define NVMCTRL_FUSES_EEPROM_SIZE_Pos 4 /**< \brief (NVMCTRL_USER) EEPROM Size */
|
||||
#define NVMCTRL_FUSES_EEPROM_SIZE_Msk (0x7u << NVMCTRL_FUSES_EEPROM_SIZE_Pos)
|
||||
#define NVMCTRL_FUSES_EEPROM_SIZE(value) ((NVMCTRL_FUSES_EEPROM_SIZE_Msk & ((value) << NVMCTRL_FUSES_EEPROM_SIZE_Pos)))
|
||||
|
||||
#define NVMCTRL_FUSES_LOCKFIELD_ADDR NVMCTRL_LOCKBIT
|
||||
#define NVMCTRL_FUSES_LOCKFIELD_Pos 0 /**< \brief (NVMCTRL_LOCKBIT) LOCK Region */
|
||||
#define NVMCTRL_FUSES_LOCKFIELD_Msk (0xFFu << NVMCTRL_FUSES_LOCKFIELD_Pos)
|
||||
#define NVMCTRL_FUSES_LOCKFIELD(value) ((NVMCTRL_FUSES_LOCKFIELD_Msk & ((value) << NVMCTRL_FUSES_LOCKFIELD_Pos)))
|
||||
|
||||
#define NVMCTRL_FUSES_NVMP_ADDR NVMCTRL_OTP1
|
||||
#define NVMCTRL_FUSES_NVMP_Pos 16 /**< \brief (NVMCTRL_OTP1) Number of NVM Pages */
|
||||
#define NVMCTRL_FUSES_NVMP_Msk (0xFFFFu << NVMCTRL_FUSES_NVMP_Pos)
|
||||
#define NVMCTRL_FUSES_NVMP(value) ((NVMCTRL_FUSES_NVMP_Msk & ((value) << NVMCTRL_FUSES_NVMP_Pos)))
|
||||
|
||||
#define NVMCTRL_FUSES_NVM_LOCK_ADDR NVMCTRL_OTP1
|
||||
#define NVMCTRL_FUSES_NVM_LOCK_Pos 0 /**< \brief (NVMCTRL_OTP1) NVM Lock */
|
||||
#define NVMCTRL_FUSES_NVM_LOCK_Msk (0xFFu << NVMCTRL_FUSES_NVM_LOCK_Pos)
|
||||
#define NVMCTRL_FUSES_NVM_LOCK(value) ((NVMCTRL_FUSES_NVM_LOCK_Msk & ((value) << NVMCTRL_FUSES_NVM_LOCK_Pos)))
|
||||
|
||||
#define NVMCTRL_FUSES_PSZ_ADDR NVMCTRL_OTP1
|
||||
#define NVMCTRL_FUSES_PSZ_Pos 8 /**< \brief (NVMCTRL_OTP1) NVM Page Size */
|
||||
#define NVMCTRL_FUSES_PSZ_Msk (0xFu << NVMCTRL_FUSES_PSZ_Pos)
|
||||
#define NVMCTRL_FUSES_PSZ(value) ((NVMCTRL_FUSES_PSZ_Msk & ((value) << NVMCTRL_FUSES_PSZ_Pos)))
|
||||
|
||||
#define NVMCTRL_FUSES_REGION_LOCKS_ADDR (NVMCTRL_USER + 4)
|
||||
#define NVMCTRL_FUSES_REGION_LOCKS_Pos 16 /**< \brief (NVMCTRL_USER) NVM Region Locks */
|
||||
#define NVMCTRL_FUSES_REGION_LOCKS_Msk (0xFFFFu << NVMCTRL_FUSES_REGION_LOCKS_Pos)
|
||||
#define NVMCTRL_FUSES_REGION_LOCKS(value) ((NVMCTRL_FUSES_REGION_LOCKS_Msk & ((value) << NVMCTRL_FUSES_REGION_LOCKS_Pos)))
|
||||
|
||||
#define SYSCTRL_FUSES_OSC32KCAL_ADDR (NVMCTRL_OTP4 + 4)
|
||||
#define SYSCTRL_FUSES_OSC32KCAL_Pos 6 /**< \brief (NVMCTRL_OTP4) OSC32K Calibration */
|
||||
#define SYSCTRL_FUSES_OSC32KCAL_Msk (0x7Fu << SYSCTRL_FUSES_OSC32KCAL_Pos)
|
||||
#define SYSCTRL_FUSES_OSC32KCAL(value) ((SYSCTRL_FUSES_OSC32KCAL_Msk & ((value) << SYSCTRL_FUSES_OSC32KCAL_Pos)))
|
||||
|
||||
#define SYSCTRL_FUSES_BOD12USERLEVEL_ADDR NVMCTRL_USER
|
||||
#define SYSCTRL_FUSES_BOD12USERLEVEL_Pos 17 /**< \brief (NVMCTRL_USER) BOD12 User Level */
|
||||
#define SYSCTRL_FUSES_BOD12USERLEVEL_Msk (0x1Fu << SYSCTRL_FUSES_BOD12USERLEVEL_Pos)
|
||||
#define SYSCTRL_FUSES_BOD12USERLEVEL(value) ((SYSCTRL_FUSES_BOD12USERLEVEL_Msk & ((value) << SYSCTRL_FUSES_BOD12USERLEVEL_Pos)))
|
||||
|
||||
#define SYSCTRL_FUSES_BOD12_ACTION_ADDR NVMCTRL_USER
|
||||
#define SYSCTRL_FUSES_BOD12_ACTION_Pos 23 /**< \brief (NVMCTRL_USER) BOD12 Action */
|
||||
#define SYSCTRL_FUSES_BOD12_ACTION_Msk (0x3u << SYSCTRL_FUSES_BOD12_ACTION_Pos)
|
||||
#define SYSCTRL_FUSES_BOD12_ACTION(value) ((SYSCTRL_FUSES_BOD12_ACTION_Msk & ((value) << SYSCTRL_FUSES_BOD12_ACTION_Pos)))
|
||||
|
||||
#define SYSCTRL_FUSES_BOD12_EN_ADDR NVMCTRL_USER
|
||||
#define SYSCTRL_FUSES_BOD12_EN_Pos 22 /**< \brief (NVMCTRL_USER) BOD12 Enable */
|
||||
#define SYSCTRL_FUSES_BOD12_EN_Msk (0x1u << SYSCTRL_FUSES_BOD12_EN_Pos)
|
||||
|
||||
#define SYSCTRL_FUSES_BOD33USERLEVEL_ADDR NVMCTRL_USER
|
||||
#define SYSCTRL_FUSES_BOD33USERLEVEL_Pos 8 /**< \brief (NVMCTRL_USER) BOD33 User Level */
|
||||
#define SYSCTRL_FUSES_BOD33USERLEVEL_Msk (0x3Fu << SYSCTRL_FUSES_BOD33USERLEVEL_Pos)
|
||||
#define SYSCTRL_FUSES_BOD33USERLEVEL(value) ((SYSCTRL_FUSES_BOD33USERLEVEL_Msk & ((value) << SYSCTRL_FUSES_BOD33USERLEVEL_Pos)))
|
||||
|
||||
#define SYSCTRL_FUSES_BOD33_ACTION_ADDR NVMCTRL_USER
|
||||
#define SYSCTRL_FUSES_BOD33_ACTION_Pos 15 /**< \brief (NVMCTRL_USER) BOD33 Action */
|
||||
#define SYSCTRL_FUSES_BOD33_ACTION_Msk (0x3u << SYSCTRL_FUSES_BOD33_ACTION_Pos)
|
||||
#define SYSCTRL_FUSES_BOD33_ACTION(value) ((SYSCTRL_FUSES_BOD33_ACTION_Msk & ((value) << SYSCTRL_FUSES_BOD33_ACTION_Pos)))
|
||||
|
||||
#define SYSCTRL_FUSES_BOD33_EN_ADDR NVMCTRL_USER
|
||||
#define SYSCTRL_FUSES_BOD33_EN_Pos 14 /**< \brief (NVMCTRL_USER) BOD33 Enable */
|
||||
#define SYSCTRL_FUSES_BOD33_EN_Msk (0x1u << SYSCTRL_FUSES_BOD33_EN_Pos)
|
||||
|
||||
#define SYSCTRL_FUSES_ULPVREG_ADDR NVMCTRL_OTP4
|
||||
#define SYSCTRL_FUSES_ULPVREG_Pos 0 /**< \brief (NVMCTRL_OTP4) ULP Regulator Fallback Mode */
|
||||
#define SYSCTRL_FUSES_ULPVREG_Msk (0x7u << SYSCTRL_FUSES_ULPVREG_Pos)
|
||||
#define SYSCTRL_FUSES_ULPVREG(value) ((SYSCTRL_FUSES_ULPVREG_Msk & ((value) << SYSCTRL_FUSES_ULPVREG_Pos)))
|
||||
|
||||
#define WDT_FUSES_ALWAYSON_ADDR NVMCTRL_USER
|
||||
#define WDT_FUSES_ALWAYSON_Pos 26 /**< \brief (NVMCTRL_USER) WDT Always On */
|
||||
#define WDT_FUSES_ALWAYSON_Msk (0x1u << WDT_FUSES_ALWAYSON_Pos)
|
||||
|
||||
#define WDT_FUSES_ENABLE_ADDR NVMCTRL_USER
|
||||
#define WDT_FUSES_ENABLE_Pos 25 /**< \brief (NVMCTRL_USER) WDT Enable */
|
||||
#define WDT_FUSES_ENABLE_Msk (0x1u << WDT_FUSES_ENABLE_Pos)
|
||||
|
||||
#define WDT_FUSES_EWOFFSET_ADDR (NVMCTRL_USER + 4)
|
||||
#define WDT_FUSES_EWOFFSET_Pos 3 /**< \brief (NVMCTRL_USER) WDT Early Warning Offset */
|
||||
#define WDT_FUSES_EWOFFSET_Msk (0xFu << WDT_FUSES_EWOFFSET_Pos)
|
||||
#define WDT_FUSES_EWOFFSET(value) ((WDT_FUSES_EWOFFSET_Msk & ((value) << WDT_FUSES_EWOFFSET_Pos)))
|
||||
|
||||
#define WDT_FUSES_PER_ADDR NVMCTRL_USER
|
||||
#define WDT_FUSES_PER_Pos 27 /**< \brief (NVMCTRL_USER) WDT Period */
|
||||
#define WDT_FUSES_PER_Msk (0xFu << WDT_FUSES_PER_Pos)
|
||||
#define WDT_FUSES_PER(value) ((WDT_FUSES_PER_Msk & ((value) << WDT_FUSES_PER_Pos)))
|
||||
|
||||
#define WDT_FUSES_WEN_ADDR (NVMCTRL_USER + 4)
|
||||
#define WDT_FUSES_WEN_Pos 7 /**< \brief (NVMCTRL_USER) WDT Window Mode Enable */
|
||||
#define WDT_FUSES_WEN_Msk (0x1u << WDT_FUSES_WEN_Pos)
|
||||
|
||||
#define WDT_FUSES_WINDOW_0_ADDR NVMCTRL_USER
|
||||
#define WDT_FUSES_WINDOW_0_Pos 31 /**< \brief (NVMCTRL_USER) WDT Window bit 0 */
|
||||
#define WDT_FUSES_WINDOW_0_Msk (0x1u << WDT_FUSES_WINDOW_0_Pos)
|
||||
|
||||
#define WDT_FUSES_WINDOW_1_ADDR (NVMCTRL_USER + 4)
|
||||
#define WDT_FUSES_WINDOW_1_Pos 0 /**< \brief (NVMCTRL_USER) WDT Window bits 3:1 */
|
||||
#define WDT_FUSES_WINDOW_1_Msk (0x7u << WDT_FUSES_WINDOW_1_Pos)
|
||||
#define WDT_FUSES_WINDOW_1(value) ((WDT_FUSES_WINDOW_1_Msk & ((value) << WDT_FUSES_WINDOW_1_Pos)))
|
||||
|
||||
/*@}*/
|
||||
|
||||
#endif /* _SAMD20_NVMCTRL_COMPONENT_ */
|
|
@ -0,0 +1,103 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Component description for PAC
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_PAC_COMPONENT_
|
||||
#define _SAMD20_PAC_COMPONENT_
|
||||
|
||||
/* ========================================================================== */
|
||||
/** SOFTWARE API DEFINITION FOR PAC */
|
||||
/* ========================================================================== */
|
||||
/** \addtogroup SAMD20_PAC Peripheral Access Controller */
|
||||
/*@{*/
|
||||
|
||||
#define REV_PAC 0x101
|
||||
|
||||
/* -------- PAC_WPCLR : (PAC Offset: 0x0) (R/W 32) Write Protection Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t :1; /*!< bit: 0 Reserved */
|
||||
uint32_t WP:31; /*!< bit: 1..31 Write Protection Clear */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} PAC_WPCLR_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PAC_WPCLR_OFFSET 0x0 /**< \brief (PAC_WPCLR offset) Write Protection Clear Register */
|
||||
#define PAC_WPCLR_RESETVALUE 0x00000000 /**< \brief (PAC_WPCLR reset_value) Write Protection Clear Register */
|
||||
|
||||
#define PAC_WPCLR_WP_Pos 1 /**< \brief (PAC_WPCLR) Write Protection Clear */
|
||||
#define PAC_WPCLR_WP_Msk (0x7FFFFFFFu << PAC_WPCLR_WP_Pos)
|
||||
#define PAC_WPCLR_WP(value) ((PAC_WPCLR_WP_Msk & ((value) << PAC_WPCLR_WP_Pos)))
|
||||
#define PAC_WPCLR_MASK 0xFFFFFFFEu /**< \brief (PAC_WPCLR) MASK Register */
|
||||
|
||||
/* -------- PAC_WPSET : (PAC Offset: 0x4) (R/W 32) Write Protection Set Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t :1; /*!< bit: 0 Reserved */
|
||||
uint32_t WP:31; /*!< bit: 1..31 Write Protection Set */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} PAC_WPSET_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PAC_WPSET_OFFSET 0x4 /**< \brief (PAC_WPSET offset) Write Protection Set Register */
|
||||
#define PAC_WPSET_RESETVALUE 0x00000000 /**< \brief (PAC_WPSET reset_value) Write Protection Set Register */
|
||||
|
||||
#define PAC_WPSET_WP_Pos 1 /**< \brief (PAC_WPSET) Write Protection Set */
|
||||
#define PAC_WPSET_WP_Msk (0x7FFFFFFFu << PAC_WPSET_WP_Pos)
|
||||
#define PAC_WPSET_WP(value) ((PAC_WPSET_WP_Msk & ((value) << PAC_WPSET_WP_Pos)))
|
||||
#define PAC_WPSET_MASK 0xFFFFFFFEu /**< \brief (PAC_WPSET) MASK Register */
|
||||
|
||||
/** \brief PAC hardware registers */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef struct {
|
||||
__IO PAC_WPCLR_Type WPCLR; /**< \brief Offset: 0x0 (R/W 32) Write Protection Clear Register */
|
||||
__IO PAC_WPSET_Type WPSET; /**< \brief Offset: 0x4 (R/W 32) Write Protection Set Register */
|
||||
} Pac;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/*@}*/
|
||||
|
||||
#endif /* _SAMD20_PAC_COMPONENT_ */
|
|
@ -0,0 +1,461 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Component description for PM
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_PM_COMPONENT_
|
||||
#define _SAMD20_PM_COMPONENT_
|
||||
|
||||
/* ========================================================================== */
|
||||
/** SOFTWARE API DEFINITION FOR PM */
|
||||
/* ========================================================================== */
|
||||
/** \addtogroup SAMD20_PM Power Manager */
|
||||
/*@{*/
|
||||
|
||||
#define REV_PM 0x200
|
||||
|
||||
/* -------- PM_CTRL : (PM Offset: 0x00) (R/W 8) Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t :2; /*!< bit: 0.. 1 Reserved */
|
||||
uint8_t CFDEN:1; /*!< bit: 2 Clock Failure Detector Enable */
|
||||
uint8_t :1; /*!< bit: 3 Reserved */
|
||||
uint8_t BKUPCLK:1; /*!< bit: 4 Backup Clock Select */
|
||||
uint8_t :3; /*!< bit: 5.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} PM_CTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PM_CTRL_OFFSET 0x00 /**< \brief (PM_CTRL offset) Control Register */
|
||||
#define PM_CTRL_RESETVALUE 0x00 /**< \brief (PM_CTRL reset_value) Control Register */
|
||||
|
||||
#define PM_CTRL_CFDEN_Pos 2 /**< \brief (PM_CTRL) Clock Failure Detector Enable */
|
||||
#define PM_CTRL_CFDEN (0x1u << PM_CTRL_CFDEN_Pos)
|
||||
#define PM_CTRL_BKUPCLK_Pos 4 /**< \brief (PM_CTRL) Backup Clock Select */
|
||||
#define PM_CTRL_BKUPCLK (0x1u << PM_CTRL_BKUPCLK_Pos)
|
||||
#define PM_CTRL_MASK 0x14u /**< \brief (PM_CTRL) MASK Register */
|
||||
|
||||
/* -------- PM_SLEEP : (PM Offset: 0x01) (R/W 8) Sleep Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t IDLE:2; /*!< bit: 0.. 1 Idle Level */
|
||||
uint8_t :6; /*!< bit: 2.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} PM_SLEEP_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PM_SLEEP_OFFSET 0x01 /**< \brief (PM_SLEEP offset) Sleep Register */
|
||||
#define PM_SLEEP_RESETVALUE 0x00 /**< \brief (PM_SLEEP reset_value) Sleep Register */
|
||||
|
||||
#define PM_SLEEP_IDLE_Pos 0 /**< \brief (PM_SLEEP) Idle Level */
|
||||
#define PM_SLEEP_IDLE_Msk (0x3u << PM_SLEEP_IDLE_Pos)
|
||||
#define PM_SLEEP_IDLE(value) ((PM_SLEEP_IDLE_Msk & ((value) << PM_SLEEP_IDLE_Pos)))
|
||||
#define PM_SLEEP_MASK 0x03u /**< \brief (PM_SLEEP) MASK Register */
|
||||
|
||||
/* -------- PM_CPUSEL : (PM Offset: 0x08) (R/W 8) CPU Clock Select -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t CPUDIV:3; /*!< bit: 0.. 2 CPU Clock Select */
|
||||
uint8_t :5; /*!< bit: 3.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} PM_CPUSEL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PM_CPUSEL_OFFSET 0x08 /**< \brief (PM_CPUSEL offset) CPU Clock Select */
|
||||
#define PM_CPUSEL_RESETVALUE 0x00 /**< \brief (PM_CPUSEL reset_value) CPU Clock Select */
|
||||
|
||||
#define PM_CPUSEL_CPUDIV_Pos 0 /**< \brief (PM_CPUSEL) CPU Clock Select */
|
||||
#define PM_CPUSEL_CPUDIV_Msk (0x7u << PM_CPUSEL_CPUDIV_Pos)
|
||||
#define PM_CPUSEL_CPUDIV(value) ((PM_CPUSEL_CPUDIV_Msk & ((value) << PM_CPUSEL_CPUDIV_Pos)))
|
||||
#define PM_CPUSEL_MASK 0x07u /**< \brief (PM_CPUSEL) MASK Register */
|
||||
|
||||
/* -------- PM_APBASEL : (PM Offset: 0x09) (R/W 8) APBA Clock Select -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t APBADIV:3; /*!< bit: 0.. 2 APBA Clock Select */
|
||||
uint8_t :5; /*!< bit: 3.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} PM_APBASEL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PM_APBASEL_OFFSET 0x09 /**< \brief (PM_APBASEL offset) APBA Clock Select */
|
||||
#define PM_APBASEL_RESETVALUE 0x00 /**< \brief (PM_APBASEL reset_value) APBA Clock Select */
|
||||
|
||||
#define PM_APBASEL_APBADIV_Pos 0 /**< \brief (PM_APBASEL) APBA Clock Select */
|
||||
#define PM_APBASEL_APBADIV_Msk (0x7u << PM_APBASEL_APBADIV_Pos)
|
||||
#define PM_APBASEL_APBADIV(value) ((PM_APBASEL_APBADIV_Msk & ((value) << PM_APBASEL_APBADIV_Pos)))
|
||||
#define PM_APBASEL_MASK 0x07u /**< \brief (PM_APBASEL) MASK Register */
|
||||
|
||||
/* -------- PM_APBBSEL : (PM Offset: 0x0A) (R/W 8) APBB Clock Select -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t APBBDIV:3; /*!< bit: 0.. 2 PB Clock Select */
|
||||
uint8_t :5; /*!< bit: 3.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} PM_APBBSEL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PM_APBBSEL_OFFSET 0x0A /**< \brief (PM_APBBSEL offset) APBB Clock Select */
|
||||
#define PM_APBBSEL_RESETVALUE 0x00 /**< \brief (PM_APBBSEL reset_value) APBB Clock Select */
|
||||
|
||||
#define PM_APBBSEL_APBBDIV_Pos 0 /**< \brief (PM_APBBSEL) PB Clock Select */
|
||||
#define PM_APBBSEL_APBBDIV_Msk (0x7u << PM_APBBSEL_APBBDIV_Pos)
|
||||
#define PM_APBBSEL_APBBDIV(value) ((PM_APBBSEL_APBBDIV_Msk & ((value) << PM_APBBSEL_APBBDIV_Pos)))
|
||||
#define PM_APBBSEL_MASK 0x07u /**< \brief (PM_APBBSEL) MASK Register */
|
||||
|
||||
/* -------- PM_APBCSEL : (PM Offset: 0x0B) (R/W 8) APBC Clock Select -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t APBCDIV:3; /*!< bit: 0.. 2 APBC Clock Select */
|
||||
uint8_t :5; /*!< bit: 3.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} PM_APBCSEL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PM_APBCSEL_OFFSET 0x0B /**< \brief (PM_APBCSEL offset) APBC Clock Select */
|
||||
#define PM_APBCSEL_RESETVALUE 0x00 /**< \brief (PM_APBCSEL reset_value) APBC Clock Select */
|
||||
|
||||
#define PM_APBCSEL_APBCDIV_Pos 0 /**< \brief (PM_APBCSEL) APBC Clock Select */
|
||||
#define PM_APBCSEL_APBCDIV_Msk (0x7u << PM_APBCSEL_APBCDIV_Pos)
|
||||
#define PM_APBCSEL_APBCDIV(value) ((PM_APBCSEL_APBCDIV_Msk & ((value) << PM_APBCSEL_APBCDIV_Pos)))
|
||||
#define PM_APBCSEL_MASK 0x07u /**< \brief (PM_APBCSEL) MASK Register */
|
||||
|
||||
/* -------- PM_AHBMASK : (PM Offset: 0x14) (R/W 32) AHB Mask -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t HPB0:1; /*!< bit: 0 HPB0 AHB Clock Mask */
|
||||
uint32_t HPB1:1; /*!< bit: 1 HPB1 AHB Clock Mask */
|
||||
uint32_t HPB2:1; /*!< bit: 2 HPB2 AHB Clock Mask */
|
||||
uint32_t DSU:1; /*!< bit: 3 DSU AHB Clock Mask */
|
||||
uint32_t NVMCTRL:1; /*!< bit: 4 NVMCTRL AHB Clock Mask */
|
||||
uint32_t :27; /*!< bit: 5..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} PM_AHBMASK_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PM_AHBMASK_OFFSET 0x14 /**< \brief (PM_AHBMASK offset) AHB Mask */
|
||||
#define PM_AHBMASK_RESETVALUE 0x0000001F /**< \brief (PM_AHBMASK reset_value) AHB Mask */
|
||||
|
||||
#define PM_AHBMASK_HPB0_Pos 0 /**< \brief (PM_AHBMASK) HPB0 AHB Clock Mask */
|
||||
#define PM_AHBMASK_HPB0 (0x1u << PM_AHBMASK_HPB0_Pos)
|
||||
#define PM_AHBMASK_HPB1_Pos 1 /**< \brief (PM_AHBMASK) HPB1 AHB Clock Mask */
|
||||
#define PM_AHBMASK_HPB1 (0x1u << PM_AHBMASK_HPB1_Pos)
|
||||
#define PM_AHBMASK_HPB2_Pos 2 /**< \brief (PM_AHBMASK) HPB2 AHB Clock Mask */
|
||||
#define PM_AHBMASK_HPB2 (0x1u << PM_AHBMASK_HPB2_Pos)
|
||||
#define PM_AHBMASK_DSU_Pos 3 /**< \brief (PM_AHBMASK) DSU AHB Clock Mask */
|
||||
#define PM_AHBMASK_DSU (0x1u << PM_AHBMASK_DSU_Pos)
|
||||
#define PM_AHBMASK_NVMCTRL_Pos 4 /**< \brief (PM_AHBMASK) NVMCTRL AHB Clock Mask */
|
||||
#define PM_AHBMASK_NVMCTRL (0x1u << PM_AHBMASK_NVMCTRL_Pos)
|
||||
#define PM_AHBMASK_MASK 0x0000001Fu /**< \brief (PM_AHBMASK) MASK Register */
|
||||
|
||||
/* -------- PM_APBAMASK : (PM Offset: 0x18) (R/W 32) APBA Mask -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t PAC0:1; /*!< bit: 0 PAC0 APB Clock Mask */
|
||||
uint32_t PM:1; /*!< bit: 1 PM APB Clock Mask */
|
||||
uint32_t SYSCTRL:1; /*!< bit: 2 SYSCTRL APB Clock Mask */
|
||||
uint32_t GCLK:1; /*!< bit: 3 GCLK APB Clock Mask */
|
||||
uint32_t WDT:1; /*!< bit: 4 WDT APB Clock Mask */
|
||||
uint32_t RTC:1; /*!< bit: 5 RTC APB Clock Mask */
|
||||
uint32_t EIC:1; /*!< bit: 6 EIC APB Clock Mask */
|
||||
uint32_t :25; /*!< bit: 7..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} PM_APBAMASK_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PM_APBAMASK_OFFSET 0x18 /**< \brief (PM_APBAMASK offset) APBA Mask */
|
||||
#define PM_APBAMASK_RESETVALUE 0x0000007F /**< \brief (PM_APBAMASK reset_value) APBA Mask */
|
||||
|
||||
#define PM_APBAMASK_PAC0_Pos 0 /**< \brief (PM_APBAMASK) PAC0 APB Clock Mask */
|
||||
#define PM_APBAMASK_PAC0 (0x1u << PM_APBAMASK_PAC0_Pos)
|
||||
#define PM_APBAMASK_PM_Pos 1 /**< \brief (PM_APBAMASK) PM APB Clock Mask */
|
||||
#define PM_APBAMASK_PM (0x1u << PM_APBAMASK_PM_Pos)
|
||||
#define PM_APBAMASK_SYSCTRL_Pos 2 /**< \brief (PM_APBAMASK) SYSCTRL APB Clock Mask */
|
||||
#define PM_APBAMASK_SYSCTRL (0x1u << PM_APBAMASK_SYSCTRL_Pos)
|
||||
#define PM_APBAMASK_GCLK_Pos 3 /**< \brief (PM_APBAMASK) GCLK APB Clock Mask */
|
||||
#define PM_APBAMASK_GCLK (0x1u << PM_APBAMASK_GCLK_Pos)
|
||||
#define PM_APBAMASK_WDT_Pos 4 /**< \brief (PM_APBAMASK) WDT APB Clock Mask */
|
||||
#define PM_APBAMASK_WDT (0x1u << PM_APBAMASK_WDT_Pos)
|
||||
#define PM_APBAMASK_RTC_Pos 5 /**< \brief (PM_APBAMASK) RTC APB Clock Mask */
|
||||
#define PM_APBAMASK_RTC (0x1u << PM_APBAMASK_RTC_Pos)
|
||||
#define PM_APBAMASK_EIC_Pos 6 /**< \brief (PM_APBAMASK) EIC APB Clock Mask */
|
||||
#define PM_APBAMASK_EIC (0x1u << PM_APBAMASK_EIC_Pos)
|
||||
#define PM_APBAMASK_MASK 0x0000007Fu /**< \brief (PM_APBAMASK) MASK Register */
|
||||
|
||||
/* -------- PM_APBBMASK : (PM Offset: 0x1C) (R/W 32) APBB Mask -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t PAC1:1; /*!< bit: 0 PAC1 APB Clock Mask */
|
||||
uint32_t DSU:1; /*!< bit: 1 DSU APB Clock Mask */
|
||||
uint32_t NVMCTRL:1; /*!< bit: 2 NVMCTRL APB Clock Mask */
|
||||
uint32_t PORT:1; /*!< bit: 3 PORT APB Clock Mask */
|
||||
uint32_t :28; /*!< bit: 4..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} PM_APBBMASK_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PM_APBBMASK_OFFSET 0x1C /**< \brief (PM_APBBMASK offset) APBB Mask */
|
||||
#define PM_APBBMASK_RESETVALUE 0x0000001F /**< \brief (PM_APBBMASK reset_value) APBB Mask */
|
||||
|
||||
#define PM_APBBMASK_PAC1_Pos 0 /**< \brief (PM_APBBMASK) PAC1 APB Clock Mask */
|
||||
#define PM_APBBMASK_PAC1 (0x1u << PM_APBBMASK_PAC1_Pos)
|
||||
#define PM_APBBMASK_DSU_Pos 1 /**< \brief (PM_APBBMASK) DSU APB Clock Mask */
|
||||
#define PM_APBBMASK_DSU (0x1u << PM_APBBMASK_DSU_Pos)
|
||||
#define PM_APBBMASK_NVMCTRL_Pos 2 /**< \brief (PM_APBBMASK) NVMCTRL APB Clock Mask */
|
||||
#define PM_APBBMASK_NVMCTRL (0x1u << PM_APBBMASK_NVMCTRL_Pos)
|
||||
#define PM_APBBMASK_PORT_Pos 3 /**< \brief (PM_APBBMASK) PORT APB Clock Mask */
|
||||
#define PM_APBBMASK_PORT (0x1u << PM_APBBMASK_PORT_Pos)
|
||||
#define PM_APBBMASK_MASK 0x0000000Fu /**< \brief (PM_APBBMASK) MASK Register */
|
||||
|
||||
/* -------- PM_APBCMASK : (PM Offset: 0x20) (R/W 32) APBC Mask -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t PAC2:1; /*!< bit: 0 PAC2 APB Clock Mask */
|
||||
uint32_t EVSYS:1; /*!< bit: 1 EVSYS APB Clock Mask */
|
||||
uint32_t SERCOM0:1; /*!< bit: 2 SERCOM0 APB Clock Mask */
|
||||
uint32_t SERCOM1:1; /*!< bit: 3 SERCOM1 APB Clock Mask */
|
||||
uint32_t SERCOM2:1; /*!< bit: 4 SERCOM2 APB Clock Mask */
|
||||
uint32_t SERCOM3:1; /*!< bit: 5 SERCOM3 APB Clock Mask */
|
||||
uint32_t SERCOM4:1; /*!< bit: 6 SERCOM4 APB Clock Mask */
|
||||
uint32_t SERCOM5:1; /*!< bit: 7 SERCOM5 APB Clock Mask */
|
||||
uint32_t TC0:1; /*!< bit: 8 TC0 APB Clock Mask */
|
||||
uint32_t TC1:1; /*!< bit: 9 TC1 APB Clock Mask */
|
||||
uint32_t TC2:1; /*!< bit: 10 TC2 APB Clock Mask */
|
||||
uint32_t TC3:1; /*!< bit: 11 TC3 APB Clock Mask */
|
||||
uint32_t TC4:1; /*!< bit: 12 TC4 APB Clock Mask */
|
||||
uint32_t TC5:1; /*!< bit: 13 TC5 APB Clock Mask */
|
||||
uint32_t TC6:1; /*!< bit: 14 TC6 APB Clock Mask */
|
||||
uint32_t TC7:1; /*!< bit: 15 TC7 APB Clock Mask */
|
||||
uint32_t ADC:1; /*!< bit: 16 ADC APB Clock Mask */
|
||||
uint32_t AC:1; /*!< bit: 17 AC APB Clock Mask */
|
||||
uint32_t DAC:1; /*!< bit: 18 DAC APB Clock Mask */
|
||||
uint32_t :13; /*!< bit: 19..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} PM_APBCMASK_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PM_APBCMASK_OFFSET 0x20 /**< \brief (PM_APBCMASK offset) APBC Mask */
|
||||
#define PM_APBCMASK_RESETVALUE 0x00010000 /**< \brief (PM_APBCMASK reset_value) APBC Mask */
|
||||
|
||||
#define PM_APBCMASK_PAC2_Pos 0 /**< \brief (PM_APBCMASK) PAC2 APB Clock Mask */
|
||||
#define PM_APBCMASK_PAC2 (0x1u << PM_APBCMASK_PAC2_Pos)
|
||||
#define PM_APBCMASK_EVSYS_Pos 1 /**< \brief (PM_APBCMASK) EVSYS APB Clock Mask */
|
||||
#define PM_APBCMASK_EVSYS (0x1u << PM_APBCMASK_EVSYS_Pos)
|
||||
#define PM_APBCMASK_SERCOM0_Pos 2 /**< \brief (PM_APBCMASK) SERCOM0 APB Clock Mask */
|
||||
#define PM_APBCMASK_SERCOM0 (0x1u << PM_APBCMASK_SERCOM0_Pos)
|
||||
#define PM_APBCMASK_SERCOM1_Pos 3 /**< \brief (PM_APBCMASK) SERCOM1 APB Clock Mask */
|
||||
#define PM_APBCMASK_SERCOM1 (0x1u << PM_APBCMASK_SERCOM1_Pos)
|
||||
#define PM_APBCMASK_SERCOM2_Pos 4 /**< \brief (PM_APBCMASK) SERCOM2 APB Clock Mask */
|
||||
#define PM_APBCMASK_SERCOM2 (0x1u << PM_APBCMASK_SERCOM2_Pos)
|
||||
#define PM_APBCMASK_SERCOM3_Pos 5 /**< \brief (PM_APBCMASK) SERCOM3 APB Clock Mask */
|
||||
#define PM_APBCMASK_SERCOM3 (0x1u << PM_APBCMASK_SERCOM3_Pos)
|
||||
#define PM_APBCMASK_SERCOM4_Pos 6 /**< \brief (PM_APBCMASK) SERCOM4 APB Clock Mask */
|
||||
#define PM_APBCMASK_SERCOM4 (0x1u << PM_APBCMASK_SERCOM4_Pos)
|
||||
#define PM_APBCMASK_SERCOM5_Pos 7 /**< \brief (PM_APBCMASK) SERCOM5 APB Clock Mask */
|
||||
#define PM_APBCMASK_SERCOM5 (0x1u << PM_APBCMASK_SERCOM5_Pos)
|
||||
#define PM_APBCMASK_TC0_Pos 8 /**< \brief (PM_APBCMASK) TC0 APB Clock Mask */
|
||||
#define PM_APBCMASK_TC0 (0x1u << PM_APBCMASK_TC0_Pos)
|
||||
#define PM_APBCMASK_TC1_Pos 9 /**< \brief (PM_APBCMASK) TC1 APB Clock Mask */
|
||||
#define PM_APBCMASK_TC1 (0x1u << PM_APBCMASK_TC1_Pos)
|
||||
#define PM_APBCMASK_TC2_Pos 10 /**< \brief (PM_APBCMASK) TC2 APB Clock Mask */
|
||||
#define PM_APBCMASK_TC2 (0x1u << PM_APBCMASK_TC2_Pos)
|
||||
#define PM_APBCMASK_TC3_Pos 11 /**< \brief (PM_APBCMASK) TC3 APB Clock Mask */
|
||||
#define PM_APBCMASK_TC3 (0x1u << PM_APBCMASK_TC3_Pos)
|
||||
#define PM_APBCMASK_TC4_Pos 12 /**< \brief (PM_APBCMASK) TC4 APB Clock Mask */
|
||||
#define PM_APBCMASK_TC4 (0x1u << PM_APBCMASK_TC4_Pos)
|
||||
#define PM_APBCMASK_TC5_Pos 13 /**< \brief (PM_APBCMASK) TC5 APB Clock Mask */
|
||||
#define PM_APBCMASK_TC5 (0x1u << PM_APBCMASK_TC5_Pos)
|
||||
#define PM_APBCMASK_TC6_Pos 14 /**< \brief (PM_APBCMASK) TC6 APB Clock Mask */
|
||||
#define PM_APBCMASK_TC6 (0x1u << PM_APBCMASK_TC6_Pos)
|
||||
#define PM_APBCMASK_TC7_Pos 15 /**< \brief (PM_APBCMASK) TC7 APB Clock Mask */
|
||||
#define PM_APBCMASK_TC7 (0x1u << PM_APBCMASK_TC7_Pos)
|
||||
#define PM_APBCMASK_ADC_Pos 16 /**< \brief (PM_APBCMASK) ADC APB Clock Mask */
|
||||
#define PM_APBCMASK_ADC (0x1u << PM_APBCMASK_ADC_Pos)
|
||||
#define PM_APBCMASK_AC_Pos 17 /**< \brief (PM_APBCMASK) AC APB Clock Mask */
|
||||
#define PM_APBCMASK_AC (0x1u << PM_APBCMASK_AC_Pos)
|
||||
#define PM_APBCMASK_DAC_Pos 18 /**< \brief (PM_APBCMASK) DAC APB Clock Mask */
|
||||
#define PM_APBCMASK_DAC (0x1u << PM_APBCMASK_DAC_Pos)
|
||||
#define PM_APBCMASK_MASK 0x0007FFFFu /**< \brief (PM_APBCMASK) MASK Register */
|
||||
|
||||
/* -------- PM_INTENCLR : (PM Offset: 0x34) (R/W 8) Interrupt Enable Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t CKRDY:1; /*!< bit: 0 Clock Ready Interrupt Enable Clear */
|
||||
uint8_t CFD:1; /*!< bit: 1 Clock Failure Detector Enable Clear */
|
||||
uint8_t :6; /*!< bit: 2.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} PM_INTENCLR_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PM_INTENCLR_OFFSET 0x34 /**< \brief (PM_INTENCLR offset) Interrupt Enable Clear Register */
|
||||
#define PM_INTENCLR_RESETVALUE 0x00 /**< \brief (PM_INTENCLR reset_value) Interrupt Enable Clear Register */
|
||||
|
||||
#define PM_INTENCLR_CKRDY_Pos 0 /**< \brief (PM_INTENCLR) Clock Ready Interrupt Enable Clear */
|
||||
#define PM_INTENCLR_CKRDY (0x1u << PM_INTENCLR_CKRDY_Pos)
|
||||
#define PM_INTENCLR_CFD_Pos 1 /**< \brief (PM_INTENCLR) Clock Failure Detector Enable Clear */
|
||||
#define PM_INTENCLR_CFD (0x1u << PM_INTENCLR_CFD_Pos)
|
||||
#define PM_INTENCLR_MASK 0x03u /**< \brief (PM_INTENCLR) MASK Register */
|
||||
|
||||
/* -------- PM_INTENSET : (PM Offset: 0x35) (R/W 8) Interrupt Enable Set Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t CKRDY:1; /*!< bit: 0 Clock Ready Interrupt Enable Set */
|
||||
uint8_t CFD:1; /*!< bit: 1 Clock Failure Detector Enable Set */
|
||||
uint8_t :6; /*!< bit: 2.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} PM_INTENSET_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PM_INTENSET_OFFSET 0x35 /**< \brief (PM_INTENSET offset) Interrupt Enable Set Register */
|
||||
#define PM_INTENSET_RESETVALUE 0x00 /**< \brief (PM_INTENSET reset_value) Interrupt Enable Set Register */
|
||||
|
||||
#define PM_INTENSET_CKRDY_Pos 0 /**< \brief (PM_INTENSET) Clock Ready Interrupt Enable Set */
|
||||
#define PM_INTENSET_CKRDY (0x1u << PM_INTENSET_CKRDY_Pos)
|
||||
#define PM_INTENSET_CFD_Pos 1 /**< \brief (PM_INTENSET) Clock Failure Detector Enable Set */
|
||||
#define PM_INTENSET_CFD (0x1u << PM_INTENSET_CFD_Pos)
|
||||
#define PM_INTENSET_MASK 0x03u /**< \brief (PM_INTENSET) MASK Register */
|
||||
|
||||
/* -------- PM_INTFLAG : (PM Offset: 0x36) (R/W 8) Interrupt Flag Status and Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t CKRDY:1; /*!< bit: 0 Clock Ready Interrupt */
|
||||
uint8_t CFD:1; /*!< bit: 1 Clock Failure Detectore Interrupt */
|
||||
uint8_t :6; /*!< bit: 2.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} PM_INTFLAG_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PM_INTFLAG_OFFSET 0x36 /**< \brief (PM_INTFLAG offset) Interrupt Flag Status and Clear Register */
|
||||
#define PM_INTFLAG_RESETVALUE 0x00 /**< \brief (PM_INTFLAG reset_value) Interrupt Flag Status and Clear Register */
|
||||
|
||||
#define PM_INTFLAG_CKRDY_Pos 0 /**< \brief (PM_INTFLAG) Clock Ready Interrupt */
|
||||
#define PM_INTFLAG_CKRDY (0x1u << PM_INTFLAG_CKRDY_Pos)
|
||||
#define PM_INTFLAG_CFD_Pos 1 /**< \brief (PM_INTFLAG) Clock Failure Detectore Interrupt */
|
||||
#define PM_INTFLAG_CFD (0x1u << PM_INTFLAG_CFD_Pos)
|
||||
#define PM_INTFLAG_MASK 0x03u /**< \brief (PM_INTFLAG) MASK Register */
|
||||
|
||||
/* -------- PM_RCAUSE : (PM Offset: 0x38) (R/ 8) Reset Cause Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t POR:1; /*!< bit: 0 Power-on Reset */
|
||||
uint8_t BOD12:1; /*!< bit: 1 Brown-out 1.2V Reset */
|
||||
uint8_t BOD33:1; /*!< bit: 2 Brown-out 3.3V Reset */
|
||||
uint8_t :1; /*!< bit: 3 Reserved */
|
||||
uint8_t EXT:1; /*!< bit: 4 External Reset Pin */
|
||||
uint8_t WDT:1; /*!< bit: 5 Watchdog Reset */
|
||||
uint8_t SYST:1; /*!< bit: 6 System Reset Request */
|
||||
uint8_t :1; /*!< bit: 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} PM_RCAUSE_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PM_RCAUSE_OFFSET 0x38 /**< \brief (PM_RCAUSE offset) Reset Cause Register */
|
||||
#define PM_RCAUSE_RESETVALUE 0x01 /**< \brief (PM_RCAUSE reset_value) Reset Cause Register */
|
||||
|
||||
#define PM_RCAUSE_POR_Pos 0 /**< \brief (PM_RCAUSE) Power-on Reset */
|
||||
#define PM_RCAUSE_POR (0x1u << PM_RCAUSE_POR_Pos)
|
||||
#define PM_RCAUSE_BOD12_Pos 1 /**< \brief (PM_RCAUSE) Brown-out 1.2V Reset */
|
||||
#define PM_RCAUSE_BOD12 (0x1u << PM_RCAUSE_BOD12_Pos)
|
||||
#define PM_RCAUSE_BOD33_Pos 2 /**< \brief (PM_RCAUSE) Brown-out 3.3V Reset */
|
||||
#define PM_RCAUSE_BOD33 (0x1u << PM_RCAUSE_BOD33_Pos)
|
||||
#define PM_RCAUSE_EXT_Pos 4 /**< \brief (PM_RCAUSE) External Reset Pin */
|
||||
#define PM_RCAUSE_EXT (0x1u << PM_RCAUSE_EXT_Pos)
|
||||
#define PM_RCAUSE_WDT_Pos 5 /**< \brief (PM_RCAUSE) Watchdog Reset */
|
||||
#define PM_RCAUSE_WDT (0x1u << PM_RCAUSE_WDT_Pos)
|
||||
#define PM_RCAUSE_SYST_Pos 6 /**< \brief (PM_RCAUSE) System Reset Request */
|
||||
#define PM_RCAUSE_SYST (0x1u << PM_RCAUSE_SYST_Pos)
|
||||
#define PM_RCAUSE_MASK 0x77u /**< \brief (PM_RCAUSE) MASK Register */
|
||||
|
||||
/** \brief PM hardware registers */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef struct {
|
||||
__IO PM_CTRL_Type CTRL; /**< \brief Offset: 0x00 (R/W 8) Control Register */
|
||||
__IO PM_SLEEP_Type SLEEP; /**< \brief Offset: 0x01 (R/W 8) Sleep Register */
|
||||
RoReg8 Reserved1[0x6];
|
||||
__IO PM_CPUSEL_Type CPUSEL; /**< \brief Offset: 0x08 (R/W 8) CPU Clock Select */
|
||||
__IO PM_APBASEL_Type APBASEL; /**< \brief Offset: 0x09 (R/W 8) APBA Clock Select */
|
||||
__IO PM_APBBSEL_Type APBBSEL; /**< \brief Offset: 0x0A (R/W 8) APBB Clock Select */
|
||||
__IO PM_APBCSEL_Type APBCSEL; /**< \brief Offset: 0x0B (R/W 8) APBC Clock Select */
|
||||
RoReg8 Reserved2[0x8];
|
||||
__IO PM_AHBMASK_Type AHBMASK; /**< \brief Offset: 0x14 (R/W 32) AHB Mask */
|
||||
__IO PM_APBAMASK_Type APBAMASK; /**< \brief Offset: 0x18 (R/W 32) APBA Mask */
|
||||
__IO PM_APBBMASK_Type APBBMASK; /**< \brief Offset: 0x1C (R/W 32) APBB Mask */
|
||||
__IO PM_APBCMASK_Type APBCMASK; /**< \brief Offset: 0x20 (R/W 32) APBC Mask */
|
||||
RoReg8 Reserved3[0x10];
|
||||
__IO PM_INTENCLR_Type INTENCLR; /**< \brief Offset: 0x34 (R/W 8) Interrupt Enable Clear Register */
|
||||
__IO PM_INTENSET_Type INTENSET; /**< \brief Offset: 0x35 (R/W 8) Interrupt Enable Set Register */
|
||||
__IO PM_INTFLAG_Type INTFLAG; /**< \brief Offset: 0x36 (R/W 8) Interrupt Flag Status and Clear Register */
|
||||
RoReg8 Reserved4[0x1];
|
||||
__I PM_RCAUSE_Type RCAUSE; /**< \brief Offset: 0x38 (R/ 8) Reset Cause Register */
|
||||
} Pm;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/*@}*/
|
||||
|
||||
#endif /* _SAMD20_PM_COMPONENT_ */
|
|
@ -0,0 +1,373 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Component description for PORT
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_PORT_COMPONENT_
|
||||
#define _SAMD20_PORT_COMPONENT_
|
||||
|
||||
/* ========================================================================== */
|
||||
/** SOFTWARE API DEFINITION FOR PORT */
|
||||
/* ========================================================================== */
|
||||
/** \addtogroup SAMD20_PORT Port Module */
|
||||
/*@{*/
|
||||
|
||||
#define REV_PORT 0x100
|
||||
|
||||
/* -------- PORT_DIR : (PORT Offset: 0x00) (R/W 32) GROUP Data Direction Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t DIR:32; /*!< bit: 0..31 Port Data Direction */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} PORT_DIR_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PORT_DIR_OFFSET 0x00 /**< \brief (PORT_DIR offset) Data Direction Register */
|
||||
#define PORT_DIR_RESETVALUE 0x00000000 /**< \brief (PORT_DIR reset_value) Data Direction Register */
|
||||
|
||||
#define PORT_DIR_DIR_Pos 0 /**< \brief (PORT_DIR) Port Data Direction */
|
||||
#define PORT_DIR_DIR_Msk (0xFFFFFFFFu << PORT_DIR_DIR_Pos)
|
||||
#define PORT_DIR_DIR(value) ((PORT_DIR_DIR_Msk & ((value) << PORT_DIR_DIR_Pos)))
|
||||
#define PORT_DIR_MASK 0xFFFFFFFFu /**< \brief (PORT_DIR) MASK Register */
|
||||
|
||||
/* -------- PORT_DIRCLR : (PORT Offset: 0x04) (R/W 32) GROUP Data Direction Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t DIRCLR:32; /*!< bit: 0..31 Port Data Direction Clear */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} PORT_DIRCLR_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PORT_DIRCLR_OFFSET 0x04 /**< \brief (PORT_DIRCLR offset) Data Direction Clear Register */
|
||||
#define PORT_DIRCLR_RESETVALUE 0x00000000 /**< \brief (PORT_DIRCLR reset_value) Data Direction Clear Register */
|
||||
|
||||
#define PORT_DIRCLR_DIRCLR_Pos 0 /**< \brief (PORT_DIRCLR) Port Data Direction Clear */
|
||||
#define PORT_DIRCLR_DIRCLR_Msk (0xFFFFFFFFu << PORT_DIRCLR_DIRCLR_Pos)
|
||||
#define PORT_DIRCLR_DIRCLR(value) ((PORT_DIRCLR_DIRCLR_Msk & ((value) << PORT_DIRCLR_DIRCLR_Pos)))
|
||||
#define PORT_DIRCLR_MASK 0xFFFFFFFFu /**< \brief (PORT_DIRCLR) MASK Register */
|
||||
|
||||
/* -------- PORT_DIRSET : (PORT Offset: 0x08) (R/W 32) GROUP Data Direction Set Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t DIRSET:32; /*!< bit: 0..31 Port Data Direction Set */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} PORT_DIRSET_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PORT_DIRSET_OFFSET 0x08 /**< \brief (PORT_DIRSET offset) Data Direction Set Register */
|
||||
#define PORT_DIRSET_RESETVALUE 0x00000000 /**< \brief (PORT_DIRSET reset_value) Data Direction Set Register */
|
||||
|
||||
#define PORT_DIRSET_DIRSET_Pos 0 /**< \brief (PORT_DIRSET) Port Data Direction Set */
|
||||
#define PORT_DIRSET_DIRSET_Msk (0xFFFFFFFFu << PORT_DIRSET_DIRSET_Pos)
|
||||
#define PORT_DIRSET_DIRSET(value) ((PORT_DIRSET_DIRSET_Msk & ((value) << PORT_DIRSET_DIRSET_Pos)))
|
||||
#define PORT_DIRSET_MASK 0xFFFFFFFFu /**< \brief (PORT_DIRSET) MASK Register */
|
||||
|
||||
/* -------- PORT_DIRTGL : (PORT Offset: 0x0C) (R/W 32) GROUP Data Direction Toggle Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t DIRTGL:32; /*!< bit: 0..31 Port Data Direction Toggle */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} PORT_DIRTGL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PORT_DIRTGL_OFFSET 0x0C /**< \brief (PORT_DIRTGL offset) Data Direction Toggle Register */
|
||||
#define PORT_DIRTGL_RESETVALUE 0x00000000 /**< \brief (PORT_DIRTGL reset_value) Data Direction Toggle Register */
|
||||
|
||||
#define PORT_DIRTGL_DIRTGL_Pos 0 /**< \brief (PORT_DIRTGL) Port Data Direction Toggle */
|
||||
#define PORT_DIRTGL_DIRTGL_Msk (0xFFFFFFFFu << PORT_DIRTGL_DIRTGL_Pos)
|
||||
#define PORT_DIRTGL_DIRTGL(value) ((PORT_DIRTGL_DIRTGL_Msk & ((value) << PORT_DIRTGL_DIRTGL_Pos)))
|
||||
#define PORT_DIRTGL_MASK 0xFFFFFFFFu /**< \brief (PORT_DIRTGL) MASK Register */
|
||||
|
||||
/* -------- PORT_OUT : (PORT Offset: 0x10) (R/W 32) GROUP Data Output Value Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t OUT:32; /*!< bit: 0..31 Port Data Output Value */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} PORT_OUT_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PORT_OUT_OFFSET 0x10 /**< \brief (PORT_OUT offset) Data Output Value Register */
|
||||
#define PORT_OUT_RESETVALUE 0x00000000 /**< \brief (PORT_OUT reset_value) Data Output Value Register */
|
||||
|
||||
#define PORT_OUT_OUT_Pos 0 /**< \brief (PORT_OUT) Port Data Output Value */
|
||||
#define PORT_OUT_OUT_Msk (0xFFFFFFFFu << PORT_OUT_OUT_Pos)
|
||||
#define PORT_OUT_OUT(value) ((PORT_OUT_OUT_Msk & ((value) << PORT_OUT_OUT_Pos)))
|
||||
#define PORT_OUT_MASK 0xFFFFFFFFu /**< \brief (PORT_OUT) MASK Register */
|
||||
|
||||
/* -------- PORT_OUTCLR : (PORT Offset: 0x14) (R/W 32) GROUP Data Output Value Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t OUTCLR:32; /*!< bit: 0..31 Port Data Output Value Clear */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} PORT_OUTCLR_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PORT_OUTCLR_OFFSET 0x14 /**< \brief (PORT_OUTCLR offset) Data Output Value Clear Register */
|
||||
#define PORT_OUTCLR_RESETVALUE 0x00000000 /**< \brief (PORT_OUTCLR reset_value) Data Output Value Clear Register */
|
||||
|
||||
#define PORT_OUTCLR_OUTCLR_Pos 0 /**< \brief (PORT_OUTCLR) Port Data Output Value Clear */
|
||||
#define PORT_OUTCLR_OUTCLR_Msk (0xFFFFFFFFu << PORT_OUTCLR_OUTCLR_Pos)
|
||||
#define PORT_OUTCLR_OUTCLR(value) ((PORT_OUTCLR_OUTCLR_Msk & ((value) << PORT_OUTCLR_OUTCLR_Pos)))
|
||||
#define PORT_OUTCLR_MASK 0xFFFFFFFFu /**< \brief (PORT_OUTCLR) MASK Register */
|
||||
|
||||
/* -------- PORT_OUTSET : (PORT Offset: 0x18) (R/W 32) GROUP Data Output Value Set Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t OUTSET:32; /*!< bit: 0..31 Port Data Output Value Set */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} PORT_OUTSET_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PORT_OUTSET_OFFSET 0x18 /**< \brief (PORT_OUTSET offset) Data Output Value Set Register */
|
||||
#define PORT_OUTSET_RESETVALUE 0x00000000 /**< \brief (PORT_OUTSET reset_value) Data Output Value Set Register */
|
||||
|
||||
#define PORT_OUTSET_OUTSET_Pos 0 /**< \brief (PORT_OUTSET) Port Data Output Value Set */
|
||||
#define PORT_OUTSET_OUTSET_Msk (0xFFFFFFFFu << PORT_OUTSET_OUTSET_Pos)
|
||||
#define PORT_OUTSET_OUTSET(value) ((PORT_OUTSET_OUTSET_Msk & ((value) << PORT_OUTSET_OUTSET_Pos)))
|
||||
#define PORT_OUTSET_MASK 0xFFFFFFFFu /**< \brief (PORT_OUTSET) MASK Register */
|
||||
|
||||
/* -------- PORT_OUTTGL : (PORT Offset: 0x1C) (R/W 32) GROUP Data Output Value Toggle Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t OUTTGL:32; /*!< bit: 0..31 Port Data Output Value Toggle */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} PORT_OUTTGL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PORT_OUTTGL_OFFSET 0x1C /**< \brief (PORT_OUTTGL offset) Data Output Value Toggle Register */
|
||||
#define PORT_OUTTGL_RESETVALUE 0x00000000 /**< \brief (PORT_OUTTGL reset_value) Data Output Value Toggle Register */
|
||||
|
||||
#define PORT_OUTTGL_OUTTGL_Pos 0 /**< \brief (PORT_OUTTGL) Port Data Output Value Toggle */
|
||||
#define PORT_OUTTGL_OUTTGL_Msk (0xFFFFFFFFu << PORT_OUTTGL_OUTTGL_Pos)
|
||||
#define PORT_OUTTGL_OUTTGL(value) ((PORT_OUTTGL_OUTTGL_Msk & ((value) << PORT_OUTTGL_OUTTGL_Pos)))
|
||||
#define PORT_OUTTGL_MASK 0xFFFFFFFFu /**< \brief (PORT_OUTTGL) MASK Register */
|
||||
|
||||
/* -------- PORT_IN : (PORT Offset: 0x20) (R/ 32) GROUP Data Input Value Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t IN:32; /*!< bit: 0..31 Port Data Input Value */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} PORT_IN_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PORT_IN_OFFSET 0x20 /**< \brief (PORT_IN offset) Data Input Value Register */
|
||||
#define PORT_IN_RESETVALUE 0x00000000 /**< \brief (PORT_IN reset_value) Data Input Value Register */
|
||||
|
||||
#define PORT_IN_IN_Pos 0 /**< \brief (PORT_IN) Port Data Input Value */
|
||||
#define PORT_IN_IN_Msk (0xFFFFFFFFu << PORT_IN_IN_Pos)
|
||||
#define PORT_IN_IN(value) ((PORT_IN_IN_Msk & ((value) << PORT_IN_IN_Pos)))
|
||||
#define PORT_IN_MASK 0xFFFFFFFFu /**< \brief (PORT_IN) MASK Register */
|
||||
|
||||
/* -------- PORT_CTRL : (PORT Offset: 0x24) (R/W 32) GROUP Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t SAMPLING:32; /*!< bit: 0..31 Input Sampling Mode */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} PORT_CTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PORT_CTRL_OFFSET 0x24 /**< \brief (PORT_CTRL offset) Control Register */
|
||||
#define PORT_CTRL_RESETVALUE 0x00000000 /**< \brief (PORT_CTRL reset_value) Control Register */
|
||||
|
||||
#define PORT_CTRL_SAMPLING_Pos 0 /**< \brief (PORT_CTRL) Input Sampling Mode */
|
||||
#define PORT_CTRL_SAMPLING_Msk (0xFFFFFFFFu << PORT_CTRL_SAMPLING_Pos)
|
||||
#define PORT_CTRL_SAMPLING(value) ((PORT_CTRL_SAMPLING_Msk & ((value) << PORT_CTRL_SAMPLING_Pos)))
|
||||
#define PORT_CTRL_MASK 0xFFFFFFFFu /**< \brief (PORT_CTRL) MASK Register */
|
||||
|
||||
/* -------- PORT_WRCONFIG : (PORT Offset: 0x28) ( /W 32) GROUP Write Configuration Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t PINMASK:16; /*!< bit: 0..15 Pin Mask for Multiple Pin Configuration */
|
||||
uint32_t PMUXEN:1; /*!< bit: 16 Select Peripheral Multiplexer */
|
||||
uint32_t INEN:1; /*!< bit: 17 Input Enable */
|
||||
uint32_t PULLEN:1; /*!< bit: 18 Pull Enable */
|
||||
uint32_t ODRAIN:1; /*!< bit: 19 Open Drain Output */
|
||||
uint32_t SLEWLIM:1; /*!< bit: 20 Output Driver Slew Rate Limit Enable */
|
||||
uint32_t :1; /*!< bit: 21 Reserved */
|
||||
uint32_t DRVSTR:1; /*!< bit: 22 Output Driver Strength Selection */
|
||||
uint32_t :1; /*!< bit: 23 Reserved */
|
||||
uint32_t PMUX:4; /*!< bit: 24..27 Peripheral Multiplexing Template */
|
||||
uint32_t WRPMUX:1; /*!< bit: 28 Write PMUX Registers */
|
||||
uint32_t :1; /*!< bit: 29 Reserved */
|
||||
uint32_t WRPINCFG:1; /*!< bit: 30 Write PINCFG Registers */
|
||||
uint32_t HWSEL:1; /*!< bit: 31 Half-Word Select */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} PORT_WRCONFIG_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PORT_WRCONFIG_OFFSET 0x28 /**< \brief (PORT_WRCONFIG offset) Write Configuration Register */
|
||||
#define PORT_WRCONFIG_RESETVALUE 0x00000000 /**< \brief (PORT_WRCONFIG reset_value) Write Configuration Register */
|
||||
|
||||
#define PORT_WRCONFIG_PINMASK_Pos 0 /**< \brief (PORT_WRCONFIG) Pin Mask for Multiple Pin Configuration */
|
||||
#define PORT_WRCONFIG_PINMASK_Msk (0xFFFFu << PORT_WRCONFIG_PINMASK_Pos)
|
||||
#define PORT_WRCONFIG_PINMASK(value) ((PORT_WRCONFIG_PINMASK_Msk & ((value) << PORT_WRCONFIG_PINMASK_Pos)))
|
||||
#define PORT_WRCONFIG_PMUXEN_Pos 16 /**< \brief (PORT_WRCONFIG) Select Peripheral Multiplexer */
|
||||
#define PORT_WRCONFIG_PMUXEN (0x1u << PORT_WRCONFIG_PMUXEN_Pos)
|
||||
#define PORT_WRCONFIG_INEN_Pos 17 /**< \brief (PORT_WRCONFIG) Input Enable */
|
||||
#define PORT_WRCONFIG_INEN (0x1u << PORT_WRCONFIG_INEN_Pos)
|
||||
#define PORT_WRCONFIG_PULLEN_Pos 18 /**< \brief (PORT_WRCONFIG) Pull Enable */
|
||||
#define PORT_WRCONFIG_PULLEN (0x1u << PORT_WRCONFIG_PULLEN_Pos)
|
||||
#define PORT_WRCONFIG_ODRAIN_Pos 19 /**< \brief (PORT_WRCONFIG) Open Drain Output */
|
||||
#define PORT_WRCONFIG_ODRAIN (0x1u << PORT_WRCONFIG_ODRAIN_Pos)
|
||||
#define PORT_WRCONFIG_SLEWLIM_Pos 20 /**< \brief (PORT_WRCONFIG) Output Driver Slew Rate Limit Enable */
|
||||
#define PORT_WRCONFIG_SLEWLIM (0x1u << PORT_WRCONFIG_SLEWLIM_Pos)
|
||||
#define PORT_WRCONFIG_DRVSTR_Pos 22 /**< \brief (PORT_WRCONFIG) Output Driver Strength Selection */
|
||||
#define PORT_WRCONFIG_DRVSTR (0x1u << PORT_WRCONFIG_DRVSTR_Pos)
|
||||
#define PORT_WRCONFIG_PMUX_Pos 24 /**< \brief (PORT_WRCONFIG) Peripheral Multiplexing Template */
|
||||
#define PORT_WRCONFIG_PMUX_Msk (0xFu << PORT_WRCONFIG_PMUX_Pos)
|
||||
#define PORT_WRCONFIG_PMUX(value) ((PORT_WRCONFIG_PMUX_Msk & ((value) << PORT_WRCONFIG_PMUX_Pos)))
|
||||
#define PORT_WRCONFIG_WRPMUX_Pos 28 /**< \brief (PORT_WRCONFIG) Write PMUX Registers */
|
||||
#define PORT_WRCONFIG_WRPMUX (0x1u << PORT_WRCONFIG_WRPMUX_Pos)
|
||||
#define PORT_WRCONFIG_WRPINCFG_Pos 30 /**< \brief (PORT_WRCONFIG) Write PINCFG Registers */
|
||||
#define PORT_WRCONFIG_WRPINCFG (0x1u << PORT_WRCONFIG_WRPINCFG_Pos)
|
||||
#define PORT_WRCONFIG_HWSEL_Pos 31 /**< \brief (PORT_WRCONFIG) Half-Word Select */
|
||||
#define PORT_WRCONFIG_HWSEL (0x1u << PORT_WRCONFIG_HWSEL_Pos)
|
||||
#define PORT_WRCONFIG_MASK 0xDF5FFFFFu /**< \brief (PORT_WRCONFIG) MASK Register */
|
||||
|
||||
/* -------- PORT_PMUX : (PORT Offset: 0x30) (R/W 8) GROUP Peripheral Multiplexing Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t PMUXE:4; /*!< bit: 0.. 3 Peripheral Multiplexing for Even-Numbered Pin */
|
||||
uint8_t PMUXO:4; /*!< bit: 4.. 7 Peripheral Multiplexing for Odd-Numbered Pin */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} PORT_PMUX_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PORT_PMUX_OFFSET 0x30 /**< \brief (PORT_PMUX offset) Peripheral Multiplexing Register */
|
||||
#define PORT_PMUX_RESETVALUE 0x00 /**< \brief (PORT_PMUX reset_value) Peripheral Multiplexing Register */
|
||||
|
||||
#define PORT_PMUX_PMUXE_Pos 0 /**< \brief (PORT_PMUX) Peripheral Multiplexing for Even-Numbered Pin */
|
||||
#define PORT_PMUX_PMUXE_Msk (0xFu << PORT_PMUX_PMUXE_Pos)
|
||||
#define PORT_PMUX_PMUXE(value) ((PORT_PMUX_PMUXE_Msk & ((value) << PORT_PMUX_PMUXE_Pos)))
|
||||
#define PORT_PMUX_PMUXO_Pos 4 /**< \brief (PORT_PMUX) Peripheral Multiplexing for Odd-Numbered Pin */
|
||||
#define PORT_PMUX_PMUXO_Msk (0xFu << PORT_PMUX_PMUXO_Pos)
|
||||
#define PORT_PMUX_PMUXO(value) ((PORT_PMUX_PMUXO_Msk & ((value) << PORT_PMUX_PMUXO_Pos)))
|
||||
#define PORT_PMUX_MASK 0xFFu /**< \brief (PORT_PMUX) MASK Register */
|
||||
|
||||
/* -------- PORT_PINCFG : (PORT Offset: 0x40) (R/W 8) GROUP Pin Configuration Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t PMUXEN:1; /*!< bit: 0 Select Peripheral Multiplexer */
|
||||
uint8_t INEN:1; /*!< bit: 1 Input Enable */
|
||||
uint8_t PULLEN:1; /*!< bit: 2 Pull Enable */
|
||||
uint8_t ODRAIN:1; /*!< bit: 3 Open Drain Output */
|
||||
uint8_t SLEWLIM:1; /*!< bit: 4 Output Driver Slew Rate Limit Enable */
|
||||
uint8_t :1; /*!< bit: 5 Reserved */
|
||||
uint8_t DRVSTR:1; /*!< bit: 6 Output Driver Strength Selection */
|
||||
uint8_t :1; /*!< bit: 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} PORT_PINCFG_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define PORT_PINCFG_OFFSET 0x40 /**< \brief (PORT_PINCFG offset) Pin Configuration Register */
|
||||
#define PORT_PINCFG_RESETVALUE 0x00 /**< \brief (PORT_PINCFG reset_value) Pin Configuration Register */
|
||||
|
||||
#define PORT_PINCFG_PMUXEN_Pos 0 /**< \brief (PORT_PINCFG) Select Peripheral Multiplexer */
|
||||
#define PORT_PINCFG_PMUXEN (0x1u << PORT_PINCFG_PMUXEN_Pos)
|
||||
#define PORT_PINCFG_INEN_Pos 1 /**< \brief (PORT_PINCFG) Input Enable */
|
||||
#define PORT_PINCFG_INEN (0x1u << PORT_PINCFG_INEN_Pos)
|
||||
#define PORT_PINCFG_PULLEN_Pos 2 /**< \brief (PORT_PINCFG) Pull Enable */
|
||||
#define PORT_PINCFG_PULLEN (0x1u << PORT_PINCFG_PULLEN_Pos)
|
||||
#define PORT_PINCFG_ODRAIN_Pos 3 /**< \brief (PORT_PINCFG) Open Drain Output */
|
||||
#define PORT_PINCFG_ODRAIN (0x1u << PORT_PINCFG_ODRAIN_Pos)
|
||||
#define PORT_PINCFG_SLEWLIM_Pos 4 /**< \brief (PORT_PINCFG) Output Driver Slew Rate Limit Enable */
|
||||
#define PORT_PINCFG_SLEWLIM (0x1u << PORT_PINCFG_SLEWLIM_Pos)
|
||||
#define PORT_PINCFG_DRVSTR_Pos 6 /**< \brief (PORT_PINCFG) Output Driver Strength Selection */
|
||||
#define PORT_PINCFG_DRVSTR (0x1u << PORT_PINCFG_DRVSTR_Pos)
|
||||
#define PORT_PINCFG_MASK 0x5Fu /**< \brief (PORT_PINCFG) MASK Register */
|
||||
|
||||
/** \brief PortGroup hardware registers */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef struct {
|
||||
__IO PORT_DIR_Type DIR; /**< \brief Offset: 0x00 (R/W 32) Data Direction Register */
|
||||
__IO PORT_DIRCLR_Type DIRCLR; /**< \brief Offset: 0x04 (R/W 32) Data Direction Clear Register */
|
||||
__IO PORT_DIRSET_Type DIRSET; /**< \brief Offset: 0x08 (R/W 32) Data Direction Set Register */
|
||||
__IO PORT_DIRTGL_Type DIRTGL; /**< \brief Offset: 0x0C (R/W 32) Data Direction Toggle Register */
|
||||
__IO PORT_OUT_Type OUT; /**< \brief Offset: 0x10 (R/W 32) Data Output Value Register */
|
||||
__IO PORT_OUTCLR_Type OUTCLR; /**< \brief Offset: 0x14 (R/W 32) Data Output Value Clear Register */
|
||||
__IO PORT_OUTSET_Type OUTSET; /**< \brief Offset: 0x18 (R/W 32) Data Output Value Set Register */
|
||||
__IO PORT_OUTTGL_Type OUTTGL; /**< \brief Offset: 0x1C (R/W 32) Data Output Value Toggle Register */
|
||||
__I PORT_IN_Type IN; /**< \brief Offset: 0x20 (R/ 32) Data Input Value Register */
|
||||
__IO PORT_CTRL_Type CTRL; /**< \brief Offset: 0x24 (R/W 32) Control Register */
|
||||
__O PORT_WRCONFIG_Type WRCONFIG; /**< \brief Offset: 0x28 ( /W 32) Write Configuration Register */
|
||||
RoReg8 Reserved1[0x4];
|
||||
__IO PORT_PMUX_Type PMUX[16]; /**< \brief Offset: 0x30 (R/W 8) Peripheral Multiplexing Register */
|
||||
__IO PORT_PINCFG_Type PINCFG[32]; /**< \brief Offset: 0x40 (R/W 8) Pin Configuration Register */
|
||||
RoReg8 Reserved2[0x20];
|
||||
} PortGroup;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/** \brief PORT hardware registers */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef struct {
|
||||
PortGroup Group[2]; /**< \brief Offset: 0x00 PortGroup groups [GROUPS] */
|
||||
} Port;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/*@}*/
|
||||
|
||||
#endif /* _SAMD20_PORT_COMPONENT_ */
|
|
@ -0,0 +1,855 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Component description for RTC
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_RTC_COMPONENT_
|
||||
#define _SAMD20_RTC_COMPONENT_
|
||||
|
||||
/* ========================================================================== */
|
||||
/** SOFTWARE API DEFINITION FOR RTC */
|
||||
/* ========================================================================== */
|
||||
/** \addtogroup SAMD20_RTC Real-Time Counter */
|
||||
/*@{*/
|
||||
|
||||
#define REV_RTC 0x101
|
||||
|
||||
/* -------- RTC_MODE0_CTRL : (RTC Offset: 0x00) (R/W 16) MODE0 MODE0 Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t SWRST:1; /*!< bit: 0 Software Reset */
|
||||
uint16_t ENABLE:1; /*!< bit: 1 Enable */
|
||||
uint16_t MODE:2; /*!< bit: 2.. 3 Mode */
|
||||
uint16_t :3; /*!< bit: 4.. 6 Reserved */
|
||||
uint16_t MATCHCLR:1; /*!< bit: 7 Match Clears Counter */
|
||||
uint16_t PRESCALER:4; /*!< bit: 8..11 Prescaler */
|
||||
uint16_t :4; /*!< bit: 12..15 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} RTC_MODE0_CTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define RTC_MODE0_CTRL_OFFSET 0x00 /**< \brief (RTC_MODE0_CTRL offset) MODE0 Control Register */
|
||||
#define RTC_MODE0_CTRL_RESETVALUE 0x0000 /**< \brief (RTC_MODE0_CTRL reset_value) MODE0 Control Register */
|
||||
|
||||
#define RTC_MODE0_CTRL_SWRST_Pos 0 /**< \brief (RTC_MODE0_CTRL) Software Reset */
|
||||
#define RTC_MODE0_CTRL_SWRST (0x1u << RTC_MODE0_CTRL_SWRST_Pos)
|
||||
#define RTC_MODE0_CTRL_ENABLE_Pos 1 /**< \brief (RTC_MODE0_CTRL) Enable */
|
||||
#define RTC_MODE0_CTRL_ENABLE (0x1u << RTC_MODE0_CTRL_ENABLE_Pos)
|
||||
#define RTC_MODE0_CTRL_MODE_Pos 2 /**< \brief (RTC_MODE0_CTRL) Mode */
|
||||
#define RTC_MODE0_CTRL_MODE_Msk (0x3u << RTC_MODE0_CTRL_MODE_Pos)
|
||||
#define RTC_MODE0_CTRL_MODE(value) ((RTC_MODE0_CTRL_MODE_Msk & ((value) << RTC_MODE0_CTRL_MODE_Pos)))
|
||||
#define RTC_MODE0_CTRL_MODE_COUNT32 (0x0u << 2) /**< \brief (RTC_MODE0_CTRL) Mode 0 */
|
||||
#define RTC_MODE0_CTRL_MODE_COUNT16 (0x1u << 2) /**< \brief (RTC_MODE0_CTRL) Mode 1 */
|
||||
#define RTC_MODE0_CTRL_MODE_CLOCK (0x2u << 2) /**< \brief (RTC_MODE0_CTRL) Mode 2 */
|
||||
#define RTC_MODE0_CTRL_MATCHCLR_Pos 7 /**< \brief (RTC_MODE0_CTRL) Match Clears Counter */
|
||||
#define RTC_MODE0_CTRL_MATCHCLR (0x1u << RTC_MODE0_CTRL_MATCHCLR_Pos)
|
||||
#define RTC_MODE0_CTRL_PRESCALER_Pos 8 /**< \brief (RTC_MODE0_CTRL) Prescaler */
|
||||
#define RTC_MODE0_CTRL_PRESCALER_Msk (0xFu << RTC_MODE0_CTRL_PRESCALER_Pos)
|
||||
#define RTC_MODE0_CTRL_PRESCALER(value) ((RTC_MODE0_CTRL_PRESCALER_Msk & ((value) << RTC_MODE0_CTRL_PRESCALER_Pos)))
|
||||
#define RTC_MODE0_CTRL_PRESCALER_DIV1 (0x0u << 8) /**< \brief (RTC_MODE0_CTRL) */
|
||||
#define RTC_MODE0_CTRL_PRESCALER_DIV2 (0x1u << 8) /**< \brief (RTC_MODE0_CTRL) */
|
||||
#define RTC_MODE0_CTRL_PRESCALER_DIV4 (0x2u << 8) /**< \brief (RTC_MODE0_CTRL) */
|
||||
#define RTC_MODE0_CTRL_PRESCALER_DIV8 (0x3u << 8) /**< \brief (RTC_MODE0_CTRL) */
|
||||
#define RTC_MODE0_CTRL_PRESCALER_DIV16 (0x4u << 8) /**< \brief (RTC_MODE0_CTRL) */
|
||||
#define RTC_MODE0_CTRL_PRESCALER_DIV32 (0x5u << 8) /**< \brief (RTC_MODE0_CTRL) */
|
||||
#define RTC_MODE0_CTRL_PRESCALER_DIV64 (0x6u << 8) /**< \brief (RTC_MODE0_CTRL) */
|
||||
#define RTC_MODE0_CTRL_PRESCALER_DIV128 (0x7u << 8) /**< \brief (RTC_MODE0_CTRL) */
|
||||
#define RTC_MODE0_CTRL_PRESCALER_DIV256 (0x8u << 8) /**< \brief (RTC_MODE0_CTRL) */
|
||||
#define RTC_MODE0_CTRL_PRESCALER_DIV512 (0x9u << 8) /**< \brief (RTC_MODE0_CTRL) */
|
||||
#define RTC_MODE0_CTRL_PRESCALER_DIV1024 (0xAu << 8) /**< \brief (RTC_MODE0_CTRL) */
|
||||
#define RTC_MODE0_CTRL_MASK 0x0F8Fu /**< \brief (RTC_MODE0_CTRL) MASK Register */
|
||||
|
||||
/* -------- RTC_MODE1_CTRL : (RTC Offset: 0x00) (R/W 16) MODE1 MODE1 Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t SWRST:1; /*!< bit: 0 Software Reset */
|
||||
uint16_t ENABLE:1; /*!< bit: 1 Enable */
|
||||
uint16_t MODE:2; /*!< bit: 2.. 3 Mode */
|
||||
uint16_t :4; /*!< bit: 4.. 7 Reserved */
|
||||
uint16_t PRESCALER:4; /*!< bit: 8..11 Prescaler */
|
||||
uint16_t :4; /*!< bit: 12..15 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} RTC_MODE1_CTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define RTC_MODE1_CTRL_OFFSET 0x00 /**< \brief (RTC_MODE1_CTRL offset) MODE1 Control Register */
|
||||
#define RTC_MODE1_CTRL_RESETVALUE 0x0000 /**< \brief (RTC_MODE1_CTRL reset_value) MODE1 Control Register */
|
||||
|
||||
#define RTC_MODE1_CTRL_SWRST_Pos 0 /**< \brief (RTC_MODE1_CTRL) Software Reset */
|
||||
#define RTC_MODE1_CTRL_SWRST (0x1u << RTC_MODE1_CTRL_SWRST_Pos)
|
||||
#define RTC_MODE1_CTRL_ENABLE_Pos 1 /**< \brief (RTC_MODE1_CTRL) Enable */
|
||||
#define RTC_MODE1_CTRL_ENABLE (0x1u << RTC_MODE1_CTRL_ENABLE_Pos)
|
||||
#define RTC_MODE1_CTRL_MODE_Pos 2 /**< \brief (RTC_MODE1_CTRL) Mode */
|
||||
#define RTC_MODE1_CTRL_MODE_Msk (0x3u << RTC_MODE1_CTRL_MODE_Pos)
|
||||
#define RTC_MODE1_CTRL_MODE(value) ((RTC_MODE1_CTRL_MODE_Msk & ((value) << RTC_MODE1_CTRL_MODE_Pos)))
|
||||
#define RTC_MODE1_CTRL_MODE_COUNT32 (0x0u << 2) /**< \brief (RTC_MODE1_CTRL) Mode 0 */
|
||||
#define RTC_MODE1_CTRL_MODE_COUNT16 (0x1u << 2) /**< \brief (RTC_MODE1_CTRL) Mode 1 */
|
||||
#define RTC_MODE1_CTRL_MODE_CLOCK (0x2u << 2) /**< \brief (RTC_MODE1_CTRL) Mode 2 */
|
||||
#define RTC_MODE1_CTRL_PRESCALER_Pos 8 /**< \brief (RTC_MODE1_CTRL) Prescaler */
|
||||
#define RTC_MODE1_CTRL_PRESCALER_Msk (0xFu << RTC_MODE1_CTRL_PRESCALER_Pos)
|
||||
#define RTC_MODE1_CTRL_PRESCALER(value) ((RTC_MODE1_CTRL_PRESCALER_Msk & ((value) << RTC_MODE1_CTRL_PRESCALER_Pos)))
|
||||
#define RTC_MODE1_CTRL_PRESCALER_DIV1 (0x0u << 8) /**< \brief (RTC_MODE1_CTRL) */
|
||||
#define RTC_MODE1_CTRL_PRESCALER_DIV2 (0x1u << 8) /**< \brief (RTC_MODE1_CTRL) */
|
||||
#define RTC_MODE1_CTRL_PRESCALER_DIV4 (0x2u << 8) /**< \brief (RTC_MODE1_CTRL) */
|
||||
#define RTC_MODE1_CTRL_PRESCALER_DIV8 (0x3u << 8) /**< \brief (RTC_MODE1_CTRL) */
|
||||
#define RTC_MODE1_CTRL_PRESCALER_DIV16 (0x4u << 8) /**< \brief (RTC_MODE1_CTRL) */
|
||||
#define RTC_MODE1_CTRL_PRESCALER_DIV32 (0x5u << 8) /**< \brief (RTC_MODE1_CTRL) */
|
||||
#define RTC_MODE1_CTRL_PRESCALER_DIV64 (0x6u << 8) /**< \brief (RTC_MODE1_CTRL) */
|
||||
#define RTC_MODE1_CTRL_PRESCALER_DIV128 (0x7u << 8) /**< \brief (RTC_MODE1_CTRL) */
|
||||
#define RTC_MODE1_CTRL_PRESCALER_DIV256 (0x8u << 8) /**< \brief (RTC_MODE1_CTRL) */
|
||||
#define RTC_MODE1_CTRL_PRESCALER_DIV512 (0x9u << 8) /**< \brief (RTC_MODE1_CTRL) */
|
||||
#define RTC_MODE1_CTRL_PRESCALER_DIV1024 (0xAu << 8) /**< \brief (RTC_MODE1_CTRL) */
|
||||
#define RTC_MODE1_CTRL_MASK 0x0F0Fu /**< \brief (RTC_MODE1_CTRL) MASK Register */
|
||||
|
||||
/* -------- RTC_MODE2_CTRL : (RTC Offset: 0x00) (R/W 16) MODE2 MODE2 Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t SWRST:1; /*!< bit: 0 Software Reset */
|
||||
uint16_t ENABLE:1; /*!< bit: 1 Enable */
|
||||
uint16_t MODE:2; /*!< bit: 2.. 3 Mode */
|
||||
uint16_t :2; /*!< bit: 4.. 5 Reserved */
|
||||
uint16_t CLKREP:1; /*!< bit: 6 Clock Representation */
|
||||
uint16_t MATCHCLR:1; /*!< bit: 7 Match Clears Counter */
|
||||
uint16_t PRESCALER:4; /*!< bit: 8..11 Prescaler */
|
||||
uint16_t :4; /*!< bit: 12..15 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} RTC_MODE2_CTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define RTC_MODE2_CTRL_OFFSET 0x00 /**< \brief (RTC_MODE2_CTRL offset) MODE2 Control Register */
|
||||
#define RTC_MODE2_CTRL_RESETVALUE 0x0000 /**< \brief (RTC_MODE2_CTRL reset_value) MODE2 Control Register */
|
||||
|
||||
#define RTC_MODE2_CTRL_SWRST_Pos 0 /**< \brief (RTC_MODE2_CTRL) Software Reset */
|
||||
#define RTC_MODE2_CTRL_SWRST (0x1u << RTC_MODE2_CTRL_SWRST_Pos)
|
||||
#define RTC_MODE2_CTRL_ENABLE_Pos 1 /**< \brief (RTC_MODE2_CTRL) Enable */
|
||||
#define RTC_MODE2_CTRL_ENABLE (0x1u << RTC_MODE2_CTRL_ENABLE_Pos)
|
||||
#define RTC_MODE2_CTRL_MODE_Pos 2 /**< \brief (RTC_MODE2_CTRL) Mode */
|
||||
#define RTC_MODE2_CTRL_MODE_Msk (0x3u << RTC_MODE2_CTRL_MODE_Pos)
|
||||
#define RTC_MODE2_CTRL_MODE(value) ((RTC_MODE2_CTRL_MODE_Msk & ((value) << RTC_MODE2_CTRL_MODE_Pos)))
|
||||
#define RTC_MODE2_CTRL_MODE_COUNT32 (0x0u << 2) /**< \brief (RTC_MODE2_CTRL) Mode 0 */
|
||||
#define RTC_MODE2_CTRL_MODE_COUNT16 (0x1u << 2) /**< \brief (RTC_MODE2_CTRL) Mode 1 */
|
||||
#define RTC_MODE2_CTRL_MODE_CLOCK (0x2u << 2) /**< \brief (RTC_MODE2_CTRL) Mode 2 */
|
||||
#define RTC_MODE2_CTRL_CLKREP_Pos 6 /**< \brief (RTC_MODE2_CTRL) Clock Representation */
|
||||
#define RTC_MODE2_CTRL_CLKREP (0x1u << RTC_MODE2_CTRL_CLKREP_Pos)
|
||||
#define RTC_MODE2_CTRL_MATCHCLR_Pos 7 /**< \brief (RTC_MODE2_CTRL) Match Clears Counter */
|
||||
#define RTC_MODE2_CTRL_MATCHCLR (0x1u << RTC_MODE2_CTRL_MATCHCLR_Pos)
|
||||
#define RTC_MODE2_CTRL_PRESCALER_Pos 8 /**< \brief (RTC_MODE2_CTRL) Prescaler */
|
||||
#define RTC_MODE2_CTRL_PRESCALER_Msk (0xFu << RTC_MODE2_CTRL_PRESCALER_Pos)
|
||||
#define RTC_MODE2_CTRL_PRESCALER(value) ((RTC_MODE2_CTRL_PRESCALER_Msk & ((value) << RTC_MODE2_CTRL_PRESCALER_Pos)))
|
||||
#define RTC_MODE2_CTRL_PRESCALER_DIV1 (0x0u << 8) /**< \brief (RTC_MODE2_CTRL) */
|
||||
#define RTC_MODE2_CTRL_PRESCALER_DIV2 (0x1u << 8) /**< \brief (RTC_MODE2_CTRL) */
|
||||
#define RTC_MODE2_CTRL_PRESCALER_DIV4 (0x2u << 8) /**< \brief (RTC_MODE2_CTRL) */
|
||||
#define RTC_MODE2_CTRL_PRESCALER_DIV8 (0x3u << 8) /**< \brief (RTC_MODE2_CTRL) */
|
||||
#define RTC_MODE2_CTRL_PRESCALER_DIV16 (0x4u << 8) /**< \brief (RTC_MODE2_CTRL) */
|
||||
#define RTC_MODE2_CTRL_PRESCALER_DIV32 (0x5u << 8) /**< \brief (RTC_MODE2_CTRL) */
|
||||
#define RTC_MODE2_CTRL_PRESCALER_DIV64 (0x6u << 8) /**< \brief (RTC_MODE2_CTRL) */
|
||||
#define RTC_MODE2_CTRL_PRESCALER_DIV128 (0x7u << 8) /**< \brief (RTC_MODE2_CTRL) */
|
||||
#define RTC_MODE2_CTRL_PRESCALER_DIV256 (0x8u << 8) /**< \brief (RTC_MODE2_CTRL) */
|
||||
#define RTC_MODE2_CTRL_PRESCALER_DIV512 (0x9u << 8) /**< \brief (RTC_MODE2_CTRL) */
|
||||
#define RTC_MODE2_CTRL_PRESCALER_DIV1024 (0xAu << 8) /**< \brief (RTC_MODE2_CTRL) */
|
||||
#define RTC_MODE2_CTRL_MASK 0x0FCFu /**< \brief (RTC_MODE2_CTRL) MASK Register */
|
||||
|
||||
/* -------- RTC_READREQ : (RTC Offset: 0x02) (R/W 16) Read Request Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t ADDR:6; /*!< bit: 0.. 5 Read Address */
|
||||
uint16_t :8; /*!< bit: 6..13 Reserved */
|
||||
uint16_t RCONT:1; /*!< bit: 14 Read Continuously */
|
||||
uint16_t RREQ:1; /*!< bit: 15 Read Request */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} RTC_READREQ_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define RTC_READREQ_OFFSET 0x02 /**< \brief (RTC_READREQ offset) Read Request Register */
|
||||
#define RTC_READREQ_RESETVALUE 0x0010 /**< \brief (RTC_READREQ reset_value) Read Request Register */
|
||||
|
||||
#define RTC_READREQ_ADDR_Pos 0 /**< \brief (RTC_READREQ) Read Address */
|
||||
#define RTC_READREQ_ADDR_Msk (0x3Fu << RTC_READREQ_ADDR_Pos)
|
||||
#define RTC_READREQ_ADDR(value) ((RTC_READREQ_ADDR_Msk & ((value) << RTC_READREQ_ADDR_Pos)))
|
||||
#define RTC_READREQ_RCONT_Pos 14 /**< \brief (RTC_READREQ) Read Continuously */
|
||||
#define RTC_READREQ_RCONT (0x1u << RTC_READREQ_RCONT_Pos)
|
||||
#define RTC_READREQ_RREQ_Pos 15 /**< \brief (RTC_READREQ) Read Request */
|
||||
#define RTC_READREQ_RREQ (0x1u << RTC_READREQ_RREQ_Pos)
|
||||
#define RTC_READREQ_MASK 0xC03Fu /**< \brief (RTC_READREQ) MASK Register */
|
||||
|
||||
/* -------- RTC_MODE0_EVCTRL : (RTC Offset: 0x04) (R/W 16) MODE0 MODE0 Event Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t PEREO:8; /*!< bit: 0.. 7 Periodic Interval Event Output Enables */
|
||||
uint16_t CMPEO:1; /*!< bit: 8 Compare Event Output Enables */
|
||||
uint16_t :6; /*!< bit: 9..14 Reserved */
|
||||
uint16_t OVFEO:1; /*!< bit: 15 Overflow Event Output Enable */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} RTC_MODE0_EVCTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define RTC_MODE0_EVCTRL_OFFSET 0x04 /**< \brief (RTC_MODE0_EVCTRL offset) MODE0 Event Control Register */
|
||||
#define RTC_MODE0_EVCTRL_RESETVALUE 0x0000 /**< \brief (RTC_MODE0_EVCTRL reset_value) MODE0 Event Control Register */
|
||||
|
||||
#define RTC_MODE0_EVCTRL_PEREO_Pos 0 /**< \brief (RTC_MODE0_EVCTRL) Periodic Interval Event Output Enables */
|
||||
#define RTC_MODE0_EVCTRL_PEREO_Msk (0xFFu << RTC_MODE0_EVCTRL_PEREO_Pos)
|
||||
#define RTC_MODE0_EVCTRL_PEREO(value) ((RTC_MODE0_EVCTRL_PEREO_Msk & ((value) << RTC_MODE0_EVCTRL_PEREO_Pos)))
|
||||
#define RTC_MODE0_EVCTRL_CMPEO_Pos 8 /**< \brief (RTC_MODE0_EVCTRL) Compare Event Output Enables */
|
||||
#define RTC_MODE0_EVCTRL_CMPEO_Msk (0x1u << RTC_MODE0_EVCTRL_CMPEO_Pos)
|
||||
#define RTC_MODE0_EVCTRL_CMPEO(value) ((RTC_MODE0_EVCTRL_CMPEO_Msk & ((value) << RTC_MODE0_EVCTRL_CMPEO_Pos)))
|
||||
#define RTC_MODE0_EVCTRL_OVFEO_Pos 15 /**< \brief (RTC_MODE0_EVCTRL) Overflow Event Output Enable */
|
||||
#define RTC_MODE0_EVCTRL_OVFEO (0x1u << RTC_MODE0_EVCTRL_OVFEO_Pos)
|
||||
#define RTC_MODE0_EVCTRL_MASK 0x81FFu /**< \brief (RTC_MODE0_EVCTRL) MASK Register */
|
||||
|
||||
/* -------- RTC_MODE1_EVCTRL : (RTC Offset: 0x04) (R/W 16) MODE1 MODE1 Event Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t PEREO:8; /*!< bit: 0.. 7 Periodic Interval Event Output Enables */
|
||||
uint16_t CMPEO:2; /*!< bit: 8.. 9 Compare Event Output Enables */
|
||||
uint16_t :5; /*!< bit: 10..14 Reserved */
|
||||
uint16_t OVFEO:1; /*!< bit: 15 Overflow Event Output Enable */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} RTC_MODE1_EVCTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define RTC_MODE1_EVCTRL_OFFSET 0x04 /**< \brief (RTC_MODE1_EVCTRL offset) MODE1 Event Control Register */
|
||||
#define RTC_MODE1_EVCTRL_RESETVALUE 0x0000 /**< \brief (RTC_MODE1_EVCTRL reset_value) MODE1 Event Control Register */
|
||||
|
||||
#define RTC_MODE1_EVCTRL_PEREO_Pos 0 /**< \brief (RTC_MODE1_EVCTRL) Periodic Interval Event Output Enables */
|
||||
#define RTC_MODE1_EVCTRL_PEREO_Msk (0xFFu << RTC_MODE1_EVCTRL_PEREO_Pos)
|
||||
#define RTC_MODE1_EVCTRL_PEREO(value) ((RTC_MODE1_EVCTRL_PEREO_Msk & ((value) << RTC_MODE1_EVCTRL_PEREO_Pos)))
|
||||
#define RTC_MODE1_EVCTRL_CMPEO_Pos 8 /**< \brief (RTC_MODE1_EVCTRL) Compare Event Output Enables */
|
||||
#define RTC_MODE1_EVCTRL_CMPEO_Msk (0x3u << RTC_MODE1_EVCTRL_CMPEO_Pos)
|
||||
#define RTC_MODE1_EVCTRL_CMPEO(value) ((RTC_MODE1_EVCTRL_CMPEO_Msk & ((value) << RTC_MODE1_EVCTRL_CMPEO_Pos)))
|
||||
#define RTC_MODE1_EVCTRL_OVFEO_Pos 15 /**< \brief (RTC_MODE1_EVCTRL) Overflow Event Output Enable */
|
||||
#define RTC_MODE1_EVCTRL_OVFEO (0x1u << RTC_MODE1_EVCTRL_OVFEO_Pos)
|
||||
#define RTC_MODE1_EVCTRL_MASK 0x83FFu /**< \brief (RTC_MODE1_EVCTRL) MASK Register */
|
||||
|
||||
/* -------- RTC_MODE2_EVCTRL : (RTC Offset: 0x04) (R/W 16) MODE2 MODE2 Event Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t PEREO:8; /*!< bit: 0.. 7 Periodic Interval Event Output Enables */
|
||||
uint16_t ALARMEO:1; /*!< bit: 8 Alarm 0Event Output Enables */
|
||||
uint16_t :6; /*!< bit: 9..14 Reserved */
|
||||
uint16_t OVFEO:1; /*!< bit: 15 Overflow Event Output Enable */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} RTC_MODE2_EVCTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define RTC_MODE2_EVCTRL_OFFSET 0x04 /**< \brief (RTC_MODE2_EVCTRL offset) MODE2 Event Control Register */
|
||||
#define RTC_MODE2_EVCTRL_RESETVALUE 0x0000 /**< \brief (RTC_MODE2_EVCTRL reset_value) MODE2 Event Control Register */
|
||||
|
||||
#define RTC_MODE2_EVCTRL_PEREO_Pos 0 /**< \brief (RTC_MODE2_EVCTRL) Periodic Interval Event Output Enables */
|
||||
#define RTC_MODE2_EVCTRL_PEREO_Msk (0xFFu << RTC_MODE2_EVCTRL_PEREO_Pos)
|
||||
#define RTC_MODE2_EVCTRL_PEREO(value) ((RTC_MODE2_EVCTRL_PEREO_Msk & ((value) << RTC_MODE2_EVCTRL_PEREO_Pos)))
|
||||
#define RTC_MODE2_EVCTRL_ALARMEO_Pos 8 /**< \brief (RTC_MODE2_EVCTRL) Alarm 0Event Output Enables */
|
||||
#define RTC_MODE2_EVCTRL_ALARMEO_Msk (0x1u << RTC_MODE2_EVCTRL_ALARMEO_Pos)
|
||||
#define RTC_MODE2_EVCTRL_ALARMEO(value) ((RTC_MODE2_EVCTRL_ALARMEO_Msk & ((value) << RTC_MODE2_EVCTRL_ALARMEO_Pos)))
|
||||
#define RTC_MODE2_EVCTRL_OVFEO_Pos 15 /**< \brief (RTC_MODE2_EVCTRL) Overflow Event Output Enable */
|
||||
#define RTC_MODE2_EVCTRL_OVFEO (0x1u << RTC_MODE2_EVCTRL_OVFEO_Pos)
|
||||
#define RTC_MODE2_EVCTRL_MASK 0x81FFu /**< \brief (RTC_MODE2_EVCTRL) MASK Register */
|
||||
|
||||
/* -------- RTC_MODE0_INTENCLR : (RTC Offset: 0x06) (R/W 8) MODE0 MODE0 Interrupt Enable Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t CMP:1; /*!< bit: 0 Comparator Interrupt Disables */
|
||||
uint8_t :5; /*!< bit: 1.. 5 Reserved */
|
||||
uint8_t SYNCRDY:1; /*!< bit: 6 Synchronization Ready Interrupt Disable */
|
||||
uint8_t OVF:1; /*!< bit: 7 Overflow Interrupt Disable */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} RTC_MODE0_INTENCLR_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define RTC_MODE0_INTENCLR_OFFSET 0x06 /**< \brief (RTC_MODE0_INTENCLR offset) MODE0 Interrupt Enable Clear Register */
|
||||
#define RTC_MODE0_INTENCLR_RESETVALUE 0x00 /**< \brief (RTC_MODE0_INTENCLR reset_value) MODE0 Interrupt Enable Clear Register */
|
||||
|
||||
#define RTC_MODE0_INTENCLR_CMP_Pos 0 /**< \brief (RTC_MODE0_INTENCLR) Comparator Interrupt Disables */
|
||||
#define RTC_MODE0_INTENCLR_CMP_Msk (0x1u << RTC_MODE0_INTENCLR_CMP_Pos)
|
||||
#define RTC_MODE0_INTENCLR_CMP(value) ((RTC_MODE0_INTENCLR_CMP_Msk & ((value) << RTC_MODE0_INTENCLR_CMP_Pos)))
|
||||
#define RTC_MODE0_INTENCLR_SYNCRDY_Pos 6 /**< \brief (RTC_MODE0_INTENCLR) Synchronization Ready Interrupt Disable */
|
||||
#define RTC_MODE0_INTENCLR_SYNCRDY (0x1u << RTC_MODE0_INTENCLR_SYNCRDY_Pos)
|
||||
#define RTC_MODE0_INTENCLR_OVF_Pos 7 /**< \brief (RTC_MODE0_INTENCLR) Overflow Interrupt Disable */
|
||||
#define RTC_MODE0_INTENCLR_OVF (0x1u << RTC_MODE0_INTENCLR_OVF_Pos)
|
||||
#define RTC_MODE0_INTENCLR_MASK 0xC1u /**< \brief (RTC_MODE0_INTENCLR) MASK Register */
|
||||
|
||||
/* -------- RTC_MODE1_INTENCLR : (RTC Offset: 0x06) (R/W 8) MODE1 MODE1 Interrupt Enable Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t CMP:2; /*!< bit: 0.. 1 Comparator Interrupt Disables */
|
||||
uint8_t :4; /*!< bit: 2.. 5 Reserved */
|
||||
uint8_t SYNCRDY:1; /*!< bit: 6 Synchronization Ready Interrupt Disable */
|
||||
uint8_t OVF:1; /*!< bit: 7 Overflow Interrupt Disable */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} RTC_MODE1_INTENCLR_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define RTC_MODE1_INTENCLR_OFFSET 0x06 /**< \brief (RTC_MODE1_INTENCLR offset) MODE1 Interrupt Enable Clear Register */
|
||||
#define RTC_MODE1_INTENCLR_RESETVALUE 0x00 /**< \brief (RTC_MODE1_INTENCLR reset_value) MODE1 Interrupt Enable Clear Register */
|
||||
|
||||
#define RTC_MODE1_INTENCLR_CMP_Pos 0 /**< \brief (RTC_MODE1_INTENCLR) Comparator Interrupt Disables */
|
||||
#define RTC_MODE1_INTENCLR_CMP_Msk (0x3u << RTC_MODE1_INTENCLR_CMP_Pos)
|
||||
#define RTC_MODE1_INTENCLR_CMP(value) ((RTC_MODE1_INTENCLR_CMP_Msk & ((value) << RTC_MODE1_INTENCLR_CMP_Pos)))
|
||||
#define RTC_MODE1_INTENCLR_SYNCRDY_Pos 6 /**< \brief (RTC_MODE1_INTENCLR) Synchronization Ready Interrupt Disable */
|
||||
#define RTC_MODE1_INTENCLR_SYNCRDY (0x1u << RTC_MODE1_INTENCLR_SYNCRDY_Pos)
|
||||
#define RTC_MODE1_INTENCLR_OVF_Pos 7 /**< \brief (RTC_MODE1_INTENCLR) Overflow Interrupt Disable */
|
||||
#define RTC_MODE1_INTENCLR_OVF (0x1u << RTC_MODE1_INTENCLR_OVF_Pos)
|
||||
#define RTC_MODE1_INTENCLR_MASK 0xC3u /**< \brief (RTC_MODE1_INTENCLR) MASK Register */
|
||||
|
||||
/* -------- RTC_MODE2_INTENCLR : (RTC Offset: 0x06) (R/W 8) MODE2 MODE2 Interrupt Enable Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t ALARM:1; /*!< bit: 0 Alarm Interrupt Disables */
|
||||
uint8_t :5; /*!< bit: 1.. 5 Reserved */
|
||||
uint8_t SYNCRDY:1; /*!< bit: 6 Synchronization Ready Interrupt Disable */
|
||||
uint8_t OVF:1; /*!< bit: 7 Overflow Interrupt Disable */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} RTC_MODE2_INTENCLR_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define RTC_MODE2_INTENCLR_OFFSET 0x06 /**< \brief (RTC_MODE2_INTENCLR offset) MODE2 Interrupt Enable Clear Register */
|
||||
#define RTC_MODE2_INTENCLR_RESETVALUE 0x00 /**< \brief (RTC_MODE2_INTENCLR reset_value) MODE2 Interrupt Enable Clear Register */
|
||||
|
||||
#define RTC_MODE2_INTENCLR_ALARM_Pos 0 /**< \brief (RTC_MODE2_INTENCLR) Alarm Interrupt Disables */
|
||||
#define RTC_MODE2_INTENCLR_ALARM_Msk (0x1u << RTC_MODE2_INTENCLR_ALARM_Pos)
|
||||
#define RTC_MODE2_INTENCLR_ALARM(value) ((RTC_MODE2_INTENCLR_ALARM_Msk & ((value) << RTC_MODE2_INTENCLR_ALARM_Pos)))
|
||||
#define RTC_MODE2_INTENCLR_SYNCRDY_Pos 6 /**< \brief (RTC_MODE2_INTENCLR) Synchronization Ready Interrupt Disable */
|
||||
#define RTC_MODE2_INTENCLR_SYNCRDY (0x1u << RTC_MODE2_INTENCLR_SYNCRDY_Pos)
|
||||
#define RTC_MODE2_INTENCLR_OVF_Pos 7 /**< \brief (RTC_MODE2_INTENCLR) Overflow Interrupt Disable */
|
||||
#define RTC_MODE2_INTENCLR_OVF (0x1u << RTC_MODE2_INTENCLR_OVF_Pos)
|
||||
#define RTC_MODE2_INTENCLR_MASK 0xC1u /**< \brief (RTC_MODE2_INTENCLR) MASK Register */
|
||||
|
||||
/* -------- RTC_MODE0_INTENSET : (RTC Offset: 0x07) (R/W 8) MODE0 MODE0 Interrupt Enable Set Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t CMP:1; /*!< bit: 0 Comparator Interrupt Enables */
|
||||
uint8_t :5; /*!< bit: 1.. 5 Reserved */
|
||||
uint8_t SYNCRDY:1; /*!< bit: 6 Synchronization Ready Interrupt Enable */
|
||||
uint8_t OVF:1; /*!< bit: 7 Overflow Interrupt Enable */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} RTC_MODE0_INTENSET_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define RTC_MODE0_INTENSET_OFFSET 0x07 /**< \brief (RTC_MODE0_INTENSET offset) MODE0 Interrupt Enable Set Register */
|
||||
#define RTC_MODE0_INTENSET_RESETVALUE 0x00 /**< \brief (RTC_MODE0_INTENSET reset_value) MODE0 Interrupt Enable Set Register */
|
||||
|
||||
#define RTC_MODE0_INTENSET_CMP_Pos 0 /**< \brief (RTC_MODE0_INTENSET) Comparator Interrupt Enables */
|
||||
#define RTC_MODE0_INTENSET_CMP_Msk (0x1u << RTC_MODE0_INTENSET_CMP_Pos)
|
||||
#define RTC_MODE0_INTENSET_CMP(value) ((RTC_MODE0_INTENSET_CMP_Msk & ((value) << RTC_MODE0_INTENSET_CMP_Pos)))
|
||||
#define RTC_MODE0_INTENSET_SYNCRDY_Pos 6 /**< \brief (RTC_MODE0_INTENSET) Synchronization Ready Interrupt Enable */
|
||||
#define RTC_MODE0_INTENSET_SYNCRDY (0x1u << RTC_MODE0_INTENSET_SYNCRDY_Pos)
|
||||
#define RTC_MODE0_INTENSET_OVF_Pos 7 /**< \brief (RTC_MODE0_INTENSET) Overflow Interrupt Enable */
|
||||
#define RTC_MODE0_INTENSET_OVF (0x1u << RTC_MODE0_INTENSET_OVF_Pos)
|
||||
#define RTC_MODE0_INTENSET_MASK 0xC1u /**< \brief (RTC_MODE0_INTENSET) MASK Register */
|
||||
|
||||
/* -------- RTC_MODE1_INTENSET : (RTC Offset: 0x07) (R/W 8) MODE1 MODE1 Interrupt Enable Set Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t CMP:2; /*!< bit: 0.. 1 Comparator Interrupt Enables */
|
||||
uint8_t :4; /*!< bit: 2.. 5 Reserved */
|
||||
uint8_t SYNCRDY:1; /*!< bit: 6 Synchronization Ready Interrupt Enable */
|
||||
uint8_t OVF:1; /*!< bit: 7 Overflow Interrupt Enable */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} RTC_MODE1_INTENSET_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define RTC_MODE1_INTENSET_OFFSET 0x07 /**< \brief (RTC_MODE1_INTENSET offset) MODE1 Interrupt Enable Set Register */
|
||||
#define RTC_MODE1_INTENSET_RESETVALUE 0x00 /**< \brief (RTC_MODE1_INTENSET reset_value) MODE1 Interrupt Enable Set Register */
|
||||
|
||||
#define RTC_MODE1_INTENSET_CMP_Pos 0 /**< \brief (RTC_MODE1_INTENSET) Comparator Interrupt Enables */
|
||||
#define RTC_MODE1_INTENSET_CMP_Msk (0x3u << RTC_MODE1_INTENSET_CMP_Pos)
|
||||
#define RTC_MODE1_INTENSET_CMP(value) ((RTC_MODE1_INTENSET_CMP_Msk & ((value) << RTC_MODE1_INTENSET_CMP_Pos)))
|
||||
#define RTC_MODE1_INTENSET_SYNCRDY_Pos 6 /**< \brief (RTC_MODE1_INTENSET) Synchronization Ready Interrupt Enable */
|
||||
#define RTC_MODE1_INTENSET_SYNCRDY (0x1u << RTC_MODE1_INTENSET_SYNCRDY_Pos)
|
||||
#define RTC_MODE1_INTENSET_OVF_Pos 7 /**< \brief (RTC_MODE1_INTENSET) Overflow Interrupt Enable */
|
||||
#define RTC_MODE1_INTENSET_OVF (0x1u << RTC_MODE1_INTENSET_OVF_Pos)
|
||||
#define RTC_MODE1_INTENSET_MASK 0xC3u /**< \brief (RTC_MODE1_INTENSET) MASK Register */
|
||||
|
||||
/* -------- RTC_MODE2_INTENSET : (RTC Offset: 0x07) (R/W 8) MODE2 MODE2 Interrupt Enable Set Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t ALARM:1; /*!< bit: 0 Alarm Interrupt Enables */
|
||||
uint8_t :5; /*!< bit: 1.. 5 Reserved */
|
||||
uint8_t SYNCRDY:1; /*!< bit: 6 Synchronization Ready Interrupt Enable */
|
||||
uint8_t OVF:1; /*!< bit: 7 Overflow Interrupt Enable */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} RTC_MODE2_INTENSET_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define RTC_MODE2_INTENSET_OFFSET 0x07 /**< \brief (RTC_MODE2_INTENSET offset) MODE2 Interrupt Enable Set Register */
|
||||
#define RTC_MODE2_INTENSET_RESETVALUE 0x00 /**< \brief (RTC_MODE2_INTENSET reset_value) MODE2 Interrupt Enable Set Register */
|
||||
|
||||
#define RTC_MODE2_INTENSET_ALARM_Pos 0 /**< \brief (RTC_MODE2_INTENSET) Alarm Interrupt Enables */
|
||||
#define RTC_MODE2_INTENSET_ALARM_Msk (0x1u << RTC_MODE2_INTENSET_ALARM_Pos)
|
||||
#define RTC_MODE2_INTENSET_ALARM(value) ((RTC_MODE2_INTENSET_ALARM_Msk & ((value) << RTC_MODE2_INTENSET_ALARM_Pos)))
|
||||
#define RTC_MODE2_INTENSET_SYNCRDY_Pos 6 /**< \brief (RTC_MODE2_INTENSET) Synchronization Ready Interrupt Enable */
|
||||
#define RTC_MODE2_INTENSET_SYNCRDY (0x1u << RTC_MODE2_INTENSET_SYNCRDY_Pos)
|
||||
#define RTC_MODE2_INTENSET_OVF_Pos 7 /**< \brief (RTC_MODE2_INTENSET) Overflow Interrupt Enable */
|
||||
#define RTC_MODE2_INTENSET_OVF (0x1u << RTC_MODE2_INTENSET_OVF_Pos)
|
||||
#define RTC_MODE2_INTENSET_MASK 0xC1u /**< \brief (RTC_MODE2_INTENSET) MASK Register */
|
||||
|
||||
/* -------- RTC_MODE0_INTFLAG : (RTC Offset: 0x08) (R/W 8) MODE0 MODE0 Interrupt Flag Status and Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t CMP:1; /*!< bit: 0 Comparator Interrupt Flags */
|
||||
uint8_t :5; /*!< bit: 1.. 5 Reserved */
|
||||
uint8_t SYNCRDY:1; /*!< bit: 6 Synchronization Ready Interrupt Flag */
|
||||
uint8_t OVF:1; /*!< bit: 7 Overflow Interrupt Flag */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} RTC_MODE0_INTFLAG_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define RTC_MODE0_INTFLAG_OFFSET 0x08 /**< \brief (RTC_MODE0_INTFLAG offset) MODE0 Interrupt Flag Status and Clear Register */
|
||||
#define RTC_MODE0_INTFLAG_RESETVALUE 0x00 /**< \brief (RTC_MODE0_INTFLAG reset_value) MODE0 Interrupt Flag Status and Clear Register */
|
||||
|
||||
#define RTC_MODE0_INTFLAG_CMP_Pos 0 /**< \brief (RTC_MODE0_INTFLAG) Comparator Interrupt Flags */
|
||||
#define RTC_MODE0_INTFLAG_CMP_Msk (0x1u << RTC_MODE0_INTFLAG_CMP_Pos)
|
||||
#define RTC_MODE0_INTFLAG_CMP(value) ((RTC_MODE0_INTFLAG_CMP_Msk & ((value) << RTC_MODE0_INTFLAG_CMP_Pos)))
|
||||
#define RTC_MODE0_INTFLAG_SYNCRDY_Pos 6 /**< \brief (RTC_MODE0_INTFLAG) Synchronization Ready Interrupt Flag */
|
||||
#define RTC_MODE0_INTFLAG_SYNCRDY (0x1u << RTC_MODE0_INTFLAG_SYNCRDY_Pos)
|
||||
#define RTC_MODE0_INTFLAG_OVF_Pos 7 /**< \brief (RTC_MODE0_INTFLAG) Overflow Interrupt Flag */
|
||||
#define RTC_MODE0_INTFLAG_OVF (0x1u << RTC_MODE0_INTFLAG_OVF_Pos)
|
||||
#define RTC_MODE0_INTFLAG_MASK 0xC1u /**< \brief (RTC_MODE0_INTFLAG) MASK Register */
|
||||
|
||||
/* -------- RTC_MODE1_INTFLAG : (RTC Offset: 0x08) (R/W 8) MODE1 MODE1 Interrupt Flag Status and Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t CMP:2; /*!< bit: 0.. 1 Comparator Interrupt Flags */
|
||||
uint8_t :4; /*!< bit: 2.. 5 Reserved */
|
||||
uint8_t SYNCRDY:1; /*!< bit: 6 Synchronization Ready Interrupt Flag */
|
||||
uint8_t OVF:1; /*!< bit: 7 Overflow Interrupt Flag */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} RTC_MODE1_INTFLAG_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define RTC_MODE1_INTFLAG_OFFSET 0x08 /**< \brief (RTC_MODE1_INTFLAG offset) MODE1 Interrupt Flag Status and Clear Register */
|
||||
#define RTC_MODE1_INTFLAG_RESETVALUE 0x00 /**< \brief (RTC_MODE1_INTFLAG reset_value) MODE1 Interrupt Flag Status and Clear Register */
|
||||
|
||||
#define RTC_MODE1_INTFLAG_CMP_Pos 0 /**< \brief (RTC_MODE1_INTFLAG) Comparator Interrupt Flags */
|
||||
#define RTC_MODE1_INTFLAG_CMP_Msk (0x3u << RTC_MODE1_INTFLAG_CMP_Pos)
|
||||
#define RTC_MODE1_INTFLAG_CMP(value) ((RTC_MODE1_INTFLAG_CMP_Msk & ((value) << RTC_MODE1_INTFLAG_CMP_Pos)))
|
||||
#define RTC_MODE1_INTFLAG_SYNCRDY_Pos 6 /**< \brief (RTC_MODE1_INTFLAG) Synchronization Ready Interrupt Flag */
|
||||
#define RTC_MODE1_INTFLAG_SYNCRDY (0x1u << RTC_MODE1_INTFLAG_SYNCRDY_Pos)
|
||||
#define RTC_MODE1_INTFLAG_OVF_Pos 7 /**< \brief (RTC_MODE1_INTFLAG) Overflow Interrupt Flag */
|
||||
#define RTC_MODE1_INTFLAG_OVF (0x1u << RTC_MODE1_INTFLAG_OVF_Pos)
|
||||
#define RTC_MODE1_INTFLAG_MASK 0xC3u /**< \brief (RTC_MODE1_INTFLAG) MASK Register */
|
||||
|
||||
/* -------- RTC_MODE2_INTFLAG : (RTC Offset: 0x08) (R/W 8) MODE2 MODE2 Interrupt Flag Status and Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t ALARM:1; /*!< bit: 0 Alarm Interrupt Flags */
|
||||
uint8_t :5; /*!< bit: 1.. 5 Reserved */
|
||||
uint8_t SYNCRDY:1; /*!< bit: 6 Synchronization Ready Interrupt Flag */
|
||||
uint8_t OVF:1; /*!< bit: 7 Overflow Interrupt Flag */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} RTC_MODE2_INTFLAG_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define RTC_MODE2_INTFLAG_OFFSET 0x08 /**< \brief (RTC_MODE2_INTFLAG offset) MODE2 Interrupt Flag Status and Clear Register */
|
||||
#define RTC_MODE2_INTFLAG_RESETVALUE 0x00 /**< \brief (RTC_MODE2_INTFLAG reset_value) MODE2 Interrupt Flag Status and Clear Register */
|
||||
|
||||
#define RTC_MODE2_INTFLAG_ALARM_Pos 0 /**< \brief (RTC_MODE2_INTFLAG) Alarm Interrupt Flags */
|
||||
#define RTC_MODE2_INTFLAG_ALARM_Msk (0x1u << RTC_MODE2_INTFLAG_ALARM_Pos)
|
||||
#define RTC_MODE2_INTFLAG_ALARM(value) ((RTC_MODE2_INTFLAG_ALARM_Msk & ((value) << RTC_MODE2_INTFLAG_ALARM_Pos)))
|
||||
#define RTC_MODE2_INTFLAG_SYNCRDY_Pos 6 /**< \brief (RTC_MODE2_INTFLAG) Synchronization Ready Interrupt Flag */
|
||||
#define RTC_MODE2_INTFLAG_SYNCRDY (0x1u << RTC_MODE2_INTFLAG_SYNCRDY_Pos)
|
||||
#define RTC_MODE2_INTFLAG_OVF_Pos 7 /**< \brief (RTC_MODE2_INTFLAG) Overflow Interrupt Flag */
|
||||
#define RTC_MODE2_INTFLAG_OVF (0x1u << RTC_MODE2_INTFLAG_OVF_Pos)
|
||||
#define RTC_MODE2_INTFLAG_MASK 0xC1u /**< \brief (RTC_MODE2_INTFLAG) MASK Register */
|
||||
|
||||
/* -------- RTC_STATUS : (RTC Offset: 0x0A) (R/W 8) Status Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t :7; /*!< bit: 0.. 6 Reserved */
|
||||
uint8_t SYNCBUSY:1; /*!< bit: 7 Synchronization Busy Status */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} RTC_STATUS_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define RTC_STATUS_OFFSET 0x0A /**< \brief (RTC_STATUS offset) Status Register */
|
||||
#define RTC_STATUS_RESETVALUE 0x00 /**< \brief (RTC_STATUS reset_value) Status Register */
|
||||
|
||||
#define RTC_STATUS_SYNCBUSY_Pos 7 /**< \brief (RTC_STATUS) Synchronization Busy Status */
|
||||
#define RTC_STATUS_SYNCBUSY (0x1u << RTC_STATUS_SYNCBUSY_Pos)
|
||||
#define RTC_STATUS_MASK 0x80u /**< \brief (RTC_STATUS) MASK Register */
|
||||
|
||||
/* -------- RTC_DBGCTRL : (RTC Offset: 0x0B) (R/W 8) Debug Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t DBGRUN:1; /*!< bit: 0 Run During Debug */
|
||||
uint8_t :7; /*!< bit: 1.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} RTC_DBGCTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define RTC_DBGCTRL_OFFSET 0x0B /**< \brief (RTC_DBGCTRL offset) Debug Register */
|
||||
#define RTC_DBGCTRL_RESETVALUE 0x00 /**< \brief (RTC_DBGCTRL reset_value) Debug Register */
|
||||
|
||||
#define RTC_DBGCTRL_DBGRUN_Pos 0 /**< \brief (RTC_DBGCTRL) Run During Debug */
|
||||
#define RTC_DBGCTRL_DBGRUN (0x1u << RTC_DBGCTRL_DBGRUN_Pos)
|
||||
#define RTC_DBGCTRL_MASK 0x01u /**< \brief (RTC_DBGCTRL) MASK Register */
|
||||
|
||||
/* -------- RTC_FREQCORR : (RTC Offset: 0x0C) (R/W 8) Frequency Correction Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t VALUE:7; /*!< bit: 0.. 6 Correction Value */
|
||||
uint8_t SIGN:1; /*!< bit: 7 Correction Sign */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} RTC_FREQCORR_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define RTC_FREQCORR_OFFSET 0x0C /**< \brief (RTC_FREQCORR offset) Frequency Correction Register */
|
||||
#define RTC_FREQCORR_RESETVALUE 0x00 /**< \brief (RTC_FREQCORR reset_value) Frequency Correction Register */
|
||||
|
||||
#define RTC_FREQCORR_VALUE_Pos 0 /**< \brief (RTC_FREQCORR) Correction Value */
|
||||
#define RTC_FREQCORR_VALUE_Msk (0x7Fu << RTC_FREQCORR_VALUE_Pos)
|
||||
#define RTC_FREQCORR_VALUE(value) ((RTC_FREQCORR_VALUE_Msk & ((value) << RTC_FREQCORR_VALUE_Pos)))
|
||||
#define RTC_FREQCORR_SIGN_Pos 7 /**< \brief (RTC_FREQCORR) Correction Sign */
|
||||
#define RTC_FREQCORR_SIGN (0x1u << RTC_FREQCORR_SIGN_Pos)
|
||||
#define RTC_FREQCORR_MASK 0xFFu /**< \brief (RTC_FREQCORR) MASK Register */
|
||||
|
||||
/* -------- RTC_MODE0_COUNT : (RTC Offset: 0x10) (R/W 32) MODE0 MODE0 Count Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t COUNT:32; /*!< bit: 0..31 Counter Value */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} RTC_MODE0_COUNT_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define RTC_MODE0_COUNT_OFFSET 0x10 /**< \brief (RTC_MODE0_COUNT offset) MODE0 Count Register */
|
||||
#define RTC_MODE0_COUNT_RESETVALUE 0x00000000 /**< \brief (RTC_MODE0_COUNT reset_value) MODE0 Count Register */
|
||||
|
||||
#define RTC_MODE0_COUNT_COUNT_Pos 0 /**< \brief (RTC_MODE0_COUNT) Counter Value */
|
||||
#define RTC_MODE0_COUNT_COUNT_Msk (0xFFFFFFFFu << RTC_MODE0_COUNT_COUNT_Pos)
|
||||
#define RTC_MODE0_COUNT_COUNT(value) ((RTC_MODE0_COUNT_COUNT_Msk & ((value) << RTC_MODE0_COUNT_COUNT_Pos)))
|
||||
#define RTC_MODE0_COUNT_MASK 0xFFFFFFFFu /**< \brief (RTC_MODE0_COUNT) MASK Register */
|
||||
|
||||
/* -------- RTC_MODE1_COUNT : (RTC Offset: 0x10) (R/W 16) MODE1 MODE1 Count Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t COUNT:16; /*!< bit: 0..15 Counter Value */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} RTC_MODE1_COUNT_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define RTC_MODE1_COUNT_OFFSET 0x10 /**< \brief (RTC_MODE1_COUNT offset) MODE1 Count Register */
|
||||
#define RTC_MODE1_COUNT_RESETVALUE 0x0000 /**< \brief (RTC_MODE1_COUNT reset_value) MODE1 Count Register */
|
||||
|
||||
#define RTC_MODE1_COUNT_COUNT_Pos 0 /**< \brief (RTC_MODE1_COUNT) Counter Value */
|
||||
#define RTC_MODE1_COUNT_COUNT_Msk (0xFFFFu << RTC_MODE1_COUNT_COUNT_Pos)
|
||||
#define RTC_MODE1_COUNT_COUNT(value) ((RTC_MODE1_COUNT_COUNT_Msk & ((value) << RTC_MODE1_COUNT_COUNT_Pos)))
|
||||
#define RTC_MODE1_COUNT_MASK 0xFFFFu /**< \brief (RTC_MODE1_COUNT) MASK Register */
|
||||
|
||||
/* -------- RTC_MODE2_CLOCK : (RTC Offset: 0x10) (R/W 32) MODE2 MODE2 Clock Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t SECOND:6; /*!< bit: 0.. 5 Current Second */
|
||||
uint32_t MINUTE:6; /*!< bit: 6..11 Current Minute */
|
||||
uint32_t HOUR:5; /*!< bit: 12..16 Current Hour */
|
||||
uint32_t DAY:5; /*!< bit: 17..21 Current Day */
|
||||
uint32_t MONTH:4; /*!< bit: 22..25 Current Month */
|
||||
uint32_t YEAR:6; /*!< bit: 26..31 Current Year */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} RTC_MODE2_CLOCK_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define RTC_MODE2_CLOCK_OFFSET 0x10 /**< \brief (RTC_MODE2_CLOCK offset) MODE2 Clock Register */
|
||||
#define RTC_MODE2_CLOCK_RESETVALUE 0x00000000 /**< \brief (RTC_MODE2_CLOCK reset_value) MODE2 Clock Register */
|
||||
|
||||
#define RTC_MODE2_CLOCK_SECOND_Pos 0 /**< \brief (RTC_MODE2_CLOCK) Current Second */
|
||||
#define RTC_MODE2_CLOCK_SECOND_Msk (0x3Fu << RTC_MODE2_CLOCK_SECOND_Pos)
|
||||
#define RTC_MODE2_CLOCK_SECOND(value) ((RTC_MODE2_CLOCK_SECOND_Msk & ((value) << RTC_MODE2_CLOCK_SECOND_Pos)))
|
||||
#define RTC_MODE2_CLOCK_MINUTE_Pos 6 /**< \brief (RTC_MODE2_CLOCK) Current Minute */
|
||||
#define RTC_MODE2_CLOCK_MINUTE_Msk (0x3Fu << RTC_MODE2_CLOCK_MINUTE_Pos)
|
||||
#define RTC_MODE2_CLOCK_MINUTE(value) ((RTC_MODE2_CLOCK_MINUTE_Msk & ((value) << RTC_MODE2_CLOCK_MINUTE_Pos)))
|
||||
#define RTC_MODE2_CLOCK_HOUR_Pos 12 /**< \brief (RTC_MODE2_CLOCK) Current Hour */
|
||||
#define RTC_MODE2_CLOCK_HOUR_Msk (0x1Fu << RTC_MODE2_CLOCK_HOUR_Pos)
|
||||
#define RTC_MODE2_CLOCK_HOUR(value) ((RTC_MODE2_CLOCK_HOUR_Msk & ((value) << RTC_MODE2_CLOCK_HOUR_Pos)))
|
||||
#define RTC_MODE2_CLOCK_HOUR_PM (0x10u << 12) /**< \brief (RTC_MODE2_CLOCK) */
|
||||
#define RTC_MODE2_CLOCK_DAY_Pos 17 /**< \brief (RTC_MODE2_CLOCK) Current Day */
|
||||
#define RTC_MODE2_CLOCK_DAY_Msk (0x1Fu << RTC_MODE2_CLOCK_DAY_Pos)
|
||||
#define RTC_MODE2_CLOCK_DAY(value) ((RTC_MODE2_CLOCK_DAY_Msk & ((value) << RTC_MODE2_CLOCK_DAY_Pos)))
|
||||
#define RTC_MODE2_CLOCK_MONTH_Pos 22 /**< \brief (RTC_MODE2_CLOCK) Current Month */
|
||||
#define RTC_MODE2_CLOCK_MONTH_Msk (0xFu << RTC_MODE2_CLOCK_MONTH_Pos)
|
||||
#define RTC_MODE2_CLOCK_MONTH(value) ((RTC_MODE2_CLOCK_MONTH_Msk & ((value) << RTC_MODE2_CLOCK_MONTH_Pos)))
|
||||
#define RTC_MODE2_CLOCK_YEAR_Pos 26 /**< \brief (RTC_MODE2_CLOCK) Current Year */
|
||||
#define RTC_MODE2_CLOCK_YEAR_Msk (0x3Fu << RTC_MODE2_CLOCK_YEAR_Pos)
|
||||
#define RTC_MODE2_CLOCK_YEAR(value) ((RTC_MODE2_CLOCK_YEAR_Msk & ((value) << RTC_MODE2_CLOCK_YEAR_Pos)))
|
||||
#define RTC_MODE2_CLOCK_MASK 0xFFFFFFFFu /**< \brief (RTC_MODE2_CLOCK) MASK Register */
|
||||
|
||||
/* -------- RTC_MODE1_PER : (RTC Offset: 0x14) (R/W 16) MODE1 MODE1 Period Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t PER:16; /*!< bit: 0..15 Counter Period */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} RTC_MODE1_PER_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define RTC_MODE1_PER_OFFSET 0x14 /**< \brief (RTC_MODE1_PER offset) MODE1 Period Register */
|
||||
#define RTC_MODE1_PER_RESETVALUE 0x0000 /**< \brief (RTC_MODE1_PER reset_value) MODE1 Period Register */
|
||||
|
||||
#define RTC_MODE1_PER_PER_Pos 0 /**< \brief (RTC_MODE1_PER) Counter Period */
|
||||
#define RTC_MODE1_PER_PER_Msk (0xFFFFu << RTC_MODE1_PER_PER_Pos)
|
||||
#define RTC_MODE1_PER_PER(value) ((RTC_MODE1_PER_PER_Msk & ((value) << RTC_MODE1_PER_PER_Pos)))
|
||||
#define RTC_MODE1_PER_MASK 0xFFFFu /**< \brief (RTC_MODE1_PER) MASK Register */
|
||||
|
||||
/* -------- RTC_MODE0_COMP : (RTC Offset: 0x18) (R/W 32) MODE0 MODE0 Compare Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t COMP:32; /*!< bit: 0..31 Compare Value */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} RTC_MODE0_COMP_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define RTC_MODE0_COMP_OFFSET 0x18 /**< \brief (RTC_MODE0_COMP offset) MODE0 Compare Register */
|
||||
#define RTC_MODE0_COMP_RESETVALUE 0x00000000 /**< \brief (RTC_MODE0_COMP reset_value) MODE0 Compare Register */
|
||||
|
||||
#define RTC_MODE0_COMP_COMP_Pos 0 /**< \brief (RTC_MODE0_COMP) Compare Value */
|
||||
#define RTC_MODE0_COMP_COMP_Msk (0xFFFFFFFFu << RTC_MODE0_COMP_COMP_Pos)
|
||||
#define RTC_MODE0_COMP_COMP(value) ((RTC_MODE0_COMP_COMP_Msk & ((value) << RTC_MODE0_COMP_COMP_Pos)))
|
||||
#define RTC_MODE0_COMP_MASK 0xFFFFFFFFu /**< \brief (RTC_MODE0_COMP) MASK Register */
|
||||
|
||||
/* -------- RTC_MODE1_COMP : (RTC Offset: 0x18) (R/W 16) MODE1 MODE1 Compare Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t COMP:16; /*!< bit: 0..15 Compare Value */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} RTC_MODE1_COMP_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define RTC_MODE1_COMP_OFFSET 0x18 /**< \brief (RTC_MODE1_COMP offset) MODE1 Compare Register */
|
||||
#define RTC_MODE1_COMP_RESETVALUE 0x0000 /**< \brief (RTC_MODE1_COMP reset_value) MODE1 Compare Register */
|
||||
|
||||
#define RTC_MODE1_COMP_COMP_Pos 0 /**< \brief (RTC_MODE1_COMP) Compare Value */
|
||||
#define RTC_MODE1_COMP_COMP_Msk (0xFFFFu << RTC_MODE1_COMP_COMP_Pos)
|
||||
#define RTC_MODE1_COMP_COMP(value) ((RTC_MODE1_COMP_COMP_Msk & ((value) << RTC_MODE1_COMP_COMP_Pos)))
|
||||
#define RTC_MODE1_COMP_MASK 0xFFFFu /**< \brief (RTC_MODE1_COMP) MASK Register */
|
||||
|
||||
/* -------- RTC_MODE2_ALARM : (RTC Offset: 0x18) (R/W 32) MODE2 MODE2_ALARM Alarm Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t SECOND:6; /*!< bit: 0.. 5 Alarm Second */
|
||||
uint32_t MINUTE:6; /*!< bit: 6..11 Alarm Minute */
|
||||
uint32_t HOUR:5; /*!< bit: 12..16 Alarm Hour */
|
||||
uint32_t DAY:5; /*!< bit: 17..21 Alarm Day */
|
||||
uint32_t MONTH:4; /*!< bit: 22..25 Alarm Month */
|
||||
uint32_t YEAR:6; /*!< bit: 26..31 Alarm Year */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} RTC_MODE2_ALARM_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define RTC_MODE2_ALARM_OFFSET 0x18 /**< \brief (RTC_MODE2_ALARM offset) MODE2_ALARM Alarm Register */
|
||||
#define RTC_MODE2_ALARM_RESETVALUE 0x00000000 /**< \brief (RTC_MODE2_ALARM reset_value) MODE2_ALARM Alarm Register */
|
||||
|
||||
#define RTC_MODE2_ALARM_SECOND_Pos 0 /**< \brief (RTC_MODE2_ALARM) Alarm Second */
|
||||
#define RTC_MODE2_ALARM_SECOND_Msk (0x3Fu << RTC_MODE2_ALARM_SECOND_Pos)
|
||||
#define RTC_MODE2_ALARM_SECOND(value) ((RTC_MODE2_ALARM_SECOND_Msk & ((value) << RTC_MODE2_ALARM_SECOND_Pos)))
|
||||
#define RTC_MODE2_ALARM_MINUTE_Pos 6 /**< \brief (RTC_MODE2_ALARM) Alarm Minute */
|
||||
#define RTC_MODE2_ALARM_MINUTE_Msk (0x3Fu << RTC_MODE2_ALARM_MINUTE_Pos)
|
||||
#define RTC_MODE2_ALARM_MINUTE(value) ((RTC_MODE2_ALARM_MINUTE_Msk & ((value) << RTC_MODE2_ALARM_MINUTE_Pos)))
|
||||
#define RTC_MODE2_ALARM_HOUR_Pos 12 /**< \brief (RTC_MODE2_ALARM) Alarm Hour */
|
||||
#define RTC_MODE2_ALARM_HOUR_Msk (0x1Fu << RTC_MODE2_ALARM_HOUR_Pos)
|
||||
#define RTC_MODE2_ALARM_HOUR(value) ((RTC_MODE2_ALARM_HOUR_Msk & ((value) << RTC_MODE2_ALARM_HOUR_Pos)))
|
||||
#define RTC_MODE2_ALARM_DAY_Pos 17 /**< \brief (RTC_MODE2_ALARM) Alarm Day */
|
||||
#define RTC_MODE2_ALARM_DAY_Msk (0x1Fu << RTC_MODE2_ALARM_DAY_Pos)
|
||||
#define RTC_MODE2_ALARM_DAY(value) ((RTC_MODE2_ALARM_DAY_Msk & ((value) << RTC_MODE2_ALARM_DAY_Pos)))
|
||||
#define RTC_MODE2_ALARM_MONTH_Pos 22 /**< \brief (RTC_MODE2_ALARM) Alarm Month */
|
||||
#define RTC_MODE2_ALARM_MONTH_Msk (0xFu << RTC_MODE2_ALARM_MONTH_Pos)
|
||||
#define RTC_MODE2_ALARM_MONTH(value) ((RTC_MODE2_ALARM_MONTH_Msk & ((value) << RTC_MODE2_ALARM_MONTH_Pos)))
|
||||
#define RTC_MODE2_ALARM_YEAR_Pos 26 /**< \brief (RTC_MODE2_ALARM) Alarm Year */
|
||||
#define RTC_MODE2_ALARM_YEAR_Msk (0x3Fu << RTC_MODE2_ALARM_YEAR_Pos)
|
||||
#define RTC_MODE2_ALARM_YEAR(value) ((RTC_MODE2_ALARM_YEAR_Msk & ((value) << RTC_MODE2_ALARM_YEAR_Pos)))
|
||||
#define RTC_MODE2_ALARM_MASK 0xFFFFFFFFu /**< \brief (RTC_MODE2_ALARM) MASK Register */
|
||||
|
||||
/* -------- RTC_MODE2_MASK : (RTC Offset: 0x1C) (R/W 8) MODE2 MODE2_ALARM Alarm Mask Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t SEL:3; /*!< bit: 0.. 2 Alarm Mask Selection */
|
||||
uint8_t :5; /*!< bit: 3.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} RTC_MODE2_MASK_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define RTC_MODE2_MASK_OFFSET 0x1C /**< \brief (RTC_MODE2_MASK offset) MODE2_ALARM Alarm Mask Register */
|
||||
#define RTC_MODE2_MASK_RESETVALUE 0x00 /**< \brief (RTC_MODE2_MASK reset_value) MODE2_ALARM Alarm Mask Register */
|
||||
|
||||
#define RTC_MODE2_MASK_SEL_Pos 0 /**< \brief (RTC_MODE2_MASK) Alarm Mask Selection */
|
||||
#define RTC_MODE2_MASK_SEL_Msk (0x7u << RTC_MODE2_MASK_SEL_Pos)
|
||||
#define RTC_MODE2_MASK_SEL(value) ((RTC_MODE2_MASK_SEL_Msk & ((value) << RTC_MODE2_MASK_SEL_Pos)))
|
||||
#define RTC_MODE2_MASK_SEL_OFF (0x0u << 0) /**< \brief (RTC_MODE2_MASK) */
|
||||
#define RTC_MODE2_MASK_SEL_SS (0x1u << 0) /**< \brief (RTC_MODE2_MASK) */
|
||||
#define RTC_MODE2_MASK_SEL_MMSS (0x2u << 0) /**< \brief (RTC_MODE2_MASK) */
|
||||
#define RTC_MODE2_MASK_SEL_HHMMSS (0x3u << 0) /**< \brief (RTC_MODE2_MASK) */
|
||||
#define RTC_MODE2_MASK_SEL_DDHHMMSS (0x4u << 0) /**< \brief (RTC_MODE2_MASK) */
|
||||
#define RTC_MODE2_MASK_SEL_MMDDHHMMSS (0x5u << 0) /**< \brief (RTC_MODE2_MASK) */
|
||||
#define RTC_MODE2_MASK_SEL_YYMMDDHHMMSS (0x6u << 0) /**< \brief (RTC_MODE2_MASK) */
|
||||
#define RTC_MODE2_MASK_MASK 0x07u /**< \brief (RTC_MODE2_MASK) MASK Register */
|
||||
|
||||
/** \brief RtcMode2Alarm hardware registers */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef struct {
|
||||
__IO RTC_MODE2_ALARM_Type ALARM; /**< \brief Offset: 0x00 (R/W 32) MODE2_ALARM Alarm Register */
|
||||
__IO RTC_MODE2_MASK_Type MASK; /**< \brief Offset: 0x04 (R/W 8) MODE2_ALARM Alarm Mask Register */
|
||||
RoReg8 Reserved1[0x3];
|
||||
} RtcMode2Alarm;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/** \brief RTC_MODE0 hardware registers */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef struct { /* 32-bit Counter with Single 32-bit Compare */
|
||||
__IO RTC_MODE0_CTRL_Type CTRL; /**< \brief Offset: 0x00 (R/W 16) MODE0 Control Register */
|
||||
__IO RTC_READREQ_Type READREQ; /**< \brief Offset: 0x02 (R/W 16) Read Request Register */
|
||||
__IO RTC_MODE0_EVCTRL_Type EVCTRL; /**< \brief Offset: 0x04 (R/W 16) MODE0 Event Control Register */
|
||||
__IO RTC_MODE0_INTENCLR_Type INTENCLR; /**< \brief Offset: 0x06 (R/W 8) MODE0 Interrupt Enable Clear Register */
|
||||
__IO RTC_MODE0_INTENSET_Type INTENSET; /**< \brief Offset: 0x07 (R/W 8) MODE0 Interrupt Enable Set Register */
|
||||
__IO RTC_MODE0_INTFLAG_Type INTFLAG; /**< \brief Offset: 0x08 (R/W 8) MODE0 Interrupt Flag Status and Clear Register */
|
||||
RoReg8 Reserved1[0x1];
|
||||
__IO RTC_STATUS_Type STATUS; /**< \brief Offset: 0x0A (R/W 8) Status Register */
|
||||
__IO RTC_DBGCTRL_Type DBGCTRL; /**< \brief Offset: 0x0B (R/W 8) Debug Register */
|
||||
__IO RTC_FREQCORR_Type FREQCORR; /**< \brief Offset: 0x0C (R/W 8) Frequency Correction Register */
|
||||
RoReg8 Reserved2[0x3];
|
||||
__IO RTC_MODE0_COUNT_Type COUNT; /**< \brief Offset: 0x10 (R/W 32) MODE0 Count Register */
|
||||
RoReg8 Reserved3[0x4];
|
||||
__IO RTC_MODE0_COMP_Type COMP[1]; /**< \brief Offset: 0x18 (R/W 32) MODE0 Compare Register [NUM_OF_COMP32] */
|
||||
} RtcMode0;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/** \brief RTC_MODE1 hardware registers */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef struct { /* 16-bit Counter with Two 16-bit Compares */
|
||||
__IO RTC_MODE1_CTRL_Type CTRL; /**< \brief Offset: 0x00 (R/W 16) MODE1 Control Register */
|
||||
__IO RTC_READREQ_Type READREQ; /**< \brief Offset: 0x02 (R/W 16) Read Request Register */
|
||||
__IO RTC_MODE1_EVCTRL_Type EVCTRL; /**< \brief Offset: 0x04 (R/W 16) MODE1 Event Control Register */
|
||||
__IO RTC_MODE1_INTENCLR_Type INTENCLR; /**< \brief Offset: 0x06 (R/W 8) MODE1 Interrupt Enable Clear Register */
|
||||
__IO RTC_MODE1_INTENSET_Type INTENSET; /**< \brief Offset: 0x07 (R/W 8) MODE1 Interrupt Enable Set Register */
|
||||
__IO RTC_MODE1_INTFLAG_Type INTFLAG; /**< \brief Offset: 0x08 (R/W 8) MODE1 Interrupt Flag Status and Clear Register */
|
||||
RoReg8 Reserved1[0x1];
|
||||
__IO RTC_STATUS_Type STATUS; /**< \brief Offset: 0x0A (R/W 8) Status Register */
|
||||
__IO RTC_DBGCTRL_Type DBGCTRL; /**< \brief Offset: 0x0B (R/W 8) Debug Register */
|
||||
__IO RTC_FREQCORR_Type FREQCORR; /**< \brief Offset: 0x0C (R/W 8) Frequency Correction Register */
|
||||
RoReg8 Reserved2[0x3];
|
||||
__IO RTC_MODE1_COUNT_Type COUNT; /**< \brief Offset: 0x10 (R/W 16) MODE1 Count Register */
|
||||
RoReg8 Reserved3[0x2];
|
||||
__IO RTC_MODE1_PER_Type PER; /**< \brief Offset: 0x14 (R/W 16) MODE1 Period Register */
|
||||
RoReg8 Reserved4[0x2];
|
||||
__IO RTC_MODE1_COMP_Type COMP[2]; /**< \brief Offset: 0x18 (R/W 16) MODE1 Compare Register [NUM_OF_COMP16] */
|
||||
} RtcMode1;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/** \brief RTC_MODE2 hardware registers */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef struct { /* Clock/Calendar with Alarm */
|
||||
__IO RTC_MODE2_CTRL_Type CTRL; /**< \brief Offset: 0x00 (R/W 16) MODE2 Control Register */
|
||||
__IO RTC_READREQ_Type READREQ; /**< \brief Offset: 0x02 (R/W 16) Read Request Register */
|
||||
__IO RTC_MODE2_EVCTRL_Type EVCTRL; /**< \brief Offset: 0x04 (R/W 16) MODE2 Event Control Register */
|
||||
__IO RTC_MODE2_INTENCLR_Type INTENCLR; /**< \brief Offset: 0x06 (R/W 8) MODE2 Interrupt Enable Clear Register */
|
||||
__IO RTC_MODE2_INTENSET_Type INTENSET; /**< \brief Offset: 0x07 (R/W 8) MODE2 Interrupt Enable Set Register */
|
||||
__IO RTC_MODE2_INTFLAG_Type INTFLAG; /**< \brief Offset: 0x08 (R/W 8) MODE2 Interrupt Flag Status and Clear Register */
|
||||
RoReg8 Reserved1[0x1];
|
||||
__IO RTC_STATUS_Type STATUS; /**< \brief Offset: 0x0A (R/W 8) Status Register */
|
||||
__IO RTC_DBGCTRL_Type DBGCTRL; /**< \brief Offset: 0x0B (R/W 8) Debug Register */
|
||||
__IO RTC_FREQCORR_Type FREQCORR; /**< \brief Offset: 0x0C (R/W 8) Frequency Correction Register */
|
||||
RoReg8 Reserved2[0x3];
|
||||
__IO RTC_MODE2_CLOCK_Type CLOCK; /**< \brief Offset: 0x10 (R/W 32) MODE2 Clock Register */
|
||||
RoReg8 Reserved3[0x4];
|
||||
RtcMode2Alarm Mode2Alarm[1]; /**< \brief Offset: 0x18 RtcMode2Alarm groups [NUM_OF_ALARMS] */
|
||||
} RtcMode2;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
RtcMode0 MODE0; /**< \brief Offset: 0x00 32-bit Counter with Single 32-bit Compare */
|
||||
RtcMode1 MODE1; /**< \brief Offset: 0x00 16-bit Counter with Two 16-bit Compares */
|
||||
RtcMode2 MODE2; /**< \brief Offset: 0x00 Clock/Calendar with Alarm */
|
||||
} Rtc;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/*@}*/
|
||||
|
||||
#endif /* _SAMD20_RTC_COMPONENT_ */
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,785 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Component description for SYSCTRL
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_SYSCTRL_COMPONENT_
|
||||
#define _SAMD20_SYSCTRL_COMPONENT_
|
||||
|
||||
/* ========================================================================== */
|
||||
/** SOFTWARE API DEFINITION FOR SYSCTRL */
|
||||
/* ========================================================================== */
|
||||
/** \addtogroup SAMD20_SYSCTRL System Control */
|
||||
/*@{*/
|
||||
|
||||
#define REV_SYSCTRL 0x200
|
||||
|
||||
/* -------- SYSCTRL_INTENCLR : (SYSCTRL Offset: 0x00) (R/W 32) Interrupt Enable Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t XOSCRDY:1; /*!< bit: 0 XOSC Ready */
|
||||
uint32_t XOSC32KRDY:1; /*!< bit: 1 XOSC32K Ready */
|
||||
uint32_t OSC32KRDY:1; /*!< bit: 2 OSC32K Ready */
|
||||
uint32_t OSC8MRDY:1; /*!< bit: 3 OSC8M Ready */
|
||||
uint32_t DFLLRDY:1; /*!< bit: 4 DFLL Ready */
|
||||
uint32_t DFLLOOB:1; /*!< bit: 5 DFLL Out Of Bounds */
|
||||
uint32_t DFLLLCKF:1; /*!< bit: 6 DFLL Lock Fine */
|
||||
uint32_t DFLLLCKC:1; /*!< bit: 7 DFLL Lock Coarse */
|
||||
uint32_t DFLLRCS:1; /*!< bit: 8 DFLL Reference Clock Stopped */
|
||||
uint32_t BOD33RDY:1; /*!< bit: 9 BOD33 Ready */
|
||||
uint32_t BOD33DET:1; /*!< bit: 10 BOD33 Detection */
|
||||
uint32_t B33SRDY:1; /*!< bit: 11 BOD33 Synchronization Ready */
|
||||
uint32_t BOD12RDY:1; /*!< bit: 12 BOD12 Ready */
|
||||
uint32_t BOD12DET:1; /*!< bit: 13 BOD12 Detection */
|
||||
uint32_t B12SRDY:1; /*!< bit: 14 BOD12 Synchronization Ready */
|
||||
uint32_t :17; /*!< bit: 15..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} SYSCTRL_INTENCLR_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define SYSCTRL_INTENCLR_OFFSET 0x00 /**< \brief (SYSCTRL_INTENCLR offset) Interrupt Enable Clear Register */
|
||||
#define SYSCTRL_INTENCLR_RESETVALUE 0x00000000 /**< \brief (SYSCTRL_INTENCLR reset_value) Interrupt Enable Clear Register */
|
||||
|
||||
#define SYSCTRL_INTENCLR_XOSCRDY_Pos 0 /**< \brief (SYSCTRL_INTENCLR) XOSC Ready */
|
||||
#define SYSCTRL_INTENCLR_XOSCRDY (0x1u << SYSCTRL_INTENCLR_XOSCRDY_Pos)
|
||||
#define SYSCTRL_INTENCLR_XOSC32KRDY_Pos 1 /**< \brief (SYSCTRL_INTENCLR) XOSC32K Ready */
|
||||
#define SYSCTRL_INTENCLR_XOSC32KRDY (0x1u << SYSCTRL_INTENCLR_XOSC32KRDY_Pos)
|
||||
#define SYSCTRL_INTENCLR_OSC32KRDY_Pos 2 /**< \brief (SYSCTRL_INTENCLR) OSC32K Ready */
|
||||
#define SYSCTRL_INTENCLR_OSC32KRDY (0x1u << SYSCTRL_INTENCLR_OSC32KRDY_Pos)
|
||||
#define SYSCTRL_INTENCLR_OSC8MRDY_Pos 3 /**< \brief (SYSCTRL_INTENCLR) OSC8M Ready */
|
||||
#define SYSCTRL_INTENCLR_OSC8MRDY (0x1u << SYSCTRL_INTENCLR_OSC8MRDY_Pos)
|
||||
#define SYSCTRL_INTENCLR_DFLLRDY_Pos 4 /**< \brief (SYSCTRL_INTENCLR) DFLL Ready */
|
||||
#define SYSCTRL_INTENCLR_DFLLRDY (0x1u << SYSCTRL_INTENCLR_DFLLRDY_Pos)
|
||||
#define SYSCTRL_INTENCLR_DFLLOOB_Pos 5 /**< \brief (SYSCTRL_INTENCLR) DFLL Out Of Bounds */
|
||||
#define SYSCTRL_INTENCLR_DFLLOOB (0x1u << SYSCTRL_INTENCLR_DFLLOOB_Pos)
|
||||
#define SYSCTRL_INTENCLR_DFLLLCKF_Pos 6 /**< \brief (SYSCTRL_INTENCLR) DFLL Lock Fine */
|
||||
#define SYSCTRL_INTENCLR_DFLLLCKF (0x1u << SYSCTRL_INTENCLR_DFLLLCKF_Pos)
|
||||
#define SYSCTRL_INTENCLR_DFLLLCKC_Pos 7 /**< \brief (SYSCTRL_INTENCLR) DFLL Lock Coarse */
|
||||
#define SYSCTRL_INTENCLR_DFLLLCKC (0x1u << SYSCTRL_INTENCLR_DFLLLCKC_Pos)
|
||||
#define SYSCTRL_INTENCLR_DFLLRCS_Pos 8 /**< \brief (SYSCTRL_INTENCLR) DFLL Reference Clock Stopped */
|
||||
#define SYSCTRL_INTENCLR_DFLLRCS (0x1u << SYSCTRL_INTENCLR_DFLLRCS_Pos)
|
||||
#define SYSCTRL_INTENCLR_BOD33RDY_Pos 9 /**< \brief (SYSCTRL_INTENCLR) BOD33 Ready */
|
||||
#define SYSCTRL_INTENCLR_BOD33RDY (0x1u << SYSCTRL_INTENCLR_BOD33RDY_Pos)
|
||||
#define SYSCTRL_INTENCLR_BOD33DET_Pos 10 /**< \brief (SYSCTRL_INTENCLR) BOD33 Detection */
|
||||
#define SYSCTRL_INTENCLR_BOD33DET (0x1u << SYSCTRL_INTENCLR_BOD33DET_Pos)
|
||||
#define SYSCTRL_INTENCLR_B33SRDY_Pos 11 /**< \brief (SYSCTRL_INTENCLR) BOD33 Synchronization Ready */
|
||||
#define SYSCTRL_INTENCLR_B33SRDY (0x1u << SYSCTRL_INTENCLR_B33SRDY_Pos)
|
||||
#define SYSCTRL_INTENCLR_BOD12RDY_Pos 12 /**< \brief (SYSCTRL_INTENCLR) BOD12 Ready */
|
||||
#define SYSCTRL_INTENCLR_BOD12RDY (0x1u << SYSCTRL_INTENCLR_BOD12RDY_Pos)
|
||||
#define SYSCTRL_INTENCLR_BOD12DET_Pos 13 /**< \brief (SYSCTRL_INTENCLR) BOD12 Detection */
|
||||
#define SYSCTRL_INTENCLR_BOD12DET (0x1u << SYSCTRL_INTENCLR_BOD12DET_Pos)
|
||||
#define SYSCTRL_INTENCLR_B12SRDY_Pos 14 /**< \brief (SYSCTRL_INTENCLR) BOD12 Synchronization Ready */
|
||||
#define SYSCTRL_INTENCLR_B12SRDY (0x1u << SYSCTRL_INTENCLR_B12SRDY_Pos)
|
||||
#define SYSCTRL_INTENCLR_MASK 0x00007FFFu /**< \brief (SYSCTRL_INTENCLR) MASK Register */
|
||||
|
||||
/* -------- SYSCTRL_INTENSET : (SYSCTRL Offset: 0x04) (R/W 32) Interrupt Enable Set Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t XOSCRDY:1; /*!< bit: 0 XOSC Ready */
|
||||
uint32_t XOSC32KRDY:1; /*!< bit: 1 XOSC32K Ready */
|
||||
uint32_t OSC32KRDY:1; /*!< bit: 2 OSC32K Ready */
|
||||
uint32_t OSC8MRDY:1; /*!< bit: 3 OSC8M Ready */
|
||||
uint32_t DFLLRDY:1; /*!< bit: 4 DFLL Ready */
|
||||
uint32_t DFLLOOB:1; /*!< bit: 5 DFLL Out Of Bounds */
|
||||
uint32_t DFLLLCKF:1; /*!< bit: 6 DFLL Lock Fine */
|
||||
uint32_t DFLLLCKC:1; /*!< bit: 7 DFLL Lock Coarse */
|
||||
uint32_t DFLLRCS:1; /*!< bit: 8 DFLL Reference Clock Stopped */
|
||||
uint32_t BOD33RDY:1; /*!< bit: 9 BOD33 Ready */
|
||||
uint32_t BOD33DET:1; /*!< bit: 10 BOD33 Detection */
|
||||
uint32_t B33SRDY:1; /*!< bit: 11 BOD33 Synchronization Ready */
|
||||
uint32_t BOD12RDY:1; /*!< bit: 12 BOD12 Ready */
|
||||
uint32_t BOD12DET:1; /*!< bit: 13 BOD12 Detection */
|
||||
uint32_t B12SRDY:1; /*!< bit: 14 BOD12 Synchronization Ready */
|
||||
uint32_t :17; /*!< bit: 15..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} SYSCTRL_INTENSET_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define SYSCTRL_INTENSET_OFFSET 0x04 /**< \brief (SYSCTRL_INTENSET offset) Interrupt Enable Set Register */
|
||||
#define SYSCTRL_INTENSET_RESETVALUE 0x00000000 /**< \brief (SYSCTRL_INTENSET reset_value) Interrupt Enable Set Register */
|
||||
|
||||
#define SYSCTRL_INTENSET_XOSCRDY_Pos 0 /**< \brief (SYSCTRL_INTENSET) XOSC Ready */
|
||||
#define SYSCTRL_INTENSET_XOSCRDY (0x1u << SYSCTRL_INTENSET_XOSCRDY_Pos)
|
||||
#define SYSCTRL_INTENSET_XOSC32KRDY_Pos 1 /**< \brief (SYSCTRL_INTENSET) XOSC32K Ready */
|
||||
#define SYSCTRL_INTENSET_XOSC32KRDY (0x1u << SYSCTRL_INTENSET_XOSC32KRDY_Pos)
|
||||
#define SYSCTRL_INTENSET_OSC32KRDY_Pos 2 /**< \brief (SYSCTRL_INTENSET) OSC32K Ready */
|
||||
#define SYSCTRL_INTENSET_OSC32KRDY (0x1u << SYSCTRL_INTENSET_OSC32KRDY_Pos)
|
||||
#define SYSCTRL_INTENSET_OSC8MRDY_Pos 3 /**< \brief (SYSCTRL_INTENSET) OSC8M Ready */
|
||||
#define SYSCTRL_INTENSET_OSC8MRDY (0x1u << SYSCTRL_INTENSET_OSC8MRDY_Pos)
|
||||
#define SYSCTRL_INTENSET_DFLLRDY_Pos 4 /**< \brief (SYSCTRL_INTENSET) DFLL Ready */
|
||||
#define SYSCTRL_INTENSET_DFLLRDY (0x1u << SYSCTRL_INTENSET_DFLLRDY_Pos)
|
||||
#define SYSCTRL_INTENSET_DFLLOOB_Pos 5 /**< \brief (SYSCTRL_INTENSET) DFLL Out Of Bounds */
|
||||
#define SYSCTRL_INTENSET_DFLLOOB (0x1u << SYSCTRL_INTENSET_DFLLOOB_Pos)
|
||||
#define SYSCTRL_INTENSET_DFLLLCKF_Pos 6 /**< \brief (SYSCTRL_INTENSET) DFLL Lock Fine */
|
||||
#define SYSCTRL_INTENSET_DFLLLCKF (0x1u << SYSCTRL_INTENSET_DFLLLCKF_Pos)
|
||||
#define SYSCTRL_INTENSET_DFLLLCKC_Pos 7 /**< \brief (SYSCTRL_INTENSET) DFLL Lock Coarse */
|
||||
#define SYSCTRL_INTENSET_DFLLLCKC (0x1u << SYSCTRL_INTENSET_DFLLLCKC_Pos)
|
||||
#define SYSCTRL_INTENSET_DFLLRCS_Pos 8 /**< \brief (SYSCTRL_INTENSET) DFLL Reference Clock Stopped */
|
||||
#define SYSCTRL_INTENSET_DFLLRCS (0x1u << SYSCTRL_INTENSET_DFLLRCS_Pos)
|
||||
#define SYSCTRL_INTENSET_BOD33RDY_Pos 9 /**< \brief (SYSCTRL_INTENSET) BOD33 Ready */
|
||||
#define SYSCTRL_INTENSET_BOD33RDY (0x1u << SYSCTRL_INTENSET_BOD33RDY_Pos)
|
||||
#define SYSCTRL_INTENSET_BOD33DET_Pos 10 /**< \brief (SYSCTRL_INTENSET) BOD33 Detection */
|
||||
#define SYSCTRL_INTENSET_BOD33DET (0x1u << SYSCTRL_INTENSET_BOD33DET_Pos)
|
||||
#define SYSCTRL_INTENSET_B33SRDY_Pos 11 /**< \brief (SYSCTRL_INTENSET) BOD33 Synchronization Ready */
|
||||
#define SYSCTRL_INTENSET_B33SRDY (0x1u << SYSCTRL_INTENSET_B33SRDY_Pos)
|
||||
#define SYSCTRL_INTENSET_BOD12RDY_Pos 12 /**< \brief (SYSCTRL_INTENSET) BOD12 Ready */
|
||||
#define SYSCTRL_INTENSET_BOD12RDY (0x1u << SYSCTRL_INTENSET_BOD12RDY_Pos)
|
||||
#define SYSCTRL_INTENSET_BOD12DET_Pos 13 /**< \brief (SYSCTRL_INTENSET) BOD12 Detection */
|
||||
#define SYSCTRL_INTENSET_BOD12DET (0x1u << SYSCTRL_INTENSET_BOD12DET_Pos)
|
||||
#define SYSCTRL_INTENSET_B12SRDY_Pos 14 /**< \brief (SYSCTRL_INTENSET) BOD12 Synchronization Ready */
|
||||
#define SYSCTRL_INTENSET_B12SRDY (0x1u << SYSCTRL_INTENSET_B12SRDY_Pos)
|
||||
#define SYSCTRL_INTENSET_MASK 0x00007FFFu /**< \brief (SYSCTRL_INTENSET) MASK Register */
|
||||
|
||||
/* -------- SYSCTRL_INTFLAG : (SYSCTRL Offset: 0x08) (R/W 32) Interrupt Flag Status and Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t XOSCRDY:1; /*!< bit: 0 XOSC Ready */
|
||||
uint32_t XOSC32KRDY:1; /*!< bit: 1 XOSC32K Ready */
|
||||
uint32_t OSC32KRDY:1; /*!< bit: 2 OSC32K Ready */
|
||||
uint32_t OSC8MRDY:1; /*!< bit: 3 OSC8M Ready */
|
||||
uint32_t DFLLRDY:1; /*!< bit: 4 DFLL Ready */
|
||||
uint32_t DFLLOOB:1; /*!< bit: 5 DFLL Out Of Bounds */
|
||||
uint32_t DFLLLCKF:1; /*!< bit: 6 DFLL Lock Fine */
|
||||
uint32_t DFLLLCKC:1; /*!< bit: 7 DFLL Lock Coarse */
|
||||
uint32_t DFLLRCS:1; /*!< bit: 8 DFLL Reference Clock Stopped */
|
||||
uint32_t BOD33RDY:1; /*!< bit: 9 BOD33 Ready */
|
||||
uint32_t BOD33DET:1; /*!< bit: 10 BOD33 Detection */
|
||||
uint32_t B33SRDY:1; /*!< bit: 11 BOD33 Synchronization Ready */
|
||||
uint32_t BOD12RDY:1; /*!< bit: 12 BOD12 Ready */
|
||||
uint32_t BOD12DET:1; /*!< bit: 13 BOD12 Detection */
|
||||
uint32_t B12SRDY:1; /*!< bit: 14 BOD12 Synchronization Ready */
|
||||
uint32_t :17; /*!< bit: 15..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} SYSCTRL_INTFLAG_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define SYSCTRL_INTFLAG_OFFSET 0x08 /**< \brief (SYSCTRL_INTFLAG offset) Interrupt Flag Status and Clear Register */
|
||||
#define SYSCTRL_INTFLAG_RESETVALUE 0x00000000 /**< \brief (SYSCTRL_INTFLAG reset_value) Interrupt Flag Status and Clear Register */
|
||||
|
||||
#define SYSCTRL_INTFLAG_XOSCRDY_Pos 0 /**< \brief (SYSCTRL_INTFLAG) XOSC Ready */
|
||||
#define SYSCTRL_INTFLAG_XOSCRDY (0x1u << SYSCTRL_INTFLAG_XOSCRDY_Pos)
|
||||
#define SYSCTRL_INTFLAG_XOSC32KRDY_Pos 1 /**< \brief (SYSCTRL_INTFLAG) XOSC32K Ready */
|
||||
#define SYSCTRL_INTFLAG_XOSC32KRDY (0x1u << SYSCTRL_INTFLAG_XOSC32KRDY_Pos)
|
||||
#define SYSCTRL_INTFLAG_OSC32KRDY_Pos 2 /**< \brief (SYSCTRL_INTFLAG) OSC32K Ready */
|
||||
#define SYSCTRL_INTFLAG_OSC32KRDY (0x1u << SYSCTRL_INTFLAG_OSC32KRDY_Pos)
|
||||
#define SYSCTRL_INTFLAG_OSC8MRDY_Pos 3 /**< \brief (SYSCTRL_INTFLAG) OSC8M Ready */
|
||||
#define SYSCTRL_INTFLAG_OSC8MRDY (0x1u << SYSCTRL_INTFLAG_OSC8MRDY_Pos)
|
||||
#define SYSCTRL_INTFLAG_DFLLRDY_Pos 4 /**< \brief (SYSCTRL_INTFLAG) DFLL Ready */
|
||||
#define SYSCTRL_INTFLAG_DFLLRDY (0x1u << SYSCTRL_INTFLAG_DFLLRDY_Pos)
|
||||
#define SYSCTRL_INTFLAG_DFLLOOB_Pos 5 /**< \brief (SYSCTRL_INTFLAG) DFLL Out Of Bounds */
|
||||
#define SYSCTRL_INTFLAG_DFLLOOB (0x1u << SYSCTRL_INTFLAG_DFLLOOB_Pos)
|
||||
#define SYSCTRL_INTFLAG_DFLLLCKF_Pos 6 /**< \brief (SYSCTRL_INTFLAG) DFLL Lock Fine */
|
||||
#define SYSCTRL_INTFLAG_DFLLLCKF (0x1u << SYSCTRL_INTFLAG_DFLLLCKF_Pos)
|
||||
#define SYSCTRL_INTFLAG_DFLLLCKC_Pos 7 /**< \brief (SYSCTRL_INTFLAG) DFLL Lock Coarse */
|
||||
#define SYSCTRL_INTFLAG_DFLLLCKC (0x1u << SYSCTRL_INTFLAG_DFLLLCKC_Pos)
|
||||
#define SYSCTRL_INTFLAG_DFLLRCS_Pos 8 /**< \brief (SYSCTRL_INTFLAG) DFLL Reference Clock Stopped */
|
||||
#define SYSCTRL_INTFLAG_DFLLRCS (0x1u << SYSCTRL_INTFLAG_DFLLRCS_Pos)
|
||||
#define SYSCTRL_INTFLAG_BOD33RDY_Pos 9 /**< \brief (SYSCTRL_INTFLAG) BOD33 Ready */
|
||||
#define SYSCTRL_INTFLAG_BOD33RDY (0x1u << SYSCTRL_INTFLAG_BOD33RDY_Pos)
|
||||
#define SYSCTRL_INTFLAG_BOD33DET_Pos 10 /**< \brief (SYSCTRL_INTFLAG) BOD33 Detection */
|
||||
#define SYSCTRL_INTFLAG_BOD33DET (0x1u << SYSCTRL_INTFLAG_BOD33DET_Pos)
|
||||
#define SYSCTRL_INTFLAG_B33SRDY_Pos 11 /**< \brief (SYSCTRL_INTFLAG) BOD33 Synchronization Ready */
|
||||
#define SYSCTRL_INTFLAG_B33SRDY (0x1u << SYSCTRL_INTFLAG_B33SRDY_Pos)
|
||||
#define SYSCTRL_INTFLAG_BOD12RDY_Pos 12 /**< \brief (SYSCTRL_INTFLAG) BOD12 Ready */
|
||||
#define SYSCTRL_INTFLAG_BOD12RDY (0x1u << SYSCTRL_INTFLAG_BOD12RDY_Pos)
|
||||
#define SYSCTRL_INTFLAG_BOD12DET_Pos 13 /**< \brief (SYSCTRL_INTFLAG) BOD12 Detection */
|
||||
#define SYSCTRL_INTFLAG_BOD12DET (0x1u << SYSCTRL_INTFLAG_BOD12DET_Pos)
|
||||
#define SYSCTRL_INTFLAG_B12SRDY_Pos 14 /**< \brief (SYSCTRL_INTFLAG) BOD12 Synchronization Ready */
|
||||
#define SYSCTRL_INTFLAG_B12SRDY (0x1u << SYSCTRL_INTFLAG_B12SRDY_Pos)
|
||||
#define SYSCTRL_INTFLAG_MASK 0x00007FFFu /**< \brief (SYSCTRL_INTFLAG) MASK Register */
|
||||
|
||||
/* -------- SYSCTRL_PCLKSR : (SYSCTRL Offset: 0x0C) (R/ 32) Power and Clocks Status Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t XOSCRDY:1; /*!< bit: 0 XOSC Ready */
|
||||
uint32_t XOSC32KRDY:1; /*!< bit: 1 XOSC32K Ready */
|
||||
uint32_t OSC32KRDY:1; /*!< bit: 2 OSC32K Ready */
|
||||
uint32_t OSC8MRDY:1; /*!< bit: 3 OSC8M Ready */
|
||||
uint32_t DFLLRDY:1; /*!< bit: 4 DFLL Ready */
|
||||
uint32_t DFLLOOB:1; /*!< bit: 5 DFLL Out Of Bounds */
|
||||
uint32_t DFLLLCKF:1; /*!< bit: 6 DFLL Lock Fine */
|
||||
uint32_t DFLLLCKC:1; /*!< bit: 7 DFLL Lock Coarse */
|
||||
uint32_t DFLLRCS:1; /*!< bit: 8 DFLL Reference Clock Stopped */
|
||||
uint32_t BOD33RDY:1; /*!< bit: 9 BOD33 Ready */
|
||||
uint32_t BOD33DET:1; /*!< bit: 10 BOD33 Detection */
|
||||
uint32_t B33SRDY:1; /*!< bit: 11 BOD33 Synchronization Ready */
|
||||
uint32_t BOD12RDY:1; /*!< bit: 12 BOD12 Ready */
|
||||
uint32_t BOD12DET:1; /*!< bit: 13 BOD12 Detection */
|
||||
uint32_t B12SRDY:1; /*!< bit: 14 BOD12 Synchronization Ready */
|
||||
uint32_t :17; /*!< bit: 15..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} SYSCTRL_PCLKSR_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define SYSCTRL_PCLKSR_OFFSET 0x0C /**< \brief (SYSCTRL_PCLKSR offset) Power and Clocks Status Register */
|
||||
#define SYSCTRL_PCLKSR_RESETVALUE 0x00000000 /**< \brief (SYSCTRL_PCLKSR reset_value) Power and Clocks Status Register */
|
||||
|
||||
#define SYSCTRL_PCLKSR_XOSCRDY_Pos 0 /**< \brief (SYSCTRL_PCLKSR) XOSC Ready */
|
||||
#define SYSCTRL_PCLKSR_XOSCRDY (0x1u << SYSCTRL_PCLKSR_XOSCRDY_Pos)
|
||||
#define SYSCTRL_PCLKSR_XOSC32KRDY_Pos 1 /**< \brief (SYSCTRL_PCLKSR) XOSC32K Ready */
|
||||
#define SYSCTRL_PCLKSR_XOSC32KRDY (0x1u << SYSCTRL_PCLKSR_XOSC32KRDY_Pos)
|
||||
#define SYSCTRL_PCLKSR_OSC32KRDY_Pos 2 /**< \brief (SYSCTRL_PCLKSR) OSC32K Ready */
|
||||
#define SYSCTRL_PCLKSR_OSC32KRDY (0x1u << SYSCTRL_PCLKSR_OSC32KRDY_Pos)
|
||||
#define SYSCTRL_PCLKSR_OSC8MRDY_Pos 3 /**< \brief (SYSCTRL_PCLKSR) OSC8M Ready */
|
||||
#define SYSCTRL_PCLKSR_OSC8MRDY (0x1u << SYSCTRL_PCLKSR_OSC8MRDY_Pos)
|
||||
#define SYSCTRL_PCLKSR_DFLLRDY_Pos 4 /**< \brief (SYSCTRL_PCLKSR) DFLL Ready */
|
||||
#define SYSCTRL_PCLKSR_DFLLRDY (0x1u << SYSCTRL_PCLKSR_DFLLRDY_Pos)
|
||||
#define SYSCTRL_PCLKSR_DFLLOOB_Pos 5 /**< \brief (SYSCTRL_PCLKSR) DFLL Out Of Bounds */
|
||||
#define SYSCTRL_PCLKSR_DFLLOOB (0x1u << SYSCTRL_PCLKSR_DFLLOOB_Pos)
|
||||
#define SYSCTRL_PCLKSR_DFLLLCKF_Pos 6 /**< \brief (SYSCTRL_PCLKSR) DFLL Lock Fine */
|
||||
#define SYSCTRL_PCLKSR_DFLLLCKF (0x1u << SYSCTRL_PCLKSR_DFLLLCKF_Pos)
|
||||
#define SYSCTRL_PCLKSR_DFLLLCKC_Pos 7 /**< \brief (SYSCTRL_PCLKSR) DFLL Lock Coarse */
|
||||
#define SYSCTRL_PCLKSR_DFLLLCKC (0x1u << SYSCTRL_PCLKSR_DFLLLCKC_Pos)
|
||||
#define SYSCTRL_PCLKSR_DFLLRCS_Pos 8 /**< \brief (SYSCTRL_PCLKSR) DFLL Reference Clock Stopped */
|
||||
#define SYSCTRL_PCLKSR_DFLLRCS (0x1u << SYSCTRL_PCLKSR_DFLLRCS_Pos)
|
||||
#define SYSCTRL_PCLKSR_BOD33RDY_Pos 9 /**< \brief (SYSCTRL_PCLKSR) BOD33 Ready */
|
||||
#define SYSCTRL_PCLKSR_BOD33RDY (0x1u << SYSCTRL_PCLKSR_BOD33RDY_Pos)
|
||||
#define SYSCTRL_PCLKSR_BOD33DET_Pos 10 /**< \brief (SYSCTRL_PCLKSR) BOD33 Detection */
|
||||
#define SYSCTRL_PCLKSR_BOD33DET (0x1u << SYSCTRL_PCLKSR_BOD33DET_Pos)
|
||||
#define SYSCTRL_PCLKSR_B33SRDY_Pos 11 /**< \brief (SYSCTRL_PCLKSR) BOD33 Synchronization Ready */
|
||||
#define SYSCTRL_PCLKSR_B33SRDY (0x1u << SYSCTRL_PCLKSR_B33SRDY_Pos)
|
||||
#define SYSCTRL_PCLKSR_BOD12RDY_Pos 12 /**< \brief (SYSCTRL_PCLKSR) BOD12 Ready */
|
||||
#define SYSCTRL_PCLKSR_BOD12RDY (0x1u << SYSCTRL_PCLKSR_BOD12RDY_Pos)
|
||||
#define SYSCTRL_PCLKSR_BOD12DET_Pos 13 /**< \brief (SYSCTRL_PCLKSR) BOD12 Detection */
|
||||
#define SYSCTRL_PCLKSR_BOD12DET (0x1u << SYSCTRL_PCLKSR_BOD12DET_Pos)
|
||||
#define SYSCTRL_PCLKSR_B12SRDY_Pos 14 /**< \brief (SYSCTRL_PCLKSR) BOD12 Synchronization Ready */
|
||||
#define SYSCTRL_PCLKSR_B12SRDY (0x1u << SYSCTRL_PCLKSR_B12SRDY_Pos)
|
||||
#define SYSCTRL_PCLKSR_MASK 0x00007FFFu /**< \brief (SYSCTRL_PCLKSR) MASK Register */
|
||||
|
||||
/* -------- SYSCTRL_XOSC : (SYSCTRL Offset: 0x10) (R/W 16) XOSC Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t :1; /*!< bit: 0 Reserved */
|
||||
uint16_t ENABLE:1; /*!< bit: 1 Enable */
|
||||
uint16_t XTALEN:1; /*!< bit: 2 Crystal Oscillator Enable */
|
||||
uint16_t :3; /*!< bit: 3.. 5 Reserved */
|
||||
uint16_t RUNSTDBY:1; /*!< bit: 6 Run during Standby */
|
||||
uint16_t ONDEMAND:1; /*!< bit: 7 Enable on Demand */
|
||||
uint16_t GAIN:3; /*!< bit: 8..10 Gain Value */
|
||||
uint16_t AMPGC:1; /*!< bit: 11 Automatic Amplitude Gain Control */
|
||||
uint16_t STARTUP:4; /*!< bit: 12..15 Start-Up Time */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} SYSCTRL_XOSC_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define SYSCTRL_XOSC_OFFSET 0x10 /**< \brief (SYSCTRL_XOSC offset) XOSC Control Register */
|
||||
#define SYSCTRL_XOSC_RESETVALUE 0x0080 /**< \brief (SYSCTRL_XOSC reset_value) XOSC Control Register */
|
||||
|
||||
#define SYSCTRL_XOSC_ENABLE_Pos 1 /**< \brief (SYSCTRL_XOSC) Enable */
|
||||
#define SYSCTRL_XOSC_ENABLE (0x1u << SYSCTRL_XOSC_ENABLE_Pos)
|
||||
#define SYSCTRL_XOSC_XTALEN_Pos 2 /**< \brief (SYSCTRL_XOSC) Crystal Oscillator Enable */
|
||||
#define SYSCTRL_XOSC_XTALEN (0x1u << SYSCTRL_XOSC_XTALEN_Pos)
|
||||
#define SYSCTRL_XOSC_RUNSTDBY_Pos 6 /**< \brief (SYSCTRL_XOSC) Run during Standby */
|
||||
#define SYSCTRL_XOSC_RUNSTDBY (0x1u << SYSCTRL_XOSC_RUNSTDBY_Pos)
|
||||
#define SYSCTRL_XOSC_ONDEMAND_Pos 7 /**< \brief (SYSCTRL_XOSC) Enable on Demand */
|
||||
#define SYSCTRL_XOSC_ONDEMAND (0x1u << SYSCTRL_XOSC_ONDEMAND_Pos)
|
||||
#define SYSCTRL_XOSC_GAIN_Pos 8 /**< \brief (SYSCTRL_XOSC) Gain Value */
|
||||
#define SYSCTRL_XOSC_GAIN_Msk (0x7u << SYSCTRL_XOSC_GAIN_Pos)
|
||||
#define SYSCTRL_XOSC_GAIN(value) ((SYSCTRL_XOSC_GAIN_Msk & ((value) << SYSCTRL_XOSC_GAIN_Pos)))
|
||||
#define SYSCTRL_XOSC_AMPGC_Pos 11 /**< \brief (SYSCTRL_XOSC) Automatic Amplitude Gain Control */
|
||||
#define SYSCTRL_XOSC_AMPGC (0x1u << SYSCTRL_XOSC_AMPGC_Pos)
|
||||
#define SYSCTRL_XOSC_STARTUP_Pos 12 /**< \brief (SYSCTRL_XOSC) Start-Up Time */
|
||||
#define SYSCTRL_XOSC_STARTUP_Msk (0xFu << SYSCTRL_XOSC_STARTUP_Pos)
|
||||
#define SYSCTRL_XOSC_STARTUP(value) ((SYSCTRL_XOSC_STARTUP_Msk & ((value) << SYSCTRL_XOSC_STARTUP_Pos)))
|
||||
#define SYSCTRL_XOSC_MASK 0xFFC6u /**< \brief (SYSCTRL_XOSC) MASK Register */
|
||||
|
||||
/* -------- SYSCTRL_XOSC32K : (SYSCTRL Offset: 0x14) (R/W 16) XOSC32K Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t :1; /*!< bit: 0 Reserved */
|
||||
uint16_t ENABLE:1; /*!< bit: 1 Enable */
|
||||
uint16_t XTALEN:1; /*!< bit: 2 Crystal Oscillator Enable */
|
||||
uint16_t EN32K:1; /*!< bit: 3 32kHz Output Enable */
|
||||
uint16_t EN1K:1; /*!< bit: 4 1kHz Output Enable */
|
||||
uint16_t AAMPEN:1; /*!< bit: 5 Automatic Amplitude Control Enable */
|
||||
uint16_t RUNSTDBY:1; /*!< bit: 6 Run during Standby */
|
||||
uint16_t ONDEMAND:1; /*!< bit: 7 Enable on Demand */
|
||||
uint16_t STARTUP:3; /*!< bit: 8..10 Start-Up Time */
|
||||
uint16_t :1; /*!< bit: 11 Reserved */
|
||||
uint16_t WRTLOCK:1; /*!< bit: 12 Write Lock */
|
||||
uint16_t :3; /*!< bit: 13..15 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} SYSCTRL_XOSC32K_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define SYSCTRL_XOSC32K_OFFSET 0x14 /**< \brief (SYSCTRL_XOSC32K offset) XOSC32K Control Register */
|
||||
#define SYSCTRL_XOSC32K_RESETVALUE 0x0080 /**< \brief (SYSCTRL_XOSC32K reset_value) XOSC32K Control Register */
|
||||
|
||||
#define SYSCTRL_XOSC32K_ENABLE_Pos 1 /**< \brief (SYSCTRL_XOSC32K) Enable */
|
||||
#define SYSCTRL_XOSC32K_ENABLE (0x1u << SYSCTRL_XOSC32K_ENABLE_Pos)
|
||||
#define SYSCTRL_XOSC32K_XTALEN_Pos 2 /**< \brief (SYSCTRL_XOSC32K) Crystal Oscillator Enable */
|
||||
#define SYSCTRL_XOSC32K_XTALEN (0x1u << SYSCTRL_XOSC32K_XTALEN_Pos)
|
||||
#define SYSCTRL_XOSC32K_EN32K_Pos 3 /**< \brief (SYSCTRL_XOSC32K) 32kHz Output Enable */
|
||||
#define SYSCTRL_XOSC32K_EN32K (0x1u << SYSCTRL_XOSC32K_EN32K_Pos)
|
||||
#define SYSCTRL_XOSC32K_EN1K_Pos 4 /**< \brief (SYSCTRL_XOSC32K) 1kHz Output Enable */
|
||||
#define SYSCTRL_XOSC32K_EN1K (0x1u << SYSCTRL_XOSC32K_EN1K_Pos)
|
||||
#define SYSCTRL_XOSC32K_AAMPEN_Pos 5 /**< \brief (SYSCTRL_XOSC32K) Automatic Amplitude Control Enable */
|
||||
#define SYSCTRL_XOSC32K_AAMPEN (0x1u << SYSCTRL_XOSC32K_AAMPEN_Pos)
|
||||
#define SYSCTRL_XOSC32K_RUNSTDBY_Pos 6 /**< \brief (SYSCTRL_XOSC32K) Run during Standby */
|
||||
#define SYSCTRL_XOSC32K_RUNSTDBY (0x1u << SYSCTRL_XOSC32K_RUNSTDBY_Pos)
|
||||
#define SYSCTRL_XOSC32K_ONDEMAND_Pos 7 /**< \brief (SYSCTRL_XOSC32K) Enable on Demand */
|
||||
#define SYSCTRL_XOSC32K_ONDEMAND (0x1u << SYSCTRL_XOSC32K_ONDEMAND_Pos)
|
||||
#define SYSCTRL_XOSC32K_STARTUP_Pos 8 /**< \brief (SYSCTRL_XOSC32K) Start-Up Time */
|
||||
#define SYSCTRL_XOSC32K_STARTUP_Msk (0x7u << SYSCTRL_XOSC32K_STARTUP_Pos)
|
||||
#define SYSCTRL_XOSC32K_STARTUP(value) ((SYSCTRL_XOSC32K_STARTUP_Msk & ((value) << SYSCTRL_XOSC32K_STARTUP_Pos)))
|
||||
#define SYSCTRL_XOSC32K_WRTLOCK_Pos 12 /**< \brief (SYSCTRL_XOSC32K) Write Lock */
|
||||
#define SYSCTRL_XOSC32K_WRTLOCK (0x1u << SYSCTRL_XOSC32K_WRTLOCK_Pos)
|
||||
#define SYSCTRL_XOSC32K_MASK 0x17FEu /**< \brief (SYSCTRL_XOSC32K) MASK Register */
|
||||
|
||||
/* -------- SYSCTRL_OSC32K : (SYSCTRL Offset: 0x18) (R/W 32) OSC32K Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t :1; /*!< bit: 0 Reserved */
|
||||
uint32_t ENABLE:1; /*!< bit: 1 Enable */
|
||||
uint32_t EN32K:1; /*!< bit: 2 32kHz Output Enable */
|
||||
uint32_t EN1K:1; /*!< bit: 3 1kHz Output Enable */
|
||||
uint32_t :2; /*!< bit: 4.. 5 Reserved */
|
||||
uint32_t RUNSTDBY:1; /*!< bit: 6 Run during Standby */
|
||||
uint32_t ONDEMAND:1; /*!< bit: 7 Enable on Demand */
|
||||
uint32_t STARTUP:3; /*!< bit: 8..10 Start-Up Time */
|
||||
uint32_t :1; /*!< bit: 11 Reserved */
|
||||
uint32_t WRTLOCK:1; /*!< bit: 12 Write Lock */
|
||||
uint32_t :3; /*!< bit: 13..15 Reserved */
|
||||
uint32_t CALIB:7; /*!< bit: 16..22 Calibration Value */
|
||||
uint32_t :9; /*!< bit: 23..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} SYSCTRL_OSC32K_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define SYSCTRL_OSC32K_OFFSET 0x18 /**< \brief (SYSCTRL_OSC32K offset) OSC32K Control Register */
|
||||
#define SYSCTRL_OSC32K_RESETVALUE 0x003F0080 /**< \brief (SYSCTRL_OSC32K reset_value) OSC32K Control Register */
|
||||
|
||||
#define SYSCTRL_OSC32K_ENABLE_Pos 1 /**< \brief (SYSCTRL_OSC32K) Enable */
|
||||
#define SYSCTRL_OSC32K_ENABLE (0x1u << SYSCTRL_OSC32K_ENABLE_Pos)
|
||||
#define SYSCTRL_OSC32K_EN32K_Pos 2 /**< \brief (SYSCTRL_OSC32K) 32kHz Output Enable */
|
||||
#define SYSCTRL_OSC32K_EN32K (0x1u << SYSCTRL_OSC32K_EN32K_Pos)
|
||||
#define SYSCTRL_OSC32K_EN1K_Pos 3 /**< \brief (SYSCTRL_OSC32K) 1kHz Output Enable */
|
||||
#define SYSCTRL_OSC32K_EN1K (0x1u << SYSCTRL_OSC32K_EN1K_Pos)
|
||||
#define SYSCTRL_OSC32K_RUNSTDBY_Pos 6 /**< \brief (SYSCTRL_OSC32K) Run during Standby */
|
||||
#define SYSCTRL_OSC32K_RUNSTDBY (0x1u << SYSCTRL_OSC32K_RUNSTDBY_Pos)
|
||||
#define SYSCTRL_OSC32K_ONDEMAND_Pos 7 /**< \brief (SYSCTRL_OSC32K) Enable on Demand */
|
||||
#define SYSCTRL_OSC32K_ONDEMAND (0x1u << SYSCTRL_OSC32K_ONDEMAND_Pos)
|
||||
#define SYSCTRL_OSC32K_STARTUP_Pos 8 /**< \brief (SYSCTRL_OSC32K) Start-Up Time */
|
||||
#define SYSCTRL_OSC32K_STARTUP_Msk (0x7u << SYSCTRL_OSC32K_STARTUP_Pos)
|
||||
#define SYSCTRL_OSC32K_STARTUP(value) ((SYSCTRL_OSC32K_STARTUP_Msk & ((value) << SYSCTRL_OSC32K_STARTUP_Pos)))
|
||||
#define SYSCTRL_OSC32K_WRTLOCK_Pos 12 /**< \brief (SYSCTRL_OSC32K) Write Lock */
|
||||
#define SYSCTRL_OSC32K_WRTLOCK (0x1u << SYSCTRL_OSC32K_WRTLOCK_Pos)
|
||||
#define SYSCTRL_OSC32K_CALIB_Pos 16 /**< \brief (SYSCTRL_OSC32K) Calibration Value */
|
||||
#define SYSCTRL_OSC32K_CALIB_Msk (0x7Fu << SYSCTRL_OSC32K_CALIB_Pos)
|
||||
#define SYSCTRL_OSC32K_CALIB(value) ((SYSCTRL_OSC32K_CALIB_Msk & ((value) << SYSCTRL_OSC32K_CALIB_Pos)))
|
||||
#define SYSCTRL_OSC32K_MASK 0x007F17CEu /**< \brief (SYSCTRL_OSC32K) MASK Register */
|
||||
|
||||
/* -------- SYSCTRL_OSCULP32K : (SYSCTRL Offset: 0x1C) (R/W 8) OSCULP32K Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t CALIB:5; /*!< bit: 0.. 4 Calibration Value */
|
||||
uint8_t :2; /*!< bit: 5.. 6 Reserved */
|
||||
uint8_t WRTLOCK:1; /*!< bit: 7 Write Lock */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} SYSCTRL_OSCULP32K_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define SYSCTRL_OSCULP32K_OFFSET 0x1C /**< \brief (SYSCTRL_OSCULP32K offset) OSCULP32K Control Register */
|
||||
#define SYSCTRL_OSCULP32K_RESETVALUE 0x0F /**< \brief (SYSCTRL_OSCULP32K reset_value) OSCULP32K Control Register */
|
||||
|
||||
#define SYSCTRL_OSCULP32K_CALIB_Pos 0 /**< \brief (SYSCTRL_OSCULP32K) Calibration Value */
|
||||
#define SYSCTRL_OSCULP32K_CALIB_Msk (0x1Fu << SYSCTRL_OSCULP32K_CALIB_Pos)
|
||||
#define SYSCTRL_OSCULP32K_CALIB(value) ((SYSCTRL_OSCULP32K_CALIB_Msk & ((value) << SYSCTRL_OSCULP32K_CALIB_Pos)))
|
||||
#define SYSCTRL_OSCULP32K_WRTLOCK_Pos 7 /**< \brief (SYSCTRL_OSCULP32K) Write Lock */
|
||||
#define SYSCTRL_OSCULP32K_WRTLOCK (0x1u << SYSCTRL_OSCULP32K_WRTLOCK_Pos)
|
||||
#define SYSCTRL_OSCULP32K_MASK 0x9Fu /**< \brief (SYSCTRL_OSCULP32K) MASK Register */
|
||||
|
||||
/* -------- SYSCTRL_OSC8M : (SYSCTRL Offset: 0x20) (R/W 32) OSC8M Control Register A -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t :1; /*!< bit: 0 Reserved */
|
||||
uint32_t ENABLE:1; /*!< bit: 1 Enable */
|
||||
uint32_t :4; /*!< bit: 2.. 5 Reserved */
|
||||
uint32_t RUNSTDBY:1; /*!< bit: 6 Run during Standby */
|
||||
uint32_t ONDEMAND:1; /*!< bit: 7 Enable on Demand */
|
||||
uint32_t PRESC:2; /*!< bit: 8.. 9 Prescaler Select */
|
||||
uint32_t :6; /*!< bit: 10..15 Reserved */
|
||||
uint32_t CALIB:12; /*!< bit: 16..27 Calibration Value */
|
||||
uint32_t :2; /*!< bit: 28..29 Reserved */
|
||||
uint32_t FRANGE:2; /*!< bit: 30..31 Frequency Range */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} SYSCTRL_OSC8M_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define SYSCTRL_OSC8M_OFFSET 0x20 /**< \brief (SYSCTRL_OSC8M offset) OSC8M Control Register A */
|
||||
#define SYSCTRL_OSC8M_RESETVALUE 0x00000080 /**< \brief (SYSCTRL_OSC8M reset_value) OSC8M Control Register A */
|
||||
|
||||
#define SYSCTRL_OSC8M_ENABLE_Pos 1 /**< \brief (SYSCTRL_OSC8M) Enable */
|
||||
#define SYSCTRL_OSC8M_ENABLE (0x1u << SYSCTRL_OSC8M_ENABLE_Pos)
|
||||
#define SYSCTRL_OSC8M_RUNSTDBY_Pos 6 /**< \brief (SYSCTRL_OSC8M) Run during Standby */
|
||||
#define SYSCTRL_OSC8M_RUNSTDBY (0x1u << SYSCTRL_OSC8M_RUNSTDBY_Pos)
|
||||
#define SYSCTRL_OSC8M_ONDEMAND_Pos 7 /**< \brief (SYSCTRL_OSC8M) Enable on Demand */
|
||||
#define SYSCTRL_OSC8M_ONDEMAND (0x1u << SYSCTRL_OSC8M_ONDEMAND_Pos)
|
||||
#define SYSCTRL_OSC8M_PRESC_Pos 8 /**< \brief (SYSCTRL_OSC8M) Prescaler Select */
|
||||
#define SYSCTRL_OSC8M_PRESC_Msk (0x3u << SYSCTRL_OSC8M_PRESC_Pos)
|
||||
#define SYSCTRL_OSC8M_PRESC(value) ((SYSCTRL_OSC8M_PRESC_Msk & ((value) << SYSCTRL_OSC8M_PRESC_Pos)))
|
||||
#define SYSCTRL_OSC8M_CALIB_Pos 16 /**< \brief (SYSCTRL_OSC8M) Calibration Value */
|
||||
#define SYSCTRL_OSC8M_CALIB_Msk (0xFFFu << SYSCTRL_OSC8M_CALIB_Pos)
|
||||
#define SYSCTRL_OSC8M_CALIB(value) ((SYSCTRL_OSC8M_CALIB_Msk & ((value) << SYSCTRL_OSC8M_CALIB_Pos)))
|
||||
#define SYSCTRL_OSC8M_FRANGE_Pos 30 /**< \brief (SYSCTRL_OSC8M) Frequency Range */
|
||||
#define SYSCTRL_OSC8M_FRANGE_Msk (0x3u << SYSCTRL_OSC8M_FRANGE_Pos)
|
||||
#define SYSCTRL_OSC8M_FRANGE(value) ((SYSCTRL_OSC8M_FRANGE_Msk & ((value) << SYSCTRL_OSC8M_FRANGE_Pos)))
|
||||
#define SYSCTRL_OSC8M_MASK 0xCFFF03C2u /**< \brief (SYSCTRL_OSC8M) MASK Register */
|
||||
|
||||
/* -------- SYSCTRL_DFLLCTRL : (SYSCTRL Offset: 0x24) (R/W 16) DFLL Config Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t :1; /*!< bit: 0 Reserved */
|
||||
uint16_t ENABLE:1; /*!< bit: 1 Enable */
|
||||
uint16_t MODE:1; /*!< bit: 2 Mode Selection */
|
||||
uint16_t STABLE:1; /*!< bit: 3 Stable Frequency */
|
||||
uint16_t LLAW:1; /*!< bit: 4 Lose Lock After Wake */
|
||||
uint16_t USBCRM:1; /*!< bit: 5 USB Clock Recovery Mode */
|
||||
uint16_t RUNSTDBY:1; /*!< bit: 6 Run during Standby */
|
||||
uint16_t ONDEMAND:1; /*!< bit: 7 Enable on Demand */
|
||||
uint16_t CCDIS:1; /*!< bit: 8 Chill Cycle Disable */
|
||||
uint16_t QLDIS:1; /*!< bit: 9 Quick Lock Disable */
|
||||
uint16_t :6; /*!< bit: 10..15 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} SYSCTRL_DFLLCTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define SYSCTRL_DFLLCTRL_OFFSET 0x24 /**< \brief (SYSCTRL_DFLLCTRL offset) DFLL Config Register */
|
||||
#define SYSCTRL_DFLLCTRL_RESETVALUE 0x0080 /**< \brief (SYSCTRL_DFLLCTRL reset_value) DFLL Config Register */
|
||||
|
||||
#define SYSCTRL_DFLLCTRL_ENABLE_Pos 1 /**< \brief (SYSCTRL_DFLLCTRL) Enable */
|
||||
#define SYSCTRL_DFLLCTRL_ENABLE (0x1u << SYSCTRL_DFLLCTRL_ENABLE_Pos)
|
||||
#define SYSCTRL_DFLLCTRL_MODE_Pos 2 /**< \brief (SYSCTRL_DFLLCTRL) Mode Selection */
|
||||
#define SYSCTRL_DFLLCTRL_MODE (0x1u << SYSCTRL_DFLLCTRL_MODE_Pos)
|
||||
#define SYSCTRL_DFLLCTRL_STABLE_Pos 3 /**< \brief (SYSCTRL_DFLLCTRL) Stable Frequency */
|
||||
#define SYSCTRL_DFLLCTRL_STABLE (0x1u << SYSCTRL_DFLLCTRL_STABLE_Pos)
|
||||
#define SYSCTRL_DFLLCTRL_LLAW_Pos 4 /**< \brief (SYSCTRL_DFLLCTRL) Lose Lock After Wake */
|
||||
#define SYSCTRL_DFLLCTRL_LLAW (0x1u << SYSCTRL_DFLLCTRL_LLAW_Pos)
|
||||
#define SYSCTRL_DFLLCTRL_USBCRM_Pos 5 /**< \brief (SYSCTRL_DFLLCTRL) USB Clock Recovery Mode */
|
||||
#define SYSCTRL_DFLLCTRL_USBCRM (0x1u << SYSCTRL_DFLLCTRL_USBCRM_Pos)
|
||||
#define SYSCTRL_DFLLCTRL_RUNSTDBY_Pos 6 /**< \brief (SYSCTRL_DFLLCTRL) Run during Standby */
|
||||
#define SYSCTRL_DFLLCTRL_RUNSTDBY (0x1u << SYSCTRL_DFLLCTRL_RUNSTDBY_Pos)
|
||||
#define SYSCTRL_DFLLCTRL_ONDEMAND_Pos 7 /**< \brief (SYSCTRL_DFLLCTRL) Enable on Demand */
|
||||
#define SYSCTRL_DFLLCTRL_ONDEMAND (0x1u << SYSCTRL_DFLLCTRL_ONDEMAND_Pos)
|
||||
#define SYSCTRL_DFLLCTRL_CCDIS_Pos 8 /**< \brief (SYSCTRL_DFLLCTRL) Chill Cycle Disable */
|
||||
#define SYSCTRL_DFLLCTRL_CCDIS (0x1u << SYSCTRL_DFLLCTRL_CCDIS_Pos)
|
||||
#define SYSCTRL_DFLLCTRL_QLDIS_Pos 9 /**< \brief (SYSCTRL_DFLLCTRL) Quick Lock Disable */
|
||||
#define SYSCTRL_DFLLCTRL_QLDIS (0x1u << SYSCTRL_DFLLCTRL_QLDIS_Pos)
|
||||
#define SYSCTRL_DFLLCTRL_MASK 0x03FEu /**< \brief (SYSCTRL_DFLLCTRL) MASK Register */
|
||||
|
||||
/* -------- SYSCTRL_DFLLVAL : (SYSCTRL Offset: 0x28) (R/W 32) DFLL Calibration Value Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t FINE:8; /*!< bit: 0.. 7 Fine Calibration Value */
|
||||
uint32_t COARSE:5; /*!< bit: 8..12 Coarse Calibration Value */
|
||||
uint32_t :3; /*!< bit: 13..15 Reserved */
|
||||
uint32_t DIFF:16; /*!< bit: 16..31 Multiplication Ratio Difference */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} SYSCTRL_DFLLVAL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define SYSCTRL_DFLLVAL_OFFSET 0x28 /**< \brief (SYSCTRL_DFLLVAL offset) DFLL Calibration Value Register */
|
||||
#define SYSCTRL_DFLLVAL_RESETVALUE 0x00000000 /**< \brief (SYSCTRL_DFLLVAL reset_value) DFLL Calibration Value Register */
|
||||
|
||||
#define SYSCTRL_DFLLVAL_FINE_Pos 0 /**< \brief (SYSCTRL_DFLLVAL) Fine Calibration Value */
|
||||
#define SYSCTRL_DFLLVAL_FINE_Msk (0xFFu << SYSCTRL_DFLLVAL_FINE_Pos)
|
||||
#define SYSCTRL_DFLLVAL_FINE(value) ((SYSCTRL_DFLLVAL_FINE_Msk & ((value) << SYSCTRL_DFLLVAL_FINE_Pos)))
|
||||
#define SYSCTRL_DFLLVAL_COARSE_Pos 8 /**< \brief (SYSCTRL_DFLLVAL) Coarse Calibration Value */
|
||||
#define SYSCTRL_DFLLVAL_COARSE_Msk (0x1Fu << SYSCTRL_DFLLVAL_COARSE_Pos)
|
||||
#define SYSCTRL_DFLLVAL_COARSE(value) ((SYSCTRL_DFLLVAL_COARSE_Msk & ((value) << SYSCTRL_DFLLVAL_COARSE_Pos)))
|
||||
#define SYSCTRL_DFLLVAL_DIFF_Pos 16 /**< \brief (SYSCTRL_DFLLVAL) Multiplication Ratio Difference */
|
||||
#define SYSCTRL_DFLLVAL_DIFF_Msk (0xFFFFu << SYSCTRL_DFLLVAL_DIFF_Pos)
|
||||
#define SYSCTRL_DFLLVAL_DIFF(value) ((SYSCTRL_DFLLVAL_DIFF_Msk & ((value) << SYSCTRL_DFLLVAL_DIFF_Pos)))
|
||||
#define SYSCTRL_DFLLVAL_MASK 0xFFFF1FFFu /**< \brief (SYSCTRL_DFLLVAL) MASK Register */
|
||||
|
||||
/* -------- SYSCTRL_DFLLMUL : (SYSCTRL Offset: 0x2C) (R/W 32) DFLL Multiplier Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t MUL:16; /*!< bit: 0..15 Multiplication Value */
|
||||
uint32_t FSTEP:8; /*!< bit: 16..23 Maximum Fine Step Size */
|
||||
uint32_t CSTEP:5; /*!< bit: 24..28 Maximum Coarse Step Size */
|
||||
uint32_t :3; /*!< bit: 29..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} SYSCTRL_DFLLMUL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define SYSCTRL_DFLLMUL_OFFSET 0x2C /**< \brief (SYSCTRL_DFLLMUL offset) DFLL Multiplier Register */
|
||||
#define SYSCTRL_DFLLMUL_RESETVALUE 0x00000000 /**< \brief (SYSCTRL_DFLLMUL reset_value) DFLL Multiplier Register */
|
||||
|
||||
#define SYSCTRL_DFLLMUL_MUL_Pos 0 /**< \brief (SYSCTRL_DFLLMUL) Multiplication Value */
|
||||
#define SYSCTRL_DFLLMUL_MUL_Msk (0xFFFFu << SYSCTRL_DFLLMUL_MUL_Pos)
|
||||
#define SYSCTRL_DFLLMUL_MUL(value) ((SYSCTRL_DFLLMUL_MUL_Msk & ((value) << SYSCTRL_DFLLMUL_MUL_Pos)))
|
||||
#define SYSCTRL_DFLLMUL_FSTEP_Pos 16 /**< \brief (SYSCTRL_DFLLMUL) Maximum Fine Step Size */
|
||||
#define SYSCTRL_DFLLMUL_FSTEP_Msk (0xFFu << SYSCTRL_DFLLMUL_FSTEP_Pos)
|
||||
#define SYSCTRL_DFLLMUL_FSTEP(value) ((SYSCTRL_DFLLMUL_FSTEP_Msk & ((value) << SYSCTRL_DFLLMUL_FSTEP_Pos)))
|
||||
#define SYSCTRL_DFLLMUL_CSTEP_Pos 24 /**< \brief (SYSCTRL_DFLLMUL) Maximum Coarse Step Size */
|
||||
#define SYSCTRL_DFLLMUL_CSTEP_Msk (0x1Fu << SYSCTRL_DFLLMUL_CSTEP_Pos)
|
||||
#define SYSCTRL_DFLLMUL_CSTEP(value) ((SYSCTRL_DFLLMUL_CSTEP_Msk & ((value) << SYSCTRL_DFLLMUL_CSTEP_Pos)))
|
||||
#define SYSCTRL_DFLLMUL_MASK 0x1FFFFFFFu /**< \brief (SYSCTRL_DFLLMUL) MASK Register */
|
||||
|
||||
/* -------- SYSCTRL_DFLLSYNC : (SYSCTRL Offset: 0x30) (R/W 8) DFLL Synchronization Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t :7; /*!< bit: 0.. 6 Reserved */
|
||||
uint8_t READREQ:1; /*!< bit: 7 Read Request Synchronization */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} SYSCTRL_DFLLSYNC_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define SYSCTRL_DFLLSYNC_OFFSET 0x30 /**< \brief (SYSCTRL_DFLLSYNC offset) DFLL Synchronization Register */
|
||||
#define SYSCTRL_DFLLSYNC_RESETVALUE 0x00 /**< \brief (SYSCTRL_DFLLSYNC reset_value) DFLL Synchronization Register */
|
||||
|
||||
#define SYSCTRL_DFLLSYNC_READREQ_Pos 7 /**< \brief (SYSCTRL_DFLLSYNC) Read Request Synchronization */
|
||||
#define SYSCTRL_DFLLSYNC_READREQ (0x1u << SYSCTRL_DFLLSYNC_READREQ_Pos)
|
||||
#define SYSCTRL_DFLLSYNC_MASK 0x80u /**< \brief (SYSCTRL_DFLLSYNC) MASK Register */
|
||||
|
||||
/* -------- SYSCTRL_BOD33 : (SYSCTRL Offset: 0x34) (R/W 32) BOD33 Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t :1; /*!< bit: 0 Reserved */
|
||||
uint32_t ENABLE:1; /*!< bit: 1 Enable */
|
||||
uint32_t HYST:1; /*!< bit: 2 Hysteresis Enable */
|
||||
uint32_t ACTION:2; /*!< bit: 3.. 4 Action when Threshold Crossed */
|
||||
uint32_t :1; /*!< bit: 5 Reserved */
|
||||
uint32_t RUNSTDBY:1; /*!< bit: 6 Run during Standby */
|
||||
uint32_t :1; /*!< bit: 7 Reserved */
|
||||
uint32_t MODE:1; /*!< bit: 8 Operation Modes */
|
||||
uint32_t CEN:1; /*!< bit: 9 Clock Enable */
|
||||
uint32_t :2; /*!< bit: 10..11 Reserved */
|
||||
uint32_t PSEL:4; /*!< bit: 12..15 Prescaler Select */
|
||||
uint32_t LEVEL:6; /*!< bit: 16..21 Threshold Level */
|
||||
uint32_t :10; /*!< bit: 22..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} SYSCTRL_BOD33_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define SYSCTRL_BOD33_OFFSET 0x34 /**< \brief (SYSCTRL_BOD33 offset) BOD33 Control Register */
|
||||
|
||||
#define SYSCTRL_BOD33_ENABLE_Pos 1 /**< \brief (SYSCTRL_BOD33) Enable */
|
||||
#define SYSCTRL_BOD33_ENABLE (0x1u << SYSCTRL_BOD33_ENABLE_Pos)
|
||||
#define SYSCTRL_BOD33_HYST_Pos 2 /**< \brief (SYSCTRL_BOD33) Hysteresis Enable */
|
||||
#define SYSCTRL_BOD33_HYST (0x1u << SYSCTRL_BOD33_HYST_Pos)
|
||||
#define SYSCTRL_BOD33_ACTION_Pos 3 /**< \brief (SYSCTRL_BOD33) Action when Threshold Crossed */
|
||||
#define SYSCTRL_BOD33_ACTION_Msk (0x3u << SYSCTRL_BOD33_ACTION_Pos)
|
||||
#define SYSCTRL_BOD33_ACTION(value) ((SYSCTRL_BOD33_ACTION_Msk & ((value) << SYSCTRL_BOD33_ACTION_Pos)))
|
||||
#define SYSCTRL_BOD33_RUNSTDBY_Pos 6 /**< \brief (SYSCTRL_BOD33) Run during Standby */
|
||||
#define SYSCTRL_BOD33_RUNSTDBY (0x1u << SYSCTRL_BOD33_RUNSTDBY_Pos)
|
||||
#define SYSCTRL_BOD33_MODE_Pos 8 /**< \brief (SYSCTRL_BOD33) Operation Modes */
|
||||
#define SYSCTRL_BOD33_MODE (0x1u << SYSCTRL_BOD33_MODE_Pos)
|
||||
#define SYSCTRL_BOD33_CEN_Pos 9 /**< \brief (SYSCTRL_BOD33) Clock Enable */
|
||||
#define SYSCTRL_BOD33_CEN (0x1u << SYSCTRL_BOD33_CEN_Pos)
|
||||
#define SYSCTRL_BOD33_PSEL_Pos 12 /**< \brief (SYSCTRL_BOD33) Prescaler Select */
|
||||
#define SYSCTRL_BOD33_PSEL_Msk (0xFu << SYSCTRL_BOD33_PSEL_Pos)
|
||||
#define SYSCTRL_BOD33_PSEL(value) ((SYSCTRL_BOD33_PSEL_Msk & ((value) << SYSCTRL_BOD33_PSEL_Pos)))
|
||||
#define SYSCTRL_BOD33_LEVEL_Pos 16 /**< \brief (SYSCTRL_BOD33) Threshold Level */
|
||||
#define SYSCTRL_BOD33_LEVEL_Msk (0x3Fu << SYSCTRL_BOD33_LEVEL_Pos)
|
||||
#define SYSCTRL_BOD33_LEVEL(value) ((SYSCTRL_BOD33_LEVEL_Msk & ((value) << SYSCTRL_BOD33_LEVEL_Pos)))
|
||||
#define SYSCTRL_BOD33_MASK 0x003FF35Eu /**< \brief (SYSCTRL_BOD33) MASK Register */
|
||||
|
||||
/* -------- SYSCTRL_BOD12 : (SYSCTRL Offset: 0x38) (R/W 32) BOD12 Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t :1; /*!< bit: 0 Reserved */
|
||||
uint32_t ENABLE:1; /*!< bit: 1 Enable */
|
||||
uint32_t HYST:1; /*!< bit: 2 Hysteresis Enable */
|
||||
uint32_t ACTION:2; /*!< bit: 3.. 4 Action when Threshold Crossed */
|
||||
uint32_t :1; /*!< bit: 5 Reserved */
|
||||
uint32_t RUNSTDBY:1; /*!< bit: 6 Run during Standby */
|
||||
uint32_t :1; /*!< bit: 7 Reserved */
|
||||
uint32_t MODE:1; /*!< bit: 8 Operation Modes */
|
||||
uint32_t CEN:1; /*!< bit: 9 Clock Enable */
|
||||
uint32_t :2; /*!< bit: 10..11 Reserved */
|
||||
uint32_t PSEL:4; /*!< bit: 12..15 Prescaler Select */
|
||||
uint32_t LEVEL:5; /*!< bit: 16..20 Threshold Level */
|
||||
uint32_t :11; /*!< bit: 21..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} SYSCTRL_BOD12_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define SYSCTRL_BOD12_OFFSET 0x38 /**< \brief (SYSCTRL_BOD12 offset) BOD12 Control Register */
|
||||
|
||||
#define SYSCTRL_BOD12_ENABLE_Pos 1 /**< \brief (SYSCTRL_BOD12) Enable */
|
||||
#define SYSCTRL_BOD12_ENABLE (0x1u << SYSCTRL_BOD12_ENABLE_Pos)
|
||||
#define SYSCTRL_BOD12_HYST_Pos 2 /**< \brief (SYSCTRL_BOD12) Hysteresis Enable */
|
||||
#define SYSCTRL_BOD12_HYST (0x1u << SYSCTRL_BOD12_HYST_Pos)
|
||||
#define SYSCTRL_BOD12_ACTION_Pos 3 /**< \brief (SYSCTRL_BOD12) Action when Threshold Crossed */
|
||||
#define SYSCTRL_BOD12_ACTION_Msk (0x3u << SYSCTRL_BOD12_ACTION_Pos)
|
||||
#define SYSCTRL_BOD12_ACTION(value) ((SYSCTRL_BOD12_ACTION_Msk & ((value) << SYSCTRL_BOD12_ACTION_Pos)))
|
||||
#define SYSCTRL_BOD12_RUNSTDBY_Pos 6 /**< \brief (SYSCTRL_BOD12) Run during Standby */
|
||||
#define SYSCTRL_BOD12_RUNSTDBY (0x1u << SYSCTRL_BOD12_RUNSTDBY_Pos)
|
||||
#define SYSCTRL_BOD12_MODE_Pos 8 /**< \brief (SYSCTRL_BOD12) Operation Modes */
|
||||
#define SYSCTRL_BOD12_MODE (0x1u << SYSCTRL_BOD12_MODE_Pos)
|
||||
#define SYSCTRL_BOD12_CEN_Pos 9 /**< \brief (SYSCTRL_BOD12) Clock Enable */
|
||||
#define SYSCTRL_BOD12_CEN (0x1u << SYSCTRL_BOD12_CEN_Pos)
|
||||
#define SYSCTRL_BOD12_PSEL_Pos 12 /**< \brief (SYSCTRL_BOD12) Prescaler Select */
|
||||
#define SYSCTRL_BOD12_PSEL_Msk (0xFu << SYSCTRL_BOD12_PSEL_Pos)
|
||||
#define SYSCTRL_BOD12_PSEL(value) ((SYSCTRL_BOD12_PSEL_Msk & ((value) << SYSCTRL_BOD12_PSEL_Pos)))
|
||||
#define SYSCTRL_BOD12_LEVEL_Pos 16 /**< \brief (SYSCTRL_BOD12) Threshold Level */
|
||||
#define SYSCTRL_BOD12_LEVEL_Msk (0x1Fu << SYSCTRL_BOD12_LEVEL_Pos)
|
||||
#define SYSCTRL_BOD12_LEVEL(value) ((SYSCTRL_BOD12_LEVEL_Msk & ((value) << SYSCTRL_BOD12_LEVEL_Pos)))
|
||||
#define SYSCTRL_BOD12_MASK 0x001FF35Eu /**< \brief (SYSCTRL_BOD12) MASK Register */
|
||||
|
||||
/* -------- SYSCTRL_VREG : (SYSCTRL Offset: 0x3C) (R/W 16) VREG Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t :1; /*!< bit: 0 Reserved */
|
||||
uint16_t ENABLE:1; /*!< bit: 1 Enable */
|
||||
uint16_t :2; /*!< bit: 2.. 3 Reserved */
|
||||
uint16_t VDDMON:2; /*!< bit: 4.. 5 Enable reset on core supply failure */
|
||||
uint16_t RUNSTDBY:1; /*!< bit: 6 Run during Standby */
|
||||
uint16_t :1; /*!< bit: 7 Reserved */
|
||||
uint16_t LEVEL:3; /*!< bit: 8..10 Output Voltage Level */
|
||||
uint16_t :1; /*!< bit: 11 Reserved */
|
||||
uint16_t CALIB:3; /*!< bit: 12..14 Calibration Value */
|
||||
uint16_t :1; /*!< bit: 15 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} SYSCTRL_VREG_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define SYSCTRL_VREG_OFFSET 0x3C /**< \brief (SYSCTRL_VREG offset) VREG Control Register */
|
||||
#define SYSCTRL_VREG_RESETVALUE 0x0000 /**< \brief (SYSCTRL_VREG reset_value) VREG Control Register */
|
||||
|
||||
#define SYSCTRL_VREG_ENABLE_Pos 1 /**< \brief (SYSCTRL_VREG) Enable */
|
||||
#define SYSCTRL_VREG_ENABLE (0x1u << SYSCTRL_VREG_ENABLE_Pos)
|
||||
#define SYSCTRL_VREG_VDDMON_Pos 4 /**< \brief (SYSCTRL_VREG) Enable reset on core supply failure */
|
||||
#define SYSCTRL_VREG_VDDMON_Msk (0x3u << SYSCTRL_VREG_VDDMON_Pos)
|
||||
#define SYSCTRL_VREG_VDDMON(value) ((SYSCTRL_VREG_VDDMON_Msk & ((value) << SYSCTRL_VREG_VDDMON_Pos)))
|
||||
#define SYSCTRL_VREG_RUNSTDBY_Pos 6 /**< \brief (SYSCTRL_VREG) Run during Standby */
|
||||
#define SYSCTRL_VREG_RUNSTDBY (0x1u << SYSCTRL_VREG_RUNSTDBY_Pos)
|
||||
#define SYSCTRL_VREG_LEVEL_Pos 8 /**< \brief (SYSCTRL_VREG) Output Voltage Level */
|
||||
#define SYSCTRL_VREG_LEVEL_Msk (0x7u << SYSCTRL_VREG_LEVEL_Pos)
|
||||
#define SYSCTRL_VREG_LEVEL(value) ((SYSCTRL_VREG_LEVEL_Msk & ((value) << SYSCTRL_VREG_LEVEL_Pos)))
|
||||
#define SYSCTRL_VREG_CALIB_Pos 12 /**< \brief (SYSCTRL_VREG) Calibration Value */
|
||||
#define SYSCTRL_VREG_CALIB_Msk (0x7u << SYSCTRL_VREG_CALIB_Pos)
|
||||
#define SYSCTRL_VREG_CALIB(value) ((SYSCTRL_VREG_CALIB_Msk & ((value) << SYSCTRL_VREG_CALIB_Pos)))
|
||||
#define SYSCTRL_VREG_MASK 0x7772u /**< \brief (SYSCTRL_VREG) MASK Register */
|
||||
|
||||
/* -------- SYSCTRL_VREF : (SYSCTRL Offset: 0x40) (R/W 32) VREF Control Register A -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t :1; /*!< bit: 0 Reserved */
|
||||
uint32_t TSEN:1; /*!< bit: 1 Temperature Sensor Output Enable */
|
||||
uint32_t BGOUTEN:1; /*!< bit: 2 Bandgap Output Enable */
|
||||
uint32_t :13; /*!< bit: 3..15 Reserved */
|
||||
uint32_t CALIB:11; /*!< bit: 16..26 Voltage Reference Calibration Value */
|
||||
uint32_t :5; /*!< bit: 27..31 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} SYSCTRL_VREF_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define SYSCTRL_VREF_OFFSET 0x40 /**< \brief (SYSCTRL_VREF offset) VREF Control Register A */
|
||||
#define SYSCTRL_VREF_RESETVALUE 0x00000000 /**< \brief (SYSCTRL_VREF reset_value) VREF Control Register A */
|
||||
|
||||
#define SYSCTRL_VREF_TSEN_Pos 1 /**< \brief (SYSCTRL_VREF) Temperature Sensor Output Enable */
|
||||
#define SYSCTRL_VREF_TSEN (0x1u << SYSCTRL_VREF_TSEN_Pos)
|
||||
#define SYSCTRL_VREF_BGOUTEN_Pos 2 /**< \brief (SYSCTRL_VREF) Bandgap Output Enable */
|
||||
#define SYSCTRL_VREF_BGOUTEN (0x1u << SYSCTRL_VREF_BGOUTEN_Pos)
|
||||
#define SYSCTRL_VREF_CALIB_Pos 16 /**< \brief (SYSCTRL_VREF) Voltage Reference Calibration Value */
|
||||
#define SYSCTRL_VREF_CALIB_Msk (0x7FFu << SYSCTRL_VREF_CALIB_Pos)
|
||||
#define SYSCTRL_VREF_CALIB(value) ((SYSCTRL_VREF_CALIB_Msk & ((value) << SYSCTRL_VREF_CALIB_Pos)))
|
||||
#define SYSCTRL_VREF_MASK 0x07FF0006u /**< \brief (SYSCTRL_VREF) MASK Register */
|
||||
|
||||
/** \brief SYSCTRL hardware registers */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef struct {
|
||||
__IO SYSCTRL_INTENCLR_Type INTENCLR; /**< \brief Offset: 0x00 (R/W 32) Interrupt Enable Clear Register */
|
||||
__IO SYSCTRL_INTENSET_Type INTENSET; /**< \brief Offset: 0x04 (R/W 32) Interrupt Enable Set Register */
|
||||
__IO SYSCTRL_INTFLAG_Type INTFLAG; /**< \brief Offset: 0x08 (R/W 32) Interrupt Flag Status and Clear Register */
|
||||
__I SYSCTRL_PCLKSR_Type PCLKSR; /**< \brief Offset: 0x0C (R/ 32) Power and Clocks Status Register */
|
||||
__IO SYSCTRL_XOSC_Type XOSC; /**< \brief Offset: 0x10 (R/W 16) XOSC Control Register */
|
||||
RoReg8 Reserved1[0x2];
|
||||
__IO SYSCTRL_XOSC32K_Type XOSC32K; /**< \brief Offset: 0x14 (R/W 16) XOSC32K Control Register */
|
||||
RoReg8 Reserved2[0x2];
|
||||
__IO SYSCTRL_OSC32K_Type OSC32K; /**< \brief Offset: 0x18 (R/W 32) OSC32K Control Register */
|
||||
__IO SYSCTRL_OSCULP32K_Type OSCULP32K; /**< \brief Offset: 0x1C (R/W 8) OSCULP32K Control Register */
|
||||
RoReg8 Reserved3[0x3];
|
||||
__IO SYSCTRL_OSC8M_Type OSC8M; /**< \brief Offset: 0x20 (R/W 32) OSC8M Control Register A */
|
||||
__IO SYSCTRL_DFLLCTRL_Type DFLLCTRL; /**< \brief Offset: 0x24 (R/W 16) DFLL Config Register */
|
||||
RoReg8 Reserved4[0x2];
|
||||
__IO SYSCTRL_DFLLVAL_Type DFLLVAL; /**< \brief Offset: 0x28 (R/W 32) DFLL Calibration Value Register */
|
||||
__IO SYSCTRL_DFLLMUL_Type DFLLMUL; /**< \brief Offset: 0x2C (R/W 32) DFLL Multiplier Register */
|
||||
__IO SYSCTRL_DFLLSYNC_Type DFLLSYNC; /**< \brief Offset: 0x30 (R/W 8) DFLL Synchronization Register */
|
||||
RoReg8 Reserved5[0x3];
|
||||
__IO SYSCTRL_BOD33_Type BOD33; /**< \brief Offset: 0x34 (R/W 32) BOD33 Control Register */
|
||||
__IO SYSCTRL_BOD12_Type BOD12; /**< \brief Offset: 0x38 (R/W 32) BOD12 Control Register */
|
||||
__IO SYSCTRL_VREG_Type VREG; /**< \brief Offset: 0x3C (R/W 16) VREG Control Register */
|
||||
RoReg8 Reserved6[0x2];
|
||||
__IO SYSCTRL_VREF_Type VREF; /**< \brief Offset: 0x40 (R/W 32) VREF Control Register A */
|
||||
} Sysctrl;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/*@}*/
|
||||
|
||||
#endif /* _SAMD20_SYSCTRL_COMPONENT_ */
|
|
@ -0,0 +1,607 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Component description for TC
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_TC_COMPONENT_
|
||||
#define _SAMD20_TC_COMPONENT_
|
||||
|
||||
/* ========================================================================== */
|
||||
/** SOFTWARE API DEFINITION FOR TC */
|
||||
/* ========================================================================== */
|
||||
/** \addtogroup SAMD20_TC Basic Timer Counter */
|
||||
/*@{*/
|
||||
|
||||
#define REV_TC 0x110
|
||||
|
||||
/* -------- TC_CTRLA : (TC Offset: 0x00) (R/W 16) Control A Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t SWRST:1; /*!< bit: 0 Software Reset */
|
||||
uint16_t ENABLE:1; /*!< bit: 1 Enable */
|
||||
uint16_t MODE:2; /*!< bit: 2.. 3 Timer Counter Mode */
|
||||
uint16_t :1; /*!< bit: 4 Reserved */
|
||||
uint16_t WAVEGEN:2; /*!< bit: 5.. 6 Waveform Generation Operation */
|
||||
uint16_t :1; /*!< bit: 7 Reserved */
|
||||
uint16_t PRESCALER:3; /*!< bit: 8..10 Prescaler */
|
||||
uint16_t RUNSTDBY:1; /*!< bit: 11 Run during Standby */
|
||||
uint16_t PRESCSYNC:2; /*!< bit: 12..13 Prescaler and Counter Synchronization */
|
||||
uint16_t :2; /*!< bit: 14..15 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} TC_CTRLA_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define TC_CTRLA_OFFSET 0x00 /**< \brief (TC_CTRLA offset) Control A Register */
|
||||
#define TC_CTRLA_RESETVALUE 0x0000 /**< \brief (TC_CTRLA reset_value) Control A Register */
|
||||
|
||||
#define TC_CTRLA_SWRST_Pos 0 /**< \brief (TC_CTRLA) Software Reset */
|
||||
#define TC_CTRLA_SWRST (0x1u << TC_CTRLA_SWRST_Pos)
|
||||
#define TC_CTRLA_ENABLE_Pos 1 /**< \brief (TC_CTRLA) Enable */
|
||||
#define TC_CTRLA_ENABLE (0x1u << TC_CTRLA_ENABLE_Pos)
|
||||
#define TC_CTRLA_MODE_Pos 2 /**< \brief (TC_CTRLA) Timer Counter Mode */
|
||||
#define TC_CTRLA_MODE_Msk (0x3u << TC_CTRLA_MODE_Pos)
|
||||
#define TC_CTRLA_MODE(value) ((TC_CTRLA_MODE_Msk & ((value) << TC_CTRLA_MODE_Pos)))
|
||||
#define TC_CTRLA_MODE_COUNT16 (0x0u << 2) /**< \brief (TC_CTRLA) */
|
||||
#define TC_CTRLA_MODE_COUNT8 (0x1u << 2) /**< \brief (TC_CTRLA) */
|
||||
#define TC_CTRLA_MODE_COUNT32 (0x2u << 2) /**< \brief (TC_CTRLA) */
|
||||
#define TC_CTRLA_WAVEGEN_Pos 5 /**< \brief (TC_CTRLA) Waveform Generation Operation */
|
||||
#define TC_CTRLA_WAVEGEN_Msk (0x3u << TC_CTRLA_WAVEGEN_Pos)
|
||||
#define TC_CTRLA_WAVEGEN(value) ((TC_CTRLA_WAVEGEN_Msk & ((value) << TC_CTRLA_WAVEGEN_Pos)))
|
||||
#define TC_CTRLA_WAVEGEN_NFRQ (0x0u << 5) /**< \brief (TC_CTRLA) */
|
||||
#define TC_CTRLA_WAVEGEN_MFRQ (0x1u << 5) /**< \brief (TC_CTRLA) */
|
||||
#define TC_CTRLA_WAVEGEN_NPWM (0x2u << 5) /**< \brief (TC_CTRLA) */
|
||||
#define TC_CTRLA_WAVEGEN_MPWM (0x3u << 5) /**< \brief (TC_CTRLA) */
|
||||
#define TC_CTRLA_PRESCALER_Pos 8 /**< \brief (TC_CTRLA) Prescaler */
|
||||
#define TC_CTRLA_PRESCALER_Msk (0x7u << TC_CTRLA_PRESCALER_Pos)
|
||||
#define TC_CTRLA_PRESCALER(value) ((TC_CTRLA_PRESCALER_Msk & ((value) << TC_CTRLA_PRESCALER_Pos)))
|
||||
#define TC_CTRLA_RUNSTDBY_Pos 11 /**< \brief (TC_CTRLA) Run during Standby */
|
||||
#define TC_CTRLA_RUNSTDBY (0x1u << TC_CTRLA_RUNSTDBY_Pos)
|
||||
#define TC_CTRLA_PRESCSYNC_Pos 12 /**< \brief (TC_CTRLA) Prescaler and Counter Synchronization */
|
||||
#define TC_CTRLA_PRESCSYNC_Msk (0x3u << TC_CTRLA_PRESCSYNC_Pos)
|
||||
#define TC_CTRLA_PRESCSYNC(value) ((TC_CTRLA_PRESCSYNC_Msk & ((value) << TC_CTRLA_PRESCSYNC_Pos)))
|
||||
#define TC_CTRLA_PRESCSYNC_GCLK (0x0u << 12) /**< \brief (TC_CTRLA) */
|
||||
#define TC_CTRLA_PRESCSYNC_PRESC (0x1u << 12) /**< \brief (TC_CTRLA) */
|
||||
#define TC_CTRLA_PRESCSYNC_RESYNC (0x2u << 12) /**< \brief (TC_CTRLA) */
|
||||
#define TC_CTRLA_MASK 0x3F6Fu /**< \brief (TC_CTRLA) MASK Register */
|
||||
|
||||
/* -------- TC_READREQ : (TC Offset: 0x02) (R/W 16) Read Request Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t ADDR:5; /*!< bit: 0.. 4 Address */
|
||||
uint16_t :9; /*!< bit: 5..13 Reserved */
|
||||
uint16_t RCONT:1; /*!< bit: 14 Read Continuously */
|
||||
uint16_t RREQ:1; /*!< bit: 15 Read Request */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} TC_READREQ_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define TC_READREQ_OFFSET 0x02 /**< \brief (TC_READREQ offset) Read Request Register */
|
||||
#define TC_READREQ_RESETVALUE 0x0000 /**< \brief (TC_READREQ reset_value) Read Request Register */
|
||||
|
||||
#define TC_READREQ_ADDR_Pos 0 /**< \brief (TC_READREQ) Address */
|
||||
#define TC_READREQ_ADDR_Msk (0x1Fu << TC_READREQ_ADDR_Pos)
|
||||
#define TC_READREQ_ADDR(value) ((TC_READREQ_ADDR_Msk & ((value) << TC_READREQ_ADDR_Pos)))
|
||||
#define TC_READREQ_RCONT_Pos 14 /**< \brief (TC_READREQ) Read Continuously */
|
||||
#define TC_READREQ_RCONT (0x1u << TC_READREQ_RCONT_Pos)
|
||||
#define TC_READREQ_RREQ_Pos 15 /**< \brief (TC_READREQ) Read Request */
|
||||
#define TC_READREQ_RREQ (0x1u << TC_READREQ_RREQ_Pos)
|
||||
#define TC_READREQ_MASK 0xC01Fu /**< \brief (TC_READREQ) MASK Register */
|
||||
|
||||
/* -------- TC_CTRLBCLR : (TC Offset: 0x04) (R/W 8) Control B Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t DIR:1; /*!< bit: 0 Counter Direction */
|
||||
uint8_t :1; /*!< bit: 1 Reserved */
|
||||
uint8_t ONESHOT:1; /*!< bit: 2 One-Shot on Counter */
|
||||
uint8_t :3; /*!< bit: 3.. 5 Reserved */
|
||||
uint8_t CMD:2; /*!< bit: 6.. 7 Command */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} TC_CTRLBCLR_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define TC_CTRLBCLR_OFFSET 0x04 /**< \brief (TC_CTRLBCLR offset) Control B Clear Register */
|
||||
#define TC_CTRLBCLR_RESETVALUE 0x02 /**< \brief (TC_CTRLBCLR reset_value) Control B Clear Register */
|
||||
|
||||
#define TC_CTRLBCLR_DIR_Pos 0 /**< \brief (TC_CTRLBCLR) Counter Direction */
|
||||
#define TC_CTRLBCLR_DIR (0x1u << TC_CTRLBCLR_DIR_Pos)
|
||||
#define TC_CTRLBCLR_ONESHOT_Pos 2 /**< \brief (TC_CTRLBCLR) One-Shot on Counter */
|
||||
#define TC_CTRLBCLR_ONESHOT (0x1u << TC_CTRLBCLR_ONESHOT_Pos)
|
||||
#define TC_CTRLBCLR_CMD_Pos 6 /**< \brief (TC_CTRLBCLR) Command */
|
||||
#define TC_CTRLBCLR_CMD_Msk (0x3u << TC_CTRLBCLR_CMD_Pos)
|
||||
#define TC_CTRLBCLR_CMD(value) ((TC_CTRLBCLR_CMD_Msk & ((value) << TC_CTRLBCLR_CMD_Pos)))
|
||||
#define TC_CTRLBCLR_CMD_NONE (0x0u << 6) /**< \brief (TC_CTRLBCLR) */
|
||||
#define TC_CTRLBCLR_CMD_RETRIGGER (0x1u << 6) /**< \brief (TC_CTRLBCLR) */
|
||||
#define TC_CTRLBCLR_CMD_STOP (0x2u << 6) /**< \brief (TC_CTRLBCLR) */
|
||||
#define TC_CTRLBCLR_MASK 0xC5u /**< \brief (TC_CTRLBCLR) MASK Register */
|
||||
|
||||
/* -------- TC_CTRLBSET : (TC Offset: 0x05) (R/W 8) Control B Set Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t DIR:1; /*!< bit: 0 Counter Direction */
|
||||
uint8_t :1; /*!< bit: 1 Reserved */
|
||||
uint8_t ONESHOT:1; /*!< bit: 2 One-Shot on Counter */
|
||||
uint8_t :3; /*!< bit: 3.. 5 Reserved */
|
||||
uint8_t CMD:2; /*!< bit: 6.. 7 Command */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} TC_CTRLBSET_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define TC_CTRLBSET_OFFSET 0x05 /**< \brief (TC_CTRLBSET offset) Control B Set Register */
|
||||
#define TC_CTRLBSET_RESETVALUE 0x00 /**< \brief (TC_CTRLBSET reset_value) Control B Set Register */
|
||||
|
||||
#define TC_CTRLBSET_DIR_Pos 0 /**< \brief (TC_CTRLBSET) Counter Direction */
|
||||
#define TC_CTRLBSET_DIR (0x1u << TC_CTRLBSET_DIR_Pos)
|
||||
#define TC_CTRLBSET_ONESHOT_Pos 2 /**< \brief (TC_CTRLBSET) One-Shot on Counter */
|
||||
#define TC_CTRLBSET_ONESHOT (0x1u << TC_CTRLBSET_ONESHOT_Pos)
|
||||
#define TC_CTRLBSET_CMD_Pos 6 /**< \brief (TC_CTRLBSET) Command */
|
||||
#define TC_CTRLBSET_CMD_Msk (0x3u << TC_CTRLBSET_CMD_Pos)
|
||||
#define TC_CTRLBSET_CMD(value) ((TC_CTRLBSET_CMD_Msk & ((value) << TC_CTRLBSET_CMD_Pos)))
|
||||
#define TC_CTRLBSET_CMD_NONE (0x0u << 6) /**< \brief (TC_CTRLBSET) */
|
||||
#define TC_CTRLBSET_CMD_RETRIGGER (0x1u << 6) /**< \brief (TC_CTRLBSET) */
|
||||
#define TC_CTRLBSET_CMD_STOP (0x2u << 6) /**< \brief (TC_CTRLBSET) */
|
||||
#define TC_CTRLBSET_MASK 0xC5u /**< \brief (TC_CTRLBSET) MASK Register */
|
||||
|
||||
/* -------- TC_CTRLC : (TC Offset: 0x06) (R/W 8) Control C Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t INVEN:2; /*!< bit: 0.. 1 Output Waveform Invert Enable */
|
||||
uint8_t :2; /*!< bit: 2.. 3 Reserved */
|
||||
uint8_t CPTEN:2; /*!< bit: 4.. 5 Capture Channel Enable */
|
||||
uint8_t :2; /*!< bit: 6.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} TC_CTRLC_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define TC_CTRLC_OFFSET 0x06 /**< \brief (TC_CTRLC offset) Control C Register */
|
||||
#define TC_CTRLC_RESETVALUE 0x00 /**< \brief (TC_CTRLC reset_value) Control C Register */
|
||||
|
||||
#define TC_CTRLC_INVEN_Pos 0 /**< \brief (TC_CTRLC) Output Waveform Invert Enable */
|
||||
#define TC_CTRLC_INVEN_Msk (0x3u << TC_CTRLC_INVEN_Pos)
|
||||
#define TC_CTRLC_INVEN(value) ((TC_CTRLC_INVEN_Msk & ((value) << TC_CTRLC_INVEN_Pos)))
|
||||
#define TC_CTRLC_CPTEN_Pos 4 /**< \brief (TC_CTRLC) Capture Channel Enable */
|
||||
#define TC_CTRLC_CPTEN_Msk (0x3u << TC_CTRLC_CPTEN_Pos)
|
||||
#define TC_CTRLC_CPTEN(value) ((TC_CTRLC_CPTEN_Msk & ((value) << TC_CTRLC_CPTEN_Pos)))
|
||||
#define TC_CTRLC_MASK 0x33u /**< \brief (TC_CTRLC) MASK Register */
|
||||
|
||||
/* -------- TC_DBGCTRL : (TC Offset: 0x08) (R/W 8) Debug Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t DBGRUN:1; /*!< bit: 0 Run During Debug */
|
||||
uint8_t :7; /*!< bit: 1.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} TC_DBGCTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define TC_DBGCTRL_OFFSET 0x08 /**< \brief (TC_DBGCTRL offset) Debug Register */
|
||||
#define TC_DBGCTRL_RESETVALUE 0x00 /**< \brief (TC_DBGCTRL reset_value) Debug Register */
|
||||
|
||||
#define TC_DBGCTRL_DBGRUN_Pos 0 /**< \brief (TC_DBGCTRL) Run During Debug */
|
||||
#define TC_DBGCTRL_DBGRUN (0x1u << TC_DBGCTRL_DBGRUN_Pos)
|
||||
#define TC_DBGCTRL_MASK 0x01u /**< \brief (TC_DBGCTRL) MASK Register */
|
||||
|
||||
/* -------- TC_EVCTRL : (TC Offset: 0x0A) (R/W 16) Event Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t EVACT:3; /*!< bit: 0.. 2 Event Action */
|
||||
uint16_t :1; /*!< bit: 3 Reserved */
|
||||
uint16_t TCINV:1; /*!< bit: 4 TC Event Input Polarity */
|
||||
uint16_t TCEI:1; /*!< bit: 5 TC Event Enable */
|
||||
uint16_t :2; /*!< bit: 6.. 7 Reserved */
|
||||
uint16_t OVFEO:1; /*!< bit: 8 Event Output Enable */
|
||||
uint16_t :3; /*!< bit: 9..11 Reserved */
|
||||
uint16_t MCEO:2; /*!< bit: 12..13 MC Event Output Enable */
|
||||
uint16_t :2; /*!< bit: 14..15 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} TC_EVCTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define TC_EVCTRL_OFFSET 0x0A /**< \brief (TC_EVCTRL offset) Event Control Register */
|
||||
#define TC_EVCTRL_RESETVALUE 0x0000 /**< \brief (TC_EVCTRL reset_value) Event Control Register */
|
||||
|
||||
#define TC_EVCTRL_EVACT_Pos 0 /**< \brief (TC_EVCTRL) Event Action */
|
||||
#define TC_EVCTRL_EVACT_Msk (0x7u << TC_EVCTRL_EVACT_Pos)
|
||||
#define TC_EVCTRL_EVACT(value) ((TC_EVCTRL_EVACT_Msk & ((value) << TC_EVCTRL_EVACT_Pos)))
|
||||
#define TC_EVCTRL_EVACT_OFF (0x0u << 0) /**< \brief (TC_EVCTRL) */
|
||||
#define TC_EVCTRL_EVACT_RETRIGGER (0x1u << 0) /**< \brief (TC_EVCTRL) */
|
||||
#define TC_EVCTRL_EVACT_COUNT (0x2u << 0) /**< \brief (TC_EVCTRL) */
|
||||
#define TC_EVCTRL_EVACT_START (0x3u << 0) /**< \brief (TC_EVCTRL) */
|
||||
#define TC_EVCTRL_EVACT_PPW (0x5u << 0) /**< \brief (TC_EVCTRL) */
|
||||
#define TC_EVCTRL_EVACT_PWP (0x6u << 0) /**< \brief (TC_EVCTRL) */
|
||||
#define TC_EVCTRL_TCINV_Pos 4 /**< \brief (TC_EVCTRL) TC Event Input Polarity */
|
||||
#define TC_EVCTRL_TCINV (0x1u << TC_EVCTRL_TCINV_Pos)
|
||||
#define TC_EVCTRL_TCEI_Pos 5 /**< \brief (TC_EVCTRL) TC Event Enable */
|
||||
#define TC_EVCTRL_TCEI (0x1u << TC_EVCTRL_TCEI_Pos)
|
||||
#define TC_EVCTRL_OVFEO_Pos 8 /**< \brief (TC_EVCTRL) Event Output Enable */
|
||||
#define TC_EVCTRL_OVFEO (0x1u << TC_EVCTRL_OVFEO_Pos)
|
||||
#define TC_EVCTRL_MCEO_Pos 12 /**< \brief (TC_EVCTRL) MC Event Output Enable */
|
||||
#define TC_EVCTRL_MCEO_Msk (0x3u << TC_EVCTRL_MCEO_Pos)
|
||||
#define TC_EVCTRL_MCEO(value) ((TC_EVCTRL_MCEO_Msk & ((value) << TC_EVCTRL_MCEO_Pos)))
|
||||
#define TC_EVCTRL_MASK 0x3137u /**< \brief (TC_EVCTRL) MASK Register */
|
||||
|
||||
/* -------- TC_INTENCLR : (TC Offset: 0x0C) (R/W 8) Interrupt Enable Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t OVF:1; /*!< bit: 0 OVF Interrupt Disable */
|
||||
uint8_t ERR:1; /*!< bit: 1 ERR Interrupt Disable */
|
||||
uint8_t :1; /*!< bit: 2 Reserved */
|
||||
uint8_t SYNCRDY:1; /*!< bit: 3 READY Interrupt Disable */
|
||||
uint8_t MC:2; /*!< bit: 4.. 5 MC Interrupt Disable */
|
||||
uint8_t :2; /*!< bit: 6.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} TC_INTENCLR_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define TC_INTENCLR_OFFSET 0x0C /**< \brief (TC_INTENCLR offset) Interrupt Enable Clear Register */
|
||||
#define TC_INTENCLR_RESETVALUE 0x00 /**< \brief (TC_INTENCLR reset_value) Interrupt Enable Clear Register */
|
||||
|
||||
#define TC_INTENCLR_OVF_Pos 0 /**< \brief (TC_INTENCLR) OVF Interrupt Disable */
|
||||
#define TC_INTENCLR_OVF (0x1u << TC_INTENCLR_OVF_Pos)
|
||||
#define TC_INTENCLR_ERR_Pos 1 /**< \brief (TC_INTENCLR) ERR Interrupt Disable */
|
||||
#define TC_INTENCLR_ERR (0x1u << TC_INTENCLR_ERR_Pos)
|
||||
#define TC_INTENCLR_SYNCRDY_Pos 3 /**< \brief (TC_INTENCLR) READY Interrupt Disable */
|
||||
#define TC_INTENCLR_SYNCRDY (0x1u << TC_INTENCLR_SYNCRDY_Pos)
|
||||
#define TC_INTENCLR_MC_Pos 4 /**< \brief (TC_INTENCLR) MC Interrupt Disable */
|
||||
#define TC_INTENCLR_MC_Msk (0x3u << TC_INTENCLR_MC_Pos)
|
||||
#define TC_INTENCLR_MC(value) ((TC_INTENCLR_MC_Msk & ((value) << TC_INTENCLR_MC_Pos)))
|
||||
#define TC_INTENCLR_MASK 0x3Bu /**< \brief (TC_INTENCLR) MASK Register */
|
||||
|
||||
/* -------- TC_INTENSET : (TC Offset: 0x0D) (R/W 8) Interrupt Enable Set Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t OVF:1; /*!< bit: 0 OVF Interrupt Enable */
|
||||
uint8_t ERR:1; /*!< bit: 1 ERR Interrupt Enable */
|
||||
uint8_t :1; /*!< bit: 2 Reserved */
|
||||
uint8_t SYNCRDY:1; /*!< bit: 3 READY Interrupt Enable */
|
||||
uint8_t MC:2; /*!< bit: 4.. 5 MC Interrupt Enable */
|
||||
uint8_t :2; /*!< bit: 6.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} TC_INTENSET_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define TC_INTENSET_OFFSET 0x0D /**< \brief (TC_INTENSET offset) Interrupt Enable Set Register */
|
||||
#define TC_INTENSET_RESETVALUE 0x00 /**< \brief (TC_INTENSET reset_value) Interrupt Enable Set Register */
|
||||
|
||||
#define TC_INTENSET_OVF_Pos 0 /**< \brief (TC_INTENSET) OVF Interrupt Enable */
|
||||
#define TC_INTENSET_OVF (0x1u << TC_INTENSET_OVF_Pos)
|
||||
#define TC_INTENSET_ERR_Pos 1 /**< \brief (TC_INTENSET) ERR Interrupt Enable */
|
||||
#define TC_INTENSET_ERR (0x1u << TC_INTENSET_ERR_Pos)
|
||||
#define TC_INTENSET_SYNCRDY_Pos 3 /**< \brief (TC_INTENSET) READY Interrupt Enable */
|
||||
#define TC_INTENSET_SYNCRDY (0x1u << TC_INTENSET_SYNCRDY_Pos)
|
||||
#define TC_INTENSET_MC_Pos 4 /**< \brief (TC_INTENSET) MC Interrupt Enable */
|
||||
#define TC_INTENSET_MC_Msk (0x3u << TC_INTENSET_MC_Pos)
|
||||
#define TC_INTENSET_MC(value) ((TC_INTENSET_MC_Msk & ((value) << TC_INTENSET_MC_Pos)))
|
||||
#define TC_INTENSET_MASK 0x3Bu /**< \brief (TC_INTENSET) MASK Register */
|
||||
|
||||
/* -------- TC_INTFLAG : (TC Offset: 0x0E) (R/W 8) Interrupt Flag Status and Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t OVF:1; /*!< bit: 0 OVF Interrupt Flag */
|
||||
uint8_t ERR:1; /*!< bit: 1 ERR Interrupt Flag */
|
||||
uint8_t :1; /*!< bit: 2 Reserved */
|
||||
uint8_t SYNCRDY:1; /*!< bit: 3 READY Interrupt Flag */
|
||||
uint8_t MC:2; /*!< bit: 4.. 5 MC Interrupt Flag */
|
||||
uint8_t :2; /*!< bit: 6.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} TC_INTFLAG_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define TC_INTFLAG_OFFSET 0x0E /**< \brief (TC_INTFLAG offset) Interrupt Flag Status and Clear Register */
|
||||
#define TC_INTFLAG_RESETVALUE 0x00 /**< \brief (TC_INTFLAG reset_value) Interrupt Flag Status and Clear Register */
|
||||
|
||||
#define TC_INTFLAG_OVF_Pos 0 /**< \brief (TC_INTFLAG) OVF Interrupt Flag */
|
||||
#define TC_INTFLAG_OVF (0x1u << TC_INTFLAG_OVF_Pos)
|
||||
#define TC_INTFLAG_ERR_Pos 1 /**< \brief (TC_INTFLAG) ERR Interrupt Flag */
|
||||
#define TC_INTFLAG_ERR (0x1u << TC_INTFLAG_ERR_Pos)
|
||||
#define TC_INTFLAG_SYNCRDY_Pos 3 /**< \brief (TC_INTFLAG) READY Interrupt Flag */
|
||||
#define TC_INTFLAG_SYNCRDY (0x1u << TC_INTFLAG_SYNCRDY_Pos)
|
||||
#define TC_INTFLAG_MC_Pos 4 /**< \brief (TC_INTFLAG) MC Interrupt Flag */
|
||||
#define TC_INTFLAG_MC_Msk (0x3u << TC_INTFLAG_MC_Pos)
|
||||
#define TC_INTFLAG_MC(value) ((TC_INTFLAG_MC_Msk & ((value) << TC_INTFLAG_MC_Pos)))
|
||||
#define TC_INTFLAG_MASK 0x3Bu /**< \brief (TC_INTFLAG) MASK Register */
|
||||
|
||||
/* -------- TC_STATUS : (TC Offset: 0x0F) (R/ 8) Status Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t :3; /*!< bit: 0.. 2 Reserved */
|
||||
uint8_t STOP:1; /*!< bit: 3 Stop Status Flag */
|
||||
uint8_t SLAVE:1; /*!< bit: 4 Slave Status Flag */
|
||||
uint8_t :2; /*!< bit: 5.. 6 Reserved */
|
||||
uint8_t SYNCBUSY:1; /*!< bit: 7 Synchronization Busy Status */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} TC_STATUS_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define TC_STATUS_OFFSET 0x0F /**< \brief (TC_STATUS offset) Status Register */
|
||||
#define TC_STATUS_RESETVALUE 0x08 /**< \brief (TC_STATUS reset_value) Status Register */
|
||||
|
||||
#define TC_STATUS_STOP_Pos 3 /**< \brief (TC_STATUS) Stop Status Flag */
|
||||
#define TC_STATUS_STOP (0x1u << TC_STATUS_STOP_Pos)
|
||||
#define TC_STATUS_SLAVE_Pos 4 /**< \brief (TC_STATUS) Slave Status Flag */
|
||||
#define TC_STATUS_SLAVE (0x1u << TC_STATUS_SLAVE_Pos)
|
||||
#define TC_STATUS_SYNCBUSY_Pos 7 /**< \brief (TC_STATUS) Synchronization Busy Status */
|
||||
#define TC_STATUS_SYNCBUSY (0x1u << TC_STATUS_SYNCBUSY_Pos)
|
||||
#define TC_STATUS_MASK 0x98u /**< \brief (TC_STATUS) MASK Register */
|
||||
|
||||
/* -------- TC_COUNT8_COUNT : (TC Offset: 0x10) (R/W 8) COUNT8 COUNT8 Count Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t COUNT:8; /*!< bit: 0.. 7 Counter Value */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} TC_COUNT8_COUNT_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define TC_COUNT8_COUNT_OFFSET 0x10 /**< \brief (TC_COUNT8_COUNT offset) COUNT8 Count Register */
|
||||
#define TC_COUNT8_COUNT_RESETVALUE 0x00 /**< \brief (TC_COUNT8_COUNT reset_value) COUNT8 Count Register */
|
||||
|
||||
#define TC_COUNT8_COUNT_COUNT_Pos 0 /**< \brief (TC_COUNT8_COUNT) Counter Value */
|
||||
#define TC_COUNT8_COUNT_COUNT_Msk (0xFFu << TC_COUNT8_COUNT_COUNT_Pos)
|
||||
#define TC_COUNT8_COUNT_COUNT(value) ((TC_COUNT8_COUNT_COUNT_Msk & ((value) << TC_COUNT8_COUNT_COUNT_Pos)))
|
||||
#define TC_COUNT8_COUNT_MASK 0xFFu /**< \brief (TC_COUNT8_COUNT) MASK Register */
|
||||
|
||||
/* -------- TC_COUNT16_COUNT : (TC Offset: 0x10) (R/W 16) COUNT16 COUNT16 Count Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t COUNT:16; /*!< bit: 0..15 Counter Value */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} TC_COUNT16_COUNT_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define TC_COUNT16_COUNT_OFFSET 0x10 /**< \brief (TC_COUNT16_COUNT offset) COUNT16 Count Register */
|
||||
#define TC_COUNT16_COUNT_RESETVALUE 0x0000 /**< \brief (TC_COUNT16_COUNT reset_value) COUNT16 Count Register */
|
||||
|
||||
#define TC_COUNT16_COUNT_COUNT_Pos 0 /**< \brief (TC_COUNT16_COUNT) Counter Value */
|
||||
#define TC_COUNT16_COUNT_COUNT_Msk (0xFFFFu << TC_COUNT16_COUNT_COUNT_Pos)
|
||||
#define TC_COUNT16_COUNT_COUNT(value) ((TC_COUNT16_COUNT_COUNT_Msk & ((value) << TC_COUNT16_COUNT_COUNT_Pos)))
|
||||
#define TC_COUNT16_COUNT_MASK 0xFFFFu /**< \brief (TC_COUNT16_COUNT) MASK Register */
|
||||
|
||||
/* -------- TC_COUNT32_COUNT : (TC Offset: 0x10) (R/W 32) COUNT32 COUNT32 Count Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t COUNT:32; /*!< bit: 0..31 Counter Value */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} TC_COUNT32_COUNT_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define TC_COUNT32_COUNT_OFFSET 0x10 /**< \brief (TC_COUNT32_COUNT offset) COUNT32 Count Register */
|
||||
#define TC_COUNT32_COUNT_RESETVALUE 0x00000000 /**< \brief (TC_COUNT32_COUNT reset_value) COUNT32 Count Register */
|
||||
|
||||
#define TC_COUNT32_COUNT_COUNT_Pos 0 /**< \brief (TC_COUNT32_COUNT) Counter Value */
|
||||
#define TC_COUNT32_COUNT_COUNT_Msk (0xFFFFFFFFu << TC_COUNT32_COUNT_COUNT_Pos)
|
||||
#define TC_COUNT32_COUNT_COUNT(value) ((TC_COUNT32_COUNT_COUNT_Msk & ((value) << TC_COUNT32_COUNT_COUNT_Pos)))
|
||||
#define TC_COUNT32_COUNT_MASK 0xFFFFFFFFu /**< \brief (TC_COUNT32_COUNT) MASK Register */
|
||||
|
||||
/* -------- TC_COUNT8_PER : (TC Offset: 0x14) (R/W 8) COUNT8 COUNT8 Period Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t PER:8; /*!< bit: 0.. 7 Period Value */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} TC_COUNT8_PER_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define TC_COUNT8_PER_OFFSET 0x14 /**< \brief (TC_COUNT8_PER offset) COUNT8 Period Register */
|
||||
#define TC_COUNT8_PER_RESETVALUE 0xFF /**< \brief (TC_COUNT8_PER reset_value) COUNT8 Period Register */
|
||||
|
||||
#define TC_COUNT8_PER_PER_Pos 0 /**< \brief (TC_COUNT8_PER) Period Value */
|
||||
#define TC_COUNT8_PER_PER_Msk (0xFFu << TC_COUNT8_PER_PER_Pos)
|
||||
#define TC_COUNT8_PER_PER(value) ((TC_COUNT8_PER_PER_Msk & ((value) << TC_COUNT8_PER_PER_Pos)))
|
||||
#define TC_COUNT8_PER_MASK 0xFFu /**< \brief (TC_COUNT8_PER) MASK Register */
|
||||
|
||||
/* -------- TC_COUNT32_PER : (TC Offset: 0x14) (R/W 32) COUNT32 COUNT32 Period Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t PER:32; /*!< bit: 0..31 Period Value */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} TC_COUNT32_PER_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define TC_COUNT32_PER_OFFSET 0x14 /**< \brief (TC_COUNT32_PER offset) COUNT32 Period Register */
|
||||
#define TC_COUNT32_PER_RESETVALUE 0x00000000 /**< \brief (TC_COUNT32_PER reset_value) COUNT32 Period Register */
|
||||
|
||||
#define TC_COUNT32_PER_PER_Pos 0 /**< \brief (TC_COUNT32_PER) Period Value */
|
||||
#define TC_COUNT32_PER_PER_Msk (0xFFFFFFFFu << TC_COUNT32_PER_PER_Pos)
|
||||
#define TC_COUNT32_PER_PER(value) ((TC_COUNT32_PER_PER_Msk & ((value) << TC_COUNT32_PER_PER_Pos)))
|
||||
#define TC_COUNT32_PER_MASK 0xFFFFFFFFu /**< \brief (TC_COUNT32_PER) MASK Register */
|
||||
|
||||
/* -------- TC_COUNT8_CC : (TC Offset: 0x18) (R/W 8) COUNT8 COUNT8 Compare and Capture Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t CC:8; /*!< bit: 0.. 7 Counter/Compare Value */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} TC_COUNT8_CC_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define TC_COUNT8_CC_OFFSET 0x18 /**< \brief (TC_COUNT8_CC offset) COUNT8 Compare and Capture Register */
|
||||
#define TC_COUNT8_CC_RESETVALUE 0x00 /**< \brief (TC_COUNT8_CC reset_value) COUNT8 Compare and Capture Register */
|
||||
|
||||
#define TC_COUNT8_CC_CC_Pos 0 /**< \brief (TC_COUNT8_CC) Counter/Compare Value */
|
||||
#define TC_COUNT8_CC_CC_Msk (0xFFu << TC_COUNT8_CC_CC_Pos)
|
||||
#define TC_COUNT8_CC_CC(value) ((TC_COUNT8_CC_CC_Msk & ((value) << TC_COUNT8_CC_CC_Pos)))
|
||||
#define TC_COUNT8_CC_MASK 0xFFu /**< \brief (TC_COUNT8_CC) MASK Register */
|
||||
|
||||
/* -------- TC_COUNT16_CC : (TC Offset: 0x18) (R/W 16) COUNT16 COUNT16 Compare and Capture Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint16_t CC:16; /*!< bit: 0..15 Counter/Compare Value */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint16_t reg; /*!< Type used for register access */
|
||||
} TC_COUNT16_CC_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define TC_COUNT16_CC_OFFSET 0x18 /**< \brief (TC_COUNT16_CC offset) COUNT16 Compare and Capture Register */
|
||||
#define TC_COUNT16_CC_RESETVALUE 0x0000 /**< \brief (TC_COUNT16_CC reset_value) COUNT16 Compare and Capture Register */
|
||||
|
||||
#define TC_COUNT16_CC_CC_Pos 0 /**< \brief (TC_COUNT16_CC) Counter/Compare Value */
|
||||
#define TC_COUNT16_CC_CC_Msk (0xFFFFu << TC_COUNT16_CC_CC_Pos)
|
||||
#define TC_COUNT16_CC_CC(value) ((TC_COUNT16_CC_CC_Msk & ((value) << TC_COUNT16_CC_CC_Pos)))
|
||||
#define TC_COUNT16_CC_MASK 0xFFFFu /**< \brief (TC_COUNT16_CC) MASK Register */
|
||||
|
||||
/* -------- TC_COUNT32_CC : (TC Offset: 0x18) (R/W 32) COUNT32 COUNT32 Compare and Capture Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t CC:32; /*!< bit: 0..31 Counter/Compare Value */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint32_t reg; /*!< Type used for register access */
|
||||
} TC_COUNT32_CC_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define TC_COUNT32_CC_OFFSET 0x18 /**< \brief (TC_COUNT32_CC offset) COUNT32 Compare and Capture Register */
|
||||
#define TC_COUNT32_CC_RESETVALUE 0x00000000 /**< \brief (TC_COUNT32_CC reset_value) COUNT32 Compare and Capture Register */
|
||||
|
||||
#define TC_COUNT32_CC_CC_Pos 0 /**< \brief (TC_COUNT32_CC) Counter/Compare Value */
|
||||
#define TC_COUNT32_CC_CC_Msk (0xFFFFFFFFu << TC_COUNT32_CC_CC_Pos)
|
||||
#define TC_COUNT32_CC_CC(value) ((TC_COUNT32_CC_CC_Msk & ((value) << TC_COUNT32_CC_CC_Pos)))
|
||||
#define TC_COUNT32_CC_MASK 0xFFFFFFFFu /**< \brief (TC_COUNT32_CC) MASK Register */
|
||||
|
||||
/** \brief TC_COUNT8 hardware registers */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef struct { /* 8-bit Counter Mode */
|
||||
__IO TC_CTRLA_Type CTRLA; /**< \brief Offset: 0x00 (R/W 16) Control A Register */
|
||||
__IO TC_READREQ_Type READREQ; /**< \brief Offset: 0x02 (R/W 16) Read Request Register */
|
||||
__IO TC_CTRLBCLR_Type CTRLBCLR; /**< \brief Offset: 0x04 (R/W 8) Control B Clear Register */
|
||||
__IO TC_CTRLBSET_Type CTRLBSET; /**< \brief Offset: 0x05 (R/W 8) Control B Set Register */
|
||||
__IO TC_CTRLC_Type CTRLC; /**< \brief Offset: 0x06 (R/W 8) Control C Register */
|
||||
RoReg8 Reserved1[0x1];
|
||||
__IO TC_DBGCTRL_Type DBGCTRL; /**< \brief Offset: 0x08 (R/W 8) Debug Register */
|
||||
RoReg8 Reserved2[0x1];
|
||||
__IO TC_EVCTRL_Type EVCTRL; /**< \brief Offset: 0x0A (R/W 16) Event Control Register */
|
||||
__IO TC_INTENCLR_Type INTENCLR; /**< \brief Offset: 0x0C (R/W 8) Interrupt Enable Clear Register */
|
||||
__IO TC_INTENSET_Type INTENSET; /**< \brief Offset: 0x0D (R/W 8) Interrupt Enable Set Register */
|
||||
__IO TC_INTFLAG_Type INTFLAG; /**< \brief Offset: 0x0E (R/W 8) Interrupt Flag Status and Clear Register */
|
||||
__I TC_STATUS_Type STATUS; /**< \brief Offset: 0x0F (R/ 8) Status Register */
|
||||
__IO TC_COUNT8_COUNT_Type COUNT; /**< \brief Offset: 0x10 (R/W 8) COUNT8 Count Register */
|
||||
RoReg8 Reserved3[0x3];
|
||||
__IO TC_COUNT8_PER_Type PER; /**< \brief Offset: 0x14 (R/W 8) COUNT8 Period Register */
|
||||
RoReg8 Reserved4[0x3];
|
||||
__IO TC_COUNT8_CC_Type CC[2]; /**< \brief Offset: 0x18 (R/W 8) COUNT8 Compare and Capture Register [CC8_NUM] */
|
||||
} TcCount8;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/** \brief TC_COUNT16 hardware registers */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef struct { /* 16-bit Counter Mode */
|
||||
__IO TC_CTRLA_Type CTRLA; /**< \brief Offset: 0x00 (R/W 16) Control A Register */
|
||||
__IO TC_READREQ_Type READREQ; /**< \brief Offset: 0x02 (R/W 16) Read Request Register */
|
||||
__IO TC_CTRLBCLR_Type CTRLBCLR; /**< \brief Offset: 0x04 (R/W 8) Control B Clear Register */
|
||||
__IO TC_CTRLBSET_Type CTRLBSET; /**< \brief Offset: 0x05 (R/W 8) Control B Set Register */
|
||||
__IO TC_CTRLC_Type CTRLC; /**< \brief Offset: 0x06 (R/W 8) Control C Register */
|
||||
RoReg8 Reserved1[0x1];
|
||||
__IO TC_DBGCTRL_Type DBGCTRL; /**< \brief Offset: 0x08 (R/W 8) Debug Register */
|
||||
RoReg8 Reserved2[0x1];
|
||||
__IO TC_EVCTRL_Type EVCTRL; /**< \brief Offset: 0x0A (R/W 16) Event Control Register */
|
||||
__IO TC_INTENCLR_Type INTENCLR; /**< \brief Offset: 0x0C (R/W 8) Interrupt Enable Clear Register */
|
||||
__IO TC_INTENSET_Type INTENSET; /**< \brief Offset: 0x0D (R/W 8) Interrupt Enable Set Register */
|
||||
__IO TC_INTFLAG_Type INTFLAG; /**< \brief Offset: 0x0E (R/W 8) Interrupt Flag Status and Clear Register */
|
||||
__I TC_STATUS_Type STATUS; /**< \brief Offset: 0x0F (R/ 8) Status Register */
|
||||
__IO TC_COUNT16_COUNT_Type COUNT; /**< \brief Offset: 0x10 (R/W 16) COUNT16 Count Register */
|
||||
RoReg8 Reserved3[0x6];
|
||||
__IO TC_COUNT16_CC_Type CC[2]; /**< \brief Offset: 0x18 (R/W 16) COUNT16 Compare and Capture Register [CC16_NUM] */
|
||||
} TcCount16;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/** \brief TC_COUNT32 hardware registers */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef struct { /* 32-bit Counter Mode */
|
||||
__IO TC_CTRLA_Type CTRLA; /**< \brief Offset: 0x00 (R/W 16) Control A Register */
|
||||
__IO TC_READREQ_Type READREQ; /**< \brief Offset: 0x02 (R/W 16) Read Request Register */
|
||||
__IO TC_CTRLBCLR_Type CTRLBCLR; /**< \brief Offset: 0x04 (R/W 8) Control B Clear Register */
|
||||
__IO TC_CTRLBSET_Type CTRLBSET; /**< \brief Offset: 0x05 (R/W 8) Control B Set Register */
|
||||
__IO TC_CTRLC_Type CTRLC; /**< \brief Offset: 0x06 (R/W 8) Control C Register */
|
||||
RoReg8 Reserved1[0x1];
|
||||
__IO TC_DBGCTRL_Type DBGCTRL; /**< \brief Offset: 0x08 (R/W 8) Debug Register */
|
||||
RoReg8 Reserved2[0x1];
|
||||
__IO TC_EVCTRL_Type EVCTRL; /**< \brief Offset: 0x0A (R/W 16) Event Control Register */
|
||||
__IO TC_INTENCLR_Type INTENCLR; /**< \brief Offset: 0x0C (R/W 8) Interrupt Enable Clear Register */
|
||||
__IO TC_INTENSET_Type INTENSET; /**< \brief Offset: 0x0D (R/W 8) Interrupt Enable Set Register */
|
||||
__IO TC_INTFLAG_Type INTFLAG; /**< \brief Offset: 0x0E (R/W 8) Interrupt Flag Status and Clear Register */
|
||||
__I TC_STATUS_Type STATUS; /**< \brief Offset: 0x0F (R/ 8) Status Register */
|
||||
__IO TC_COUNT32_COUNT_Type COUNT; /**< \brief Offset: 0x10 (R/W 32) COUNT32 Count Register */
|
||||
__IO TC_COUNT32_PER_Type PER; /**< \brief Offset: 0x14 (R/W 32) COUNT32 Period Register */
|
||||
__IO TC_COUNT32_CC_Type CC[2]; /**< \brief Offset: 0x18 (R/W 32) COUNT32 Compare and Capture Register [CC32_NUM] */
|
||||
} TcCount32;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
TcCount8 COUNT8; /**< \brief Offset: 0x00 8-bit Counter Mode */
|
||||
TcCount16 COUNT16; /**< \brief Offset: 0x00 16-bit Counter Mode */
|
||||
TcCount32 COUNT32; /**< \brief Offset: 0x00 32-bit Counter Mode */
|
||||
} Tc;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/*@}*/
|
||||
|
||||
#endif /* _SAMD20_TC_COMPONENT_ */
|
|
@ -0,0 +1,229 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Component description for WDT
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_WDT_COMPONENT_
|
||||
#define _SAMD20_WDT_COMPONENT_
|
||||
|
||||
/* ========================================================================== */
|
||||
/** SOFTWARE API DEFINITION FOR WDT */
|
||||
/* ========================================================================== */
|
||||
/** \addtogroup SAMD20_WDT Watchdog Timer */
|
||||
/*@{*/
|
||||
|
||||
#define REV_WDT 0x200
|
||||
|
||||
/* -------- WDT_CTRL : (WDT Offset: 0x0) (R/W 8) Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t :1; /*!< bit: 0 Reserved */
|
||||
uint8_t ENABLE:1; /*!< bit: 1 Enable */
|
||||
uint8_t WEN:1; /*!< bit: 2 Watchdog Timer Window Mode Enable */
|
||||
uint8_t :4; /*!< bit: 3.. 6 Reserved */
|
||||
uint8_t ALWAYSON:1; /*!< bit: 7 Watchdog Timer Always-On Enable */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} WDT_CTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define WDT_CTRL_OFFSET 0x0 /**< \brief (WDT_CTRL offset) Control Register */
|
||||
#define WDT_CTRL_RESETVALUE 0x00 /**< \brief (WDT_CTRL reset_value) Control Register */
|
||||
|
||||
#define WDT_CTRL_ENABLE_Pos 1 /**< \brief (WDT_CTRL) Enable */
|
||||
#define WDT_CTRL_ENABLE (0x1u << WDT_CTRL_ENABLE_Pos)
|
||||
#define WDT_CTRL_WEN_Pos 2 /**< \brief (WDT_CTRL) Watchdog Timer Window Mode Enable */
|
||||
#define WDT_CTRL_WEN (0x1u << WDT_CTRL_WEN_Pos)
|
||||
#define WDT_CTRL_ALWAYSON_Pos 7 /**< \brief (WDT_CTRL) Watchdog Timer Always-On Enable */
|
||||
#define WDT_CTRL_ALWAYSON (0x1u << WDT_CTRL_ALWAYSON_Pos)
|
||||
#define WDT_CTRL_MASK 0x86u /**< \brief (WDT_CTRL) MASK Register */
|
||||
|
||||
/* -------- WDT_CONFIG : (WDT Offset: 0x1) (R/W 8) Configuration Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t PER:4; /*!< bit: 0.. 3 Timeout Period */
|
||||
uint8_t WINDOW:4; /*!< bit: 4.. 7 Watchdow Timer Window Timeout Period */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} WDT_CONFIG_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define WDT_CONFIG_OFFSET 0x1 /**< \brief (WDT_CONFIG offset) Configuration Register */
|
||||
#define WDT_CONFIG_RESETVALUE 0xBB /**< \brief (WDT_CONFIG reset_value) Configuration Register */
|
||||
|
||||
#define WDT_CONFIG_PER_Pos 0 /**< \brief (WDT_CONFIG) Timeout Period */
|
||||
#define WDT_CONFIG_PER_Msk (0xFu << WDT_CONFIG_PER_Pos)
|
||||
#define WDT_CONFIG_PER(value) ((WDT_CONFIG_PER_Msk & ((value) << WDT_CONFIG_PER_Pos)))
|
||||
#define WDT_CONFIG_WINDOW_Pos 4 /**< \brief (WDT_CONFIG) Watchdow Timer Window Timeout Period */
|
||||
#define WDT_CONFIG_WINDOW_Msk (0xFu << WDT_CONFIG_WINDOW_Pos)
|
||||
#define WDT_CONFIG_WINDOW(value) ((WDT_CONFIG_WINDOW_Msk & ((value) << WDT_CONFIG_WINDOW_Pos)))
|
||||
#define WDT_CONFIG_MASK 0xFFu /**< \brief (WDT_CONFIG) MASK Register */
|
||||
|
||||
/* -------- WDT_EWCTRL : (WDT Offset: 0x2) (R/W 8) Early Warning Control Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t EWOFFSET:4; /*!< bit: 0.. 3 Early Warning Interrupt Time Offset */
|
||||
uint8_t :4; /*!< bit: 4.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} WDT_EWCTRL_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define WDT_EWCTRL_OFFSET 0x2 /**< \brief (WDT_EWCTRL offset) Early Warning Control Register */
|
||||
#define WDT_EWCTRL_RESETVALUE 0x0B /**< \brief (WDT_EWCTRL reset_value) Early Warning Control Register */
|
||||
|
||||
#define WDT_EWCTRL_EWOFFSET_Pos 0 /**< \brief (WDT_EWCTRL) Early Warning Interrupt Time Offset */
|
||||
#define WDT_EWCTRL_EWOFFSET_Msk (0xFu << WDT_EWCTRL_EWOFFSET_Pos)
|
||||
#define WDT_EWCTRL_EWOFFSET(value) ((WDT_EWCTRL_EWOFFSET_Msk & ((value) << WDT_EWCTRL_EWOFFSET_Pos)))
|
||||
#define WDT_EWCTRL_MASK 0x0Fu /**< \brief (WDT_EWCTRL) MASK Register */
|
||||
|
||||
/* -------- WDT_INTENCLR : (WDT Offset: 0x4) (R/W 8) Interrupt Enable Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t EW:1; /*!< bit: 0 Early Warning Interrupt Disable */
|
||||
uint8_t :7; /*!< bit: 1.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} WDT_INTENCLR_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define WDT_INTENCLR_OFFSET 0x4 /**< \brief (WDT_INTENCLR offset) Interrupt Enable Clear Register */
|
||||
#define WDT_INTENCLR_RESETVALUE 0x00 /**< \brief (WDT_INTENCLR reset_value) Interrupt Enable Clear Register */
|
||||
|
||||
#define WDT_INTENCLR_EW_Pos 0 /**< \brief (WDT_INTENCLR) Early Warning Interrupt Disable */
|
||||
#define WDT_INTENCLR_EW (0x1u << WDT_INTENCLR_EW_Pos)
|
||||
#define WDT_INTENCLR_MASK 0x01u /**< \brief (WDT_INTENCLR) MASK Register */
|
||||
|
||||
/* -------- WDT_INTENSET : (WDT Offset: 0x5) (R/W 8) Interrupt Enable Set Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t EW:1; /*!< bit: 0 Early Warning Interrupt Enable */
|
||||
uint8_t :7; /*!< bit: 1.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} WDT_INTENSET_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define WDT_INTENSET_OFFSET 0x5 /**< \brief (WDT_INTENSET offset) Interrupt Enable Set Register */
|
||||
#define WDT_INTENSET_RESETVALUE 0x00 /**< \brief (WDT_INTENSET reset_value) Interrupt Enable Set Register */
|
||||
|
||||
#define WDT_INTENSET_EW_Pos 0 /**< \brief (WDT_INTENSET) Early Warning Interrupt Enable */
|
||||
#define WDT_INTENSET_EW (0x1u << WDT_INTENSET_EW_Pos)
|
||||
#define WDT_INTENSET_MASK 0x01u /**< \brief (WDT_INTENSET) MASK Register */
|
||||
|
||||
/* -------- WDT_INTFLAG : (WDT Offset: 0x6) (R/W 8) Interrupt Flag Status and Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t EW:1; /*!< bit: 0 Early Warning Interrupt Flag */
|
||||
uint8_t :7; /*!< bit: 1.. 7 Reserved */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} WDT_INTFLAG_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define WDT_INTFLAG_OFFSET 0x6 /**< \brief (WDT_INTFLAG offset) Interrupt Flag Status and Clear Register */
|
||||
#define WDT_INTFLAG_RESETVALUE 0x00 /**< \brief (WDT_INTFLAG reset_value) Interrupt Flag Status and Clear Register */
|
||||
|
||||
#define WDT_INTFLAG_EW_Pos 0 /**< \brief (WDT_INTFLAG) Early Warning Interrupt Flag */
|
||||
#define WDT_INTFLAG_EW (0x1u << WDT_INTFLAG_EW_Pos)
|
||||
#define WDT_INTFLAG_MASK 0x01u /**< \brief (WDT_INTFLAG) MASK Register */
|
||||
|
||||
/* -------- WDT_STATUS : (WDT Offset: 0x7) (R/ 8) Status Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t :7; /*!< bit: 0.. 6 Reserved */
|
||||
uint8_t SYNCBUSY:1; /*!< bit: 7 Synchronization Busy */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} WDT_STATUS_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define WDT_STATUS_OFFSET 0x7 /**< \brief (WDT_STATUS offset) Status Register */
|
||||
#define WDT_STATUS_RESETVALUE 0x00 /**< \brief (WDT_STATUS reset_value) Status Register */
|
||||
|
||||
#define WDT_STATUS_SYNCBUSY_Pos 7 /**< \brief (WDT_STATUS) Synchronization Busy */
|
||||
#define WDT_STATUS_SYNCBUSY (0x1u << WDT_STATUS_SYNCBUSY_Pos)
|
||||
#define WDT_STATUS_MASK 0x80u /**< \brief (WDT_STATUS) MASK Register */
|
||||
|
||||
/* -------- WDT_CLEAR : (WDT Offset: 0x8) ( /W 8) Clear Register -------- */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t CLEAR:8; /*!< bit: 0.. 7 Watchdog Timer Clears Command Register */
|
||||
} bit; /*!< Structure used for bit access */
|
||||
uint8_t reg; /*!< Type used for register access */
|
||||
} WDT_CLEAR_Type;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
#define WDT_CLEAR_OFFSET 0x8 /**< \brief (WDT_CLEAR offset) Clear Register */
|
||||
#define WDT_CLEAR_RESETVALUE 0x00 /**< \brief (WDT_CLEAR reset_value) Clear Register */
|
||||
|
||||
#define WDT_CLEAR_CLEAR_Pos 0 /**< \brief (WDT_CLEAR) Watchdog Timer Clears Command Register */
|
||||
#define WDT_CLEAR_CLEAR_Msk (0xFFu << WDT_CLEAR_CLEAR_Pos)
|
||||
#define WDT_CLEAR_CLEAR(value) ((WDT_CLEAR_CLEAR_Msk & ((value) << WDT_CLEAR_CLEAR_Pos)))
|
||||
#define WDT_CLEAR_CLEAR_KEY (0xA5u << 0) /**< \brief (WDT_CLEAR) Clear Key */
|
||||
#define WDT_CLEAR_MASK 0xFFu /**< \brief (WDT_CLEAR) MASK Register */
|
||||
|
||||
/** \brief WDT hardware registers */
|
||||
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
typedef struct {
|
||||
__IO WDT_CTRL_Type CTRL; /**< \brief Offset: 0x0 (R/W 8) Control Register */
|
||||
__IO WDT_CONFIG_Type CONFIG; /**< \brief Offset: 0x1 (R/W 8) Configuration Register */
|
||||
__IO WDT_EWCTRL_Type EWCTRL; /**< \brief Offset: 0x2 (R/W 8) Early Warning Control Register */
|
||||
RoReg8 Reserved1[0x1];
|
||||
__IO WDT_INTENCLR_Type INTENCLR; /**< \brief Offset: 0x4 (R/W 8) Interrupt Enable Clear Register */
|
||||
__IO WDT_INTENSET_Type INTENSET; /**< \brief Offset: 0x5 (R/W 8) Interrupt Enable Set Register */
|
||||
__IO WDT_INTFLAG_Type INTFLAG; /**< \brief Offset: 0x6 (R/W 8) Interrupt Flag Status and Clear Register */
|
||||
__I WDT_STATUS_Type STATUS; /**< \brief Offset: 0x7 (R/ 8) Status Register */
|
||||
__O WDT_CLEAR_Type CLEAR; /**< \brief Offset: 0x8 ( /W 8) Clear Register */
|
||||
} Wdt;
|
||||
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/*@}*/
|
||||
|
||||
#endif /* _SAMD20_WDT_COMPONENT_ */
|
|
@ -0,0 +1,86 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for AC
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_AC_INSTANCE_
|
||||
#define _SAMD20_AC_INSTANCE_
|
||||
|
||||
/* ========== Register definition for AC peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_AC_CTRLA (0x42004400U) /**< \brief (AC) Control A Register */
|
||||
#define REG_AC_CTRLB (0x42004401U) /**< \brief (AC) Control B Register */
|
||||
#define REG_AC_EVCTRL (0x42004402U) /**< \brief (AC) Event Control Register */
|
||||
#define REG_AC_INTENCLR (0x42004404U) /**< \brief (AC) Interrupt Enable Clear Register */
|
||||
#define REG_AC_INTENSET (0x42004405U) /**< \brief (AC) Interrupt Enable Set Register */
|
||||
#define REG_AC_INTFLAG (0x42004406U) /**< \brief (AC) Interrupt Flag Status and Clear Register */
|
||||
#define REG_AC_STATUSA (0x42004408U) /**< \brief (AC) Status A Register */
|
||||
#define REG_AC_STATUSB (0x42004409U) /**< \brief (AC) Status B Register */
|
||||
#define REG_AC_STATUSC (0x4200440AU) /**< \brief (AC) Status C Register */
|
||||
#define REG_AC_WINCTRL (0x4200440CU) /**< \brief (AC) Window Control Register */
|
||||
#define REG_AC_COMPCTRL0 (0x42004410U) /**< \brief (AC) Comparator Control Register 0 */
|
||||
#define REG_AC_COMPCTRL1 (0x42004414U) /**< \brief (AC) Comparator Control Register 1 */
|
||||
#define REG_AC_SCALER0 (0x42004420U) /**< \brief (AC) Scaler Register 0 */
|
||||
#define REG_AC_SCALER1 (0x42004421U) /**< \brief (AC) Scaler Register 1 */
|
||||
#else
|
||||
#define REG_AC_CTRLA (*(RwReg8 *)0x42004400U) /**< \brief (AC) Control A Register */
|
||||
#define REG_AC_CTRLB (*(WoReg8 *)0x42004401U) /**< \brief (AC) Control B Register */
|
||||
#define REG_AC_EVCTRL (*(RwReg16*)0x42004402U) /**< \brief (AC) Event Control Register */
|
||||
#define REG_AC_INTENCLR (*(RwReg8 *)0x42004404U) /**< \brief (AC) Interrupt Enable Clear Register */
|
||||
#define REG_AC_INTENSET (*(RwReg8 *)0x42004405U) /**< \brief (AC) Interrupt Enable Set Register */
|
||||
#define REG_AC_INTFLAG (*(RwReg8 *)0x42004406U) /**< \brief (AC) Interrupt Flag Status and Clear Register */
|
||||
#define REG_AC_STATUSA (*(RoReg8 *)0x42004408U) /**< \brief (AC) Status A Register */
|
||||
#define REG_AC_STATUSB (*(RoReg8 *)0x42004409U) /**< \brief (AC) Status B Register */
|
||||
#define REG_AC_STATUSC (*(RoReg8 *)0x4200440AU) /**< \brief (AC) Status C Register */
|
||||
#define REG_AC_WINCTRL (*(RwReg8 *)0x4200440CU) /**< \brief (AC) Window Control Register */
|
||||
#define REG_AC_COMPCTRL0 (*(RwReg *)0x42004410U) /**< \brief (AC) Comparator Control Register 0 */
|
||||
#define REG_AC_COMPCTRL1 (*(RwReg *)0x42004414U) /**< \brief (AC) Comparator Control Register 1 */
|
||||
#define REG_AC_SCALER0 (*(RwReg8 *)0x42004420U) /**< \brief (AC) Scaler Register 0 */
|
||||
#define REG_AC_SCALER1 (*(RwReg8 *)0x42004421U) /**< \brief (AC) Scaler Register 1 */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for AC peripheral ========== */
|
||||
#define AC_GCLK_ID_ANA 25
|
||||
#define AC_GCLK_ID_DIG 24
|
||||
#define AC_NUM_CMP 2
|
||||
#define AC_PAIRS 1
|
||||
|
||||
#endif /* _SAMD20_AC_INSTANCE_ */
|
|
@ -0,0 +1,103 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for ADC
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_ADC_INSTANCE_
|
||||
#define _SAMD20_ADC_INSTANCE_
|
||||
|
||||
/* ========== Register definition for ADC peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_ADC_CTRLA (0x42004000U) /**< \brief (ADC) Control Register A */
|
||||
#define REG_ADC_REFCTRL (0x42004001U) /**< \brief (ADC) Reference Control Register */
|
||||
#define REG_ADC_AVGCTRL (0x42004002U) /**< \brief (ADC) Average Control Register */
|
||||
#define REG_ADC_SAMPCTRL (0x42004003U) /**< \brief (ADC) Sample Time Control Register */
|
||||
#define REG_ADC_CTRLB (0x42004004U) /**< \brief (ADC) Control Register B */
|
||||
#define REG_ADC_WINCTRL (0x42004008U) /**< \brief (ADC) Window Monitor Control Register */
|
||||
#define REG_ADC_SWTRIG (0x4200400CU) /**< \brief (ADC) Control Register B */
|
||||
#define REG_ADC_INPUTCTRL (0x42004010U) /**< \brief (ADC) Input Control Register */
|
||||
#define REG_ADC_EVCTRL (0x42004014U) /**< \brief (ADC) Event Control Register */
|
||||
#define REG_ADC_INTENCLR (0x42004016U) /**< \brief (ADC) Interrupt Enable Clear Register */
|
||||
#define REG_ADC_INTENSET (0x42004017U) /**< \brief (ADC) Interrupt Enable Set Register */
|
||||
#define REG_ADC_INTFLAG (0x42004018U) /**< \brief (ADC) Interrupt Flag Status and Clear Register */
|
||||
#define REG_ADC_STATUS (0x42004019U) /**< \brief (ADC) Status Register */
|
||||
#define REG_ADC_RESULT (0x4200401AU) /**< \brief (ADC) Result Register */
|
||||
#define REG_ADC_WINLT (0x4200401CU) /**< \brief (ADC) Window Monitor Lower Threshold Register */
|
||||
#define REG_ADC_WINUT (0x42004020U) /**< \brief (ADC) Window Monitor Upper Threshold Register */
|
||||
#define REG_ADC_GAINCORR (0x42004024U) /**< \brief (ADC) Gain Correction Register */
|
||||
#define REG_ADC_OFFSETCORR (0x42004026U) /**< \brief (ADC) Offset Correction Register */
|
||||
#define REG_ADC_CALIB (0x42004028U) /**< \brief (ADC) Calibration Register */
|
||||
#define REG_ADC_DBGCTRL (0x4200402AU) /**< \brief (ADC) Debug Register */
|
||||
#define REG_ADC_TEST (0x4200402BU) /**< \brief (ADC) Test Modes Register */
|
||||
#define REG_ADC_TESTRESULT (0x4200402CU) /**< \brief (ADC) Test Result Register */
|
||||
#define REG_ADC_DCFG (0x42004030U) /**< \brief (ADC) Device Configuration */
|
||||
#else
|
||||
#define REG_ADC_CTRLA (*(RwReg8 *)0x42004000U) /**< \brief (ADC) Control Register A */
|
||||
#define REG_ADC_REFCTRL (*(RwReg8 *)0x42004001U) /**< \brief (ADC) Reference Control Register */
|
||||
#define REG_ADC_AVGCTRL (*(RwReg8 *)0x42004002U) /**< \brief (ADC) Average Control Register */
|
||||
#define REG_ADC_SAMPCTRL (*(RwReg8 *)0x42004003U) /**< \brief (ADC) Sample Time Control Register */
|
||||
#define REG_ADC_CTRLB (*(RwReg16*)0x42004004U) /**< \brief (ADC) Control Register B */
|
||||
#define REG_ADC_WINCTRL (*(RwReg8 *)0x42004008U) /**< \brief (ADC) Window Monitor Control Register */
|
||||
#define REG_ADC_SWTRIG (*(RwReg8 *)0x4200400CU) /**< \brief (ADC) Control Register B */
|
||||
#define REG_ADC_INPUTCTRL (*(RwReg *)0x42004010U) /**< \brief (ADC) Input Control Register */
|
||||
#define REG_ADC_EVCTRL (*(RwReg8 *)0x42004014U) /**< \brief (ADC) Event Control Register */
|
||||
#define REG_ADC_INTENCLR (*(RwReg8 *)0x42004016U) /**< \brief (ADC) Interrupt Enable Clear Register */
|
||||
#define REG_ADC_INTENSET (*(RwReg8 *)0x42004017U) /**< \brief (ADC) Interrupt Enable Set Register */
|
||||
#define REG_ADC_INTFLAG (*(RwReg8 *)0x42004018U) /**< \brief (ADC) Interrupt Flag Status and Clear Register */
|
||||
#define REG_ADC_STATUS (*(RoReg8 *)0x42004019U) /**< \brief (ADC) Status Register */
|
||||
#define REG_ADC_RESULT (*(RoReg16*)0x4200401AU) /**< \brief (ADC) Result Register */
|
||||
#define REG_ADC_WINLT (*(RwReg16*)0x4200401CU) /**< \brief (ADC) Window Monitor Lower Threshold Register */
|
||||
#define REG_ADC_WINUT (*(RwReg16*)0x42004020U) /**< \brief (ADC) Window Monitor Upper Threshold Register */
|
||||
#define REG_ADC_GAINCORR (*(RwReg16*)0x42004024U) /**< \brief (ADC) Gain Correction Register */
|
||||
#define REG_ADC_OFFSETCORR (*(RwReg16*)0x42004026U) /**< \brief (ADC) Offset Correction Register */
|
||||
#define REG_ADC_CALIB (*(RwReg16*)0x42004028U) /**< \brief (ADC) Calibration Register */
|
||||
#define REG_ADC_DBGCTRL (*(RwReg8 *)0x4200402AU) /**< \brief (ADC) Debug Register */
|
||||
#define REG_ADC_TEST (*(RwReg8 *)0x4200402BU) /**< \brief (ADC) Test Modes Register */
|
||||
#define REG_ADC_TESTRESULT (*(RwReg *)0x4200402CU) /**< \brief (ADC) Test Result Register */
|
||||
#define REG_ADC_DCFG (*(RwReg8 *)0x42004030U) /**< \brief (ADC) Device Configuration */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for ADC peripheral ========== */
|
||||
#define ADC_EXTCHANNEL_MSB 19
|
||||
#define ADC_GCLK_ID 23
|
||||
#define ADC_RESULT_MSB 15
|
||||
|
||||
#endif /* _SAMD20_ADC_INSTANCE_ */
|
|
@ -0,0 +1,75 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for DAC
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_DAC_INSTANCE_
|
||||
#define _SAMD20_DAC_INSTANCE_
|
||||
|
||||
/* ========== Register definition for DAC peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_DAC_CTRLA (0x42004800U) /**< \brief (DAC) Control Register A */
|
||||
#define REG_DAC_CTRLB (0x42004801U) /**< \brief (DAC) Control Register B */
|
||||
#define REG_DAC_EVCTRL (0x42004802U) /**< \brief (DAC) Event Control Register */
|
||||
#define REG_DAC_TEST (0x42004803U) /**< \brief (DAC) Test Register */
|
||||
#define REG_DAC_INTENCLR (0x42004804U) /**< \brief (DAC) Interrupt Enable Clear Register */
|
||||
#define REG_DAC_INTENSET (0x42004805U) /**< \brief (DAC) Interrupt Enable Set Register */
|
||||
#define REG_DAC_INTFLAG (0x42004806U) /**< \brief (DAC) Interrupt Flag Status and Clear Register */
|
||||
#define REG_DAC_STATUS (0x42004807U) /**< \brief (DAC) Status Register */
|
||||
#define REG_DAC_DATA (0x42004808U) /**< \brief (DAC) Data Register */
|
||||
#define REG_DAC_DATABUF (0x4200480CU) /**< \brief (DAC) Data Buffer Register */
|
||||
#else
|
||||
#define REG_DAC_CTRLA (*(RwReg8 *)0x42004800U) /**< \brief (DAC) Control Register A */
|
||||
#define REG_DAC_CTRLB (*(RwReg8 *)0x42004801U) /**< \brief (DAC) Control Register B */
|
||||
#define REG_DAC_EVCTRL (*(RwReg8 *)0x42004802U) /**< \brief (DAC) Event Control Register */
|
||||
#define REG_DAC_TEST (*(RwReg8 *)0x42004803U) /**< \brief (DAC) Test Register */
|
||||
#define REG_DAC_INTENCLR (*(RwReg8 *)0x42004804U) /**< \brief (DAC) Interrupt Enable Clear Register */
|
||||
#define REG_DAC_INTENSET (*(RwReg8 *)0x42004805U) /**< \brief (DAC) Interrupt Enable Set Register */
|
||||
#define REG_DAC_INTFLAG (*(RwReg8 *)0x42004806U) /**< \brief (DAC) Interrupt Flag Status and Clear Register */
|
||||
#define REG_DAC_STATUS (*(RoReg8 *)0x42004807U) /**< \brief (DAC) Status Register */
|
||||
#define REG_DAC_DATA (*(RwReg16*)0x42004808U) /**< \brief (DAC) Data Register */
|
||||
#define REG_DAC_DATABUF (*(RwReg16*)0x4200480CU) /**< \brief (DAC) Data Buffer Register */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for DAC peripheral ========== */
|
||||
#define DAC_GCLK_ID 26
|
||||
|
||||
#endif /* _SAMD20_DAC_INSTANCE_ */
|
|
@ -0,0 +1,113 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for DSU
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_DSU_INSTANCE_
|
||||
#define _SAMD20_DSU_INSTANCE_
|
||||
|
||||
/* ========== Register definition for DSU peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_DSU_CTRL (0x41002000U) /**< \brief (DSU) Control Register */
|
||||
#define REG_DSU_STATUSA (0x41002001U) /**< \brief (DSU) Status Register A */
|
||||
#define REG_DSU_STATUSB (0x41002002U) /**< \brief (DSU) Status Register B */
|
||||
#define REG_DSU_ADDR (0x41002004U) /**< \brief (DSU) Address Register */
|
||||
#define REG_DSU_LENGTH (0x41002008U) /**< \brief (DSU) Length Register */
|
||||
#define REG_DSU_DATA (0x4100200CU) /**< \brief (DSU) Data Register */
|
||||
#define REG_DSU_DCC0 (0x41002010U) /**< \brief (DSU) Debug Communication Channel Register 0 */
|
||||
#define REG_DSU_DCC1 (0x41002014U) /**< \brief (DSU) Debug Communication Channel Register 1 */
|
||||
#define REG_DSU_DID (0x41002018U) /**< \brief (DSU) Device Identification Register */
|
||||
#define REG_DSU_DCFG0 (0x410020F0U) /**< \brief (DSU) Device Configuration Register 0 */
|
||||
#define REG_DSU_DCFG1 (0x410020F4U) /**< \brief (DSU) Device Configuration Register 1 */
|
||||
#define REG_DSU_UPTM (0x410020F8U) /**< \brief (DSU) UnProtected Test Mode Register */
|
||||
#define REG_DSU_TESTMODE (0x410020FCU) /**< \brief (DSU) Test Mode Register */
|
||||
#define REG_DSU_ENTRY0 (0x41003000U) /**< \brief (DSU) CoreSight ROM Table Entry Register 0 */
|
||||
#define REG_DSU_ENTRY1 (0x41003004U) /**< \brief (DSU) CoreSight ROM Table Entry Register 1 */
|
||||
#define REG_DSU_END (0x41003008U) /**< \brief (DSU) CoreSight ROM Table End Register */
|
||||
#define REG_DSU_MEMTYPE (0x41003FCCU) /**< \brief (DSU) CoreSight ROM Table Memory Type Register */
|
||||
#define REG_DSU_PID4 (0x41003FD0U) /**< \brief (DSU) Peripheral Identification Register 4 */
|
||||
#define REG_DSU_PID5 (0x41003FD4U) /**< \brief (DSU) Peripheral Identification Register 5 */
|
||||
#define REG_DSU_PID6 (0x41003FD8U) /**< \brief (DSU) Peripheral Identification Register 6 */
|
||||
#define REG_DSU_PID7 (0x41003FDCU) /**< \brief (DSU) Peripheral Identification Register 7 */
|
||||
#define REG_DSU_PID0 (0x41003FE0U) /**< \brief (DSU) Peripheral Identification Register 0 */
|
||||
#define REG_DSU_PID1 (0x41003FE4U) /**< \brief (DSU) Peripheral Identification Register 1 */
|
||||
#define REG_DSU_PID2 (0x41003FE8U) /**< \brief (DSU) Peripheral Identification Register 2 */
|
||||
#define REG_DSU_PID3 (0x41003FECU) /**< \brief (DSU) Peripheral Identification Register 3 */
|
||||
#define REG_DSU_CID0 (0x41003FF0U) /**< \brief (DSU) Component Identification Register 0 */
|
||||
#define REG_DSU_CID1 (0x41003FF4U) /**< \brief (DSU) Component Identification Register 1 */
|
||||
#define REG_DSU_CID2 (0x41003FF8U) /**< \brief (DSU) Component Identification Register 2 */
|
||||
#define REG_DSU_CID3 (0x41003FFCU) /**< \brief (DSU) Component Identification Register 3 */
|
||||
#else
|
||||
#define REG_DSU_CTRL (*(WoReg8 *)0x41002000U) /**< \brief (DSU) Control Register */
|
||||
#define REG_DSU_STATUSA (*(RwReg8 *)0x41002001U) /**< \brief (DSU) Status Register A */
|
||||
#define REG_DSU_STATUSB (*(RoReg8 *)0x41002002U) /**< \brief (DSU) Status Register B */
|
||||
#define REG_DSU_ADDR (*(RwReg *)0x41002004U) /**< \brief (DSU) Address Register */
|
||||
#define REG_DSU_LENGTH (*(RwReg *)0x41002008U) /**< \brief (DSU) Length Register */
|
||||
#define REG_DSU_DATA (*(RwReg *)0x4100200CU) /**< \brief (DSU) Data Register */
|
||||
#define REG_DSU_DCC0 (*(RwReg *)0x41002010U) /**< \brief (DSU) Debug Communication Channel Register 0 */
|
||||
#define REG_DSU_DCC1 (*(RwReg *)0x41002014U) /**< \brief (DSU) Debug Communication Channel Register 1 */
|
||||
#define REG_DSU_DID (*(RoReg *)0x41002018U) /**< \brief (DSU) Device Identification Register */
|
||||
#define REG_DSU_DCFG0 (*(RwReg *)0x410020F0U) /**< \brief (DSU) Device Configuration Register 0 */
|
||||
#define REG_DSU_DCFG1 (*(RwReg *)0x410020F4U) /**< \brief (DSU) Device Configuration Register 1 */
|
||||
#define REG_DSU_UPTM (*(RwReg *)0x410020F8U) /**< \brief (DSU) UnProtected Test Mode Register */
|
||||
#define REG_DSU_TESTMODE (*(RwReg *)0x410020FCU) /**< \brief (DSU) Test Mode Register */
|
||||
#define REG_DSU_ENTRY0 (*(RoReg *)0x41003000U) /**< \brief (DSU) CoreSight ROM Table Entry Register 0 */
|
||||
#define REG_DSU_ENTRY1 (*(RoReg *)0x41003004U) /**< \brief (DSU) CoreSight ROM Table Entry Register 1 */
|
||||
#define REG_DSU_END (*(RoReg *)0x41003008U) /**< \brief (DSU) CoreSight ROM Table End Register */
|
||||
#define REG_DSU_MEMTYPE (*(RoReg *)0x41003FCCU) /**< \brief (DSU) CoreSight ROM Table Memory Type Register */
|
||||
#define REG_DSU_PID4 (*(RoReg *)0x41003FD0U) /**< \brief (DSU) Peripheral Identification Register 4 */
|
||||
#define REG_DSU_PID5 (*(RoReg *)0x41003FD4U) /**< \brief (DSU) Peripheral Identification Register 5 */
|
||||
#define REG_DSU_PID6 (*(RoReg *)0x41003FD8U) /**< \brief (DSU) Peripheral Identification Register 6 */
|
||||
#define REG_DSU_PID7 (*(RoReg *)0x41003FDCU) /**< \brief (DSU) Peripheral Identification Register 7 */
|
||||
#define REG_DSU_PID0 (*(RoReg *)0x41003FE0U) /**< \brief (DSU) Peripheral Identification Register 0 */
|
||||
#define REG_DSU_PID1 (*(RoReg *)0x41003FE4U) /**< \brief (DSU) Peripheral Identification Register 1 */
|
||||
#define REG_DSU_PID2 (*(RoReg *)0x41003FE8U) /**< \brief (DSU) Peripheral Identification Register 2 */
|
||||
#define REG_DSU_PID3 (*(RoReg *)0x41003FECU) /**< \brief (DSU) Peripheral Identification Register 3 */
|
||||
#define REG_DSU_CID0 (*(RoReg *)0x41003FF0U) /**< \brief (DSU) Component Identification Register 0 */
|
||||
#define REG_DSU_CID1 (*(RoReg *)0x41003FF4U) /**< \brief (DSU) Component Identification Register 1 */
|
||||
#define REG_DSU_CID2 (*(RoReg *)0x41003FF8U) /**< \brief (DSU) Component Identification Register 2 */
|
||||
#define REG_DSU_CID3 (*(RoReg *)0x41003FFCU) /**< \brief (DSU) Component Identification Register 3 */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for DSU peripheral ========== */
|
||||
#define DSU_CLK_HSB_ID 3
|
||||
|
||||
#endif /* _SAMD20_DSU_INSTANCE_ */
|
|
@ -0,0 +1,80 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for EIC
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_EIC_INSTANCE_
|
||||
#define _SAMD20_EIC_INSTANCE_
|
||||
|
||||
/* ========== Register definition for EIC peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_EIC_CTRL (0x40001800U) /**< \brief (EIC) Control Register */
|
||||
#define REG_EIC_STATUS (0x40001801U) /**< \brief (EIC) Status Register */
|
||||
#define REG_EIC_NMICTRL (0x40001802U) /**< \brief (EIC) NMI Control Register */
|
||||
#define REG_EIC_NMIFLAG (0x40001803U) /**< \brief (EIC) NMI Interrupt Flag Register */
|
||||
#define REG_EIC_EVCTRL (0x40001804U) /**< \brief (EIC) Event Control Register */
|
||||
#define REG_EIC_INTENCLR (0x40001808U) /**< \brief (EIC) Interrupt Enable Clear Register */
|
||||
#define REG_EIC_INTENSET (0x4000180CU) /**< \brief (EIC) Interrupt Enable Set Register */
|
||||
#define REG_EIC_INTFLAG (0x40001810U) /**< \brief (EIC) Interrupt Flag Status and Clear Register */
|
||||
#define REG_EIC_WAKEUP (0x40001814U) /**< \brief (EIC) Wake-up Enable Register */
|
||||
#define REG_EIC_CONFIG0 (0x40001818U) /**< \brief (EIC) Config Register 0 */
|
||||
#define REG_EIC_CONFIG1 (0x4000181CU) /**< \brief (EIC) Config Register 1 */
|
||||
#else
|
||||
#define REG_EIC_CTRL (*(RwReg8 *)0x40001800U) /**< \brief (EIC) Control Register */
|
||||
#define REG_EIC_STATUS (*(RoReg8 *)0x40001801U) /**< \brief (EIC) Status Register */
|
||||
#define REG_EIC_NMICTRL (*(RwReg8 *)0x40001802U) /**< \brief (EIC) NMI Control Register */
|
||||
#define REG_EIC_NMIFLAG (*(RwReg8 *)0x40001803U) /**< \brief (EIC) NMI Interrupt Flag Register */
|
||||
#define REG_EIC_EVCTRL (*(RwReg *)0x40001804U) /**< \brief (EIC) Event Control Register */
|
||||
#define REG_EIC_INTENCLR (*(RwReg *)0x40001808U) /**< \brief (EIC) Interrupt Enable Clear Register */
|
||||
#define REG_EIC_INTENSET (*(RwReg *)0x4000180CU) /**< \brief (EIC) Interrupt Enable Set Register */
|
||||
#define REG_EIC_INTFLAG (*(RwReg *)0x40001810U) /**< \brief (EIC) Interrupt Flag Status and Clear Register */
|
||||
#define REG_EIC_WAKEUP (*(RwReg *)0x40001814U) /**< \brief (EIC) Wake-up Enable Register */
|
||||
#define REG_EIC_CONFIG0 (*(RwReg *)0x40001818U) /**< \brief (EIC) Config Register 0 */
|
||||
#define REG_EIC_CONFIG1 (*(RwReg *)0x4000181CU) /**< \brief (EIC) Config Register 1 */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for EIC peripheral ========== */
|
||||
#define EIC_GCLK_ID 3
|
||||
#define EIC_NMI_NO_DETECT_ALLOWED 0
|
||||
#define EIC_NUMBER_OF_CONFIG_REGS 2
|
||||
#define EIC_NUMBER_OF_INTERRUPTS 16
|
||||
|
||||
#endif /* _SAMD20_EIC_INSTANCE_ */
|
|
@ -0,0 +1,161 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for EVSYS
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_EVSYS_INSTANCE_
|
||||
#define _SAMD20_EVSYS_INSTANCE_
|
||||
|
||||
/* ========== Register definition for EVSYS peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_EVSYS_CTRL (0x42000400U) /**< \brief (EVSYS) Control Register */
|
||||
#define REG_EVSYS_CHANNEL (0x42000404U) /**< \brief (EVSYS) Channel Register */
|
||||
#define REG_EVSYS_USER (0x42000408U) /**< \brief (EVSYS) User Mux Register */
|
||||
#define REG_EVSYS_CHSTATUS (0x4200040CU) /**< \brief (EVSYS) Channel Status Register */
|
||||
#define REG_EVSYS_INTENCLR (0x42000410U) /**< \brief (EVSYS) Interrupt Enable Clear Register */
|
||||
#define REG_EVSYS_INTENSET (0x42000414U) /**< \brief (EVSYS) Interrupt Enable Set Register */
|
||||
#define REG_EVSYS_INTFLAG (0x42000418U) /**< \brief (EVSYS) Interrupt Flag Status and Clear Register */
|
||||
#else
|
||||
#define REG_EVSYS_CTRL (*(WoReg8 *)0x42000400U) /**< \brief (EVSYS) Control Register */
|
||||
#define REG_EVSYS_CHANNEL (*(RwReg *)0x42000404U) /**< \brief (EVSYS) Channel Register */
|
||||
#define REG_EVSYS_USER (*(RwReg16*)0x42000408U) /**< \brief (EVSYS) User Mux Register */
|
||||
#define REG_EVSYS_CHSTATUS (*(RoReg *)0x4200040CU) /**< \brief (EVSYS) Channel Status Register */
|
||||
#define REG_EVSYS_INTENCLR (*(RwReg *)0x42000410U) /**< \brief (EVSYS) Interrupt Enable Clear Register */
|
||||
#define REG_EVSYS_INTENSET (*(RwReg *)0x42000414U) /**< \brief (EVSYS) Interrupt Enable Set Register */
|
||||
#define REG_EVSYS_INTFLAG (*(RwReg *)0x42000418U) /**< \brief (EVSYS) Interrupt Flag Status and Clear Register */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for EVSYS peripheral ========== */
|
||||
#define EVSYS_CHANNELS 8
|
||||
#define EVSYS_CHANNELS_MSB 7
|
||||
#define EVSYS_EXT_EVT_MSB 0
|
||||
#define EVSYS_GCLK_ID_0 4
|
||||
#define EVSYS_GCLK_ID_1 5
|
||||
#define EVSYS_GCLK_ID_2 6
|
||||
#define EVSYS_GCLK_ID_3 7
|
||||
#define EVSYS_GCLK_ID_4 8
|
||||
#define EVSYS_GCLK_ID_5 9
|
||||
#define EVSYS_GCLK_ID_6 10
|
||||
#define EVSYS_GCLK_ID_7 11
|
||||
#define EVSYS_GCLK_ID_LSB 4
|
||||
#define EVSYS_GCLK_ID_MSB 11
|
||||
#define EVSYS_GCLK_ID_SIZE 8
|
||||
#define EVSYS_GENERATORS 49
|
||||
#define EVSYS_USERS 14
|
||||
|
||||
// GENERATORS
|
||||
#define EVSYS_ID_GEN_RTC_CMP_0 1
|
||||
#define EVSYS_ID_GEN_RTC_CMP_1 2
|
||||
#define EVSYS_ID_GEN_RTC_OVF 3
|
||||
#define EVSYS_ID_GEN_RTC_PER_0 4
|
||||
#define EVSYS_ID_GEN_RTC_PER_1 5
|
||||
#define EVSYS_ID_GEN_RTC_PER_2 6
|
||||
#define EVSYS_ID_GEN_RTC_PER_3 7
|
||||
#define EVSYS_ID_GEN_RTC_PER_4 8
|
||||
#define EVSYS_ID_GEN_RTC_PER_5 9
|
||||
#define EVSYS_ID_GEN_RTC_PER_6 10
|
||||
#define EVSYS_ID_GEN_RTC_PER_7 11
|
||||
#define EVSYS_ID_GEN_EIC_EXTINT_0 12
|
||||
#define EVSYS_ID_GEN_EIC_EXTINT_1 13
|
||||
#define EVSYS_ID_GEN_EIC_EXTINT_2 14
|
||||
#define EVSYS_ID_GEN_EIC_EXTINT_3 15
|
||||
#define EVSYS_ID_GEN_EIC_EXTINT_4 16
|
||||
#define EVSYS_ID_GEN_EIC_EXTINT_5 17
|
||||
#define EVSYS_ID_GEN_EIC_EXTINT_6 18
|
||||
#define EVSYS_ID_GEN_EIC_EXTINT_7 19
|
||||
#define EVSYS_ID_GEN_EIC_EXTINT_8 20
|
||||
#define EVSYS_ID_GEN_EIC_EXTINT_9 21
|
||||
#define EVSYS_ID_GEN_EIC_EXTINT_10 22
|
||||
#define EVSYS_ID_GEN_EIC_EXTINT_11 23
|
||||
#define EVSYS_ID_GEN_EIC_EXTINT_12 24
|
||||
#define EVSYS_ID_GEN_EIC_EXTINT_13 25
|
||||
#define EVSYS_ID_GEN_EIC_EXTINT_14 26
|
||||
#define EVSYS_ID_GEN_EIC_EXTINT_15 27
|
||||
#define EVSYS_ID_GEN_TC0_OVF 28
|
||||
#define EVSYS_ID_GEN_TC0_MCX_0 29
|
||||
#define EVSYS_ID_GEN_TC0_MCX_1 30
|
||||
#define EVSYS_ID_GEN_TC1_OVF 31
|
||||
#define EVSYS_ID_GEN_TC1_MCX_0 32
|
||||
#define EVSYS_ID_GEN_TC1_MCX_1 33
|
||||
#define EVSYS_ID_GEN_TC2_OVF 34
|
||||
#define EVSYS_ID_GEN_TC2_MCX_0 35
|
||||
#define EVSYS_ID_GEN_TC2_MCX_1 36
|
||||
#define EVSYS_ID_GEN_TC3_OVF 37
|
||||
#define EVSYS_ID_GEN_TC3_MCX_0 38
|
||||
#define EVSYS_ID_GEN_TC3_MCX_1 39
|
||||
#define EVSYS_ID_GEN_TC4_OVF 40
|
||||
#define EVSYS_ID_GEN_TC4_MCX_0 41
|
||||
#define EVSYS_ID_GEN_TC4_MCX_1 42
|
||||
#define EVSYS_ID_GEN_TC5_OVF 43
|
||||
#define EVSYS_ID_GEN_TC5_MCX_0 44
|
||||
#define EVSYS_ID_GEN_TC5_MCX_1 45
|
||||
#define EVSYS_ID_GEN_TC6_OVF 46
|
||||
#define EVSYS_ID_GEN_TC6_MCX_0 47
|
||||
#define EVSYS_ID_GEN_TC6_MCX_1 48
|
||||
#define EVSYS_ID_GEN_TC7_OVF 49
|
||||
#define EVSYS_ID_GEN_TC7_MCX_0 50
|
||||
#define EVSYS_ID_GEN_TC7_MCX_1 51
|
||||
#define EVSYS_ID_GEN_ADC_RESRDY 52
|
||||
#define EVSYS_ID_GEN_ADC_WINMON 53
|
||||
#define EVSYS_ID_GEN_AC_COMP_0 54
|
||||
#define EVSYS_ID_GEN_AC_COMP_1 55
|
||||
#define EVSYS_ID_GEN_AC_WIN 56
|
||||
#define EVSYS_ID_GEN_DAC_EMPTY 57
|
||||
#define EVSYS_ID_GEN_PTC_EOC 58
|
||||
#define EVSYS_ID_GEN_PTC_WCOMP 59
|
||||
|
||||
// USERS
|
||||
#define EVSYS_ID_USER_TC0_EVU 0
|
||||
#define EVSYS_ID_USER_TC1_EVU 1
|
||||
#define EVSYS_ID_USER_TC2_EVU 2
|
||||
#define EVSYS_ID_USER_TC3_EVU 3
|
||||
#define EVSYS_ID_USER_TC4_EVU 4
|
||||
#define EVSYS_ID_USER_TC5_EVU 5
|
||||
#define EVSYS_ID_USER_TC6_EVU 6
|
||||
#define EVSYS_ID_USER_TC7_EVU 7
|
||||
#define EVSYS_ID_USER_ADC_START 8
|
||||
#define EVSYS_ID_USER_ADC_SYNC 9
|
||||
#define EVSYS_ID_USER_AC_SOC_0 10
|
||||
#define EVSYS_ID_USER_AC_SOC_1 11
|
||||
#define EVSYS_ID_USER_DAC_START 12
|
||||
#define EVSYS_ID_USER_PTC_STCONV 13
|
||||
|
||||
#endif /* _SAMD20_EVSYS_INSTANCE_ */
|
|
@ -0,0 +1,76 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for GCLK
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_GCLK_INSTANCE_
|
||||
#define _SAMD20_GCLK_INSTANCE_
|
||||
|
||||
/* ========== Register definition for GCLK peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_GCLK_CTRL (0x40000C00U) /**< \brief (GCLK) Control Register */
|
||||
#define REG_GCLK_STATUS (0x40000C01U) /**< \brief (GCLK) Status Register */
|
||||
#define REG_GCLK_CLKCTRL (0x40000C02U) /**< \brief (GCLK) Generic Clock Control Register */
|
||||
#define REG_GCLK_GENCTRL (0x40000C04U) /**< \brief (GCLK) Generic Clock Generator Control Register */
|
||||
#define REG_GCLK_GENDIV (0x40000C08U) /**< \brief (GCLK) Generic Clock Generator Division Register */
|
||||
#else
|
||||
#define REG_GCLK_CTRL (*(RwReg8 *)0x40000C00U) /**< \brief (GCLK) Control Register */
|
||||
#define REG_GCLK_STATUS (*(RoReg8 *)0x40000C01U) /**< \brief (GCLK) Status Register */
|
||||
#define REG_GCLK_CLKCTRL (*(RwReg16*)0x40000C02U) /**< \brief (GCLK) Generic Clock Control Register */
|
||||
#define REG_GCLK_GENCTRL (*(RwReg *)0x40000C04U) /**< \brief (GCLK) Generic Clock Generator Control Register */
|
||||
#define REG_GCLK_GENDIV (*(RwReg *)0x40000C08U) /**< \brief (GCLK) Generic Clock Generator Division Register */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for GCLK peripheral ========== */
|
||||
#define GCLK_GEN_NUM_MSB 7
|
||||
#define GCLK_GEN_SOURCE_NUM_MSB 7
|
||||
#define GCLK_MAX_DIV_BITS 16
|
||||
#define GCLK_NUM 28
|
||||
#define GCLK_SOURCE_DFLL48M 7
|
||||
#define GCLK_SOURCE_GCLKGEN1 2
|
||||
#define GCLK_SOURCE_GCLKIN 1
|
||||
#define GCLK_SOURCE_OSCULP32K 3
|
||||
#define GCLK_SOURCE_OSC8M 6
|
||||
#define GCLK_SOURCE_OSC32K 4
|
||||
#define GCLK_SOURCE_XOSC 0
|
||||
#define GCLK_SOURCE_XOSC32K 5
|
||||
|
||||
#endif /* _SAMD20_GCLK_INSTANCE_ */
|
|
@ -0,0 +1,94 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for NVMCTRL
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_NVMCTRL_INSTANCE_
|
||||
#define _SAMD20_NVMCTRL_INSTANCE_
|
||||
|
||||
/* ========== Register definition for NVMCTRL peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_NVMCTRL_CTRLA (0x41004000U) /**< \brief (NVMCTRL) NVM Control Register A */
|
||||
#define REG_NVMCTRL_CTRLB (0x41004004U) /**< \brief (NVMCTRL) NVM Control Register B */
|
||||
#define REG_NVMCTRL_PARAM (0x41004008U) /**< \brief (NVMCTRL) Parameter Register */
|
||||
#define REG_NVMCTRL_INTENCLR (0x4100400CU) /**< \brief (NVMCTRL) Interrupt Enable Clear Register */
|
||||
#define REG_NVMCTRL_INTENSET (0x41004010U) /**< \brief (NVMCTRL) Interrupt Enable Set Register */
|
||||
#define REG_NVMCTRL_INTFLAG (0x41004014U) /**< \brief (NVMCTRL) Interrupt Flag Status and Clear Register */
|
||||
#define REG_NVMCTRL_STATUS (0x41004018U) /**< \brief (NVMCTRL) Status Register */
|
||||
#define REG_NVMCTRL_ADDR (0x4100401CU) /**< \brief (NVMCTRL) Address Register */
|
||||
#define REG_NVMCTRL_LOCK (0x41004020U) /**< \brief (NVMCTRL) Lock Register */
|
||||
#else
|
||||
#define REG_NVMCTRL_CTRLA (*(RwReg16*)0x41004000U) /**< \brief (NVMCTRL) NVM Control Register A */
|
||||
#define REG_NVMCTRL_CTRLB (*(RwReg *)0x41004004U) /**< \brief (NVMCTRL) NVM Control Register B */
|
||||
#define REG_NVMCTRL_PARAM (*(RwReg *)0x41004008U) /**< \brief (NVMCTRL) Parameter Register */
|
||||
#define REG_NVMCTRL_INTENCLR (*(RwReg8 *)0x4100400CU) /**< \brief (NVMCTRL) Interrupt Enable Clear Register */
|
||||
#define REG_NVMCTRL_INTENSET (*(RwReg8 *)0x41004010U) /**< \brief (NVMCTRL) Interrupt Enable Set Register */
|
||||
#define REG_NVMCTRL_INTFLAG (*(RwReg8 *)0x41004014U) /**< \brief (NVMCTRL) Interrupt Flag Status and Clear Register */
|
||||
#define REG_NVMCTRL_STATUS (*(RwReg16*)0x41004018U) /**< \brief (NVMCTRL) Status Register */
|
||||
#define REG_NVMCTRL_ADDR (*(RwReg *)0x4100401CU) /**< \brief (NVMCTRL) Address Register */
|
||||
#define REG_NVMCTRL_LOCK (*(RwReg16*)0x41004020U) /**< \brief (NVMCTRL) Lock Register */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for NVMCTRL peripheral ========== */
|
||||
#define NVMCTRL_AUX0_ADDRESS (NVMCTRL_USER_PAGE_ADDRESS + 0x00004000)
|
||||
#define NVMCTRL_AUX1_ADDRESS (NVMCTRL_USER_PAGE_ADDRESS + 0x00006000)
|
||||
#define NVMCTRL_AUX2_ADDRESS (NVMCTRL_USER_PAGE_ADDRESS + 0x00008000)
|
||||
#define NVMCTRL_AUX3_ADDRESS (NVMCTRL_USER_PAGE_ADDRESS + 0x0000A000)
|
||||
#define NVMCTRL_CLK_AHB_ID 4
|
||||
#define NVMCTRL_FACTORY_WORD_IMPLEMENTED_MASK 0XC0000007FFFFFFFF
|
||||
#define NVMCTRL_FLASH_SIZE (NVMCTRL_PAGES*NVMCTRL_PAGE_SIZE)
|
||||
#define NVMCTRL_FUSES_SECURE_NVM
|
||||
#define NVMCTRL_FUSES_SECURE_RAM
|
||||
#define NVMCTRL_FUSES_SECURE_STATE
|
||||
#define NVMCTRL_LOCKBIT_ADDRESS (NVMCTRL_USER_PAGE_ADDRESS + 0x00002000)
|
||||
#define NVMCTRL_PAGES 4096
|
||||
#define NVMCTRL_PAGE_HW (NVMCTRL_PAGE_SIZE/2)
|
||||
#define NVMCTRL_PAGE_SIZE (1<<NVMCTRL_PSZ_BITS)
|
||||
#define NVMCTRL_PAGE_W (NVMCTRL_PAGE_SIZE/4)
|
||||
#define NVMCTRL_PMSB 3
|
||||
#define NVMCTRL_PSZ_BITS 6
|
||||
#define NVMCTRL_ROW_PAGES (NVMCTRL_ROW_SIZE/NVMCTRL_PAGE_SIZE)
|
||||
#define NVMCTRL_ROW_SIZE (NVMCTRL_PAGE_SIZE*4)
|
||||
#define NVMCTRL_USER_PAGE_ADDRESS (FLASH_ADDR + NVMCTRL_USER_PAGE_OFFSET)
|
||||
#define NVMCTRL_USER_PAGE_OFFSET 0x00800000
|
||||
#define NVMCTRL_USER_WORD_IMPLEMENTED_MASK 0XC01FFFFFFFFFFFFF
|
||||
|
||||
#endif /* _SAMD20_NVMCTRL_INSTANCE_ */
|
|
@ -0,0 +1,59 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for PAC0
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_PAC0_INSTANCE_
|
||||
#define _SAMD20_PAC0_INSTANCE_
|
||||
|
||||
/* ========== Register definition for PAC0 peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_PAC0_WPCLR (0x40000000U) /**< \brief (PAC0) Write Protection Clear Register */
|
||||
#define REG_PAC0_WPSET (0x40000004U) /**< \brief (PAC0) Write Protection Set Register */
|
||||
#else
|
||||
#define REG_PAC0_WPCLR (*(RwReg *)0x40000000U) /**< \brief (PAC0) Write Protection Clear Register */
|
||||
#define REG_PAC0_WPSET (*(RwReg *)0x40000004U) /**< \brief (PAC0) Write Protection Set Register */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for PAC0 peripheral ========== */
|
||||
#define PAC0_WPROT_DEFAULT_VAL 0x00000000
|
||||
|
||||
#endif /* _SAMD20_PAC0_INSTANCE_ */
|
|
@ -0,0 +1,59 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for PAC1
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_PAC1_INSTANCE_
|
||||
#define _SAMD20_PAC1_INSTANCE_
|
||||
|
||||
/* ========== Register definition for PAC1 peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_PAC1_WPCLR (0x41000000U) /**< \brief (PAC1) Write Protection Clear Register */
|
||||
#define REG_PAC1_WPSET (0x41000004U) /**< \brief (PAC1) Write Protection Set Register */
|
||||
#else
|
||||
#define REG_PAC1_WPCLR (*(RwReg *)0x41000000U) /**< \brief (PAC1) Write Protection Clear Register */
|
||||
#define REG_PAC1_WPSET (*(RwReg *)0x41000004U) /**< \brief (PAC1) Write Protection Set Register */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for PAC1 peripheral ========== */
|
||||
#define PAC1_WPROT_DEFAULT_VAL 0x00000002
|
||||
|
||||
#endif /* _SAMD20_PAC1_INSTANCE_ */
|
|
@ -0,0 +1,59 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for PAC2
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_PAC2_INSTANCE_
|
||||
#define _SAMD20_PAC2_INSTANCE_
|
||||
|
||||
/* ========== Register definition for PAC2 peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_PAC2_WPCLR (0x42000000U) /**< \brief (PAC2) Write Protection Clear Register */
|
||||
#define REG_PAC2_WPSET (0x42000004U) /**< \brief (PAC2) Write Protection Set Register */
|
||||
#else
|
||||
#define REG_PAC2_WPCLR (*(RwReg *)0x42000000U) /**< \brief (PAC2) Write Protection Clear Register */
|
||||
#define REG_PAC2_WPSET (*(RwReg *)0x42000004U) /**< \brief (PAC2) Write Protection Set Register */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for PAC2 peripheral ========== */
|
||||
#define PAC2_WPROT_DEFAULT_VAL 0x00100000
|
||||
|
||||
#endif /* _SAMD20_PAC2_INSTANCE_ */
|
|
@ -0,0 +1,87 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for PM
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_PM_INSTANCE_
|
||||
#define _SAMD20_PM_INSTANCE_
|
||||
|
||||
/* ========== Register definition for PM peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_PM_CTRL (0x40000400U) /**< \brief (PM) Control Register */
|
||||
#define REG_PM_SLEEP (0x40000401U) /**< \brief (PM) Sleep Register */
|
||||
#define REG_PM_CPUSEL (0x40000408U) /**< \brief (PM) CPU Clock Select */
|
||||
#define REG_PM_APBASEL (0x40000409U) /**< \brief (PM) APBA Clock Select */
|
||||
#define REG_PM_APBBSEL (0x4000040AU) /**< \brief (PM) APBB Clock Select */
|
||||
#define REG_PM_APBCSEL (0x4000040BU) /**< \brief (PM) APBC Clock Select */
|
||||
#define REG_PM_AHBMASK (0x40000414U) /**< \brief (PM) AHB Mask */
|
||||
#define REG_PM_APBAMASK (0x40000418U) /**< \brief (PM) APBA Mask */
|
||||
#define REG_PM_APBBMASK (0x4000041CU) /**< \brief (PM) APBB Mask */
|
||||
#define REG_PM_APBCMASK (0x40000420U) /**< \brief (PM) APBC Mask */
|
||||
#define REG_PM_INTENCLR (0x40000434U) /**< \brief (PM) Interrupt Enable Clear Register */
|
||||
#define REG_PM_INTENSET (0x40000435U) /**< \brief (PM) Interrupt Enable Set Register */
|
||||
#define REG_PM_INTFLAG (0x40000436U) /**< \brief (PM) Interrupt Flag Status and Clear Register */
|
||||
#define REG_PM_RCAUSE (0x40000438U) /**< \brief (PM) Reset Cause Register */
|
||||
#else
|
||||
#define REG_PM_CTRL (*(RwReg8 *)0x40000400U) /**< \brief (PM) Control Register */
|
||||
#define REG_PM_SLEEP (*(RwReg8 *)0x40000401U) /**< \brief (PM) Sleep Register */
|
||||
#define REG_PM_CPUSEL (*(RwReg8 *)0x40000408U) /**< \brief (PM) CPU Clock Select */
|
||||
#define REG_PM_APBASEL (*(RwReg8 *)0x40000409U) /**< \brief (PM) APBA Clock Select */
|
||||
#define REG_PM_APBBSEL (*(RwReg8 *)0x4000040AU) /**< \brief (PM) APBB Clock Select */
|
||||
#define REG_PM_APBCSEL (*(RwReg8 *)0x4000040BU) /**< \brief (PM) APBC Clock Select */
|
||||
#define REG_PM_AHBMASK (*(RwReg *)0x40000414U) /**< \brief (PM) AHB Mask */
|
||||
#define REG_PM_APBAMASK (*(RwReg *)0x40000418U) /**< \brief (PM) APBA Mask */
|
||||
#define REG_PM_APBBMASK (*(RwReg *)0x4000041CU) /**< \brief (PM) APBB Mask */
|
||||
#define REG_PM_APBCMASK (*(RwReg *)0x40000420U) /**< \brief (PM) APBC Mask */
|
||||
#define REG_PM_INTENCLR (*(RwReg8 *)0x40000434U) /**< \brief (PM) Interrupt Enable Clear Register */
|
||||
#define REG_PM_INTENSET (*(RwReg8 *)0x40000435U) /**< \brief (PM) Interrupt Enable Set Register */
|
||||
#define REG_PM_INTFLAG (*(RwReg8 *)0x40000436U) /**< \brief (PM) Interrupt Flag Status and Clear Register */
|
||||
#define REG_PM_RCAUSE (*(RoReg8 *)0x40000438U) /**< \brief (PM) Reset Cause Register */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for PM peripheral ========== */
|
||||
#define PM_CTRL_MCSEL_DFLL48M 3
|
||||
#define PM_CTRL_MCSEL_GCLK 0
|
||||
#define PM_CTRL_MCSEL_OSC8M 1
|
||||
#define PM_CTRL_MCSEL_XOSC 2
|
||||
#define PM_PM_CLK_APB_NUM 2
|
||||
|
||||
#endif /* _SAMD20_PM_INSTANCE_ */
|
|
@ -0,0 +1,133 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for PORT
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_PORT_INSTANCE_
|
||||
#define _SAMD20_PORT_INSTANCE_
|
||||
|
||||
/* ========== Register definition for PORT peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_PORT_DIR0 (0x41004400U) /**< \brief (PORT) Data Direction Register 0 */
|
||||
#define REG_PORT_DIRCLR0 (0x41004404U) /**< \brief (PORT) Data Direction Clear Register 0 */
|
||||
#define REG_PORT_DIRSET0 (0x41004408U) /**< \brief (PORT) Data Direction Set Register 0 */
|
||||
#define REG_PORT_DIRTGL0 (0x4100440CU) /**< \brief (PORT) Data Direction Toggle Register 0 */
|
||||
#define REG_PORT_OUT0 (0x41004410U) /**< \brief (PORT) Data Output Value Register 0 */
|
||||
#define REG_PORT_OUTCLR0 (0x41004414U) /**< \brief (PORT) Data Output Value Clear Register 0 */
|
||||
#define REG_PORT_OUTSET0 (0x41004418U) /**< \brief (PORT) Data Output Value Set Register 0 */
|
||||
#define REG_PORT_OUTTGL0 (0x4100441CU) /**< \brief (PORT) Data Output Value Toggle Register 0 */
|
||||
#define REG_PORT_IN0 (0x41004420U) /**< \brief (PORT) Data Input Value Register 0 */
|
||||
#define REG_PORT_CTRL0 (0x41004424U) /**< \brief (PORT) Control Register 0 */
|
||||
#define REG_PORT_WRCONFIG0 (0x41004428U) /**< \brief (PORT) Write Configuration Register 0 */
|
||||
#define REG_PORT_PMUX0 (0x41004430U) /**< \brief (PORT) Peripheral Multiplexing Register 0 */
|
||||
#define REG_PORT_PINCFG0 (0x41004440U) /**< \brief (PORT) Pin Configuration Register 0 */
|
||||
#define REG_PORT_DIR1 (0x41004480U) /**< \brief (PORT) Data Direction Register 1 */
|
||||
#define REG_PORT_DIRCLR1 (0x41004484U) /**< \brief (PORT) Data Direction Clear Register 1 */
|
||||
#define REG_PORT_DIRSET1 (0x41004488U) /**< \brief (PORT) Data Direction Set Register 1 */
|
||||
#define REG_PORT_DIRTGL1 (0x4100448CU) /**< \brief (PORT) Data Direction Toggle Register 1 */
|
||||
#define REG_PORT_OUT1 (0x41004490U) /**< \brief (PORT) Data Output Value Register 1 */
|
||||
#define REG_PORT_OUTCLR1 (0x41004494U) /**< \brief (PORT) Data Output Value Clear Register 1 */
|
||||
#define REG_PORT_OUTSET1 (0x41004498U) /**< \brief (PORT) Data Output Value Set Register 1 */
|
||||
#define REG_PORT_OUTTGL1 (0x4100449CU) /**< \brief (PORT) Data Output Value Toggle Register 1 */
|
||||
#define REG_PORT_IN1 (0x410044A0U) /**< \brief (PORT) Data Input Value Register 1 */
|
||||
#define REG_PORT_CTRL1 (0x410044A4U) /**< \brief (PORT) Control Register 1 */
|
||||
#define REG_PORT_WRCONFIG1 (0x410044A8U) /**< \brief (PORT) Write Configuration Register 1 */
|
||||
#define REG_PORT_PMUX1 (0x410044B0U) /**< \brief (PORT) Peripheral Multiplexing Register 1 */
|
||||
#define REG_PORT_PINCFG1 (0x410044C0U) /**< \brief (PORT) Pin Configuration Register 1 */
|
||||
#else
|
||||
#define REG_PORT_DIR0 (*(RwReg *)0x41004400U) /**< \brief (PORT) Data Direction Register 0 */
|
||||
#define REG_PORT_DIRCLR0 (*(RwReg *)0x41004404U) /**< \brief (PORT) Data Direction Clear Register 0 */
|
||||
#define REG_PORT_DIRSET0 (*(RwReg *)0x41004408U) /**< \brief (PORT) Data Direction Set Register 0 */
|
||||
#define REG_PORT_DIRTGL0 (*(RwReg *)0x4100440CU) /**< \brief (PORT) Data Direction Toggle Register 0 */
|
||||
#define REG_PORT_OUT0 (*(RwReg *)0x41004410U) /**< \brief (PORT) Data Output Value Register 0 */
|
||||
#define REG_PORT_OUTCLR0 (*(RwReg *)0x41004414U) /**< \brief (PORT) Data Output Value Clear Register 0 */
|
||||
#define REG_PORT_OUTSET0 (*(RwReg *)0x41004418U) /**< \brief (PORT) Data Output Value Set Register 0 */
|
||||
#define REG_PORT_OUTTGL0 (*(RwReg *)0x4100441CU) /**< \brief (PORT) Data Output Value Toggle Register 0 */
|
||||
#define REG_PORT_IN0 (*(RoReg *)0x41004420U) /**< \brief (PORT) Data Input Value Register 0 */
|
||||
#define REG_PORT_CTRL0 (*(RwReg *)0x41004424U) /**< \brief (PORT) Control Register 0 */
|
||||
#define REG_PORT_WRCONFIG0 (*(WoReg *)0x41004428U) /**< \brief (PORT) Write Configuration Register 0 */
|
||||
#define REG_PORT_PMUX0 (*(RwReg *)0x41004430U) /**< \brief (PORT) Peripheral Multiplexing Register 0 */
|
||||
#define REG_PORT_PINCFG0 (*(RwReg *)0x41004440U) /**< \brief (PORT) Pin Configuration Register 0 */
|
||||
#define REG_PORT_DIR1 (*(RwReg *)0x41004480U) /**< \brief (PORT) Data Direction Register 1 */
|
||||
#define REG_PORT_DIRCLR1 (*(RwReg *)0x41004484U) /**< \brief (PORT) Data Direction Clear Register 1 */
|
||||
#define REG_PORT_DIRSET1 (*(RwReg *)0x41004488U) /**< \brief (PORT) Data Direction Set Register 1 */
|
||||
#define REG_PORT_DIRTGL1 (*(RwReg *)0x4100448CU) /**< \brief (PORT) Data Direction Toggle Register 1 */
|
||||
#define REG_PORT_OUT1 (*(RwReg *)0x41004490U) /**< \brief (PORT) Data Output Value Register 1 */
|
||||
#define REG_PORT_OUTCLR1 (*(RwReg *)0x41004494U) /**< \brief (PORT) Data Output Value Clear Register 1 */
|
||||
#define REG_PORT_OUTSET1 (*(RwReg *)0x41004498U) /**< \brief (PORT) Data Output Value Set Register 1 */
|
||||
#define REG_PORT_OUTTGL1 (*(RwReg *)0x4100449CU) /**< \brief (PORT) Data Output Value Toggle Register 1 */
|
||||
#define REG_PORT_IN1 (*(RoReg *)0x410044A0U) /**< \brief (PORT) Data Input Value Register 1 */
|
||||
#define REG_PORT_CTRL1 (*(RwReg *)0x410044A4U) /**< \brief (PORT) Control Register 1 */
|
||||
#define REG_PORT_WRCONFIG1 (*(WoReg *)0x410044A8U) /**< \brief (PORT) Write Configuration Register 1 */
|
||||
#define REG_PORT_PMUX1 (*(RwReg *)0x410044B0U) /**< \brief (PORT) Peripheral Multiplexing Register 1 */
|
||||
#define REG_PORT_PINCFG1 (*(RwReg *)0x410044C0U) /**< \brief (PORT) Pin Configuration Register 1 */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for PORT peripheral ========== */
|
||||
#define PORT_BITS 64
|
||||
#define PORT_DIR_DEFAULT_VAL { 0x00000000, 0x00000000 }
|
||||
#define PORT_DIR_IMPLEMENTED { 0xDBFFFFFF, 0xC0C3FFFF }
|
||||
#define PORT_DRVSTR_DEFAULT_VAL { 0x00000000, 0x00000000 }
|
||||
#define PORT_DRVSTR_IMPLEMENTED { 0x00000000, 0x00000000 }
|
||||
#define PORT_GROUPS 2
|
||||
#define PORT_INEN_DEFAULT_VAL { 0x00000000, 0x00000000 }
|
||||
#define PORT_INEN_IMPLEMENTED { 0xDBFFFFFF, 0xC0C3FFFF }
|
||||
#define PORT_ODRAIN_DEFAULT_VAL { 0x00000000, 0x00000000 }
|
||||
#define PORT_ODRAIN_IMPLEMENTED { 0x00000000, 0x00000000 }
|
||||
#define PORT_OUT_DEFAULT_VAL { 0x00000000, 0x00000000 }
|
||||
#define PORT_OUT_IMPLEMENTED { 0xDBFFFFFF, 0xC0C3FFFF }
|
||||
#define PORT_PIN_IMPLEMENTED { 0xDBFFFFFF, 0xC0C3FFFF }
|
||||
#define PORT_PMUXBIT0_DEFAULT_VAL { 0x00000000, 0x00000000 }
|
||||
#define PORT_PMUXBIT0_IMPLEMENTED { 0xDBFFFFFF, 0xC0C3FFFF }
|
||||
#define PORT_PMUXBIT1_DEFAULT_VAL { 0x40000000, 0x00000000 }
|
||||
#define PORT_PMUXBIT1_IMPLEMENTED { 0xDBFFFFF3, 0xC0C3FF0F }
|
||||
#define PORT_PMUXBIT2_DEFAULT_VAL { 0x40000000, 0x00000000 }
|
||||
#define PORT_PMUXBIT2_IMPLEMENTED { 0xDBFFFFF3, 0xC0C3FF0F }
|
||||
#define PORT_PMUXBIT3_DEFAULT_VAL { 0x00000000, 0x00000000 }
|
||||
#define PORT_PMUXBIT3_IMPLEMENTED { 0x00000000, 0x00000000 }
|
||||
#define PORT_PMUXEN_DEFAULT_VAL { 0x64000000, 0x3F3C0000 }
|
||||
#define PORT_PMUXEN_IMPLEMENTED { 0xDBFFFFFF, 0xC0C3FFFF }
|
||||
#define PORT_PULLEN_DEFAULT_VAL { 0x00000000, 0x00000000 }
|
||||
#define PORT_PULLEN_IMPLEMENTED { 0xDBFFFFFF, 0xC0C3FFFF }
|
||||
#define PORT_SLEWLIM_DEFAULT_VAL { 0x00000000, 0x00000000 }
|
||||
#define PORT_SLEWLIM_IMPLEMENTED { 0x00000000, 0x00000000 }
|
||||
|
||||
#endif /* _SAMD20_PORT_INSTANCE_ */
|
|
@ -0,0 +1,114 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for RTC
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_RTC_INSTANCE_
|
||||
#define _SAMD20_RTC_INSTANCE_
|
||||
|
||||
/* ========== Register definition for RTC peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_RTC_MODE0_CTRL (0x40001400U) /**< \brief (RTC) MODE0 Control Register */
|
||||
#define REG_RTC_MODE1_CTRL (0x40001400U) /**< \brief (RTC) MODE1 Control Register */
|
||||
#define REG_RTC_MODE2_CTRL (0x40001400U) /**< \brief (RTC) MODE2 Control Register */
|
||||
#define REG_RTC_READREQ (0x40001402U) /**< \brief (RTC) Read Request Register */
|
||||
#define REG_RTC_MODE0_EVCTRL (0x40001404U) /**< \brief (RTC) MODE0 Event Control Register */
|
||||
#define REG_RTC_MODE1_EVCTRL (0x40001404U) /**< \brief (RTC) MODE1 Event Control Register */
|
||||
#define REG_RTC_MODE2_EVCTRL (0x40001404U) /**< \brief (RTC) MODE2 Event Control Register */
|
||||
#define REG_RTC_MODE0_INTENCLR (0x40001406U) /**< \brief (RTC) MODE0 Interrupt Enable Clear Register */
|
||||
#define REG_RTC_MODE1_INTENCLR (0x40001406U) /**< \brief (RTC) MODE1 Interrupt Enable Clear Register */
|
||||
#define REG_RTC_MODE2_INTENCLR (0x40001406U) /**< \brief (RTC) MODE2 Interrupt Enable Clear Register */
|
||||
#define REG_RTC_MODE0_INTENSET (0x40001407U) /**< \brief (RTC) MODE0 Interrupt Enable Set Register */
|
||||
#define REG_RTC_MODE1_INTENSET (0x40001407U) /**< \brief (RTC) MODE1 Interrupt Enable Set Register */
|
||||
#define REG_RTC_MODE2_INTENSET (0x40001407U) /**< \brief (RTC) MODE2 Interrupt Enable Set Register */
|
||||
#define REG_RTC_MODE0_INTFLAG (0x40001408U) /**< \brief (RTC) MODE0 Interrupt Flag Status and Clear Register */
|
||||
#define REG_RTC_MODE1_INTFLAG (0x40001408U) /**< \brief (RTC) MODE1 Interrupt Flag Status and Clear Register */
|
||||
#define REG_RTC_MODE2_INTFLAG (0x40001408U) /**< \brief (RTC) MODE2 Interrupt Flag Status and Clear Register */
|
||||
#define REG_RTC_STATUS (0x4000140AU) /**< \brief (RTC) Status Register */
|
||||
#define REG_RTC_DBGCTRL (0x4000140BU) /**< \brief (RTC) Debug Register */
|
||||
#define REG_RTC_FREQCORR (0x4000140CU) /**< \brief (RTC) Frequency Correction Register */
|
||||
#define REG_RTC_MODE0_COUNT (0x40001410U) /**< \brief (RTC) MODE0 Count Register */
|
||||
#define REG_RTC_MODE1_COUNT (0x40001410U) /**< \brief (RTC) MODE1 Count Register */
|
||||
#define REG_RTC_MODE2_CLOCK (0x40001410U) /**< \brief (RTC) MODE2 Clock Register */
|
||||
#define REG_RTC_MODE1_PER (0x40001414U) /**< \brief (RTC) MODE1 Period Register */
|
||||
#define REG_RTC_MODE0_COMP0 (0x40001418U) /**< \brief (RTC) MODE0 Compare Register 0 */
|
||||
#define REG_RTC_MODE1_COMP0 (0x40001418U) /**< \brief (RTC) MODE1 Compare Register 0 */
|
||||
#define REG_RTC_MODE1_COMP1 (0x4000141AU) /**< \brief (RTC) MODE1 Compare Register 1 */
|
||||
#define REG_RTC_MODE2_ALARM_ALARM0 (0x40001418U) /**< \brief (RTC) MODE2_ALARM Alarm Register 0 */
|
||||
#define REG_RTC_MODE2_ALARM_MASK0 (0x4000141CU) /**< \brief (RTC) MODE2_ALARM Alarm Mask Register 0 */
|
||||
#else
|
||||
#define REG_RTC_MODE0_CTRL (*(RwReg16*)0x40001400U) /**< \brief (RTC) MODE0 Control Register */
|
||||
#define REG_RTC_MODE1_CTRL (*(RwReg16*)0x40001400U) /**< \brief (RTC) MODE1 Control Register */
|
||||
#define REG_RTC_MODE2_CTRL (*(RwReg16*)0x40001400U) /**< \brief (RTC) MODE2 Control Register */
|
||||
#define REG_RTC_READREQ (*(RwReg16*)0x40001402U) /**< \brief (RTC) Read Request Register */
|
||||
#define REG_RTC_MODE0_EVCTRL (*(RwReg16*)0x40001404U) /**< \brief (RTC) MODE0 Event Control Register */
|
||||
#define REG_RTC_MODE1_EVCTRL (*(RwReg16*)0x40001404U) /**< \brief (RTC) MODE1 Event Control Register */
|
||||
#define REG_RTC_MODE2_EVCTRL (*(RwReg16*)0x40001404U) /**< \brief (RTC) MODE2 Event Control Register */
|
||||
#define REG_RTC_MODE0_INTENCLR (*(RwReg8 *)0x40001406U) /**< \brief (RTC) MODE0 Interrupt Enable Clear Register */
|
||||
#define REG_RTC_MODE1_INTENCLR (*(RwReg8 *)0x40001406U) /**< \brief (RTC) MODE1 Interrupt Enable Clear Register */
|
||||
#define REG_RTC_MODE2_INTENCLR (*(RwReg8 *)0x40001406U) /**< \brief (RTC) MODE2 Interrupt Enable Clear Register */
|
||||
#define REG_RTC_MODE0_INTENSET (*(RwReg8 *)0x40001407U) /**< \brief (RTC) MODE0 Interrupt Enable Set Register */
|
||||
#define REG_RTC_MODE1_INTENSET (*(RwReg8 *)0x40001407U) /**< \brief (RTC) MODE1 Interrupt Enable Set Register */
|
||||
#define REG_RTC_MODE2_INTENSET (*(RwReg8 *)0x40001407U) /**< \brief (RTC) MODE2 Interrupt Enable Set Register */
|
||||
#define REG_RTC_MODE0_INTFLAG (*(RwReg8 *)0x40001408U) /**< \brief (RTC) MODE0 Interrupt Flag Status and Clear Register */
|
||||
#define REG_RTC_MODE1_INTFLAG (*(RwReg8 *)0x40001408U) /**< \brief (RTC) MODE1 Interrupt Flag Status and Clear Register */
|
||||
#define REG_RTC_MODE2_INTFLAG (*(RwReg8 *)0x40001408U) /**< \brief (RTC) MODE2 Interrupt Flag Status and Clear Register */
|
||||
#define REG_RTC_STATUS (*(RwReg8 *)0x4000140AU) /**< \brief (RTC) Status Register */
|
||||
#define REG_RTC_DBGCTRL (*(RwReg8 *)0x4000140BU) /**< \brief (RTC) Debug Register */
|
||||
#define REG_RTC_FREQCORR (*(RwReg8 *)0x4000140CU) /**< \brief (RTC) Frequency Correction Register */
|
||||
#define REG_RTC_MODE0_COUNT (*(RwReg *)0x40001410U) /**< \brief (RTC) MODE0 Count Register */
|
||||
#define REG_RTC_MODE1_COUNT (*(RwReg16*)0x40001410U) /**< \brief (RTC) MODE1 Count Register */
|
||||
#define REG_RTC_MODE2_CLOCK (*(RwReg *)0x40001410U) /**< \brief (RTC) MODE2 Clock Register */
|
||||
#define REG_RTC_MODE1_PER (*(RwReg16*)0x40001414U) /**< \brief (RTC) MODE1 Period Register */
|
||||
#define REG_RTC_MODE0_COMP0 (*(RwReg *)0x40001418U) /**< \brief (RTC) MODE0 Compare Register 0 */
|
||||
#define REG_RTC_MODE1_COMP0 (*(RwReg16*)0x40001418U) /**< \brief (RTC) MODE1 Compare Register 0 */
|
||||
#define REG_RTC_MODE1_COMP1 (*(RwReg16*)0x4000141AU) /**< \brief (RTC) MODE1 Compare Register 1 */
|
||||
#define REG_RTC_MODE2_ALARM_ALARM0 (*(RwReg *)0x40001418U) /**< \brief (RTC) MODE2_ALARM Alarm Register 0 */
|
||||
#define REG_RTC_MODE2_ALARM_MASK0 (*(RwReg *)0x4000141CU) /**< \brief (RTC) MODE2_ALARM Alarm Mask Register 0 */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for RTC peripheral ========== */
|
||||
#define RTC_GCLK_ID 2
|
||||
#define RTC_NUM_OF_ALARMS 1
|
||||
#define RTC_NUM_OF_COMP16 2
|
||||
#define RTC_NUM_OF_COMP32 1
|
||||
|
||||
#endif /* _SAMD20_RTC_INSTANCE_ */
|
|
@ -0,0 +1,132 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for SERCOM0
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_SERCOM0_INSTANCE_
|
||||
#define _SAMD20_SERCOM0_INSTANCE_
|
||||
|
||||
/* ========== Register definition for SERCOM0 peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_SERCOM0_I2CM_CTRLA (0x42000800U) /**< \brief (SERCOM0) I2CM Control Register A */
|
||||
#define REG_SERCOM0_I2CS_CTRLA (0x42000800U) /**< \brief (SERCOM0) I2CS Control Register A */
|
||||
#define REG_SERCOM0_SPI_CTRLA (0x42000800U) /**< \brief (SERCOM0) SPI Control Register A */
|
||||
#define REG_SERCOM0_USART_CTRLA (0x42000800U) /**< \brief (SERCOM0) USART Control Register A */
|
||||
#define REG_SERCOM0_I2CM_CTRLB (0x42000804U) /**< \brief (SERCOM0) I2CM Control Register B */
|
||||
#define REG_SERCOM0_I2CS_CTRLB (0x42000804U) /**< \brief (SERCOM0) I2CS Control Register B */
|
||||
#define REG_SERCOM0_SPI_CTRLB (0x42000804U) /**< \brief (SERCOM0) SPI Control Register B */
|
||||
#define REG_SERCOM0_USART_CTRLB (0x42000804U) /**< \brief (SERCOM0) USART Control Register B */
|
||||
#define REG_SERCOM0_I2CM_DBGCTRL (0x42000808U) /**< \brief (SERCOM0) I2CM Debug Register */
|
||||
#define REG_SERCOM0_SPI_DBGCTRL (0x42000808U) /**< \brief (SERCOM0) SPI Debug Register */
|
||||
#define REG_SERCOM0_USART_DBGCTRL (0x42000808U) /**< \brief (SERCOM0) USART Debug Register */
|
||||
#define REG_SERCOM0_I2CM_BAUD (0x4200080AU) /**< \brief (SERCOM0) I2CM Baud Rate Register */
|
||||
#define REG_SERCOM0_SPI_BAUD (0x4200080AU) /**< \brief (SERCOM0) SPI Baud Rate Register */
|
||||
#define REG_SERCOM0_USART_BAUD (0x4200080AU) /**< \brief (SERCOM0) USART Baud Rate Register */
|
||||
#define REG_SERCOM0_I2CM_INTENCLR (0x4200080CU) /**< \brief (SERCOM0) I2CM Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM0_I2CS_INTENCLR (0x4200080CU) /**< \brief (SERCOM0) I2CS Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM0_SPI_INTENCLR (0x4200080CU) /**< \brief (SERCOM0) SPI Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM0_USART_INTENCLR (0x4200080CU) /**< \brief (SERCOM0) USART Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM0_I2CM_INTENSET (0x4200080DU) /**< \brief (SERCOM0) I2CM Interrupt Enable Set Register */
|
||||
#define REG_SERCOM0_I2CS_INTENSET (0x4200080DU) /**< \brief (SERCOM0) I2CS Interrupt Enable Set Register */
|
||||
#define REG_SERCOM0_SPI_INTENSET (0x4200080DU) /**< \brief (SERCOM0) SPI Interrupt Enable Set Register */
|
||||
#define REG_SERCOM0_USART_INTENSET (0x4200080DU) /**< \brief (SERCOM0) USART Interrupt Enable Set Register */
|
||||
#define REG_SERCOM0_I2CM_INTFLAG (0x4200080EU) /**< \brief (SERCOM0) I2CM Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM0_I2CS_INTFLAG (0x4200080EU) /**< \brief (SERCOM0) I2CS Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM0_SPI_INTFLAG (0x4200080EU) /**< \brief (SERCOM0) SPI Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM0_USART_INTFLAG (0x4200080EU) /**< \brief (SERCOM0) USART Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM0_I2CM_STATUS (0x42000810U) /**< \brief (SERCOM0) I2CM Status Register */
|
||||
#define REG_SERCOM0_I2CS_STATUS (0x42000810U) /**< \brief (SERCOM0) I2CS Status Register */
|
||||
#define REG_SERCOM0_SPI_STATUS (0x42000810U) /**< \brief (SERCOM0) SPI Status Register */
|
||||
#define REG_SERCOM0_USART_STATUS (0x42000810U) /**< \brief (SERCOM0) USART Status Register */
|
||||
#define REG_SERCOM0_I2CM_ADDR (0x42000814U) /**< \brief (SERCOM0) I2CM Address Register */
|
||||
#define REG_SERCOM0_I2CS_ADDR (0x42000814U) /**< \brief (SERCOM0) I2CS Address Register */
|
||||
#define REG_SERCOM0_SPI_ADDR (0x42000814U) /**< \brief (SERCOM0) SPI Address Register */
|
||||
#define REG_SERCOM0_I2CM_DATA (0x42000818U) /**< \brief (SERCOM0) I2CM Data Register */
|
||||
#define REG_SERCOM0_I2CS_DATA (0x42000818U) /**< \brief (SERCOM0) I2CS Data Register */
|
||||
#define REG_SERCOM0_SPI_DATA (0x42000818U) /**< \brief (SERCOM0) SPI Data Register */
|
||||
#define REG_SERCOM0_USART_DATA (0x42000818U) /**< \brief (SERCOM0) USART Data Register */
|
||||
#else
|
||||
#define REG_SERCOM0_I2CM_CTRLA (*(RwReg *)0x42000800U) /**< \brief (SERCOM0) I2CM Control Register A */
|
||||
#define REG_SERCOM0_I2CS_CTRLA (*(RwReg *)0x42000800U) /**< \brief (SERCOM0) I2CS Control Register A */
|
||||
#define REG_SERCOM0_SPI_CTRLA (*(RwReg *)0x42000800U) /**< \brief (SERCOM0) SPI Control Register A */
|
||||
#define REG_SERCOM0_USART_CTRLA (*(RwReg *)0x42000800U) /**< \brief (SERCOM0) USART Control Register A */
|
||||
#define REG_SERCOM0_I2CM_CTRLB (*(RwReg *)0x42000804U) /**< \brief (SERCOM0) I2CM Control Register B */
|
||||
#define REG_SERCOM0_I2CS_CTRLB (*(RwReg *)0x42000804U) /**< \brief (SERCOM0) I2CS Control Register B */
|
||||
#define REG_SERCOM0_SPI_CTRLB (*(RwReg *)0x42000804U) /**< \brief (SERCOM0) SPI Control Register B */
|
||||
#define REG_SERCOM0_USART_CTRLB (*(RwReg *)0x42000804U) /**< \brief (SERCOM0) USART Control Register B */
|
||||
#define REG_SERCOM0_I2CM_DBGCTRL (*(RwReg8 *)0x42000808U) /**< \brief (SERCOM0) I2CM Debug Register */
|
||||
#define REG_SERCOM0_SPI_DBGCTRL (*(RwReg8 *)0x42000808U) /**< \brief (SERCOM0) SPI Debug Register */
|
||||
#define REG_SERCOM0_USART_DBGCTRL (*(RwReg8 *)0x42000808U) /**< \brief (SERCOM0) USART Debug Register */
|
||||
#define REG_SERCOM0_I2CM_BAUD (*(RwReg16*)0x4200080AU) /**< \brief (SERCOM0) I2CM Baud Rate Register */
|
||||
#define REG_SERCOM0_SPI_BAUD (*(RwReg8 *)0x4200080AU) /**< \brief (SERCOM0) SPI Baud Rate Register */
|
||||
#define REG_SERCOM0_USART_BAUD (*(RwReg16*)0x4200080AU) /**< \brief (SERCOM0) USART Baud Rate Register */
|
||||
#define REG_SERCOM0_I2CM_INTENCLR (*(RwReg8 *)0x4200080CU) /**< \brief (SERCOM0) I2CM Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM0_I2CS_INTENCLR (*(RwReg8 *)0x4200080CU) /**< \brief (SERCOM0) I2CS Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM0_SPI_INTENCLR (*(RwReg8 *)0x4200080CU) /**< \brief (SERCOM0) SPI Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM0_USART_INTENCLR (*(RwReg8 *)0x4200080CU) /**< \brief (SERCOM0) USART Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM0_I2CM_INTENSET (*(RwReg8 *)0x4200080DU) /**< \brief (SERCOM0) I2CM Interrupt Enable Set Register */
|
||||
#define REG_SERCOM0_I2CS_INTENSET (*(RwReg8 *)0x4200080DU) /**< \brief (SERCOM0) I2CS Interrupt Enable Set Register */
|
||||
#define REG_SERCOM0_SPI_INTENSET (*(RwReg8 *)0x4200080DU) /**< \brief (SERCOM0) SPI Interrupt Enable Set Register */
|
||||
#define REG_SERCOM0_USART_INTENSET (*(RwReg8 *)0x4200080DU) /**< \brief (SERCOM0) USART Interrupt Enable Set Register */
|
||||
#define REG_SERCOM0_I2CM_INTFLAG (*(RwReg8 *)0x4200080EU) /**< \brief (SERCOM0) I2CM Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM0_I2CS_INTFLAG (*(RwReg8 *)0x4200080EU) /**< \brief (SERCOM0) I2CS Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM0_SPI_INTFLAG (*(RwReg8 *)0x4200080EU) /**< \brief (SERCOM0) SPI Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM0_USART_INTFLAG (*(RwReg8 *)0x4200080EU) /**< \brief (SERCOM0) USART Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM0_I2CM_STATUS (*(RwReg16*)0x42000810U) /**< \brief (SERCOM0) I2CM Status Register */
|
||||
#define REG_SERCOM0_I2CS_STATUS (*(RwReg16*)0x42000810U) /**< \brief (SERCOM0) I2CS Status Register */
|
||||
#define REG_SERCOM0_SPI_STATUS (*(RwReg16*)0x42000810U) /**< \brief (SERCOM0) SPI Status Register */
|
||||
#define REG_SERCOM0_USART_STATUS (*(RwReg16*)0x42000810U) /**< \brief (SERCOM0) USART Status Register */
|
||||
#define REG_SERCOM0_I2CM_ADDR (*(RwReg8 *)0x42000814U) /**< \brief (SERCOM0) I2CM Address Register */
|
||||
#define REG_SERCOM0_I2CS_ADDR (*(RwReg *)0x42000814U) /**< \brief (SERCOM0) I2CS Address Register */
|
||||
#define REG_SERCOM0_SPI_ADDR (*(RwReg *)0x42000814U) /**< \brief (SERCOM0) SPI Address Register */
|
||||
#define REG_SERCOM0_I2CM_DATA (*(RwReg8 *)0x42000818U) /**< \brief (SERCOM0) I2CM Data Register */
|
||||
#define REG_SERCOM0_I2CS_DATA (*(RwReg8 *)0x42000818U) /**< \brief (SERCOM0) I2CS Data Register */
|
||||
#define REG_SERCOM0_SPI_DATA (*(RwReg16*)0x42000818U) /**< \brief (SERCOM0) SPI Data Register */
|
||||
#define REG_SERCOM0_USART_DATA (*(RwReg16*)0x42000818U) /**< \brief (SERCOM0) USART Data Register */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for SERCOM0 peripheral ========== */
|
||||
#define SERCOM0_GCLK_ID_CORE 13
|
||||
#define SERCOM0_GCLK_ID_SLOW 12
|
||||
#define SERCOM0_INT_MSB 3
|
||||
#define SERCOM0_PMSB 3
|
||||
|
||||
#endif /* _SAMD20_SERCOM0_INSTANCE_ */
|
|
@ -0,0 +1,132 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for SERCOM1
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_SERCOM1_INSTANCE_
|
||||
#define _SAMD20_SERCOM1_INSTANCE_
|
||||
|
||||
/* ========== Register definition for SERCOM1 peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_SERCOM1_I2CM_CTRLA (0x42000C00U) /**< \brief (SERCOM1) I2CM Control Register A */
|
||||
#define REG_SERCOM1_I2CS_CTRLA (0x42000C00U) /**< \brief (SERCOM1) I2CS Control Register A */
|
||||
#define REG_SERCOM1_SPI_CTRLA (0x42000C00U) /**< \brief (SERCOM1) SPI Control Register A */
|
||||
#define REG_SERCOM1_USART_CTRLA (0x42000C00U) /**< \brief (SERCOM1) USART Control Register A */
|
||||
#define REG_SERCOM1_I2CM_CTRLB (0x42000C04U) /**< \brief (SERCOM1) I2CM Control Register B */
|
||||
#define REG_SERCOM1_I2CS_CTRLB (0x42000C04U) /**< \brief (SERCOM1) I2CS Control Register B */
|
||||
#define REG_SERCOM1_SPI_CTRLB (0x42000C04U) /**< \brief (SERCOM1) SPI Control Register B */
|
||||
#define REG_SERCOM1_USART_CTRLB (0x42000C04U) /**< \brief (SERCOM1) USART Control Register B */
|
||||
#define REG_SERCOM1_I2CM_DBGCTRL (0x42000C08U) /**< \brief (SERCOM1) I2CM Debug Register */
|
||||
#define REG_SERCOM1_SPI_DBGCTRL (0x42000C08U) /**< \brief (SERCOM1) SPI Debug Register */
|
||||
#define REG_SERCOM1_USART_DBGCTRL (0x42000C08U) /**< \brief (SERCOM1) USART Debug Register */
|
||||
#define REG_SERCOM1_I2CM_BAUD (0x42000C0AU) /**< \brief (SERCOM1) I2CM Baud Rate Register */
|
||||
#define REG_SERCOM1_SPI_BAUD (0x42000C0AU) /**< \brief (SERCOM1) SPI Baud Rate Register */
|
||||
#define REG_SERCOM1_USART_BAUD (0x42000C0AU) /**< \brief (SERCOM1) USART Baud Rate Register */
|
||||
#define REG_SERCOM1_I2CM_INTENCLR (0x42000C0CU) /**< \brief (SERCOM1) I2CM Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM1_I2CS_INTENCLR (0x42000C0CU) /**< \brief (SERCOM1) I2CS Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM1_SPI_INTENCLR (0x42000C0CU) /**< \brief (SERCOM1) SPI Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM1_USART_INTENCLR (0x42000C0CU) /**< \brief (SERCOM1) USART Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM1_I2CM_INTENSET (0x42000C0DU) /**< \brief (SERCOM1) I2CM Interrupt Enable Set Register */
|
||||
#define REG_SERCOM1_I2CS_INTENSET (0x42000C0DU) /**< \brief (SERCOM1) I2CS Interrupt Enable Set Register */
|
||||
#define REG_SERCOM1_SPI_INTENSET (0x42000C0DU) /**< \brief (SERCOM1) SPI Interrupt Enable Set Register */
|
||||
#define REG_SERCOM1_USART_INTENSET (0x42000C0DU) /**< \brief (SERCOM1) USART Interrupt Enable Set Register */
|
||||
#define REG_SERCOM1_I2CM_INTFLAG (0x42000C0EU) /**< \brief (SERCOM1) I2CM Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM1_I2CS_INTFLAG (0x42000C0EU) /**< \brief (SERCOM1) I2CS Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM1_SPI_INTFLAG (0x42000C0EU) /**< \brief (SERCOM1) SPI Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM1_USART_INTFLAG (0x42000C0EU) /**< \brief (SERCOM1) USART Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM1_I2CM_STATUS (0x42000C10U) /**< \brief (SERCOM1) I2CM Status Register */
|
||||
#define REG_SERCOM1_I2CS_STATUS (0x42000C10U) /**< \brief (SERCOM1) I2CS Status Register */
|
||||
#define REG_SERCOM1_SPI_STATUS (0x42000C10U) /**< \brief (SERCOM1) SPI Status Register */
|
||||
#define REG_SERCOM1_USART_STATUS (0x42000C10U) /**< \brief (SERCOM1) USART Status Register */
|
||||
#define REG_SERCOM1_I2CM_ADDR (0x42000C14U) /**< \brief (SERCOM1) I2CM Address Register */
|
||||
#define REG_SERCOM1_I2CS_ADDR (0x42000C14U) /**< \brief (SERCOM1) I2CS Address Register */
|
||||
#define REG_SERCOM1_SPI_ADDR (0x42000C14U) /**< \brief (SERCOM1) SPI Address Register */
|
||||
#define REG_SERCOM1_I2CM_DATA (0x42000C18U) /**< \brief (SERCOM1) I2CM Data Register */
|
||||
#define REG_SERCOM1_I2CS_DATA (0x42000C18U) /**< \brief (SERCOM1) I2CS Data Register */
|
||||
#define REG_SERCOM1_SPI_DATA (0x42000C18U) /**< \brief (SERCOM1) SPI Data Register */
|
||||
#define REG_SERCOM1_USART_DATA (0x42000C18U) /**< \brief (SERCOM1) USART Data Register */
|
||||
#else
|
||||
#define REG_SERCOM1_I2CM_CTRLA (*(RwReg *)0x42000C00U) /**< \brief (SERCOM1) I2CM Control Register A */
|
||||
#define REG_SERCOM1_I2CS_CTRLA (*(RwReg *)0x42000C00U) /**< \brief (SERCOM1) I2CS Control Register A */
|
||||
#define REG_SERCOM1_SPI_CTRLA (*(RwReg *)0x42000C00U) /**< \brief (SERCOM1) SPI Control Register A */
|
||||
#define REG_SERCOM1_USART_CTRLA (*(RwReg *)0x42000C00U) /**< \brief (SERCOM1) USART Control Register A */
|
||||
#define REG_SERCOM1_I2CM_CTRLB (*(RwReg *)0x42000C04U) /**< \brief (SERCOM1) I2CM Control Register B */
|
||||
#define REG_SERCOM1_I2CS_CTRLB (*(RwReg *)0x42000C04U) /**< \brief (SERCOM1) I2CS Control Register B */
|
||||
#define REG_SERCOM1_SPI_CTRLB (*(RwReg *)0x42000C04U) /**< \brief (SERCOM1) SPI Control Register B */
|
||||
#define REG_SERCOM1_USART_CTRLB (*(RwReg *)0x42000C04U) /**< \brief (SERCOM1) USART Control Register B */
|
||||
#define REG_SERCOM1_I2CM_DBGCTRL (*(RwReg8 *)0x42000C08U) /**< \brief (SERCOM1) I2CM Debug Register */
|
||||
#define REG_SERCOM1_SPI_DBGCTRL (*(RwReg8 *)0x42000C08U) /**< \brief (SERCOM1) SPI Debug Register */
|
||||
#define REG_SERCOM1_USART_DBGCTRL (*(RwReg8 *)0x42000C08U) /**< \brief (SERCOM1) USART Debug Register */
|
||||
#define REG_SERCOM1_I2CM_BAUD (*(RwReg16*)0x42000C0AU) /**< \brief (SERCOM1) I2CM Baud Rate Register */
|
||||
#define REG_SERCOM1_SPI_BAUD (*(RwReg8 *)0x42000C0AU) /**< \brief (SERCOM1) SPI Baud Rate Register */
|
||||
#define REG_SERCOM1_USART_BAUD (*(RwReg16*)0x42000C0AU) /**< \brief (SERCOM1) USART Baud Rate Register */
|
||||
#define REG_SERCOM1_I2CM_INTENCLR (*(RwReg8 *)0x42000C0CU) /**< \brief (SERCOM1) I2CM Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM1_I2CS_INTENCLR (*(RwReg8 *)0x42000C0CU) /**< \brief (SERCOM1) I2CS Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM1_SPI_INTENCLR (*(RwReg8 *)0x42000C0CU) /**< \brief (SERCOM1) SPI Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM1_USART_INTENCLR (*(RwReg8 *)0x42000C0CU) /**< \brief (SERCOM1) USART Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM1_I2CM_INTENSET (*(RwReg8 *)0x42000C0DU) /**< \brief (SERCOM1) I2CM Interrupt Enable Set Register */
|
||||
#define REG_SERCOM1_I2CS_INTENSET (*(RwReg8 *)0x42000C0DU) /**< \brief (SERCOM1) I2CS Interrupt Enable Set Register */
|
||||
#define REG_SERCOM1_SPI_INTENSET (*(RwReg8 *)0x42000C0DU) /**< \brief (SERCOM1) SPI Interrupt Enable Set Register */
|
||||
#define REG_SERCOM1_USART_INTENSET (*(RwReg8 *)0x42000C0DU) /**< \brief (SERCOM1) USART Interrupt Enable Set Register */
|
||||
#define REG_SERCOM1_I2CM_INTFLAG (*(RwReg8 *)0x42000C0EU) /**< \brief (SERCOM1) I2CM Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM1_I2CS_INTFLAG (*(RwReg8 *)0x42000C0EU) /**< \brief (SERCOM1) I2CS Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM1_SPI_INTFLAG (*(RwReg8 *)0x42000C0EU) /**< \brief (SERCOM1) SPI Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM1_USART_INTFLAG (*(RwReg8 *)0x42000C0EU) /**< \brief (SERCOM1) USART Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM1_I2CM_STATUS (*(RwReg16*)0x42000C10U) /**< \brief (SERCOM1) I2CM Status Register */
|
||||
#define REG_SERCOM1_I2CS_STATUS (*(RwReg16*)0x42000C10U) /**< \brief (SERCOM1) I2CS Status Register */
|
||||
#define REG_SERCOM1_SPI_STATUS (*(RwReg16*)0x42000C10U) /**< \brief (SERCOM1) SPI Status Register */
|
||||
#define REG_SERCOM1_USART_STATUS (*(RwReg16*)0x42000C10U) /**< \brief (SERCOM1) USART Status Register */
|
||||
#define REG_SERCOM1_I2CM_ADDR (*(RwReg8 *)0x42000C14U) /**< \brief (SERCOM1) I2CM Address Register */
|
||||
#define REG_SERCOM1_I2CS_ADDR (*(RwReg *)0x42000C14U) /**< \brief (SERCOM1) I2CS Address Register */
|
||||
#define REG_SERCOM1_SPI_ADDR (*(RwReg *)0x42000C14U) /**< \brief (SERCOM1) SPI Address Register */
|
||||
#define REG_SERCOM1_I2CM_DATA (*(RwReg8 *)0x42000C18U) /**< \brief (SERCOM1) I2CM Data Register */
|
||||
#define REG_SERCOM1_I2CS_DATA (*(RwReg8 *)0x42000C18U) /**< \brief (SERCOM1) I2CS Data Register */
|
||||
#define REG_SERCOM1_SPI_DATA (*(RwReg16*)0x42000C18U) /**< \brief (SERCOM1) SPI Data Register */
|
||||
#define REG_SERCOM1_USART_DATA (*(RwReg16*)0x42000C18U) /**< \brief (SERCOM1) USART Data Register */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for SERCOM1 peripheral ========== */
|
||||
#define SERCOM1_GCLK_ID_CORE 14
|
||||
#define SERCOM1_GCLK_ID_SLOW 12
|
||||
#define SERCOM1_INT_MSB 3
|
||||
#define SERCOM1_PMSB 3
|
||||
|
||||
#endif /* _SAMD20_SERCOM1_INSTANCE_ */
|
|
@ -0,0 +1,132 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for SERCOM2
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_SERCOM2_INSTANCE_
|
||||
#define _SAMD20_SERCOM2_INSTANCE_
|
||||
|
||||
/* ========== Register definition for SERCOM2 peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_SERCOM2_I2CM_CTRLA (0x42001000U) /**< \brief (SERCOM2) I2CM Control Register A */
|
||||
#define REG_SERCOM2_I2CS_CTRLA (0x42001000U) /**< \brief (SERCOM2) I2CS Control Register A */
|
||||
#define REG_SERCOM2_SPI_CTRLA (0x42001000U) /**< \brief (SERCOM2) SPI Control Register A */
|
||||
#define REG_SERCOM2_USART_CTRLA (0x42001000U) /**< \brief (SERCOM2) USART Control Register A */
|
||||
#define REG_SERCOM2_I2CM_CTRLB (0x42001004U) /**< \brief (SERCOM2) I2CM Control Register B */
|
||||
#define REG_SERCOM2_I2CS_CTRLB (0x42001004U) /**< \brief (SERCOM2) I2CS Control Register B */
|
||||
#define REG_SERCOM2_SPI_CTRLB (0x42001004U) /**< \brief (SERCOM2) SPI Control Register B */
|
||||
#define REG_SERCOM2_USART_CTRLB (0x42001004U) /**< \brief (SERCOM2) USART Control Register B */
|
||||
#define REG_SERCOM2_I2CM_DBGCTRL (0x42001008U) /**< \brief (SERCOM2) I2CM Debug Register */
|
||||
#define REG_SERCOM2_SPI_DBGCTRL (0x42001008U) /**< \brief (SERCOM2) SPI Debug Register */
|
||||
#define REG_SERCOM2_USART_DBGCTRL (0x42001008U) /**< \brief (SERCOM2) USART Debug Register */
|
||||
#define REG_SERCOM2_I2CM_BAUD (0x4200100AU) /**< \brief (SERCOM2) I2CM Baud Rate Register */
|
||||
#define REG_SERCOM2_SPI_BAUD (0x4200100AU) /**< \brief (SERCOM2) SPI Baud Rate Register */
|
||||
#define REG_SERCOM2_USART_BAUD (0x4200100AU) /**< \brief (SERCOM2) USART Baud Rate Register */
|
||||
#define REG_SERCOM2_I2CM_INTENCLR (0x4200100CU) /**< \brief (SERCOM2) I2CM Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM2_I2CS_INTENCLR (0x4200100CU) /**< \brief (SERCOM2) I2CS Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM2_SPI_INTENCLR (0x4200100CU) /**< \brief (SERCOM2) SPI Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM2_USART_INTENCLR (0x4200100CU) /**< \brief (SERCOM2) USART Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM2_I2CM_INTENSET (0x4200100DU) /**< \brief (SERCOM2) I2CM Interrupt Enable Set Register */
|
||||
#define REG_SERCOM2_I2CS_INTENSET (0x4200100DU) /**< \brief (SERCOM2) I2CS Interrupt Enable Set Register */
|
||||
#define REG_SERCOM2_SPI_INTENSET (0x4200100DU) /**< \brief (SERCOM2) SPI Interrupt Enable Set Register */
|
||||
#define REG_SERCOM2_USART_INTENSET (0x4200100DU) /**< \brief (SERCOM2) USART Interrupt Enable Set Register */
|
||||
#define REG_SERCOM2_I2CM_INTFLAG (0x4200100EU) /**< \brief (SERCOM2) I2CM Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM2_I2CS_INTFLAG (0x4200100EU) /**< \brief (SERCOM2) I2CS Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM2_SPI_INTFLAG (0x4200100EU) /**< \brief (SERCOM2) SPI Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM2_USART_INTFLAG (0x4200100EU) /**< \brief (SERCOM2) USART Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM2_I2CM_STATUS (0x42001010U) /**< \brief (SERCOM2) I2CM Status Register */
|
||||
#define REG_SERCOM2_I2CS_STATUS (0x42001010U) /**< \brief (SERCOM2) I2CS Status Register */
|
||||
#define REG_SERCOM2_SPI_STATUS (0x42001010U) /**< \brief (SERCOM2) SPI Status Register */
|
||||
#define REG_SERCOM2_USART_STATUS (0x42001010U) /**< \brief (SERCOM2) USART Status Register */
|
||||
#define REG_SERCOM2_I2CM_ADDR (0x42001014U) /**< \brief (SERCOM2) I2CM Address Register */
|
||||
#define REG_SERCOM2_I2CS_ADDR (0x42001014U) /**< \brief (SERCOM2) I2CS Address Register */
|
||||
#define REG_SERCOM2_SPI_ADDR (0x42001014U) /**< \brief (SERCOM2) SPI Address Register */
|
||||
#define REG_SERCOM2_I2CM_DATA (0x42001018U) /**< \brief (SERCOM2) I2CM Data Register */
|
||||
#define REG_SERCOM2_I2CS_DATA (0x42001018U) /**< \brief (SERCOM2) I2CS Data Register */
|
||||
#define REG_SERCOM2_SPI_DATA (0x42001018U) /**< \brief (SERCOM2) SPI Data Register */
|
||||
#define REG_SERCOM2_USART_DATA (0x42001018U) /**< \brief (SERCOM2) USART Data Register */
|
||||
#else
|
||||
#define REG_SERCOM2_I2CM_CTRLA (*(RwReg *)0x42001000U) /**< \brief (SERCOM2) I2CM Control Register A */
|
||||
#define REG_SERCOM2_I2CS_CTRLA (*(RwReg *)0x42001000U) /**< \brief (SERCOM2) I2CS Control Register A */
|
||||
#define REG_SERCOM2_SPI_CTRLA (*(RwReg *)0x42001000U) /**< \brief (SERCOM2) SPI Control Register A */
|
||||
#define REG_SERCOM2_USART_CTRLA (*(RwReg *)0x42001000U) /**< \brief (SERCOM2) USART Control Register A */
|
||||
#define REG_SERCOM2_I2CM_CTRLB (*(RwReg *)0x42001004U) /**< \brief (SERCOM2) I2CM Control Register B */
|
||||
#define REG_SERCOM2_I2CS_CTRLB (*(RwReg *)0x42001004U) /**< \brief (SERCOM2) I2CS Control Register B */
|
||||
#define REG_SERCOM2_SPI_CTRLB (*(RwReg *)0x42001004U) /**< \brief (SERCOM2) SPI Control Register B */
|
||||
#define REG_SERCOM2_USART_CTRLB (*(RwReg *)0x42001004U) /**< \brief (SERCOM2) USART Control Register B */
|
||||
#define REG_SERCOM2_I2CM_DBGCTRL (*(RwReg8 *)0x42001008U) /**< \brief (SERCOM2) I2CM Debug Register */
|
||||
#define REG_SERCOM2_SPI_DBGCTRL (*(RwReg8 *)0x42001008U) /**< \brief (SERCOM2) SPI Debug Register */
|
||||
#define REG_SERCOM2_USART_DBGCTRL (*(RwReg8 *)0x42001008U) /**< \brief (SERCOM2) USART Debug Register */
|
||||
#define REG_SERCOM2_I2CM_BAUD (*(RwReg16*)0x4200100AU) /**< \brief (SERCOM2) I2CM Baud Rate Register */
|
||||
#define REG_SERCOM2_SPI_BAUD (*(RwReg8 *)0x4200100AU) /**< \brief (SERCOM2) SPI Baud Rate Register */
|
||||
#define REG_SERCOM2_USART_BAUD (*(RwReg16*)0x4200100AU) /**< \brief (SERCOM2) USART Baud Rate Register */
|
||||
#define REG_SERCOM2_I2CM_INTENCLR (*(RwReg8 *)0x4200100CU) /**< \brief (SERCOM2) I2CM Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM2_I2CS_INTENCLR (*(RwReg8 *)0x4200100CU) /**< \brief (SERCOM2) I2CS Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM2_SPI_INTENCLR (*(RwReg8 *)0x4200100CU) /**< \brief (SERCOM2) SPI Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM2_USART_INTENCLR (*(RwReg8 *)0x4200100CU) /**< \brief (SERCOM2) USART Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM2_I2CM_INTENSET (*(RwReg8 *)0x4200100DU) /**< \brief (SERCOM2) I2CM Interrupt Enable Set Register */
|
||||
#define REG_SERCOM2_I2CS_INTENSET (*(RwReg8 *)0x4200100DU) /**< \brief (SERCOM2) I2CS Interrupt Enable Set Register */
|
||||
#define REG_SERCOM2_SPI_INTENSET (*(RwReg8 *)0x4200100DU) /**< \brief (SERCOM2) SPI Interrupt Enable Set Register */
|
||||
#define REG_SERCOM2_USART_INTENSET (*(RwReg8 *)0x4200100DU) /**< \brief (SERCOM2) USART Interrupt Enable Set Register */
|
||||
#define REG_SERCOM2_I2CM_INTFLAG (*(RwReg8 *)0x4200100EU) /**< \brief (SERCOM2) I2CM Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM2_I2CS_INTFLAG (*(RwReg8 *)0x4200100EU) /**< \brief (SERCOM2) I2CS Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM2_SPI_INTFLAG (*(RwReg8 *)0x4200100EU) /**< \brief (SERCOM2) SPI Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM2_USART_INTFLAG (*(RwReg8 *)0x4200100EU) /**< \brief (SERCOM2) USART Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM2_I2CM_STATUS (*(RwReg16*)0x42001010U) /**< \brief (SERCOM2) I2CM Status Register */
|
||||
#define REG_SERCOM2_I2CS_STATUS (*(RwReg16*)0x42001010U) /**< \brief (SERCOM2) I2CS Status Register */
|
||||
#define REG_SERCOM2_SPI_STATUS (*(RwReg16*)0x42001010U) /**< \brief (SERCOM2) SPI Status Register */
|
||||
#define REG_SERCOM2_USART_STATUS (*(RwReg16*)0x42001010U) /**< \brief (SERCOM2) USART Status Register */
|
||||
#define REG_SERCOM2_I2CM_ADDR (*(RwReg8 *)0x42001014U) /**< \brief (SERCOM2) I2CM Address Register */
|
||||
#define REG_SERCOM2_I2CS_ADDR (*(RwReg *)0x42001014U) /**< \brief (SERCOM2) I2CS Address Register */
|
||||
#define REG_SERCOM2_SPI_ADDR (*(RwReg *)0x42001014U) /**< \brief (SERCOM2) SPI Address Register */
|
||||
#define REG_SERCOM2_I2CM_DATA (*(RwReg8 *)0x42001018U) /**< \brief (SERCOM2) I2CM Data Register */
|
||||
#define REG_SERCOM2_I2CS_DATA (*(RwReg8 *)0x42001018U) /**< \brief (SERCOM2) I2CS Data Register */
|
||||
#define REG_SERCOM2_SPI_DATA (*(RwReg16*)0x42001018U) /**< \brief (SERCOM2) SPI Data Register */
|
||||
#define REG_SERCOM2_USART_DATA (*(RwReg16*)0x42001018U) /**< \brief (SERCOM2) USART Data Register */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for SERCOM2 peripheral ========== */
|
||||
#define SERCOM2_GCLK_ID_CORE 15
|
||||
#define SERCOM2_GCLK_ID_SLOW 12
|
||||
#define SERCOM2_INT_MSB 3
|
||||
#define SERCOM2_PMSB 3
|
||||
|
||||
#endif /* _SAMD20_SERCOM2_INSTANCE_ */
|
|
@ -0,0 +1,132 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for SERCOM3
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_SERCOM3_INSTANCE_
|
||||
#define _SAMD20_SERCOM3_INSTANCE_
|
||||
|
||||
/* ========== Register definition for SERCOM3 peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_SERCOM3_I2CM_CTRLA (0x42001400U) /**< \brief (SERCOM3) I2CM Control Register A */
|
||||
#define REG_SERCOM3_I2CS_CTRLA (0x42001400U) /**< \brief (SERCOM3) I2CS Control Register A */
|
||||
#define REG_SERCOM3_SPI_CTRLA (0x42001400U) /**< \brief (SERCOM3) SPI Control Register A */
|
||||
#define REG_SERCOM3_USART_CTRLA (0x42001400U) /**< \brief (SERCOM3) USART Control Register A */
|
||||
#define REG_SERCOM3_I2CM_CTRLB (0x42001404U) /**< \brief (SERCOM3) I2CM Control Register B */
|
||||
#define REG_SERCOM3_I2CS_CTRLB (0x42001404U) /**< \brief (SERCOM3) I2CS Control Register B */
|
||||
#define REG_SERCOM3_SPI_CTRLB (0x42001404U) /**< \brief (SERCOM3) SPI Control Register B */
|
||||
#define REG_SERCOM3_USART_CTRLB (0x42001404U) /**< \brief (SERCOM3) USART Control Register B */
|
||||
#define REG_SERCOM3_I2CM_DBGCTRL (0x42001408U) /**< \brief (SERCOM3) I2CM Debug Register */
|
||||
#define REG_SERCOM3_SPI_DBGCTRL (0x42001408U) /**< \brief (SERCOM3) SPI Debug Register */
|
||||
#define REG_SERCOM3_USART_DBGCTRL (0x42001408U) /**< \brief (SERCOM3) USART Debug Register */
|
||||
#define REG_SERCOM3_I2CM_BAUD (0x4200140AU) /**< \brief (SERCOM3) I2CM Baud Rate Register */
|
||||
#define REG_SERCOM3_SPI_BAUD (0x4200140AU) /**< \brief (SERCOM3) SPI Baud Rate Register */
|
||||
#define REG_SERCOM3_USART_BAUD (0x4200140AU) /**< \brief (SERCOM3) USART Baud Rate Register */
|
||||
#define REG_SERCOM3_I2CM_INTENCLR (0x4200140CU) /**< \brief (SERCOM3) I2CM Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM3_I2CS_INTENCLR (0x4200140CU) /**< \brief (SERCOM3) I2CS Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM3_SPI_INTENCLR (0x4200140CU) /**< \brief (SERCOM3) SPI Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM3_USART_INTENCLR (0x4200140CU) /**< \brief (SERCOM3) USART Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM3_I2CM_INTENSET (0x4200140DU) /**< \brief (SERCOM3) I2CM Interrupt Enable Set Register */
|
||||
#define REG_SERCOM3_I2CS_INTENSET (0x4200140DU) /**< \brief (SERCOM3) I2CS Interrupt Enable Set Register */
|
||||
#define REG_SERCOM3_SPI_INTENSET (0x4200140DU) /**< \brief (SERCOM3) SPI Interrupt Enable Set Register */
|
||||
#define REG_SERCOM3_USART_INTENSET (0x4200140DU) /**< \brief (SERCOM3) USART Interrupt Enable Set Register */
|
||||
#define REG_SERCOM3_I2CM_INTFLAG (0x4200140EU) /**< \brief (SERCOM3) I2CM Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM3_I2CS_INTFLAG (0x4200140EU) /**< \brief (SERCOM3) I2CS Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM3_SPI_INTFLAG (0x4200140EU) /**< \brief (SERCOM3) SPI Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM3_USART_INTFLAG (0x4200140EU) /**< \brief (SERCOM3) USART Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM3_I2CM_STATUS (0x42001410U) /**< \brief (SERCOM3) I2CM Status Register */
|
||||
#define REG_SERCOM3_I2CS_STATUS (0x42001410U) /**< \brief (SERCOM3) I2CS Status Register */
|
||||
#define REG_SERCOM3_SPI_STATUS (0x42001410U) /**< \brief (SERCOM3) SPI Status Register */
|
||||
#define REG_SERCOM3_USART_STATUS (0x42001410U) /**< \brief (SERCOM3) USART Status Register */
|
||||
#define REG_SERCOM3_I2CM_ADDR (0x42001414U) /**< \brief (SERCOM3) I2CM Address Register */
|
||||
#define REG_SERCOM3_I2CS_ADDR (0x42001414U) /**< \brief (SERCOM3) I2CS Address Register */
|
||||
#define REG_SERCOM3_SPI_ADDR (0x42001414U) /**< \brief (SERCOM3) SPI Address Register */
|
||||
#define REG_SERCOM3_I2CM_DATA (0x42001418U) /**< \brief (SERCOM3) I2CM Data Register */
|
||||
#define REG_SERCOM3_I2CS_DATA (0x42001418U) /**< \brief (SERCOM3) I2CS Data Register */
|
||||
#define REG_SERCOM3_SPI_DATA (0x42001418U) /**< \brief (SERCOM3) SPI Data Register */
|
||||
#define REG_SERCOM3_USART_DATA (0x42001418U) /**< \brief (SERCOM3) USART Data Register */
|
||||
#else
|
||||
#define REG_SERCOM3_I2CM_CTRLA (*(RwReg *)0x42001400U) /**< \brief (SERCOM3) I2CM Control Register A */
|
||||
#define REG_SERCOM3_I2CS_CTRLA (*(RwReg *)0x42001400U) /**< \brief (SERCOM3) I2CS Control Register A */
|
||||
#define REG_SERCOM3_SPI_CTRLA (*(RwReg *)0x42001400U) /**< \brief (SERCOM3) SPI Control Register A */
|
||||
#define REG_SERCOM3_USART_CTRLA (*(RwReg *)0x42001400U) /**< \brief (SERCOM3) USART Control Register A */
|
||||
#define REG_SERCOM3_I2CM_CTRLB (*(RwReg *)0x42001404U) /**< \brief (SERCOM3) I2CM Control Register B */
|
||||
#define REG_SERCOM3_I2CS_CTRLB (*(RwReg *)0x42001404U) /**< \brief (SERCOM3) I2CS Control Register B */
|
||||
#define REG_SERCOM3_SPI_CTRLB (*(RwReg *)0x42001404U) /**< \brief (SERCOM3) SPI Control Register B */
|
||||
#define REG_SERCOM3_USART_CTRLB (*(RwReg *)0x42001404U) /**< \brief (SERCOM3) USART Control Register B */
|
||||
#define REG_SERCOM3_I2CM_DBGCTRL (*(RwReg8 *)0x42001408U) /**< \brief (SERCOM3) I2CM Debug Register */
|
||||
#define REG_SERCOM3_SPI_DBGCTRL (*(RwReg8 *)0x42001408U) /**< \brief (SERCOM3) SPI Debug Register */
|
||||
#define REG_SERCOM3_USART_DBGCTRL (*(RwReg8 *)0x42001408U) /**< \brief (SERCOM3) USART Debug Register */
|
||||
#define REG_SERCOM3_I2CM_BAUD (*(RwReg16*)0x4200140AU) /**< \brief (SERCOM3) I2CM Baud Rate Register */
|
||||
#define REG_SERCOM3_SPI_BAUD (*(RwReg8 *)0x4200140AU) /**< \brief (SERCOM3) SPI Baud Rate Register */
|
||||
#define REG_SERCOM3_USART_BAUD (*(RwReg16*)0x4200140AU) /**< \brief (SERCOM3) USART Baud Rate Register */
|
||||
#define REG_SERCOM3_I2CM_INTENCLR (*(RwReg8 *)0x4200140CU) /**< \brief (SERCOM3) I2CM Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM3_I2CS_INTENCLR (*(RwReg8 *)0x4200140CU) /**< \brief (SERCOM3) I2CS Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM3_SPI_INTENCLR (*(RwReg8 *)0x4200140CU) /**< \brief (SERCOM3) SPI Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM3_USART_INTENCLR (*(RwReg8 *)0x4200140CU) /**< \brief (SERCOM3) USART Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM3_I2CM_INTENSET (*(RwReg8 *)0x4200140DU) /**< \brief (SERCOM3) I2CM Interrupt Enable Set Register */
|
||||
#define REG_SERCOM3_I2CS_INTENSET (*(RwReg8 *)0x4200140DU) /**< \brief (SERCOM3) I2CS Interrupt Enable Set Register */
|
||||
#define REG_SERCOM3_SPI_INTENSET (*(RwReg8 *)0x4200140DU) /**< \brief (SERCOM3) SPI Interrupt Enable Set Register */
|
||||
#define REG_SERCOM3_USART_INTENSET (*(RwReg8 *)0x4200140DU) /**< \brief (SERCOM3) USART Interrupt Enable Set Register */
|
||||
#define REG_SERCOM3_I2CM_INTFLAG (*(RwReg8 *)0x4200140EU) /**< \brief (SERCOM3) I2CM Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM3_I2CS_INTFLAG (*(RwReg8 *)0x4200140EU) /**< \brief (SERCOM3) I2CS Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM3_SPI_INTFLAG (*(RwReg8 *)0x4200140EU) /**< \brief (SERCOM3) SPI Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM3_USART_INTFLAG (*(RwReg8 *)0x4200140EU) /**< \brief (SERCOM3) USART Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM3_I2CM_STATUS (*(RwReg16*)0x42001410U) /**< \brief (SERCOM3) I2CM Status Register */
|
||||
#define REG_SERCOM3_I2CS_STATUS (*(RwReg16*)0x42001410U) /**< \brief (SERCOM3) I2CS Status Register */
|
||||
#define REG_SERCOM3_SPI_STATUS (*(RwReg16*)0x42001410U) /**< \brief (SERCOM3) SPI Status Register */
|
||||
#define REG_SERCOM3_USART_STATUS (*(RwReg16*)0x42001410U) /**< \brief (SERCOM3) USART Status Register */
|
||||
#define REG_SERCOM3_I2CM_ADDR (*(RwReg8 *)0x42001414U) /**< \brief (SERCOM3) I2CM Address Register */
|
||||
#define REG_SERCOM3_I2CS_ADDR (*(RwReg *)0x42001414U) /**< \brief (SERCOM3) I2CS Address Register */
|
||||
#define REG_SERCOM3_SPI_ADDR (*(RwReg *)0x42001414U) /**< \brief (SERCOM3) SPI Address Register */
|
||||
#define REG_SERCOM3_I2CM_DATA (*(RwReg8 *)0x42001418U) /**< \brief (SERCOM3) I2CM Data Register */
|
||||
#define REG_SERCOM3_I2CS_DATA (*(RwReg8 *)0x42001418U) /**< \brief (SERCOM3) I2CS Data Register */
|
||||
#define REG_SERCOM3_SPI_DATA (*(RwReg16*)0x42001418U) /**< \brief (SERCOM3) SPI Data Register */
|
||||
#define REG_SERCOM3_USART_DATA (*(RwReg16*)0x42001418U) /**< \brief (SERCOM3) USART Data Register */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for SERCOM3 peripheral ========== */
|
||||
#define SERCOM3_GCLK_ID_CORE 16
|
||||
#define SERCOM3_GCLK_ID_SLOW 12
|
||||
#define SERCOM3_INT_MSB 3
|
||||
#define SERCOM3_PMSB 3
|
||||
|
||||
#endif /* _SAMD20_SERCOM3_INSTANCE_ */
|
|
@ -0,0 +1,132 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for SERCOM4
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_SERCOM4_INSTANCE_
|
||||
#define _SAMD20_SERCOM4_INSTANCE_
|
||||
|
||||
/* ========== Register definition for SERCOM4 peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_SERCOM4_I2CM_CTRLA (0x42001800U) /**< \brief (SERCOM4) I2CM Control Register A */
|
||||
#define REG_SERCOM4_I2CS_CTRLA (0x42001800U) /**< \brief (SERCOM4) I2CS Control Register A */
|
||||
#define REG_SERCOM4_SPI_CTRLA (0x42001800U) /**< \brief (SERCOM4) SPI Control Register A */
|
||||
#define REG_SERCOM4_USART_CTRLA (0x42001800U) /**< \brief (SERCOM4) USART Control Register A */
|
||||
#define REG_SERCOM4_I2CM_CTRLB (0x42001804U) /**< \brief (SERCOM4) I2CM Control Register B */
|
||||
#define REG_SERCOM4_I2CS_CTRLB (0x42001804U) /**< \brief (SERCOM4) I2CS Control Register B */
|
||||
#define REG_SERCOM4_SPI_CTRLB (0x42001804U) /**< \brief (SERCOM4) SPI Control Register B */
|
||||
#define REG_SERCOM4_USART_CTRLB (0x42001804U) /**< \brief (SERCOM4) USART Control Register B */
|
||||
#define REG_SERCOM4_I2CM_DBGCTRL (0x42001808U) /**< \brief (SERCOM4) I2CM Debug Register */
|
||||
#define REG_SERCOM4_SPI_DBGCTRL (0x42001808U) /**< \brief (SERCOM4) SPI Debug Register */
|
||||
#define REG_SERCOM4_USART_DBGCTRL (0x42001808U) /**< \brief (SERCOM4) USART Debug Register */
|
||||
#define REG_SERCOM4_I2CM_BAUD (0x4200180AU) /**< \brief (SERCOM4) I2CM Baud Rate Register */
|
||||
#define REG_SERCOM4_SPI_BAUD (0x4200180AU) /**< \brief (SERCOM4) SPI Baud Rate Register */
|
||||
#define REG_SERCOM4_USART_BAUD (0x4200180AU) /**< \brief (SERCOM4) USART Baud Rate Register */
|
||||
#define REG_SERCOM4_I2CM_INTENCLR (0x4200180CU) /**< \brief (SERCOM4) I2CM Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM4_I2CS_INTENCLR (0x4200180CU) /**< \brief (SERCOM4) I2CS Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM4_SPI_INTENCLR (0x4200180CU) /**< \brief (SERCOM4) SPI Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM4_USART_INTENCLR (0x4200180CU) /**< \brief (SERCOM4) USART Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM4_I2CM_INTENSET (0x4200180DU) /**< \brief (SERCOM4) I2CM Interrupt Enable Set Register */
|
||||
#define REG_SERCOM4_I2CS_INTENSET (0x4200180DU) /**< \brief (SERCOM4) I2CS Interrupt Enable Set Register */
|
||||
#define REG_SERCOM4_SPI_INTENSET (0x4200180DU) /**< \brief (SERCOM4) SPI Interrupt Enable Set Register */
|
||||
#define REG_SERCOM4_USART_INTENSET (0x4200180DU) /**< \brief (SERCOM4) USART Interrupt Enable Set Register */
|
||||
#define REG_SERCOM4_I2CM_INTFLAG (0x4200180EU) /**< \brief (SERCOM4) I2CM Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM4_I2CS_INTFLAG (0x4200180EU) /**< \brief (SERCOM4) I2CS Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM4_SPI_INTFLAG (0x4200180EU) /**< \brief (SERCOM4) SPI Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM4_USART_INTFLAG (0x4200180EU) /**< \brief (SERCOM4) USART Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM4_I2CM_STATUS (0x42001810U) /**< \brief (SERCOM4) I2CM Status Register */
|
||||
#define REG_SERCOM4_I2CS_STATUS (0x42001810U) /**< \brief (SERCOM4) I2CS Status Register */
|
||||
#define REG_SERCOM4_SPI_STATUS (0x42001810U) /**< \brief (SERCOM4) SPI Status Register */
|
||||
#define REG_SERCOM4_USART_STATUS (0x42001810U) /**< \brief (SERCOM4) USART Status Register */
|
||||
#define REG_SERCOM4_I2CM_ADDR (0x42001814U) /**< \brief (SERCOM4) I2CM Address Register */
|
||||
#define REG_SERCOM4_I2CS_ADDR (0x42001814U) /**< \brief (SERCOM4) I2CS Address Register */
|
||||
#define REG_SERCOM4_SPI_ADDR (0x42001814U) /**< \brief (SERCOM4) SPI Address Register */
|
||||
#define REG_SERCOM4_I2CM_DATA (0x42001818U) /**< \brief (SERCOM4) I2CM Data Register */
|
||||
#define REG_SERCOM4_I2CS_DATA (0x42001818U) /**< \brief (SERCOM4) I2CS Data Register */
|
||||
#define REG_SERCOM4_SPI_DATA (0x42001818U) /**< \brief (SERCOM4) SPI Data Register */
|
||||
#define REG_SERCOM4_USART_DATA (0x42001818U) /**< \brief (SERCOM4) USART Data Register */
|
||||
#else
|
||||
#define REG_SERCOM4_I2CM_CTRLA (*(RwReg *)0x42001800U) /**< \brief (SERCOM4) I2CM Control Register A */
|
||||
#define REG_SERCOM4_I2CS_CTRLA (*(RwReg *)0x42001800U) /**< \brief (SERCOM4) I2CS Control Register A */
|
||||
#define REG_SERCOM4_SPI_CTRLA (*(RwReg *)0x42001800U) /**< \brief (SERCOM4) SPI Control Register A */
|
||||
#define REG_SERCOM4_USART_CTRLA (*(RwReg *)0x42001800U) /**< \brief (SERCOM4) USART Control Register A */
|
||||
#define REG_SERCOM4_I2CM_CTRLB (*(RwReg *)0x42001804U) /**< \brief (SERCOM4) I2CM Control Register B */
|
||||
#define REG_SERCOM4_I2CS_CTRLB (*(RwReg *)0x42001804U) /**< \brief (SERCOM4) I2CS Control Register B */
|
||||
#define REG_SERCOM4_SPI_CTRLB (*(RwReg *)0x42001804U) /**< \brief (SERCOM4) SPI Control Register B */
|
||||
#define REG_SERCOM4_USART_CTRLB (*(RwReg *)0x42001804U) /**< \brief (SERCOM4) USART Control Register B */
|
||||
#define REG_SERCOM4_I2CM_DBGCTRL (*(RwReg8 *)0x42001808U) /**< \brief (SERCOM4) I2CM Debug Register */
|
||||
#define REG_SERCOM4_SPI_DBGCTRL (*(RwReg8 *)0x42001808U) /**< \brief (SERCOM4) SPI Debug Register */
|
||||
#define REG_SERCOM4_USART_DBGCTRL (*(RwReg8 *)0x42001808U) /**< \brief (SERCOM4) USART Debug Register */
|
||||
#define REG_SERCOM4_I2CM_BAUD (*(RwReg16*)0x4200180AU) /**< \brief (SERCOM4) I2CM Baud Rate Register */
|
||||
#define REG_SERCOM4_SPI_BAUD (*(RwReg8 *)0x4200180AU) /**< \brief (SERCOM4) SPI Baud Rate Register */
|
||||
#define REG_SERCOM4_USART_BAUD (*(RwReg16*)0x4200180AU) /**< \brief (SERCOM4) USART Baud Rate Register */
|
||||
#define REG_SERCOM4_I2CM_INTENCLR (*(RwReg8 *)0x4200180CU) /**< \brief (SERCOM4) I2CM Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM4_I2CS_INTENCLR (*(RwReg8 *)0x4200180CU) /**< \brief (SERCOM4) I2CS Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM4_SPI_INTENCLR (*(RwReg8 *)0x4200180CU) /**< \brief (SERCOM4) SPI Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM4_USART_INTENCLR (*(RwReg8 *)0x4200180CU) /**< \brief (SERCOM4) USART Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM4_I2CM_INTENSET (*(RwReg8 *)0x4200180DU) /**< \brief (SERCOM4) I2CM Interrupt Enable Set Register */
|
||||
#define REG_SERCOM4_I2CS_INTENSET (*(RwReg8 *)0x4200180DU) /**< \brief (SERCOM4) I2CS Interrupt Enable Set Register */
|
||||
#define REG_SERCOM4_SPI_INTENSET (*(RwReg8 *)0x4200180DU) /**< \brief (SERCOM4) SPI Interrupt Enable Set Register */
|
||||
#define REG_SERCOM4_USART_INTENSET (*(RwReg8 *)0x4200180DU) /**< \brief (SERCOM4) USART Interrupt Enable Set Register */
|
||||
#define REG_SERCOM4_I2CM_INTFLAG (*(RwReg8 *)0x4200180EU) /**< \brief (SERCOM4) I2CM Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM4_I2CS_INTFLAG (*(RwReg8 *)0x4200180EU) /**< \brief (SERCOM4) I2CS Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM4_SPI_INTFLAG (*(RwReg8 *)0x4200180EU) /**< \brief (SERCOM4) SPI Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM4_USART_INTFLAG (*(RwReg8 *)0x4200180EU) /**< \brief (SERCOM4) USART Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM4_I2CM_STATUS (*(RwReg16*)0x42001810U) /**< \brief (SERCOM4) I2CM Status Register */
|
||||
#define REG_SERCOM4_I2CS_STATUS (*(RwReg16*)0x42001810U) /**< \brief (SERCOM4) I2CS Status Register */
|
||||
#define REG_SERCOM4_SPI_STATUS (*(RwReg16*)0x42001810U) /**< \brief (SERCOM4) SPI Status Register */
|
||||
#define REG_SERCOM4_USART_STATUS (*(RwReg16*)0x42001810U) /**< \brief (SERCOM4) USART Status Register */
|
||||
#define REG_SERCOM4_I2CM_ADDR (*(RwReg8 *)0x42001814U) /**< \brief (SERCOM4) I2CM Address Register */
|
||||
#define REG_SERCOM4_I2CS_ADDR (*(RwReg *)0x42001814U) /**< \brief (SERCOM4) I2CS Address Register */
|
||||
#define REG_SERCOM4_SPI_ADDR (*(RwReg *)0x42001814U) /**< \brief (SERCOM4) SPI Address Register */
|
||||
#define REG_SERCOM4_I2CM_DATA (*(RwReg8 *)0x42001818U) /**< \brief (SERCOM4) I2CM Data Register */
|
||||
#define REG_SERCOM4_I2CS_DATA (*(RwReg8 *)0x42001818U) /**< \brief (SERCOM4) I2CS Data Register */
|
||||
#define REG_SERCOM4_SPI_DATA (*(RwReg16*)0x42001818U) /**< \brief (SERCOM4) SPI Data Register */
|
||||
#define REG_SERCOM4_USART_DATA (*(RwReg16*)0x42001818U) /**< \brief (SERCOM4) USART Data Register */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for SERCOM4 peripheral ========== */
|
||||
#define SERCOM4_GCLK_ID_CORE 17
|
||||
#define SERCOM4_GCLK_ID_SLOW 12
|
||||
#define SERCOM4_INT_MSB 3
|
||||
#define SERCOM4_PMSB 3
|
||||
|
||||
#endif /* _SAMD20_SERCOM4_INSTANCE_ */
|
|
@ -0,0 +1,132 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for SERCOM5
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_SERCOM5_INSTANCE_
|
||||
#define _SAMD20_SERCOM5_INSTANCE_
|
||||
|
||||
/* ========== Register definition for SERCOM5 peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_SERCOM5_I2CM_CTRLA (0x42001C00U) /**< \brief (SERCOM5) I2CM Control Register A */
|
||||
#define REG_SERCOM5_I2CS_CTRLA (0x42001C00U) /**< \brief (SERCOM5) I2CS Control Register A */
|
||||
#define REG_SERCOM5_SPI_CTRLA (0x42001C00U) /**< \brief (SERCOM5) SPI Control Register A */
|
||||
#define REG_SERCOM5_USART_CTRLA (0x42001C00U) /**< \brief (SERCOM5) USART Control Register A */
|
||||
#define REG_SERCOM5_I2CM_CTRLB (0x42001C04U) /**< \brief (SERCOM5) I2CM Control Register B */
|
||||
#define REG_SERCOM5_I2CS_CTRLB (0x42001C04U) /**< \brief (SERCOM5) I2CS Control Register B */
|
||||
#define REG_SERCOM5_SPI_CTRLB (0x42001C04U) /**< \brief (SERCOM5) SPI Control Register B */
|
||||
#define REG_SERCOM5_USART_CTRLB (0x42001C04U) /**< \brief (SERCOM5) USART Control Register B */
|
||||
#define REG_SERCOM5_I2CM_DBGCTRL (0x42001C08U) /**< \brief (SERCOM5) I2CM Debug Register */
|
||||
#define REG_SERCOM5_SPI_DBGCTRL (0x42001C08U) /**< \brief (SERCOM5) SPI Debug Register */
|
||||
#define REG_SERCOM5_USART_DBGCTRL (0x42001C08U) /**< \brief (SERCOM5) USART Debug Register */
|
||||
#define REG_SERCOM5_I2CM_BAUD (0x42001C0AU) /**< \brief (SERCOM5) I2CM Baud Rate Register */
|
||||
#define REG_SERCOM5_SPI_BAUD (0x42001C0AU) /**< \brief (SERCOM5) SPI Baud Rate Register */
|
||||
#define REG_SERCOM5_USART_BAUD (0x42001C0AU) /**< \brief (SERCOM5) USART Baud Rate Register */
|
||||
#define REG_SERCOM5_I2CM_INTENCLR (0x42001C0CU) /**< \brief (SERCOM5) I2CM Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM5_I2CS_INTENCLR (0x42001C0CU) /**< \brief (SERCOM5) I2CS Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM5_SPI_INTENCLR (0x42001C0CU) /**< \brief (SERCOM5) SPI Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM5_USART_INTENCLR (0x42001C0CU) /**< \brief (SERCOM5) USART Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM5_I2CM_INTENSET (0x42001C0DU) /**< \brief (SERCOM5) I2CM Interrupt Enable Set Register */
|
||||
#define REG_SERCOM5_I2CS_INTENSET (0x42001C0DU) /**< \brief (SERCOM5) I2CS Interrupt Enable Set Register */
|
||||
#define REG_SERCOM5_SPI_INTENSET (0x42001C0DU) /**< \brief (SERCOM5) SPI Interrupt Enable Set Register */
|
||||
#define REG_SERCOM5_USART_INTENSET (0x42001C0DU) /**< \brief (SERCOM5) USART Interrupt Enable Set Register */
|
||||
#define REG_SERCOM5_I2CM_INTFLAG (0x42001C0EU) /**< \brief (SERCOM5) I2CM Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM5_I2CS_INTFLAG (0x42001C0EU) /**< \brief (SERCOM5) I2CS Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM5_SPI_INTFLAG (0x42001C0EU) /**< \brief (SERCOM5) SPI Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM5_USART_INTFLAG (0x42001C0EU) /**< \brief (SERCOM5) USART Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM5_I2CM_STATUS (0x42001C10U) /**< \brief (SERCOM5) I2CM Status Register */
|
||||
#define REG_SERCOM5_I2CS_STATUS (0x42001C10U) /**< \brief (SERCOM5) I2CS Status Register */
|
||||
#define REG_SERCOM5_SPI_STATUS (0x42001C10U) /**< \brief (SERCOM5) SPI Status Register */
|
||||
#define REG_SERCOM5_USART_STATUS (0x42001C10U) /**< \brief (SERCOM5) USART Status Register */
|
||||
#define REG_SERCOM5_I2CM_ADDR (0x42001C14U) /**< \brief (SERCOM5) I2CM Address Register */
|
||||
#define REG_SERCOM5_I2CS_ADDR (0x42001C14U) /**< \brief (SERCOM5) I2CS Address Register */
|
||||
#define REG_SERCOM5_SPI_ADDR (0x42001C14U) /**< \brief (SERCOM5) SPI Address Register */
|
||||
#define REG_SERCOM5_I2CM_DATA (0x42001C18U) /**< \brief (SERCOM5) I2CM Data Register */
|
||||
#define REG_SERCOM5_I2CS_DATA (0x42001C18U) /**< \brief (SERCOM5) I2CS Data Register */
|
||||
#define REG_SERCOM5_SPI_DATA (0x42001C18U) /**< \brief (SERCOM5) SPI Data Register */
|
||||
#define REG_SERCOM5_USART_DATA (0x42001C18U) /**< \brief (SERCOM5) USART Data Register */
|
||||
#else
|
||||
#define REG_SERCOM5_I2CM_CTRLA (*(RwReg *)0x42001C00U) /**< \brief (SERCOM5) I2CM Control Register A */
|
||||
#define REG_SERCOM5_I2CS_CTRLA (*(RwReg *)0x42001C00U) /**< \brief (SERCOM5) I2CS Control Register A */
|
||||
#define REG_SERCOM5_SPI_CTRLA (*(RwReg *)0x42001C00U) /**< \brief (SERCOM5) SPI Control Register A */
|
||||
#define REG_SERCOM5_USART_CTRLA (*(RwReg *)0x42001C00U) /**< \brief (SERCOM5) USART Control Register A */
|
||||
#define REG_SERCOM5_I2CM_CTRLB (*(RwReg *)0x42001C04U) /**< \brief (SERCOM5) I2CM Control Register B */
|
||||
#define REG_SERCOM5_I2CS_CTRLB (*(RwReg *)0x42001C04U) /**< \brief (SERCOM5) I2CS Control Register B */
|
||||
#define REG_SERCOM5_SPI_CTRLB (*(RwReg *)0x42001C04U) /**< \brief (SERCOM5) SPI Control Register B */
|
||||
#define REG_SERCOM5_USART_CTRLB (*(RwReg *)0x42001C04U) /**< \brief (SERCOM5) USART Control Register B */
|
||||
#define REG_SERCOM5_I2CM_DBGCTRL (*(RwReg8 *)0x42001C08U) /**< \brief (SERCOM5) I2CM Debug Register */
|
||||
#define REG_SERCOM5_SPI_DBGCTRL (*(RwReg8 *)0x42001C08U) /**< \brief (SERCOM5) SPI Debug Register */
|
||||
#define REG_SERCOM5_USART_DBGCTRL (*(RwReg8 *)0x42001C08U) /**< \brief (SERCOM5) USART Debug Register */
|
||||
#define REG_SERCOM5_I2CM_BAUD (*(RwReg16*)0x42001C0AU) /**< \brief (SERCOM5) I2CM Baud Rate Register */
|
||||
#define REG_SERCOM5_SPI_BAUD (*(RwReg8 *)0x42001C0AU) /**< \brief (SERCOM5) SPI Baud Rate Register */
|
||||
#define REG_SERCOM5_USART_BAUD (*(RwReg16*)0x42001C0AU) /**< \brief (SERCOM5) USART Baud Rate Register */
|
||||
#define REG_SERCOM5_I2CM_INTENCLR (*(RwReg8 *)0x42001C0CU) /**< \brief (SERCOM5) I2CM Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM5_I2CS_INTENCLR (*(RwReg8 *)0x42001C0CU) /**< \brief (SERCOM5) I2CS Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM5_SPI_INTENCLR (*(RwReg8 *)0x42001C0CU) /**< \brief (SERCOM5) SPI Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM5_USART_INTENCLR (*(RwReg8 *)0x42001C0CU) /**< \brief (SERCOM5) USART Interrupt Enable Clear Register */
|
||||
#define REG_SERCOM5_I2CM_INTENSET (*(RwReg8 *)0x42001C0DU) /**< \brief (SERCOM5) I2CM Interrupt Enable Set Register */
|
||||
#define REG_SERCOM5_I2CS_INTENSET (*(RwReg8 *)0x42001C0DU) /**< \brief (SERCOM5) I2CS Interrupt Enable Set Register */
|
||||
#define REG_SERCOM5_SPI_INTENSET (*(RwReg8 *)0x42001C0DU) /**< \brief (SERCOM5) SPI Interrupt Enable Set Register */
|
||||
#define REG_SERCOM5_USART_INTENSET (*(RwReg8 *)0x42001C0DU) /**< \brief (SERCOM5) USART Interrupt Enable Set Register */
|
||||
#define REG_SERCOM5_I2CM_INTFLAG (*(RwReg8 *)0x42001C0EU) /**< \brief (SERCOM5) I2CM Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM5_I2CS_INTFLAG (*(RwReg8 *)0x42001C0EU) /**< \brief (SERCOM5) I2CS Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM5_SPI_INTFLAG (*(RwReg8 *)0x42001C0EU) /**< \brief (SERCOM5) SPI Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM5_USART_INTFLAG (*(RwReg8 *)0x42001C0EU) /**< \brief (SERCOM5) USART Interrupt Flag Status and Clear Register */
|
||||
#define REG_SERCOM5_I2CM_STATUS (*(RwReg16*)0x42001C10U) /**< \brief (SERCOM5) I2CM Status Register */
|
||||
#define REG_SERCOM5_I2CS_STATUS (*(RwReg16*)0x42001C10U) /**< \brief (SERCOM5) I2CS Status Register */
|
||||
#define REG_SERCOM5_SPI_STATUS (*(RwReg16*)0x42001C10U) /**< \brief (SERCOM5) SPI Status Register */
|
||||
#define REG_SERCOM5_USART_STATUS (*(RwReg16*)0x42001C10U) /**< \brief (SERCOM5) USART Status Register */
|
||||
#define REG_SERCOM5_I2CM_ADDR (*(RwReg8 *)0x42001C14U) /**< \brief (SERCOM5) I2CM Address Register */
|
||||
#define REG_SERCOM5_I2CS_ADDR (*(RwReg *)0x42001C14U) /**< \brief (SERCOM5) I2CS Address Register */
|
||||
#define REG_SERCOM5_SPI_ADDR (*(RwReg *)0x42001C14U) /**< \brief (SERCOM5) SPI Address Register */
|
||||
#define REG_SERCOM5_I2CM_DATA (*(RwReg8 *)0x42001C18U) /**< \brief (SERCOM5) I2CM Data Register */
|
||||
#define REG_SERCOM5_I2CS_DATA (*(RwReg8 *)0x42001C18U) /**< \brief (SERCOM5) I2CS Data Register */
|
||||
#define REG_SERCOM5_SPI_DATA (*(RwReg16*)0x42001C18U) /**< \brief (SERCOM5) SPI Data Register */
|
||||
#define REG_SERCOM5_USART_DATA (*(RwReg16*)0x42001C18U) /**< \brief (SERCOM5) USART Data Register */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for SERCOM5 peripheral ========== */
|
||||
#define SERCOM5_GCLK_ID_CORE 18
|
||||
#define SERCOM5_GCLK_ID_SLOW 12
|
||||
#define SERCOM5_INT_MSB 3
|
||||
#define SERCOM5_PMSB 3
|
||||
|
||||
#endif /* _SAMD20_SERCOM5_INSTANCE_ */
|
|
@ -0,0 +1,114 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for SYSCTRL
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_SYSCTRL_INSTANCE_
|
||||
#define _SAMD20_SYSCTRL_INSTANCE_
|
||||
|
||||
/* ========== Register definition for SYSCTRL peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_SYSCTRL_INTENCLR (0x40000800U) /**< \brief (SYSCTRL) Interrupt Enable Clear Register */
|
||||
#define REG_SYSCTRL_INTENSET (0x40000804U) /**< \brief (SYSCTRL) Interrupt Enable Set Register */
|
||||
#define REG_SYSCTRL_INTFLAG (0x40000808U) /**< \brief (SYSCTRL) Interrupt Flag Status and Clear Register */
|
||||
#define REG_SYSCTRL_PCLKSR (0x4000080CU) /**< \brief (SYSCTRL) Power and Clocks Status Register */
|
||||
#define REG_SYSCTRL_XOSC (0x40000810U) /**< \brief (SYSCTRL) XOSC Control Register */
|
||||
#define REG_SYSCTRL_XOSC32K (0x40000814U) /**< \brief (SYSCTRL) XOSC32K Control Register */
|
||||
#define REG_SYSCTRL_OSC32K (0x40000818U) /**< \brief (SYSCTRL) OSC32K Control Register */
|
||||
#define REG_SYSCTRL_OSCULP32K (0x4000081CU) /**< \brief (SYSCTRL) OSCULP32K Control Register */
|
||||
#define REG_SYSCTRL_OSC8M (0x40000820U) /**< \brief (SYSCTRL) OSC8M Control Register A */
|
||||
#define REG_SYSCTRL_DFLLCTRL (0x40000824U) /**< \brief (SYSCTRL) DFLL Config Register */
|
||||
#define REG_SYSCTRL_DFLLVAL (0x40000828U) /**< \brief (SYSCTRL) DFLL Calibration Value Register */
|
||||
#define REG_SYSCTRL_DFLLMUL (0x4000082CU) /**< \brief (SYSCTRL) DFLL Multiplier Register */
|
||||
#define REG_SYSCTRL_DFLLSYNC (0x40000830U) /**< \brief (SYSCTRL) DFLL Synchronization Register */
|
||||
#define REG_SYSCTRL_BOD33 (0x40000834U) /**< \brief (SYSCTRL) BOD33 Control Register */
|
||||
#define REG_SYSCTRL_BOD12 (0x40000838U) /**< \brief (SYSCTRL) BOD12 Control Register */
|
||||
#define REG_SYSCTRL_VREG (0x4000083CU) /**< \brief (SYSCTRL) VREG Control Register */
|
||||
#define REG_SYSCTRL_VREF (0x40000840U) /**< \brief (SYSCTRL) VREF Control Register A */
|
||||
#else
|
||||
#define REG_SYSCTRL_INTENCLR (*(RwReg *)0x40000800U) /**< \brief (SYSCTRL) Interrupt Enable Clear Register */
|
||||
#define REG_SYSCTRL_INTENSET (*(RwReg *)0x40000804U) /**< \brief (SYSCTRL) Interrupt Enable Set Register */
|
||||
#define REG_SYSCTRL_INTFLAG (*(RwReg *)0x40000808U) /**< \brief (SYSCTRL) Interrupt Flag Status and Clear Register */
|
||||
#define REG_SYSCTRL_PCLKSR (*(RoReg *)0x4000080CU) /**< \brief (SYSCTRL) Power and Clocks Status Register */
|
||||
#define REG_SYSCTRL_XOSC (*(RwReg16*)0x40000810U) /**< \brief (SYSCTRL) XOSC Control Register */
|
||||
#define REG_SYSCTRL_XOSC32K (*(RwReg16*)0x40000814U) /**< \brief (SYSCTRL) XOSC32K Control Register */
|
||||
#define REG_SYSCTRL_OSC32K (*(RwReg *)0x40000818U) /**< \brief (SYSCTRL) OSC32K Control Register */
|
||||
#define REG_SYSCTRL_OSCULP32K (*(RwReg8 *)0x4000081CU) /**< \brief (SYSCTRL) OSCULP32K Control Register */
|
||||
#define REG_SYSCTRL_OSC8M (*(RwReg *)0x40000820U) /**< \brief (SYSCTRL) OSC8M Control Register A */
|
||||
#define REG_SYSCTRL_DFLLCTRL (*(RwReg16*)0x40000824U) /**< \brief (SYSCTRL) DFLL Config Register */
|
||||
#define REG_SYSCTRL_DFLLVAL (*(RwReg *)0x40000828U) /**< \brief (SYSCTRL) DFLL Calibration Value Register */
|
||||
#define REG_SYSCTRL_DFLLMUL (*(RwReg *)0x4000082CU) /**< \brief (SYSCTRL) DFLL Multiplier Register */
|
||||
#define REG_SYSCTRL_DFLLSYNC (*(RwReg8 *)0x40000830U) /**< \brief (SYSCTRL) DFLL Synchronization Register */
|
||||
#define REG_SYSCTRL_BOD33 (*(RwReg *)0x40000834U) /**< \brief (SYSCTRL) BOD33 Control Register */
|
||||
#define REG_SYSCTRL_BOD12 (*(RwReg *)0x40000838U) /**< \brief (SYSCTRL) BOD12 Control Register */
|
||||
#define REG_SYSCTRL_VREG (*(RwReg16*)0x4000083CU) /**< \brief (SYSCTRL) VREG Control Register */
|
||||
#define REG_SYSCTRL_VREF (*(RwReg *)0x40000840U) /**< \brief (SYSCTRL) VREF Control Register A */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for SYSCTRL peripheral ========== */
|
||||
#define SYSCTRL_BGAP_CALIB_MSB 11
|
||||
#define SYSCTRL_BOD12_CALIB_MSB 4
|
||||
#define SYSCTRL_BOD33_CALIB_MSB 5
|
||||
#define SYSCTRL_DFLL48M_COARSE_MSB 4
|
||||
#define SYSCTRL_DFLL48M_FINE_MSB 7
|
||||
#define SYSCTRL_DFLL48M_TESTEN_MSB 1
|
||||
#define SYSCTRL_GCLK_ID_DFLL48 0
|
||||
#define SYSCTRL_OSC32K_COARSE_CALIB_MSB 6
|
||||
#define SYSCTRL_POR33_ENTEST_MSB 1
|
||||
#define SYSCTRL_ULPVREF_DIVLEV_MSB 3
|
||||
#define SYSCTRL_ULPVREG_FORCEGAIN_MSB 1
|
||||
#define SYSCTRL_ULPVREG_RAMREFSEL_MSB 2
|
||||
#define SYSCTRL_VREF_CONTROL_MSB 48
|
||||
#define SYSCTRL_VREF_STATUS_MSB 7
|
||||
#define SYSCTRL_VREG_LEVEL_MSB 2
|
||||
#define SYSCTRL_BOD12_VERSION 0x110
|
||||
#define SYSCTRL_BOD33_VERSION 0x110
|
||||
#define SYSCTRL_DFLL48M_VERSION 0x200
|
||||
#define SYSCTRL_GCLK_VERSION 0x200
|
||||
#define SYSCTRL_OSCULP32K_VERSION 0x110
|
||||
#define SYSCTRL_OSC8M_VERSION 0x110
|
||||
#define SYSCTRL_OSC32K_VERSION 0x110
|
||||
#define SYSCTRL_VREF_VERSION 0x200
|
||||
#define SYSCTRL_VREG_VERSION 0x200
|
||||
#define SYSCTRL_XOSC_VERSION 0x110
|
||||
#define SYSCTRL_XOSC32K_VERSION 0x110
|
||||
|
||||
#endif /* _SAMD20_SYSCTRL_INSTANCE_ */
|
|
@ -0,0 +1,106 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for TC0
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_TC0_INSTANCE_
|
||||
#define _SAMD20_TC0_INSTANCE_
|
||||
|
||||
/* ========== Register definition for TC0 peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_TC0_CTRLA (0x42002000U) /**< \brief (TC0) Control A Register */
|
||||
#define REG_TC0_READREQ (0x42002002U) /**< \brief (TC0) Read Request Register */
|
||||
#define REG_TC0_CTRLBCLR (0x42002004U) /**< \brief (TC0) Control B Clear Register */
|
||||
#define REG_TC0_CTRLBSET (0x42002005U) /**< \brief (TC0) Control B Set Register */
|
||||
#define REG_TC0_CTRLC (0x42002006U) /**< \brief (TC0) Control C Register */
|
||||
#define REG_TC0_DBGCTRL (0x42002008U) /**< \brief (TC0) Debug Register */
|
||||
#define REG_TC0_EVCTRL (0x4200200AU) /**< \brief (TC0) Event Control Register */
|
||||
#define REG_TC0_INTENCLR (0x4200200CU) /**< \brief (TC0) Interrupt Enable Clear Register */
|
||||
#define REG_TC0_INTENSET (0x4200200DU) /**< \brief (TC0) Interrupt Enable Set Register */
|
||||
#define REG_TC0_INTFLAG (0x4200200EU) /**< \brief (TC0) Interrupt Flag Status and Clear Register */
|
||||
#define REG_TC0_STATUS (0x4200200FU) /**< \brief (TC0) Status Register */
|
||||
#define REG_TC0_COUNT8_COUNT (0x42002010U) /**< \brief (TC0) COUNT8 Count Register */
|
||||
#define REG_TC0_COUNT16_COUNT (0x42002010U) /**< \brief (TC0) COUNT16 Count Register */
|
||||
#define REG_TC0_COUNT32_COUNT (0x42002010U) /**< \brief (TC0) COUNT32 Count Register */
|
||||
#define REG_TC0_COUNT8_PER (0x42002014U) /**< \brief (TC0) COUNT8 Period Register */
|
||||
#define REG_TC0_COUNT32_PER (0x42002014U) /**< \brief (TC0) COUNT32 Period Register */
|
||||
#define REG_TC0_COUNT8_CC0 (0x42002018U) /**< \brief (TC0) COUNT8 Compare and Capture Register 0 */
|
||||
#define REG_TC0_COUNT8_CC1 (0x42002019U) /**< \brief (TC0) COUNT8 Compare and Capture Register 1 */
|
||||
#define REG_TC0_COUNT16_CC0 (0x42002018U) /**< \brief (TC0) COUNT16 Compare and Capture Register 0 */
|
||||
#define REG_TC0_COUNT16_CC1 (0x4200201AU) /**< \brief (TC0) COUNT16 Compare and Capture Register 1 */
|
||||
#define REG_TC0_COUNT32_CC0 (0x42002018U) /**< \brief (TC0) COUNT32 Compare and Capture Register 0 */
|
||||
#define REG_TC0_COUNT32_CC1 (0x4200201CU) /**< \brief (TC0) COUNT32 Compare and Capture Register 1 */
|
||||
#else
|
||||
#define REG_TC0_CTRLA (*(RwReg16*)0x42002000U) /**< \brief (TC0) Control A Register */
|
||||
#define REG_TC0_READREQ (*(RwReg16*)0x42002002U) /**< \brief (TC0) Read Request Register */
|
||||
#define REG_TC0_CTRLBCLR (*(RwReg8 *)0x42002004U) /**< \brief (TC0) Control B Clear Register */
|
||||
#define REG_TC0_CTRLBSET (*(RwReg8 *)0x42002005U) /**< \brief (TC0) Control B Set Register */
|
||||
#define REG_TC0_CTRLC (*(RwReg8 *)0x42002006U) /**< \brief (TC0) Control C Register */
|
||||
#define REG_TC0_DBGCTRL (*(RwReg8 *)0x42002008U) /**< \brief (TC0) Debug Register */
|
||||
#define REG_TC0_EVCTRL (*(RwReg16*)0x4200200AU) /**< \brief (TC0) Event Control Register */
|
||||
#define REG_TC0_INTENCLR (*(RwReg8 *)0x4200200CU) /**< \brief (TC0) Interrupt Enable Clear Register */
|
||||
#define REG_TC0_INTENSET (*(RwReg8 *)0x4200200DU) /**< \brief (TC0) Interrupt Enable Set Register */
|
||||
#define REG_TC0_INTFLAG (*(RwReg8 *)0x4200200EU) /**< \brief (TC0) Interrupt Flag Status and Clear Register */
|
||||
#define REG_TC0_STATUS (*(RoReg8 *)0x4200200FU) /**< \brief (TC0) Status Register */
|
||||
#define REG_TC0_COUNT8_COUNT (*(RwReg8 *)0x42002010U) /**< \brief (TC0) COUNT8 Count Register */
|
||||
#define REG_TC0_COUNT16_COUNT (*(RwReg16*)0x42002010U) /**< \brief (TC0) COUNT16 Count Register */
|
||||
#define REG_TC0_COUNT32_COUNT (*(RwReg *)0x42002010U) /**< \brief (TC0) COUNT32 Count Register */
|
||||
#define REG_TC0_COUNT8_PER (*(RwReg8 *)0x42002014U) /**< \brief (TC0) COUNT8 Period Register */
|
||||
#define REG_TC0_COUNT32_PER (*(RwReg *)0x42002014U) /**< \brief (TC0) COUNT32 Period Register */
|
||||
#define REG_TC0_COUNT8_CC0 (*(RwReg8 *)0x42002018U) /**< \brief (TC0) COUNT8 Compare and Capture Register 0 */
|
||||
#define REG_TC0_COUNT8_CC1 (*(RwReg8 *)0x42002019U) /**< \brief (TC0) COUNT8 Compare and Capture Register 1 */
|
||||
#define REG_TC0_COUNT16_CC0 (*(RwReg16*)0x42002018U) /**< \brief (TC0) COUNT16 Compare and Capture Register 0 */
|
||||
#define REG_TC0_COUNT16_CC1 (*(RwReg16*)0x4200201AU) /**< \brief (TC0) COUNT16 Compare and Capture Register 1 */
|
||||
#define REG_TC0_COUNT32_CC0 (*(RwReg *)0x42002018U) /**< \brief (TC0) COUNT32 Compare and Capture Register 0 */
|
||||
#define REG_TC0_COUNT32_CC1 (*(RwReg *)0x4200201CU) /**< \brief (TC0) COUNT32 Compare and Capture Register 1 */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for TC0 peripheral ========== */
|
||||
#define TC0_CC8_NUM 2
|
||||
#define TC0_CC16_NUM 2
|
||||
#define TC0_CC32_NUM 2
|
||||
#define TC0_DITHERING_EXT 0
|
||||
#define TC0_GCLK_ID 19
|
||||
#define TC0_OW_NUM 2
|
||||
#define TC0_PERIOD_EXT 0
|
||||
#define TC0_SHADOW_EXT 0
|
||||
|
||||
#endif /* _SAMD20_TC0_INSTANCE_ */
|
|
@ -0,0 +1,106 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for TC1
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_TC1_INSTANCE_
|
||||
#define _SAMD20_TC1_INSTANCE_
|
||||
|
||||
/* ========== Register definition for TC1 peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_TC1_CTRLA (0x42002400U) /**< \brief (TC1) Control A Register */
|
||||
#define REG_TC1_READREQ (0x42002402U) /**< \brief (TC1) Read Request Register */
|
||||
#define REG_TC1_CTRLBCLR (0x42002404U) /**< \brief (TC1) Control B Clear Register */
|
||||
#define REG_TC1_CTRLBSET (0x42002405U) /**< \brief (TC1) Control B Set Register */
|
||||
#define REG_TC1_CTRLC (0x42002406U) /**< \brief (TC1) Control C Register */
|
||||
#define REG_TC1_DBGCTRL (0x42002408U) /**< \brief (TC1) Debug Register */
|
||||
#define REG_TC1_EVCTRL (0x4200240AU) /**< \brief (TC1) Event Control Register */
|
||||
#define REG_TC1_INTENCLR (0x4200240CU) /**< \brief (TC1) Interrupt Enable Clear Register */
|
||||
#define REG_TC1_INTENSET (0x4200240DU) /**< \brief (TC1) Interrupt Enable Set Register */
|
||||
#define REG_TC1_INTFLAG (0x4200240EU) /**< \brief (TC1) Interrupt Flag Status and Clear Register */
|
||||
#define REG_TC1_STATUS (0x4200240FU) /**< \brief (TC1) Status Register */
|
||||
#define REG_TC1_COUNT8_COUNT (0x42002410U) /**< \brief (TC1) COUNT8 Count Register */
|
||||
#define REG_TC1_COUNT16_COUNT (0x42002410U) /**< \brief (TC1) COUNT16 Count Register */
|
||||
#define REG_TC1_COUNT32_COUNT (0x42002410U) /**< \brief (TC1) COUNT32 Count Register */
|
||||
#define REG_TC1_COUNT8_PER (0x42002414U) /**< \brief (TC1) COUNT8 Period Register */
|
||||
#define REG_TC1_COUNT32_PER (0x42002414U) /**< \brief (TC1) COUNT32 Period Register */
|
||||
#define REG_TC1_COUNT8_CC0 (0x42002418U) /**< \brief (TC1) COUNT8 Compare and Capture Register 0 */
|
||||
#define REG_TC1_COUNT8_CC1 (0x42002419U) /**< \brief (TC1) COUNT8 Compare and Capture Register 1 */
|
||||
#define REG_TC1_COUNT16_CC0 (0x42002418U) /**< \brief (TC1) COUNT16 Compare and Capture Register 0 */
|
||||
#define REG_TC1_COUNT16_CC1 (0x4200241AU) /**< \brief (TC1) COUNT16 Compare and Capture Register 1 */
|
||||
#define REG_TC1_COUNT32_CC0 (0x42002418U) /**< \brief (TC1) COUNT32 Compare and Capture Register 0 */
|
||||
#define REG_TC1_COUNT32_CC1 (0x4200241CU) /**< \brief (TC1) COUNT32 Compare and Capture Register 1 */
|
||||
#else
|
||||
#define REG_TC1_CTRLA (*(RwReg16*)0x42002400U) /**< \brief (TC1) Control A Register */
|
||||
#define REG_TC1_READREQ (*(RwReg16*)0x42002402U) /**< \brief (TC1) Read Request Register */
|
||||
#define REG_TC1_CTRLBCLR (*(RwReg8 *)0x42002404U) /**< \brief (TC1) Control B Clear Register */
|
||||
#define REG_TC1_CTRLBSET (*(RwReg8 *)0x42002405U) /**< \brief (TC1) Control B Set Register */
|
||||
#define REG_TC1_CTRLC (*(RwReg8 *)0x42002406U) /**< \brief (TC1) Control C Register */
|
||||
#define REG_TC1_DBGCTRL (*(RwReg8 *)0x42002408U) /**< \brief (TC1) Debug Register */
|
||||
#define REG_TC1_EVCTRL (*(RwReg16*)0x4200240AU) /**< \brief (TC1) Event Control Register */
|
||||
#define REG_TC1_INTENCLR (*(RwReg8 *)0x4200240CU) /**< \brief (TC1) Interrupt Enable Clear Register */
|
||||
#define REG_TC1_INTENSET (*(RwReg8 *)0x4200240DU) /**< \brief (TC1) Interrupt Enable Set Register */
|
||||
#define REG_TC1_INTFLAG (*(RwReg8 *)0x4200240EU) /**< \brief (TC1) Interrupt Flag Status and Clear Register */
|
||||
#define REG_TC1_STATUS (*(RoReg8 *)0x4200240FU) /**< \brief (TC1) Status Register */
|
||||
#define REG_TC1_COUNT8_COUNT (*(RwReg8 *)0x42002410U) /**< \brief (TC1) COUNT8 Count Register */
|
||||
#define REG_TC1_COUNT16_COUNT (*(RwReg16*)0x42002410U) /**< \brief (TC1) COUNT16 Count Register */
|
||||
#define REG_TC1_COUNT32_COUNT (*(RwReg *)0x42002410U) /**< \brief (TC1) COUNT32 Count Register */
|
||||
#define REG_TC1_COUNT8_PER (*(RwReg8 *)0x42002414U) /**< \brief (TC1) COUNT8 Period Register */
|
||||
#define REG_TC1_COUNT32_PER (*(RwReg *)0x42002414U) /**< \brief (TC1) COUNT32 Period Register */
|
||||
#define REG_TC1_COUNT8_CC0 (*(RwReg8 *)0x42002418U) /**< \brief (TC1) COUNT8 Compare and Capture Register 0 */
|
||||
#define REG_TC1_COUNT8_CC1 (*(RwReg8 *)0x42002419U) /**< \brief (TC1) COUNT8 Compare and Capture Register 1 */
|
||||
#define REG_TC1_COUNT16_CC0 (*(RwReg16*)0x42002418U) /**< \brief (TC1) COUNT16 Compare and Capture Register 0 */
|
||||
#define REG_TC1_COUNT16_CC1 (*(RwReg16*)0x4200241AU) /**< \brief (TC1) COUNT16 Compare and Capture Register 1 */
|
||||
#define REG_TC1_COUNT32_CC0 (*(RwReg *)0x42002418U) /**< \brief (TC1) COUNT32 Compare and Capture Register 0 */
|
||||
#define REG_TC1_COUNT32_CC1 (*(RwReg *)0x4200241CU) /**< \brief (TC1) COUNT32 Compare and Capture Register 1 */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for TC1 peripheral ========== */
|
||||
#define TC1_CC8_NUM 2
|
||||
#define TC1_CC16_NUM 2
|
||||
#define TC1_CC32_NUM 2
|
||||
#define TC1_DITHERING_EXT 0
|
||||
#define TC1_GCLK_ID 19
|
||||
#define TC1_OW_NUM 2
|
||||
#define TC1_PERIOD_EXT 0
|
||||
#define TC1_SHADOW_EXT 0
|
||||
|
||||
#endif /* _SAMD20_TC1_INSTANCE_ */
|
|
@ -0,0 +1,106 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for TC2
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_TC2_INSTANCE_
|
||||
#define _SAMD20_TC2_INSTANCE_
|
||||
|
||||
/* ========== Register definition for TC2 peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_TC2_CTRLA (0x42002800U) /**< \brief (TC2) Control A Register */
|
||||
#define REG_TC2_READREQ (0x42002802U) /**< \brief (TC2) Read Request Register */
|
||||
#define REG_TC2_CTRLBCLR (0x42002804U) /**< \brief (TC2) Control B Clear Register */
|
||||
#define REG_TC2_CTRLBSET (0x42002805U) /**< \brief (TC2) Control B Set Register */
|
||||
#define REG_TC2_CTRLC (0x42002806U) /**< \brief (TC2) Control C Register */
|
||||
#define REG_TC2_DBGCTRL (0x42002808U) /**< \brief (TC2) Debug Register */
|
||||
#define REG_TC2_EVCTRL (0x4200280AU) /**< \brief (TC2) Event Control Register */
|
||||
#define REG_TC2_INTENCLR (0x4200280CU) /**< \brief (TC2) Interrupt Enable Clear Register */
|
||||
#define REG_TC2_INTENSET (0x4200280DU) /**< \brief (TC2) Interrupt Enable Set Register */
|
||||
#define REG_TC2_INTFLAG (0x4200280EU) /**< \brief (TC2) Interrupt Flag Status and Clear Register */
|
||||
#define REG_TC2_STATUS (0x4200280FU) /**< \brief (TC2) Status Register */
|
||||
#define REG_TC2_COUNT8_COUNT (0x42002810U) /**< \brief (TC2) COUNT8 Count Register */
|
||||
#define REG_TC2_COUNT16_COUNT (0x42002810U) /**< \brief (TC2) COUNT16 Count Register */
|
||||
#define REG_TC2_COUNT32_COUNT (0x42002810U) /**< \brief (TC2) COUNT32 Count Register */
|
||||
#define REG_TC2_COUNT8_PER (0x42002814U) /**< \brief (TC2) COUNT8 Period Register */
|
||||
#define REG_TC2_COUNT32_PER (0x42002814U) /**< \brief (TC2) COUNT32 Period Register */
|
||||
#define REG_TC2_COUNT8_CC0 (0x42002818U) /**< \brief (TC2) COUNT8 Compare and Capture Register 0 */
|
||||
#define REG_TC2_COUNT8_CC1 (0x42002819U) /**< \brief (TC2) COUNT8 Compare and Capture Register 1 */
|
||||
#define REG_TC2_COUNT16_CC0 (0x42002818U) /**< \brief (TC2) COUNT16 Compare and Capture Register 0 */
|
||||
#define REG_TC2_COUNT16_CC1 (0x4200281AU) /**< \brief (TC2) COUNT16 Compare and Capture Register 1 */
|
||||
#define REG_TC2_COUNT32_CC0 (0x42002818U) /**< \brief (TC2) COUNT32 Compare and Capture Register 0 */
|
||||
#define REG_TC2_COUNT32_CC1 (0x4200281CU) /**< \brief (TC2) COUNT32 Compare and Capture Register 1 */
|
||||
#else
|
||||
#define REG_TC2_CTRLA (*(RwReg16*)0x42002800U) /**< \brief (TC2) Control A Register */
|
||||
#define REG_TC2_READREQ (*(RwReg16*)0x42002802U) /**< \brief (TC2) Read Request Register */
|
||||
#define REG_TC2_CTRLBCLR (*(RwReg8 *)0x42002804U) /**< \brief (TC2) Control B Clear Register */
|
||||
#define REG_TC2_CTRLBSET (*(RwReg8 *)0x42002805U) /**< \brief (TC2) Control B Set Register */
|
||||
#define REG_TC2_CTRLC (*(RwReg8 *)0x42002806U) /**< \brief (TC2) Control C Register */
|
||||
#define REG_TC2_DBGCTRL (*(RwReg8 *)0x42002808U) /**< \brief (TC2) Debug Register */
|
||||
#define REG_TC2_EVCTRL (*(RwReg16*)0x4200280AU) /**< \brief (TC2) Event Control Register */
|
||||
#define REG_TC2_INTENCLR (*(RwReg8 *)0x4200280CU) /**< \brief (TC2) Interrupt Enable Clear Register */
|
||||
#define REG_TC2_INTENSET (*(RwReg8 *)0x4200280DU) /**< \brief (TC2) Interrupt Enable Set Register */
|
||||
#define REG_TC2_INTFLAG (*(RwReg8 *)0x4200280EU) /**< \brief (TC2) Interrupt Flag Status and Clear Register */
|
||||
#define REG_TC2_STATUS (*(RoReg8 *)0x4200280FU) /**< \brief (TC2) Status Register */
|
||||
#define REG_TC2_COUNT8_COUNT (*(RwReg8 *)0x42002810U) /**< \brief (TC2) COUNT8 Count Register */
|
||||
#define REG_TC2_COUNT16_COUNT (*(RwReg16*)0x42002810U) /**< \brief (TC2) COUNT16 Count Register */
|
||||
#define REG_TC2_COUNT32_COUNT (*(RwReg *)0x42002810U) /**< \brief (TC2) COUNT32 Count Register */
|
||||
#define REG_TC2_COUNT8_PER (*(RwReg8 *)0x42002814U) /**< \brief (TC2) COUNT8 Period Register */
|
||||
#define REG_TC2_COUNT32_PER (*(RwReg *)0x42002814U) /**< \brief (TC2) COUNT32 Period Register */
|
||||
#define REG_TC2_COUNT8_CC0 (*(RwReg8 *)0x42002818U) /**< \brief (TC2) COUNT8 Compare and Capture Register 0 */
|
||||
#define REG_TC2_COUNT8_CC1 (*(RwReg8 *)0x42002819U) /**< \brief (TC2) COUNT8 Compare and Capture Register 1 */
|
||||
#define REG_TC2_COUNT16_CC0 (*(RwReg16*)0x42002818U) /**< \brief (TC2) COUNT16 Compare and Capture Register 0 */
|
||||
#define REG_TC2_COUNT16_CC1 (*(RwReg16*)0x4200281AU) /**< \brief (TC2) COUNT16 Compare and Capture Register 1 */
|
||||
#define REG_TC2_COUNT32_CC0 (*(RwReg *)0x42002818U) /**< \brief (TC2) COUNT32 Compare and Capture Register 0 */
|
||||
#define REG_TC2_COUNT32_CC1 (*(RwReg *)0x4200281CU) /**< \brief (TC2) COUNT32 Compare and Capture Register 1 */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for TC2 peripheral ========== */
|
||||
#define TC2_CC8_NUM 2
|
||||
#define TC2_CC16_NUM 2
|
||||
#define TC2_CC32_NUM 2
|
||||
#define TC2_DITHERING_EXT 0
|
||||
#define TC2_GCLK_ID 20
|
||||
#define TC2_OW_NUM 2
|
||||
#define TC2_PERIOD_EXT 0
|
||||
#define TC2_SHADOW_EXT 0
|
||||
|
||||
#endif /* _SAMD20_TC2_INSTANCE_ */
|
|
@ -0,0 +1,106 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for TC3
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_TC3_INSTANCE_
|
||||
#define _SAMD20_TC3_INSTANCE_
|
||||
|
||||
/* ========== Register definition for TC3 peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_TC3_CTRLA (0x42002C00U) /**< \brief (TC3) Control A Register */
|
||||
#define REG_TC3_READREQ (0x42002C02U) /**< \brief (TC3) Read Request Register */
|
||||
#define REG_TC3_CTRLBCLR (0x42002C04U) /**< \brief (TC3) Control B Clear Register */
|
||||
#define REG_TC3_CTRLBSET (0x42002C05U) /**< \brief (TC3) Control B Set Register */
|
||||
#define REG_TC3_CTRLC (0x42002C06U) /**< \brief (TC3) Control C Register */
|
||||
#define REG_TC3_DBGCTRL (0x42002C08U) /**< \brief (TC3) Debug Register */
|
||||
#define REG_TC3_EVCTRL (0x42002C0AU) /**< \brief (TC3) Event Control Register */
|
||||
#define REG_TC3_INTENCLR (0x42002C0CU) /**< \brief (TC3) Interrupt Enable Clear Register */
|
||||
#define REG_TC3_INTENSET (0x42002C0DU) /**< \brief (TC3) Interrupt Enable Set Register */
|
||||
#define REG_TC3_INTFLAG (0x42002C0EU) /**< \brief (TC3) Interrupt Flag Status and Clear Register */
|
||||
#define REG_TC3_STATUS (0x42002C0FU) /**< \brief (TC3) Status Register */
|
||||
#define REG_TC3_COUNT8_COUNT (0x42002C10U) /**< \brief (TC3) COUNT8 Count Register */
|
||||
#define REG_TC3_COUNT16_COUNT (0x42002C10U) /**< \brief (TC3) COUNT16 Count Register */
|
||||
#define REG_TC3_COUNT32_COUNT (0x42002C10U) /**< \brief (TC3) COUNT32 Count Register */
|
||||
#define REG_TC3_COUNT8_PER (0x42002C14U) /**< \brief (TC3) COUNT8 Period Register */
|
||||
#define REG_TC3_COUNT32_PER (0x42002C14U) /**< \brief (TC3) COUNT32 Period Register */
|
||||
#define REG_TC3_COUNT8_CC0 (0x42002C18U) /**< \brief (TC3) COUNT8 Compare and Capture Register 0 */
|
||||
#define REG_TC3_COUNT8_CC1 (0x42002C19U) /**< \brief (TC3) COUNT8 Compare and Capture Register 1 */
|
||||
#define REG_TC3_COUNT16_CC0 (0x42002C18U) /**< \brief (TC3) COUNT16 Compare and Capture Register 0 */
|
||||
#define REG_TC3_COUNT16_CC1 (0x42002C1AU) /**< \brief (TC3) COUNT16 Compare and Capture Register 1 */
|
||||
#define REG_TC3_COUNT32_CC0 (0x42002C18U) /**< \brief (TC3) COUNT32 Compare and Capture Register 0 */
|
||||
#define REG_TC3_COUNT32_CC1 (0x42002C1CU) /**< \brief (TC3) COUNT32 Compare and Capture Register 1 */
|
||||
#else
|
||||
#define REG_TC3_CTRLA (*(RwReg16*)0x42002C00U) /**< \brief (TC3) Control A Register */
|
||||
#define REG_TC3_READREQ (*(RwReg16*)0x42002C02U) /**< \brief (TC3) Read Request Register */
|
||||
#define REG_TC3_CTRLBCLR (*(RwReg8 *)0x42002C04U) /**< \brief (TC3) Control B Clear Register */
|
||||
#define REG_TC3_CTRLBSET (*(RwReg8 *)0x42002C05U) /**< \brief (TC3) Control B Set Register */
|
||||
#define REG_TC3_CTRLC (*(RwReg8 *)0x42002C06U) /**< \brief (TC3) Control C Register */
|
||||
#define REG_TC3_DBGCTRL (*(RwReg8 *)0x42002C08U) /**< \brief (TC3) Debug Register */
|
||||
#define REG_TC3_EVCTRL (*(RwReg16*)0x42002C0AU) /**< \brief (TC3) Event Control Register */
|
||||
#define REG_TC3_INTENCLR (*(RwReg8 *)0x42002C0CU) /**< \brief (TC3) Interrupt Enable Clear Register */
|
||||
#define REG_TC3_INTENSET (*(RwReg8 *)0x42002C0DU) /**< \brief (TC3) Interrupt Enable Set Register */
|
||||
#define REG_TC3_INTFLAG (*(RwReg8 *)0x42002C0EU) /**< \brief (TC3) Interrupt Flag Status and Clear Register */
|
||||
#define REG_TC3_STATUS (*(RoReg8 *)0x42002C0FU) /**< \brief (TC3) Status Register */
|
||||
#define REG_TC3_COUNT8_COUNT (*(RwReg8 *)0x42002C10U) /**< \brief (TC3) COUNT8 Count Register */
|
||||
#define REG_TC3_COUNT16_COUNT (*(RwReg16*)0x42002C10U) /**< \brief (TC3) COUNT16 Count Register */
|
||||
#define REG_TC3_COUNT32_COUNT (*(RwReg *)0x42002C10U) /**< \brief (TC3) COUNT32 Count Register */
|
||||
#define REG_TC3_COUNT8_PER (*(RwReg8 *)0x42002C14U) /**< \brief (TC3) COUNT8 Period Register */
|
||||
#define REG_TC3_COUNT32_PER (*(RwReg *)0x42002C14U) /**< \brief (TC3) COUNT32 Period Register */
|
||||
#define REG_TC3_COUNT8_CC0 (*(RwReg8 *)0x42002C18U) /**< \brief (TC3) COUNT8 Compare and Capture Register 0 */
|
||||
#define REG_TC3_COUNT8_CC1 (*(RwReg8 *)0x42002C19U) /**< \brief (TC3) COUNT8 Compare and Capture Register 1 */
|
||||
#define REG_TC3_COUNT16_CC0 (*(RwReg16*)0x42002C18U) /**< \brief (TC3) COUNT16 Compare and Capture Register 0 */
|
||||
#define REG_TC3_COUNT16_CC1 (*(RwReg16*)0x42002C1AU) /**< \brief (TC3) COUNT16 Compare and Capture Register 1 */
|
||||
#define REG_TC3_COUNT32_CC0 (*(RwReg *)0x42002C18U) /**< \brief (TC3) COUNT32 Compare and Capture Register 0 */
|
||||
#define REG_TC3_COUNT32_CC1 (*(RwReg *)0x42002C1CU) /**< \brief (TC3) COUNT32 Compare and Capture Register 1 */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for TC3 peripheral ========== */
|
||||
#define TC3_CC8_NUM 2
|
||||
#define TC3_CC16_NUM 2
|
||||
#define TC3_CC32_NUM 2
|
||||
#define TC3_DITHERING_EXT 0
|
||||
#define TC3_GCLK_ID 20
|
||||
#define TC3_OW_NUM 2
|
||||
#define TC3_PERIOD_EXT 0
|
||||
#define TC3_SHADOW_EXT 0
|
||||
|
||||
#endif /* _SAMD20_TC3_INSTANCE_ */
|
|
@ -0,0 +1,106 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for TC4
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_TC4_INSTANCE_
|
||||
#define _SAMD20_TC4_INSTANCE_
|
||||
|
||||
/* ========== Register definition for TC4 peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_TC4_CTRLA (0x42003000U) /**< \brief (TC4) Control A Register */
|
||||
#define REG_TC4_READREQ (0x42003002U) /**< \brief (TC4) Read Request Register */
|
||||
#define REG_TC4_CTRLBCLR (0x42003004U) /**< \brief (TC4) Control B Clear Register */
|
||||
#define REG_TC4_CTRLBSET (0x42003005U) /**< \brief (TC4) Control B Set Register */
|
||||
#define REG_TC4_CTRLC (0x42003006U) /**< \brief (TC4) Control C Register */
|
||||
#define REG_TC4_DBGCTRL (0x42003008U) /**< \brief (TC4) Debug Register */
|
||||
#define REG_TC4_EVCTRL (0x4200300AU) /**< \brief (TC4) Event Control Register */
|
||||
#define REG_TC4_INTENCLR (0x4200300CU) /**< \brief (TC4) Interrupt Enable Clear Register */
|
||||
#define REG_TC4_INTENSET (0x4200300DU) /**< \brief (TC4) Interrupt Enable Set Register */
|
||||
#define REG_TC4_INTFLAG (0x4200300EU) /**< \brief (TC4) Interrupt Flag Status and Clear Register */
|
||||
#define REG_TC4_STATUS (0x4200300FU) /**< \brief (TC4) Status Register */
|
||||
#define REG_TC4_COUNT8_COUNT (0x42003010U) /**< \brief (TC4) COUNT8 Count Register */
|
||||
#define REG_TC4_COUNT16_COUNT (0x42003010U) /**< \brief (TC4) COUNT16 Count Register */
|
||||
#define REG_TC4_COUNT32_COUNT (0x42003010U) /**< \brief (TC4) COUNT32 Count Register */
|
||||
#define REG_TC4_COUNT8_PER (0x42003014U) /**< \brief (TC4) COUNT8 Period Register */
|
||||
#define REG_TC4_COUNT32_PER (0x42003014U) /**< \brief (TC4) COUNT32 Period Register */
|
||||
#define REG_TC4_COUNT8_CC0 (0x42003018U) /**< \brief (TC4) COUNT8 Compare and Capture Register 0 */
|
||||
#define REG_TC4_COUNT8_CC1 (0x42003019U) /**< \brief (TC4) COUNT8 Compare and Capture Register 1 */
|
||||
#define REG_TC4_COUNT16_CC0 (0x42003018U) /**< \brief (TC4) COUNT16 Compare and Capture Register 0 */
|
||||
#define REG_TC4_COUNT16_CC1 (0x4200301AU) /**< \brief (TC4) COUNT16 Compare and Capture Register 1 */
|
||||
#define REG_TC4_COUNT32_CC0 (0x42003018U) /**< \brief (TC4) COUNT32 Compare and Capture Register 0 */
|
||||
#define REG_TC4_COUNT32_CC1 (0x4200301CU) /**< \brief (TC4) COUNT32 Compare and Capture Register 1 */
|
||||
#else
|
||||
#define REG_TC4_CTRLA (*(RwReg16*)0x42003000U) /**< \brief (TC4) Control A Register */
|
||||
#define REG_TC4_READREQ (*(RwReg16*)0x42003002U) /**< \brief (TC4) Read Request Register */
|
||||
#define REG_TC4_CTRLBCLR (*(RwReg8 *)0x42003004U) /**< \brief (TC4) Control B Clear Register */
|
||||
#define REG_TC4_CTRLBSET (*(RwReg8 *)0x42003005U) /**< \brief (TC4) Control B Set Register */
|
||||
#define REG_TC4_CTRLC (*(RwReg8 *)0x42003006U) /**< \brief (TC4) Control C Register */
|
||||
#define REG_TC4_DBGCTRL (*(RwReg8 *)0x42003008U) /**< \brief (TC4) Debug Register */
|
||||
#define REG_TC4_EVCTRL (*(RwReg16*)0x4200300AU) /**< \brief (TC4) Event Control Register */
|
||||
#define REG_TC4_INTENCLR (*(RwReg8 *)0x4200300CU) /**< \brief (TC4) Interrupt Enable Clear Register */
|
||||
#define REG_TC4_INTENSET (*(RwReg8 *)0x4200300DU) /**< \brief (TC4) Interrupt Enable Set Register */
|
||||
#define REG_TC4_INTFLAG (*(RwReg8 *)0x4200300EU) /**< \brief (TC4) Interrupt Flag Status and Clear Register */
|
||||
#define REG_TC4_STATUS (*(RoReg8 *)0x4200300FU) /**< \brief (TC4) Status Register */
|
||||
#define REG_TC4_COUNT8_COUNT (*(RwReg8 *)0x42003010U) /**< \brief (TC4) COUNT8 Count Register */
|
||||
#define REG_TC4_COUNT16_COUNT (*(RwReg16*)0x42003010U) /**< \brief (TC4) COUNT16 Count Register */
|
||||
#define REG_TC4_COUNT32_COUNT (*(RwReg *)0x42003010U) /**< \brief (TC4) COUNT32 Count Register */
|
||||
#define REG_TC4_COUNT8_PER (*(RwReg8 *)0x42003014U) /**< \brief (TC4) COUNT8 Period Register */
|
||||
#define REG_TC4_COUNT32_PER (*(RwReg *)0x42003014U) /**< \brief (TC4) COUNT32 Period Register */
|
||||
#define REG_TC4_COUNT8_CC0 (*(RwReg8 *)0x42003018U) /**< \brief (TC4) COUNT8 Compare and Capture Register 0 */
|
||||
#define REG_TC4_COUNT8_CC1 (*(RwReg8 *)0x42003019U) /**< \brief (TC4) COUNT8 Compare and Capture Register 1 */
|
||||
#define REG_TC4_COUNT16_CC0 (*(RwReg16*)0x42003018U) /**< \brief (TC4) COUNT16 Compare and Capture Register 0 */
|
||||
#define REG_TC4_COUNT16_CC1 (*(RwReg16*)0x4200301AU) /**< \brief (TC4) COUNT16 Compare and Capture Register 1 */
|
||||
#define REG_TC4_COUNT32_CC0 (*(RwReg *)0x42003018U) /**< \brief (TC4) COUNT32 Compare and Capture Register 0 */
|
||||
#define REG_TC4_COUNT32_CC1 (*(RwReg *)0x4200301CU) /**< \brief (TC4) COUNT32 Compare and Capture Register 1 */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for TC4 peripheral ========== */
|
||||
#define TC4_CC8_NUM 2
|
||||
#define TC4_CC16_NUM 2
|
||||
#define TC4_CC32_NUM 2
|
||||
#define TC4_DITHERING_EXT 0
|
||||
#define TC4_GCLK_ID 21
|
||||
#define TC4_OW_NUM 2
|
||||
#define TC4_PERIOD_EXT 0
|
||||
#define TC4_SHADOW_EXT 0
|
||||
|
||||
#endif /* _SAMD20_TC4_INSTANCE_ */
|
|
@ -0,0 +1,106 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for TC5
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_TC5_INSTANCE_
|
||||
#define _SAMD20_TC5_INSTANCE_
|
||||
|
||||
/* ========== Register definition for TC5 peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_TC5_CTRLA (0x42003400U) /**< \brief (TC5) Control A Register */
|
||||
#define REG_TC5_READREQ (0x42003402U) /**< \brief (TC5) Read Request Register */
|
||||
#define REG_TC5_CTRLBCLR (0x42003404U) /**< \brief (TC5) Control B Clear Register */
|
||||
#define REG_TC5_CTRLBSET (0x42003405U) /**< \brief (TC5) Control B Set Register */
|
||||
#define REG_TC5_CTRLC (0x42003406U) /**< \brief (TC5) Control C Register */
|
||||
#define REG_TC5_DBGCTRL (0x42003408U) /**< \brief (TC5) Debug Register */
|
||||
#define REG_TC5_EVCTRL (0x4200340AU) /**< \brief (TC5) Event Control Register */
|
||||
#define REG_TC5_INTENCLR (0x4200340CU) /**< \brief (TC5) Interrupt Enable Clear Register */
|
||||
#define REG_TC5_INTENSET (0x4200340DU) /**< \brief (TC5) Interrupt Enable Set Register */
|
||||
#define REG_TC5_INTFLAG (0x4200340EU) /**< \brief (TC5) Interrupt Flag Status and Clear Register */
|
||||
#define REG_TC5_STATUS (0x4200340FU) /**< \brief (TC5) Status Register */
|
||||
#define REG_TC5_COUNT8_COUNT (0x42003410U) /**< \brief (TC5) COUNT8 Count Register */
|
||||
#define REG_TC5_COUNT16_COUNT (0x42003410U) /**< \brief (TC5) COUNT16 Count Register */
|
||||
#define REG_TC5_COUNT32_COUNT (0x42003410U) /**< \brief (TC5) COUNT32 Count Register */
|
||||
#define REG_TC5_COUNT8_PER (0x42003414U) /**< \brief (TC5) COUNT8 Period Register */
|
||||
#define REG_TC5_COUNT32_PER (0x42003414U) /**< \brief (TC5) COUNT32 Period Register */
|
||||
#define REG_TC5_COUNT8_CC0 (0x42003418U) /**< \brief (TC5) COUNT8 Compare and Capture Register 0 */
|
||||
#define REG_TC5_COUNT8_CC1 (0x42003419U) /**< \brief (TC5) COUNT8 Compare and Capture Register 1 */
|
||||
#define REG_TC5_COUNT16_CC0 (0x42003418U) /**< \brief (TC5) COUNT16 Compare and Capture Register 0 */
|
||||
#define REG_TC5_COUNT16_CC1 (0x4200341AU) /**< \brief (TC5) COUNT16 Compare and Capture Register 1 */
|
||||
#define REG_TC5_COUNT32_CC0 (0x42003418U) /**< \brief (TC5) COUNT32 Compare and Capture Register 0 */
|
||||
#define REG_TC5_COUNT32_CC1 (0x4200341CU) /**< \brief (TC5) COUNT32 Compare and Capture Register 1 */
|
||||
#else
|
||||
#define REG_TC5_CTRLA (*(RwReg16*)0x42003400U) /**< \brief (TC5) Control A Register */
|
||||
#define REG_TC5_READREQ (*(RwReg16*)0x42003402U) /**< \brief (TC5) Read Request Register */
|
||||
#define REG_TC5_CTRLBCLR (*(RwReg8 *)0x42003404U) /**< \brief (TC5) Control B Clear Register */
|
||||
#define REG_TC5_CTRLBSET (*(RwReg8 *)0x42003405U) /**< \brief (TC5) Control B Set Register */
|
||||
#define REG_TC5_CTRLC (*(RwReg8 *)0x42003406U) /**< \brief (TC5) Control C Register */
|
||||
#define REG_TC5_DBGCTRL (*(RwReg8 *)0x42003408U) /**< \brief (TC5) Debug Register */
|
||||
#define REG_TC5_EVCTRL (*(RwReg16*)0x4200340AU) /**< \brief (TC5) Event Control Register */
|
||||
#define REG_TC5_INTENCLR (*(RwReg8 *)0x4200340CU) /**< \brief (TC5) Interrupt Enable Clear Register */
|
||||
#define REG_TC5_INTENSET (*(RwReg8 *)0x4200340DU) /**< \brief (TC5) Interrupt Enable Set Register */
|
||||
#define REG_TC5_INTFLAG (*(RwReg8 *)0x4200340EU) /**< \brief (TC5) Interrupt Flag Status and Clear Register */
|
||||
#define REG_TC5_STATUS (*(RoReg8 *)0x4200340FU) /**< \brief (TC5) Status Register */
|
||||
#define REG_TC5_COUNT8_COUNT (*(RwReg8 *)0x42003410U) /**< \brief (TC5) COUNT8 Count Register */
|
||||
#define REG_TC5_COUNT16_COUNT (*(RwReg16*)0x42003410U) /**< \brief (TC5) COUNT16 Count Register */
|
||||
#define REG_TC5_COUNT32_COUNT (*(RwReg *)0x42003410U) /**< \brief (TC5) COUNT32 Count Register */
|
||||
#define REG_TC5_COUNT8_PER (*(RwReg8 *)0x42003414U) /**< \brief (TC5) COUNT8 Period Register */
|
||||
#define REG_TC5_COUNT32_PER (*(RwReg *)0x42003414U) /**< \brief (TC5) COUNT32 Period Register */
|
||||
#define REG_TC5_COUNT8_CC0 (*(RwReg8 *)0x42003418U) /**< \brief (TC5) COUNT8 Compare and Capture Register 0 */
|
||||
#define REG_TC5_COUNT8_CC1 (*(RwReg8 *)0x42003419U) /**< \brief (TC5) COUNT8 Compare and Capture Register 1 */
|
||||
#define REG_TC5_COUNT16_CC0 (*(RwReg16*)0x42003418U) /**< \brief (TC5) COUNT16 Compare and Capture Register 0 */
|
||||
#define REG_TC5_COUNT16_CC1 (*(RwReg16*)0x4200341AU) /**< \brief (TC5) COUNT16 Compare and Capture Register 1 */
|
||||
#define REG_TC5_COUNT32_CC0 (*(RwReg *)0x42003418U) /**< \brief (TC5) COUNT32 Compare and Capture Register 0 */
|
||||
#define REG_TC5_COUNT32_CC1 (*(RwReg *)0x4200341CU) /**< \brief (TC5) COUNT32 Compare and Capture Register 1 */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for TC5 peripheral ========== */
|
||||
#define TC5_CC8_NUM 2
|
||||
#define TC5_CC16_NUM 2
|
||||
#define TC5_CC32_NUM 2
|
||||
#define TC5_DITHERING_EXT 0
|
||||
#define TC5_GCLK_ID 21
|
||||
#define TC5_OW_NUM 2
|
||||
#define TC5_PERIOD_EXT 0
|
||||
#define TC5_SHADOW_EXT 0
|
||||
|
||||
#endif /* _SAMD20_TC5_INSTANCE_ */
|
|
@ -0,0 +1,106 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for TC6
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_TC6_INSTANCE_
|
||||
#define _SAMD20_TC6_INSTANCE_
|
||||
|
||||
/* ========== Register definition for TC6 peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_TC6_CTRLA (0x42003800U) /**< \brief (TC6) Control A Register */
|
||||
#define REG_TC6_READREQ (0x42003802U) /**< \brief (TC6) Read Request Register */
|
||||
#define REG_TC6_CTRLBCLR (0x42003804U) /**< \brief (TC6) Control B Clear Register */
|
||||
#define REG_TC6_CTRLBSET (0x42003805U) /**< \brief (TC6) Control B Set Register */
|
||||
#define REG_TC6_CTRLC (0x42003806U) /**< \brief (TC6) Control C Register */
|
||||
#define REG_TC6_DBGCTRL (0x42003808U) /**< \brief (TC6) Debug Register */
|
||||
#define REG_TC6_EVCTRL (0x4200380AU) /**< \brief (TC6) Event Control Register */
|
||||
#define REG_TC6_INTENCLR (0x4200380CU) /**< \brief (TC6) Interrupt Enable Clear Register */
|
||||
#define REG_TC6_INTENSET (0x4200380DU) /**< \brief (TC6) Interrupt Enable Set Register */
|
||||
#define REG_TC6_INTFLAG (0x4200380EU) /**< \brief (TC6) Interrupt Flag Status and Clear Register */
|
||||
#define REG_TC6_STATUS (0x4200380FU) /**< \brief (TC6) Status Register */
|
||||
#define REG_TC6_COUNT8_COUNT (0x42003810U) /**< \brief (TC6) COUNT8 Count Register */
|
||||
#define REG_TC6_COUNT16_COUNT (0x42003810U) /**< \brief (TC6) COUNT16 Count Register */
|
||||
#define REG_TC6_COUNT32_COUNT (0x42003810U) /**< \brief (TC6) COUNT32 Count Register */
|
||||
#define REG_TC6_COUNT8_PER (0x42003814U) /**< \brief (TC6) COUNT8 Period Register */
|
||||
#define REG_TC6_COUNT32_PER (0x42003814U) /**< \brief (TC6) COUNT32 Period Register */
|
||||
#define REG_TC6_COUNT8_CC0 (0x42003818U) /**< \brief (TC6) COUNT8 Compare and Capture Register 0 */
|
||||
#define REG_TC6_COUNT8_CC1 (0x42003819U) /**< \brief (TC6) COUNT8 Compare and Capture Register 1 */
|
||||
#define REG_TC6_COUNT16_CC0 (0x42003818U) /**< \brief (TC6) COUNT16 Compare and Capture Register 0 */
|
||||
#define REG_TC6_COUNT16_CC1 (0x4200381AU) /**< \brief (TC6) COUNT16 Compare and Capture Register 1 */
|
||||
#define REG_TC6_COUNT32_CC0 (0x42003818U) /**< \brief (TC6) COUNT32 Compare and Capture Register 0 */
|
||||
#define REG_TC6_COUNT32_CC1 (0x4200381CU) /**< \brief (TC6) COUNT32 Compare and Capture Register 1 */
|
||||
#else
|
||||
#define REG_TC6_CTRLA (*(RwReg16*)0x42003800U) /**< \brief (TC6) Control A Register */
|
||||
#define REG_TC6_READREQ (*(RwReg16*)0x42003802U) /**< \brief (TC6) Read Request Register */
|
||||
#define REG_TC6_CTRLBCLR (*(RwReg8 *)0x42003804U) /**< \brief (TC6) Control B Clear Register */
|
||||
#define REG_TC6_CTRLBSET (*(RwReg8 *)0x42003805U) /**< \brief (TC6) Control B Set Register */
|
||||
#define REG_TC6_CTRLC (*(RwReg8 *)0x42003806U) /**< \brief (TC6) Control C Register */
|
||||
#define REG_TC6_DBGCTRL (*(RwReg8 *)0x42003808U) /**< \brief (TC6) Debug Register */
|
||||
#define REG_TC6_EVCTRL (*(RwReg16*)0x4200380AU) /**< \brief (TC6) Event Control Register */
|
||||
#define REG_TC6_INTENCLR (*(RwReg8 *)0x4200380CU) /**< \brief (TC6) Interrupt Enable Clear Register */
|
||||
#define REG_TC6_INTENSET (*(RwReg8 *)0x4200380DU) /**< \brief (TC6) Interrupt Enable Set Register */
|
||||
#define REG_TC6_INTFLAG (*(RwReg8 *)0x4200380EU) /**< \brief (TC6) Interrupt Flag Status and Clear Register */
|
||||
#define REG_TC6_STATUS (*(RoReg8 *)0x4200380FU) /**< \brief (TC6) Status Register */
|
||||
#define REG_TC6_COUNT8_COUNT (*(RwReg8 *)0x42003810U) /**< \brief (TC6) COUNT8 Count Register */
|
||||
#define REG_TC6_COUNT16_COUNT (*(RwReg16*)0x42003810U) /**< \brief (TC6) COUNT16 Count Register */
|
||||
#define REG_TC6_COUNT32_COUNT (*(RwReg *)0x42003810U) /**< \brief (TC6) COUNT32 Count Register */
|
||||
#define REG_TC6_COUNT8_PER (*(RwReg8 *)0x42003814U) /**< \brief (TC6) COUNT8 Period Register */
|
||||
#define REG_TC6_COUNT32_PER (*(RwReg *)0x42003814U) /**< \brief (TC6) COUNT32 Period Register */
|
||||
#define REG_TC6_COUNT8_CC0 (*(RwReg8 *)0x42003818U) /**< \brief (TC6) COUNT8 Compare and Capture Register 0 */
|
||||
#define REG_TC6_COUNT8_CC1 (*(RwReg8 *)0x42003819U) /**< \brief (TC6) COUNT8 Compare and Capture Register 1 */
|
||||
#define REG_TC6_COUNT16_CC0 (*(RwReg16*)0x42003818U) /**< \brief (TC6) COUNT16 Compare and Capture Register 0 */
|
||||
#define REG_TC6_COUNT16_CC1 (*(RwReg16*)0x4200381AU) /**< \brief (TC6) COUNT16 Compare and Capture Register 1 */
|
||||
#define REG_TC6_COUNT32_CC0 (*(RwReg *)0x42003818U) /**< \brief (TC6) COUNT32 Compare and Capture Register 0 */
|
||||
#define REG_TC6_COUNT32_CC1 (*(RwReg *)0x4200381CU) /**< \brief (TC6) COUNT32 Compare and Capture Register 1 */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for TC6 peripheral ========== */
|
||||
#define TC6_CC8_NUM 2
|
||||
#define TC6_CC16_NUM 2
|
||||
#define TC6_CC32_NUM 2
|
||||
#define TC6_DITHERING_EXT 0
|
||||
#define TC6_GCLK_ID 22
|
||||
#define TC6_OW_NUM 2
|
||||
#define TC6_PERIOD_EXT 0
|
||||
#define TC6_SHADOW_EXT 0
|
||||
|
||||
#endif /* _SAMD20_TC6_INSTANCE_ */
|
|
@ -0,0 +1,106 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for TC7
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_TC7_INSTANCE_
|
||||
#define _SAMD20_TC7_INSTANCE_
|
||||
|
||||
/* ========== Register definition for TC7 peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_TC7_CTRLA (0x42003C00U) /**< \brief (TC7) Control A Register */
|
||||
#define REG_TC7_READREQ (0x42003C02U) /**< \brief (TC7) Read Request Register */
|
||||
#define REG_TC7_CTRLBCLR (0x42003C04U) /**< \brief (TC7) Control B Clear Register */
|
||||
#define REG_TC7_CTRLBSET (0x42003C05U) /**< \brief (TC7) Control B Set Register */
|
||||
#define REG_TC7_CTRLC (0x42003C06U) /**< \brief (TC7) Control C Register */
|
||||
#define REG_TC7_DBGCTRL (0x42003C08U) /**< \brief (TC7) Debug Register */
|
||||
#define REG_TC7_EVCTRL (0x42003C0AU) /**< \brief (TC7) Event Control Register */
|
||||
#define REG_TC7_INTENCLR (0x42003C0CU) /**< \brief (TC7) Interrupt Enable Clear Register */
|
||||
#define REG_TC7_INTENSET (0x42003C0DU) /**< \brief (TC7) Interrupt Enable Set Register */
|
||||
#define REG_TC7_INTFLAG (0x42003C0EU) /**< \brief (TC7) Interrupt Flag Status and Clear Register */
|
||||
#define REG_TC7_STATUS (0x42003C0FU) /**< \brief (TC7) Status Register */
|
||||
#define REG_TC7_COUNT8_COUNT (0x42003C10U) /**< \brief (TC7) COUNT8 Count Register */
|
||||
#define REG_TC7_COUNT16_COUNT (0x42003C10U) /**< \brief (TC7) COUNT16 Count Register */
|
||||
#define REG_TC7_COUNT32_COUNT (0x42003C10U) /**< \brief (TC7) COUNT32 Count Register */
|
||||
#define REG_TC7_COUNT8_PER (0x42003C14U) /**< \brief (TC7) COUNT8 Period Register */
|
||||
#define REG_TC7_COUNT32_PER (0x42003C14U) /**< \brief (TC7) COUNT32 Period Register */
|
||||
#define REG_TC7_COUNT8_CC0 (0x42003C18U) /**< \brief (TC7) COUNT8 Compare and Capture Register 0 */
|
||||
#define REG_TC7_COUNT8_CC1 (0x42003C19U) /**< \brief (TC7) COUNT8 Compare and Capture Register 1 */
|
||||
#define REG_TC7_COUNT16_CC0 (0x42003C18U) /**< \brief (TC7) COUNT16 Compare and Capture Register 0 */
|
||||
#define REG_TC7_COUNT16_CC1 (0x42003C1AU) /**< \brief (TC7) COUNT16 Compare and Capture Register 1 */
|
||||
#define REG_TC7_COUNT32_CC0 (0x42003C18U) /**< \brief (TC7) COUNT32 Compare and Capture Register 0 */
|
||||
#define REG_TC7_COUNT32_CC1 (0x42003C1CU) /**< \brief (TC7) COUNT32 Compare and Capture Register 1 */
|
||||
#else
|
||||
#define REG_TC7_CTRLA (*(RwReg16*)0x42003C00U) /**< \brief (TC7) Control A Register */
|
||||
#define REG_TC7_READREQ (*(RwReg16*)0x42003C02U) /**< \brief (TC7) Read Request Register */
|
||||
#define REG_TC7_CTRLBCLR (*(RwReg8 *)0x42003C04U) /**< \brief (TC7) Control B Clear Register */
|
||||
#define REG_TC7_CTRLBSET (*(RwReg8 *)0x42003C05U) /**< \brief (TC7) Control B Set Register */
|
||||
#define REG_TC7_CTRLC (*(RwReg8 *)0x42003C06U) /**< \brief (TC7) Control C Register */
|
||||
#define REG_TC7_DBGCTRL (*(RwReg8 *)0x42003C08U) /**< \brief (TC7) Debug Register */
|
||||
#define REG_TC7_EVCTRL (*(RwReg16*)0x42003C0AU) /**< \brief (TC7) Event Control Register */
|
||||
#define REG_TC7_INTENCLR (*(RwReg8 *)0x42003C0CU) /**< \brief (TC7) Interrupt Enable Clear Register */
|
||||
#define REG_TC7_INTENSET (*(RwReg8 *)0x42003C0DU) /**< \brief (TC7) Interrupt Enable Set Register */
|
||||
#define REG_TC7_INTFLAG (*(RwReg8 *)0x42003C0EU) /**< \brief (TC7) Interrupt Flag Status and Clear Register */
|
||||
#define REG_TC7_STATUS (*(RoReg8 *)0x42003C0FU) /**< \brief (TC7) Status Register */
|
||||
#define REG_TC7_COUNT8_COUNT (*(RwReg8 *)0x42003C10U) /**< \brief (TC7) COUNT8 Count Register */
|
||||
#define REG_TC7_COUNT16_COUNT (*(RwReg16*)0x42003C10U) /**< \brief (TC7) COUNT16 Count Register */
|
||||
#define REG_TC7_COUNT32_COUNT (*(RwReg *)0x42003C10U) /**< \brief (TC7) COUNT32 Count Register */
|
||||
#define REG_TC7_COUNT8_PER (*(RwReg8 *)0x42003C14U) /**< \brief (TC7) COUNT8 Period Register */
|
||||
#define REG_TC7_COUNT32_PER (*(RwReg *)0x42003C14U) /**< \brief (TC7) COUNT32 Period Register */
|
||||
#define REG_TC7_COUNT8_CC0 (*(RwReg8 *)0x42003C18U) /**< \brief (TC7) COUNT8 Compare and Capture Register 0 */
|
||||
#define REG_TC7_COUNT8_CC1 (*(RwReg8 *)0x42003C19U) /**< \brief (TC7) COUNT8 Compare and Capture Register 1 */
|
||||
#define REG_TC7_COUNT16_CC0 (*(RwReg16*)0x42003C18U) /**< \brief (TC7) COUNT16 Compare and Capture Register 0 */
|
||||
#define REG_TC7_COUNT16_CC1 (*(RwReg16*)0x42003C1AU) /**< \brief (TC7) COUNT16 Compare and Capture Register 1 */
|
||||
#define REG_TC7_COUNT32_CC0 (*(RwReg *)0x42003C18U) /**< \brief (TC7) COUNT32 Compare and Capture Register 0 */
|
||||
#define REG_TC7_COUNT32_CC1 (*(RwReg *)0x42003C1CU) /**< \brief (TC7) COUNT32 Compare and Capture Register 1 */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for TC7 peripheral ========== */
|
||||
#define TC7_CC8_NUM 2
|
||||
#define TC7_CC16_NUM 2
|
||||
#define TC7_CC32_NUM 2
|
||||
#define TC7_DITHERING_EXT 0
|
||||
#define TC7_GCLK_ID 22
|
||||
#define TC7_OW_NUM 2
|
||||
#define TC7_PERIOD_EXT 0
|
||||
#define TC7_SHADOW_EXT 0
|
||||
|
||||
#endif /* _SAMD20_TC7_INSTANCE_ */
|
|
@ -0,0 +1,71 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Instance description for WDT
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20_WDT_INSTANCE_
|
||||
#define _SAMD20_WDT_INSTANCE_
|
||||
|
||||
/* ========== Register definition for WDT peripheral ========== */
|
||||
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
|
||||
#define REG_WDT_CTRL (0x40001000U) /**< \brief (WDT) Control Register */
|
||||
#define REG_WDT_CONFIG (0x40001001U) /**< \brief (WDT) Configuration Register */
|
||||
#define REG_WDT_EWCTRL (0x40001002U) /**< \brief (WDT) Early Warning Control Register */
|
||||
#define REG_WDT_INTENCLR (0x40001004U) /**< \brief (WDT) Interrupt Enable Clear Register */
|
||||
#define REG_WDT_INTENSET (0x40001005U) /**< \brief (WDT) Interrupt Enable Set Register */
|
||||
#define REG_WDT_INTFLAG (0x40001006U) /**< \brief (WDT) Interrupt Flag Status and Clear Register */
|
||||
#define REG_WDT_STATUS (0x40001007U) /**< \brief (WDT) Status Register */
|
||||
#define REG_WDT_CLEAR (0x40001008U) /**< \brief (WDT) Clear Register */
|
||||
#else
|
||||
#define REG_WDT_CTRL (*(RwReg8 *)0x40001000U) /**< \brief (WDT) Control Register */
|
||||
#define REG_WDT_CONFIG (*(RwReg8 *)0x40001001U) /**< \brief (WDT) Configuration Register */
|
||||
#define REG_WDT_EWCTRL (*(RwReg8 *)0x40001002U) /**< \brief (WDT) Early Warning Control Register */
|
||||
#define REG_WDT_INTENCLR (*(RwReg8 *)0x40001004U) /**< \brief (WDT) Interrupt Enable Clear Register */
|
||||
#define REG_WDT_INTENSET (*(RwReg8 *)0x40001005U) /**< \brief (WDT) Interrupt Enable Set Register */
|
||||
#define REG_WDT_INTFLAG (*(RwReg8 *)0x40001006U) /**< \brief (WDT) Interrupt Flag Status and Clear Register */
|
||||
#define REG_WDT_STATUS (*(RoReg8 *)0x40001007U) /**< \brief (WDT) Status Register */
|
||||
#define REG_WDT_CLEAR (*(WoReg8 *)0x40001008U) /**< \brief (WDT) Clear Register */
|
||||
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
|
||||
|
||||
/* ========== Instance parameters for WDT peripheral ========== */
|
||||
#define WDT_GCLK_ID 1
|
||||
|
||||
#endif /* _SAMD20_WDT_INSTANCE_ */
|
|
@ -0,0 +1,552 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Peripheral I/O description for SAMD20E14
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20E14_PIO_
|
||||
#define _SAMD20E14_PIO_
|
||||
|
||||
#define PIN_PA00 0 /**< \brief Pin Number for PA00 */
|
||||
#define PORT_PA00 (1u << 0) /**< \brief PORT Mask for PA00 */
|
||||
#define PIN_PA01 1 /**< \brief Pin Number for PA01 */
|
||||
#define PORT_PA01 (1u << 1) /**< \brief PORT Mask for PA01 */
|
||||
#define PIN_PA02 2 /**< \brief Pin Number for PA02 */
|
||||
#define PORT_PA02 (1u << 2) /**< \brief PORT Mask for PA02 */
|
||||
#define PIN_PA03 3 /**< \brief Pin Number for PA03 */
|
||||
#define PORT_PA03 (1u << 3) /**< \brief PORT Mask for PA03 */
|
||||
#define PIN_PA04 4 /**< \brief Pin Number for PA04 */
|
||||
#define PORT_PA04 (1u << 4) /**< \brief PORT Mask for PA04 */
|
||||
#define PIN_PA05 5 /**< \brief Pin Number for PA05 */
|
||||
#define PORT_PA05 (1u << 5) /**< \brief PORT Mask for PA05 */
|
||||
#define PIN_PA06 6 /**< \brief Pin Number for PA06 */
|
||||
#define PORT_PA06 (1u << 6) /**< \brief PORT Mask for PA06 */
|
||||
#define PIN_PA07 7 /**< \brief Pin Number for PA07 */
|
||||
#define PORT_PA07 (1u << 7) /**< \brief PORT Mask for PA07 */
|
||||
#define PIN_PA08 8 /**< \brief Pin Number for PA08 */
|
||||
#define PORT_PA08 (1u << 8) /**< \brief PORT Mask for PA08 */
|
||||
#define PIN_PA09 9 /**< \brief Pin Number for PA09 */
|
||||
#define PORT_PA09 (1u << 9) /**< \brief PORT Mask for PA09 */
|
||||
#define PIN_PA10 10 /**< \brief Pin Number for PA10 */
|
||||
#define PORT_PA10 (1u << 10) /**< \brief PORT Mask for PA10 */
|
||||
#define PIN_PA11 11 /**< \brief Pin Number for PA11 */
|
||||
#define PORT_PA11 (1u << 11) /**< \brief PORT Mask for PA11 */
|
||||
#define PIN_PA14 14 /**< \brief Pin Number for PA14 */
|
||||
#define PORT_PA14 (1u << 14) /**< \brief PORT Mask for PA14 */
|
||||
#define PIN_PA15 15 /**< \brief Pin Number for PA15 */
|
||||
#define PORT_PA15 (1u << 15) /**< \brief PORT Mask for PA15 */
|
||||
#define PIN_PA16 16 /**< \brief Pin Number for PA16 */
|
||||
#define PORT_PA16 (1u << 16) /**< \brief PORT Mask for PA16 */
|
||||
#define PIN_PA17 17 /**< \brief Pin Number for PA17 */
|
||||
#define PORT_PA17 (1u << 17) /**< \brief PORT Mask for PA17 */
|
||||
#define PIN_PA18 18 /**< \brief Pin Number for PA18 */
|
||||
#define PORT_PA18 (1u << 18) /**< \brief PORT Mask for PA18 */
|
||||
#define PIN_PA19 19 /**< \brief Pin Number for PA19 */
|
||||
#define PORT_PA19 (1u << 19) /**< \brief PORT Mask for PA19 */
|
||||
#define PIN_PA22 22 /**< \brief Pin Number for PA22 */
|
||||
#define PORT_PA22 (1u << 22) /**< \brief PORT Mask for PA22 */
|
||||
#define PIN_PA23 23 /**< \brief Pin Number for PA23 */
|
||||
#define PORT_PA23 (1u << 23) /**< \brief PORT Mask for PA23 */
|
||||
#define PIN_PA24 24 /**< \brief Pin Number for PA24 */
|
||||
#define PORT_PA24 (1u << 24) /**< \brief PORT Mask for PA24 */
|
||||
#define PIN_PA25 25 /**< \brief Pin Number for PA25 */
|
||||
#define PORT_PA25 (1u << 25) /**< \brief PORT Mask for PA25 */
|
||||
#define PIN_PA27 27 /**< \brief Pin Number for PA27 */
|
||||
#define PORT_PA27 (1u << 27) /**< \brief PORT Mask for PA27 */
|
||||
#define PIN_PA28 28 /**< \brief Pin Number for PA28 */
|
||||
#define PORT_PA28 (1u << 28) /**< \brief PORT Mask for PA28 */
|
||||
#define PIN_PA30 30 /**< \brief Pin Number for PA30 */
|
||||
#define PORT_PA30 (1u << 30) /**< \brief PORT Mask for PA30 */
|
||||
#define PIN_PA31 31 /**< \brief Pin Number for PA31 */
|
||||
#define PORT_PA31 (1u << 31) /**< \brief PORT Mask for PA31 */
|
||||
/* ========== PORT definition for CORE peripheral ========== */
|
||||
#define PIN_PA30G_CORE_SWCLK 30 /**< \brief CORE signal: SWCLK on PA30 mux G */
|
||||
#define MUX_PA30G_CORE_SWCLK 6
|
||||
#define PINMUX_PA30G_CORE_SWCLK ((PIN_PA30G_CORE_SWCLK << 16) | MUX_PA30G_CORE_SWCLK)
|
||||
#define PORT_PA30G_CORE_SWCLK (1u << 30)
|
||||
/* ========== PORT definition for GCLK peripheral ========== */
|
||||
#define PIN_PA14H_GCLK_IO0 14 /**< \brief GCLK signal: IO0 on PA14 mux H */
|
||||
#define MUX_PA14H_GCLK_IO0 7
|
||||
#define PINMUX_PA14H_GCLK_IO0 ((PIN_PA14H_GCLK_IO0 << 16) | MUX_PA14H_GCLK_IO0)
|
||||
#define PORT_PA14H_GCLK_IO0 (1u << 14)
|
||||
#define PIN_PA27H_GCLK_IO0 27 /**< \brief GCLK signal: IO0 on PA27 mux H */
|
||||
#define MUX_PA27H_GCLK_IO0 7
|
||||
#define PINMUX_PA27H_GCLK_IO0 ((PIN_PA27H_GCLK_IO0 << 16) | MUX_PA27H_GCLK_IO0)
|
||||
#define PORT_PA27H_GCLK_IO0 (1u << 27)
|
||||
#define PIN_PA28H_GCLK_IO0 28 /**< \brief GCLK signal: IO0 on PA28 mux H */
|
||||
#define MUX_PA28H_GCLK_IO0 7
|
||||
#define PINMUX_PA28H_GCLK_IO0 ((PIN_PA28H_GCLK_IO0 << 16) | MUX_PA28H_GCLK_IO0)
|
||||
#define PORT_PA28H_GCLK_IO0 (1u << 28)
|
||||
#define PIN_PA30H_GCLK_IO0 30 /**< \brief GCLK signal: IO0 on PA30 mux H */
|
||||
#define MUX_PA30H_GCLK_IO0 7
|
||||
#define PINMUX_PA30H_GCLK_IO0 ((PIN_PA30H_GCLK_IO0 << 16) | MUX_PA30H_GCLK_IO0)
|
||||
#define PORT_PA30H_GCLK_IO0 (1u << 30)
|
||||
#define PIN_PA15H_GCLK_IO1 15 /**< \brief GCLK signal: IO1 on PA15 mux H */
|
||||
#define MUX_PA15H_GCLK_IO1 7
|
||||
#define PINMUX_PA15H_GCLK_IO1 ((PIN_PA15H_GCLK_IO1 << 16) | MUX_PA15H_GCLK_IO1)
|
||||
#define PORT_PA15H_GCLK_IO1 (1u << 15)
|
||||
#define PIN_PA16H_GCLK_IO2 16 /**< \brief GCLK signal: IO2 on PA16 mux H */
|
||||
#define MUX_PA16H_GCLK_IO2 7
|
||||
#define PINMUX_PA16H_GCLK_IO2 ((PIN_PA16H_GCLK_IO2 << 16) | MUX_PA16H_GCLK_IO2)
|
||||
#define PORT_PA16H_GCLK_IO2 (1u << 16)
|
||||
#define PIN_PA17H_GCLK_IO3 17 /**< \brief GCLK signal: IO3 on PA17 mux H */
|
||||
#define MUX_PA17H_GCLK_IO3 7
|
||||
#define PINMUX_PA17H_GCLK_IO3 ((PIN_PA17H_GCLK_IO3 << 16) | MUX_PA17H_GCLK_IO3)
|
||||
#define PORT_PA17H_GCLK_IO3 (1u << 17)
|
||||
#define PIN_PA10H_GCLK_IO4 10 /**< \brief GCLK signal: IO4 on PA10 mux H */
|
||||
#define MUX_PA10H_GCLK_IO4 7
|
||||
#define PINMUX_PA10H_GCLK_IO4 ((PIN_PA10H_GCLK_IO4 << 16) | MUX_PA10H_GCLK_IO4)
|
||||
#define PORT_PA10H_GCLK_IO4 (1u << 10)
|
||||
#define PIN_PA11H_GCLK_IO5 11 /**< \brief GCLK signal: IO5 on PA11 mux H */
|
||||
#define MUX_PA11H_GCLK_IO5 7
|
||||
#define PINMUX_PA11H_GCLK_IO5 ((PIN_PA11H_GCLK_IO5 << 16) | MUX_PA11H_GCLK_IO5)
|
||||
#define PORT_PA11H_GCLK_IO5 (1u << 11)
|
||||
#define PIN_PA22H_GCLK_IO6 22 /**< \brief GCLK signal: IO6 on PA22 mux H */
|
||||
#define MUX_PA22H_GCLK_IO6 7
|
||||
#define PINMUX_PA22H_GCLK_IO6 ((PIN_PA22H_GCLK_IO6 << 16) | MUX_PA22H_GCLK_IO6)
|
||||
#define PORT_PA22H_GCLK_IO6 (1u << 22)
|
||||
#define PIN_PA23H_GCLK_IO7 23 /**< \brief GCLK signal: IO7 on PA23 mux H */
|
||||
#define MUX_PA23H_GCLK_IO7 7
|
||||
#define PINMUX_PA23H_GCLK_IO7 ((PIN_PA23H_GCLK_IO7 << 16) | MUX_PA23H_GCLK_IO7)
|
||||
#define PORT_PA23H_GCLK_IO7 (1u << 23)
|
||||
/* ========== PORT definition for EIC peripheral ========== */
|
||||
#define PIN_PA16A_EIC_EXTINT0 16 /**< \brief EIC signal: EXTINT0 on PA16 mux A */
|
||||
#define MUX_PA16A_EIC_EXTINT0 0
|
||||
#define PINMUX_PA16A_EIC_EXTINT0 ((PIN_PA16A_EIC_EXTINT0 << 16) | MUX_PA16A_EIC_EXTINT0)
|
||||
#define PORT_PA16A_EIC_EXTINT0 (1u << 16)
|
||||
#define PIN_PA00A_EIC_EXTINT0 0 /**< \brief EIC signal: EXTINT0 on PA00 mux A */
|
||||
#define MUX_PA00A_EIC_EXTINT0 0
|
||||
#define PINMUX_PA00A_EIC_EXTINT0 ((PIN_PA00A_EIC_EXTINT0 << 16) | MUX_PA00A_EIC_EXTINT0)
|
||||
#define PORT_PA00A_EIC_EXTINT0 (1u << 0)
|
||||
#define PIN_PA17A_EIC_EXTINT1 17 /**< \brief EIC signal: EXTINT1 on PA17 mux A */
|
||||
#define MUX_PA17A_EIC_EXTINT1 0
|
||||
#define PINMUX_PA17A_EIC_EXTINT1 ((PIN_PA17A_EIC_EXTINT1 << 16) | MUX_PA17A_EIC_EXTINT1)
|
||||
#define PORT_PA17A_EIC_EXTINT1 (1u << 17)
|
||||
#define PIN_PA01A_EIC_EXTINT1 1 /**< \brief EIC signal: EXTINT1 on PA01 mux A */
|
||||
#define MUX_PA01A_EIC_EXTINT1 0
|
||||
#define PINMUX_PA01A_EIC_EXTINT1 ((PIN_PA01A_EIC_EXTINT1 << 16) | MUX_PA01A_EIC_EXTINT1)
|
||||
#define PORT_PA01A_EIC_EXTINT1 (1u << 1)
|
||||
#define PIN_PA02A_EIC_EXTINT2 2 /**< \brief EIC signal: EXTINT2 on PA02 mux A */
|
||||
#define MUX_PA02A_EIC_EXTINT2 0
|
||||
#define PINMUX_PA02A_EIC_EXTINT2 ((PIN_PA02A_EIC_EXTINT2 << 16) | MUX_PA02A_EIC_EXTINT2)
|
||||
#define PORT_PA02A_EIC_EXTINT2 (1u << 2)
|
||||
#define PIN_PA18A_EIC_EXTINT2 18 /**< \brief EIC signal: EXTINT2 on PA18 mux A */
|
||||
#define MUX_PA18A_EIC_EXTINT2 0
|
||||
#define PINMUX_PA18A_EIC_EXTINT2 ((PIN_PA18A_EIC_EXTINT2 << 16) | MUX_PA18A_EIC_EXTINT2)
|
||||
#define PORT_PA18A_EIC_EXTINT2 (1u << 18)
|
||||
#define PIN_PA03A_EIC_EXTINT3 3 /**< \brief EIC signal: EXTINT3 on PA03 mux A */
|
||||
#define MUX_PA03A_EIC_EXTINT3 0
|
||||
#define PINMUX_PA03A_EIC_EXTINT3 ((PIN_PA03A_EIC_EXTINT3 << 16) | MUX_PA03A_EIC_EXTINT3)
|
||||
#define PORT_PA03A_EIC_EXTINT3 (1u << 3)
|
||||
#define PIN_PA19A_EIC_EXTINT3 19 /**< \brief EIC signal: EXTINT3 on PA19 mux A */
|
||||
#define MUX_PA19A_EIC_EXTINT3 0
|
||||
#define PINMUX_PA19A_EIC_EXTINT3 ((PIN_PA19A_EIC_EXTINT3 << 16) | MUX_PA19A_EIC_EXTINT3)
|
||||
#define PORT_PA19A_EIC_EXTINT3 (1u << 19)
|
||||
#define PIN_PA04A_EIC_EXTINT4 4 /**< \brief EIC signal: EXTINT4 on PA04 mux A */
|
||||
#define MUX_PA04A_EIC_EXTINT4 0
|
||||
#define PINMUX_PA04A_EIC_EXTINT4 ((PIN_PA04A_EIC_EXTINT4 << 16) | MUX_PA04A_EIC_EXTINT4)
|
||||
#define PORT_PA04A_EIC_EXTINT4 (1u << 4)
|
||||
#define PIN_PA05A_EIC_EXTINT5 5 /**< \brief EIC signal: EXTINT5 on PA05 mux A */
|
||||
#define MUX_PA05A_EIC_EXTINT5 0
|
||||
#define PINMUX_PA05A_EIC_EXTINT5 ((PIN_PA05A_EIC_EXTINT5 << 16) | MUX_PA05A_EIC_EXTINT5)
|
||||
#define PORT_PA05A_EIC_EXTINT5 (1u << 5)
|
||||
#define PIN_PA06A_EIC_EXTINT6 6 /**< \brief EIC signal: EXTINT6 on PA06 mux A */
|
||||
#define MUX_PA06A_EIC_EXTINT6 0
|
||||
#define PINMUX_PA06A_EIC_EXTINT6 ((PIN_PA06A_EIC_EXTINT6 << 16) | MUX_PA06A_EIC_EXTINT6)
|
||||
#define PORT_PA06A_EIC_EXTINT6 (1u << 6)
|
||||
#define PIN_PA22A_EIC_EXTINT6 22 /**< \brief EIC signal: EXTINT6 on PA22 mux A */
|
||||
#define MUX_PA22A_EIC_EXTINT6 0
|
||||
#define PINMUX_PA22A_EIC_EXTINT6 ((PIN_PA22A_EIC_EXTINT6 << 16) | MUX_PA22A_EIC_EXTINT6)
|
||||
#define PORT_PA22A_EIC_EXTINT6 (1u << 22)
|
||||
#define PIN_PA07A_EIC_EXTINT7 7 /**< \brief EIC signal: EXTINT7 on PA07 mux A */
|
||||
#define MUX_PA07A_EIC_EXTINT7 0
|
||||
#define PINMUX_PA07A_EIC_EXTINT7 ((PIN_PA07A_EIC_EXTINT7 << 16) | MUX_PA07A_EIC_EXTINT7)
|
||||
#define PORT_PA07A_EIC_EXTINT7 (1u << 7)
|
||||
#define PIN_PA23A_EIC_EXTINT7 23 /**< \brief EIC signal: EXTINT7 on PA23 mux A */
|
||||
#define MUX_PA23A_EIC_EXTINT7 0
|
||||
#define PINMUX_PA23A_EIC_EXTINT7 ((PIN_PA23A_EIC_EXTINT7 << 16) | MUX_PA23A_EIC_EXTINT7)
|
||||
#define PORT_PA23A_EIC_EXTINT7 (1u << 23)
|
||||
#define PIN_PA28A_EIC_EXTINT8 28 /**< \brief EIC signal: EXTINT8 on PA28 mux A */
|
||||
#define MUX_PA28A_EIC_EXTINT8 0
|
||||
#define PINMUX_PA28A_EIC_EXTINT8 ((PIN_PA28A_EIC_EXTINT8 << 16) | MUX_PA28A_EIC_EXTINT8)
|
||||
#define PORT_PA28A_EIC_EXTINT8 (1u << 28)
|
||||
#define PIN_PA09A_EIC_EXTINT9 9 /**< \brief EIC signal: EXTINT9 on PA09 mux A */
|
||||
#define MUX_PA09A_EIC_EXTINT9 0
|
||||
#define PINMUX_PA09A_EIC_EXTINT9 ((PIN_PA09A_EIC_EXTINT9 << 16) | MUX_PA09A_EIC_EXTINT9)
|
||||
#define PORT_PA09A_EIC_EXTINT9 (1u << 9)
|
||||
#define PIN_PA10A_EIC_EXTINT10 10 /**< \brief EIC signal: EXTINT10 on PA10 mux A */
|
||||
#define MUX_PA10A_EIC_EXTINT10 0
|
||||
#define PINMUX_PA10A_EIC_EXTINT10 ((PIN_PA10A_EIC_EXTINT10 << 16) | MUX_PA10A_EIC_EXTINT10)
|
||||
#define PORT_PA10A_EIC_EXTINT10 (1u << 10)
|
||||
#define PIN_PA30A_EIC_EXTINT10 30 /**< \brief EIC signal: EXTINT10 on PA30 mux A */
|
||||
#define MUX_PA30A_EIC_EXTINT10 0
|
||||
#define PINMUX_PA30A_EIC_EXTINT10 ((PIN_PA30A_EIC_EXTINT10 << 16) | MUX_PA30A_EIC_EXTINT10)
|
||||
#define PORT_PA30A_EIC_EXTINT10 (1u << 30)
|
||||
#define PIN_PA11A_EIC_EXTINT11 11 /**< \brief EIC signal: EXTINT11 on PA11 mux A */
|
||||
#define MUX_PA11A_EIC_EXTINT11 0
|
||||
#define PINMUX_PA11A_EIC_EXTINT11 ((PIN_PA11A_EIC_EXTINT11 << 16) | MUX_PA11A_EIC_EXTINT11)
|
||||
#define PORT_PA11A_EIC_EXTINT11 (1u << 11)
|
||||
#define PIN_PA31A_EIC_EXTINT11 31 /**< \brief EIC signal: EXTINT11 on PA31 mux A */
|
||||
#define MUX_PA31A_EIC_EXTINT11 0
|
||||
#define PINMUX_PA31A_EIC_EXTINT11 ((PIN_PA31A_EIC_EXTINT11 << 16) | MUX_PA31A_EIC_EXTINT11)
|
||||
#define PORT_PA31A_EIC_EXTINT11 (1u << 31)
|
||||
#define PIN_PA24A_EIC_EXTINT12 24 /**< \brief EIC signal: EXTINT12 on PA24 mux A */
|
||||
#define MUX_PA24A_EIC_EXTINT12 0
|
||||
#define PINMUX_PA24A_EIC_EXTINT12 ((PIN_PA24A_EIC_EXTINT12 << 16) | MUX_PA24A_EIC_EXTINT12)
|
||||
#define PORT_PA24A_EIC_EXTINT12 (1u << 24)
|
||||
#define PIN_PA25A_EIC_EXTINT13 25 /**< \brief EIC signal: EXTINT13 on PA25 mux A */
|
||||
#define MUX_PA25A_EIC_EXTINT13 0
|
||||
#define PINMUX_PA25A_EIC_EXTINT13 ((PIN_PA25A_EIC_EXTINT13 << 16) | MUX_PA25A_EIC_EXTINT13)
|
||||
#define PORT_PA25A_EIC_EXTINT13 (1u << 25)
|
||||
#define PIN_PA14A_EIC_EXTINT14 14 /**< \brief EIC signal: EXTINT14 on PA14 mux A */
|
||||
#define MUX_PA14A_EIC_EXTINT14 0
|
||||
#define PINMUX_PA14A_EIC_EXTINT14 ((PIN_PA14A_EIC_EXTINT14 << 16) | MUX_PA14A_EIC_EXTINT14)
|
||||
#define PORT_PA14A_EIC_EXTINT14 (1u << 14)
|
||||
#define PIN_PA27A_EIC_EXTINT15 27 /**< \brief EIC signal: EXTINT15 on PA27 mux A */
|
||||
#define MUX_PA27A_EIC_EXTINT15 0
|
||||
#define PINMUX_PA27A_EIC_EXTINT15 ((PIN_PA27A_EIC_EXTINT15 << 16) | MUX_PA27A_EIC_EXTINT15)
|
||||
#define PORT_PA27A_EIC_EXTINT15 (1u << 27)
|
||||
#define PIN_PA15A_EIC_EXTINT15 15 /**< \brief EIC signal: EXTINT15 on PA15 mux A */
|
||||
#define MUX_PA15A_EIC_EXTINT15 0
|
||||
#define PINMUX_PA15A_EIC_EXTINT15 ((PIN_PA15A_EIC_EXTINT15 << 16) | MUX_PA15A_EIC_EXTINT15)
|
||||
#define PORT_PA15A_EIC_EXTINT15 (1u << 15)
|
||||
#define PIN_PA08A_EIC_NMI 8 /**< \brief EIC signal: NMI on PA08 mux A */
|
||||
#define MUX_PA08A_EIC_NMI 0
|
||||
#define PINMUX_PA08A_EIC_NMI ((PIN_PA08A_EIC_NMI << 16) | MUX_PA08A_EIC_NMI)
|
||||
#define PORT_PA08A_EIC_NMI (1u << 8)
|
||||
/* ========== PORT definition for SERCOM0 peripheral ========== */
|
||||
#define PIN_PA04D_SERCOM0_PAD0 4 /**< \brief SERCOM0 signal: PAD0 on PA04 mux D */
|
||||
#define MUX_PA04D_SERCOM0_PAD0 3
|
||||
#define PINMUX_PA04D_SERCOM0_PAD0 ((PIN_PA04D_SERCOM0_PAD0 << 16) | MUX_PA04D_SERCOM0_PAD0)
|
||||
#define PORT_PA04D_SERCOM0_PAD0 (1u << 4)
|
||||
#define PIN_PA08C_SERCOM0_PAD0 8 /**< \brief SERCOM0 signal: PAD0 on PA08 mux C */
|
||||
#define MUX_PA08C_SERCOM0_PAD0 2
|
||||
#define PINMUX_PA08C_SERCOM0_PAD0 ((PIN_PA08C_SERCOM0_PAD0 << 16) | MUX_PA08C_SERCOM0_PAD0)
|
||||
#define PORT_PA08C_SERCOM0_PAD0 (1u << 8)
|
||||
#define PIN_PA05D_SERCOM0_PAD1 5 /**< \brief SERCOM0 signal: PAD1 on PA05 mux D */
|
||||
#define MUX_PA05D_SERCOM0_PAD1 3
|
||||
#define PINMUX_PA05D_SERCOM0_PAD1 ((PIN_PA05D_SERCOM0_PAD1 << 16) | MUX_PA05D_SERCOM0_PAD1)
|
||||
#define PORT_PA05D_SERCOM0_PAD1 (1u << 5)
|
||||
#define PIN_PA09C_SERCOM0_PAD1 9 /**< \brief SERCOM0 signal: PAD1 on PA09 mux C */
|
||||
#define MUX_PA09C_SERCOM0_PAD1 2
|
||||
#define PINMUX_PA09C_SERCOM0_PAD1 ((PIN_PA09C_SERCOM0_PAD1 << 16) | MUX_PA09C_SERCOM0_PAD1)
|
||||
#define PORT_PA09C_SERCOM0_PAD1 (1u << 9)
|
||||
#define PIN_PA06D_SERCOM0_PAD2 6 /**< \brief SERCOM0 signal: PAD2 on PA06 mux D */
|
||||
#define MUX_PA06D_SERCOM0_PAD2 3
|
||||
#define PINMUX_PA06D_SERCOM0_PAD2 ((PIN_PA06D_SERCOM0_PAD2 << 16) | MUX_PA06D_SERCOM0_PAD2)
|
||||
#define PORT_PA06D_SERCOM0_PAD2 (1u << 6)
|
||||
#define PIN_PA10C_SERCOM0_PAD2 10 /**< \brief SERCOM0 signal: PAD2 on PA10 mux C */
|
||||
#define MUX_PA10C_SERCOM0_PAD2 2
|
||||
#define PINMUX_PA10C_SERCOM0_PAD2 ((PIN_PA10C_SERCOM0_PAD2 << 16) | MUX_PA10C_SERCOM0_PAD2)
|
||||
#define PORT_PA10C_SERCOM0_PAD2 (1u << 10)
|
||||
#define PIN_PA07D_SERCOM0_PAD3 7 /**< \brief SERCOM0 signal: PAD3 on PA07 mux D */
|
||||
#define MUX_PA07D_SERCOM0_PAD3 3
|
||||
#define PINMUX_PA07D_SERCOM0_PAD3 ((PIN_PA07D_SERCOM0_PAD3 << 16) | MUX_PA07D_SERCOM0_PAD3)
|
||||
#define PORT_PA07D_SERCOM0_PAD3 (1u << 7)
|
||||
#define PIN_PA11C_SERCOM0_PAD3 11 /**< \brief SERCOM0 signal: PAD3 on PA11 mux C */
|
||||
#define MUX_PA11C_SERCOM0_PAD3 2
|
||||
#define PINMUX_PA11C_SERCOM0_PAD3 ((PIN_PA11C_SERCOM0_PAD3 << 16) | MUX_PA11C_SERCOM0_PAD3)
|
||||
#define PORT_PA11C_SERCOM0_PAD3 (1u << 11)
|
||||
/* ========== PORT definition for SERCOM1 peripheral ========== */
|
||||
#define PIN_PA16C_SERCOM1_PAD0 16 /**< \brief SERCOM1 signal: PAD0 on PA16 mux C */
|
||||
#define MUX_PA16C_SERCOM1_PAD0 2
|
||||
#define PINMUX_PA16C_SERCOM1_PAD0 ((PIN_PA16C_SERCOM1_PAD0 << 16) | MUX_PA16C_SERCOM1_PAD0)
|
||||
#define PORT_PA16C_SERCOM1_PAD0 (1u << 16)
|
||||
#define PIN_PA00D_SERCOM1_PAD0 0 /**< \brief SERCOM1 signal: PAD0 on PA00 mux D */
|
||||
#define MUX_PA00D_SERCOM1_PAD0 3
|
||||
#define PINMUX_PA00D_SERCOM1_PAD0 ((PIN_PA00D_SERCOM1_PAD0 << 16) | MUX_PA00D_SERCOM1_PAD0)
|
||||
#define PORT_PA00D_SERCOM1_PAD0 (1u << 0)
|
||||
#define PIN_PA17C_SERCOM1_PAD1 17 /**< \brief SERCOM1 signal: PAD1 on PA17 mux C */
|
||||
#define MUX_PA17C_SERCOM1_PAD1 2
|
||||
#define PINMUX_PA17C_SERCOM1_PAD1 ((PIN_PA17C_SERCOM1_PAD1 << 16) | MUX_PA17C_SERCOM1_PAD1)
|
||||
#define PORT_PA17C_SERCOM1_PAD1 (1u << 17)
|
||||
#define PIN_PA01D_SERCOM1_PAD1 1 /**< \brief SERCOM1 signal: PAD1 on PA01 mux D */
|
||||
#define MUX_PA01D_SERCOM1_PAD1 3
|
||||
#define PINMUX_PA01D_SERCOM1_PAD1 ((PIN_PA01D_SERCOM1_PAD1 << 16) | MUX_PA01D_SERCOM1_PAD1)
|
||||
#define PORT_PA01D_SERCOM1_PAD1 (1u << 1)
|
||||
#define PIN_PA30D_SERCOM1_PAD2 30 /**< \brief SERCOM1 signal: PAD2 on PA30 mux D */
|
||||
#define MUX_PA30D_SERCOM1_PAD2 3
|
||||
#define PINMUX_PA30D_SERCOM1_PAD2 ((PIN_PA30D_SERCOM1_PAD2 << 16) | MUX_PA30D_SERCOM1_PAD2)
|
||||
#define PORT_PA30D_SERCOM1_PAD2 (1u << 30)
|
||||
#define PIN_PA18C_SERCOM1_PAD2 18 /**< \brief SERCOM1 signal: PAD2 on PA18 mux C */
|
||||
#define MUX_PA18C_SERCOM1_PAD2 2
|
||||
#define PINMUX_PA18C_SERCOM1_PAD2 ((PIN_PA18C_SERCOM1_PAD2 << 16) | MUX_PA18C_SERCOM1_PAD2)
|
||||
#define PORT_PA18C_SERCOM1_PAD2 (1u << 18)
|
||||
#define PIN_PA31D_SERCOM1_PAD3 31 /**< \brief SERCOM1 signal: PAD3 on PA31 mux D */
|
||||
#define MUX_PA31D_SERCOM1_PAD3 3
|
||||
#define PINMUX_PA31D_SERCOM1_PAD3 ((PIN_PA31D_SERCOM1_PAD3 << 16) | MUX_PA31D_SERCOM1_PAD3)
|
||||
#define PORT_PA31D_SERCOM1_PAD3 (1u << 31)
|
||||
#define PIN_PA19C_SERCOM1_PAD3 19 /**< \brief SERCOM1 signal: PAD3 on PA19 mux C */
|
||||
#define MUX_PA19C_SERCOM1_PAD3 2
|
||||
#define PINMUX_PA19C_SERCOM1_PAD3 ((PIN_PA19C_SERCOM1_PAD3 << 16) | MUX_PA19C_SERCOM1_PAD3)
|
||||
#define PORT_PA19C_SERCOM1_PAD3 (1u << 19)
|
||||
/* ========== PORT definition for SERCOM2 peripheral ========== */
|
||||
#define PIN_PA08D_SERCOM2_PAD0 8 /**< \brief SERCOM2 signal: PAD0 on PA08 mux D */
|
||||
#define MUX_PA08D_SERCOM2_PAD0 3
|
||||
#define PINMUX_PA08D_SERCOM2_PAD0 ((PIN_PA08D_SERCOM2_PAD0 << 16) | MUX_PA08D_SERCOM2_PAD0)
|
||||
#define PORT_PA08D_SERCOM2_PAD0 (1u << 8)
|
||||
#define PIN_PA09D_SERCOM2_PAD1 9 /**< \brief SERCOM2 signal: PAD1 on PA09 mux D */
|
||||
#define MUX_PA09D_SERCOM2_PAD1 3
|
||||
#define PINMUX_PA09D_SERCOM2_PAD1 ((PIN_PA09D_SERCOM2_PAD1 << 16) | MUX_PA09D_SERCOM2_PAD1)
|
||||
#define PORT_PA09D_SERCOM2_PAD1 (1u << 9)
|
||||
#define PIN_PA10D_SERCOM2_PAD2 10 /**< \brief SERCOM2 signal: PAD2 on PA10 mux D */
|
||||
#define MUX_PA10D_SERCOM2_PAD2 3
|
||||
#define PINMUX_PA10D_SERCOM2_PAD2 ((PIN_PA10D_SERCOM2_PAD2 << 16) | MUX_PA10D_SERCOM2_PAD2)
|
||||
#define PORT_PA10D_SERCOM2_PAD2 (1u << 10)
|
||||
#define PIN_PA14C_SERCOM2_PAD2 14 /**< \brief SERCOM2 signal: PAD2 on PA14 mux C */
|
||||
#define MUX_PA14C_SERCOM2_PAD2 2
|
||||
#define PINMUX_PA14C_SERCOM2_PAD2 ((PIN_PA14C_SERCOM2_PAD2 << 16) | MUX_PA14C_SERCOM2_PAD2)
|
||||
#define PORT_PA14C_SERCOM2_PAD2 (1u << 14)
|
||||
#define PIN_PA11D_SERCOM2_PAD3 11 /**< \brief SERCOM2 signal: PAD3 on PA11 mux D */
|
||||
#define MUX_PA11D_SERCOM2_PAD3 3
|
||||
#define PINMUX_PA11D_SERCOM2_PAD3 ((PIN_PA11D_SERCOM2_PAD3 << 16) | MUX_PA11D_SERCOM2_PAD3)
|
||||
#define PORT_PA11D_SERCOM2_PAD3 (1u << 11)
|
||||
#define PIN_PA15C_SERCOM2_PAD3 15 /**< \brief SERCOM2 signal: PAD3 on PA15 mux C */
|
||||
#define MUX_PA15C_SERCOM2_PAD3 2
|
||||
#define PINMUX_PA15C_SERCOM2_PAD3 ((PIN_PA15C_SERCOM2_PAD3 << 16) | MUX_PA15C_SERCOM2_PAD3)
|
||||
#define PORT_PA15C_SERCOM2_PAD3 (1u << 15)
|
||||
/* ========== PORT definition for SERCOM3 peripheral ========== */
|
||||
#define PIN_PA16D_SERCOM3_PAD0 16 /**< \brief SERCOM3 signal: PAD0 on PA16 mux D */
|
||||
#define MUX_PA16D_SERCOM3_PAD0 3
|
||||
#define PINMUX_PA16D_SERCOM3_PAD0 ((PIN_PA16D_SERCOM3_PAD0 << 16) | MUX_PA16D_SERCOM3_PAD0)
|
||||
#define PORT_PA16D_SERCOM3_PAD0 (1u << 16)
|
||||
#define PIN_PA22C_SERCOM3_PAD0 22 /**< \brief SERCOM3 signal: PAD0 on PA22 mux C */
|
||||
#define MUX_PA22C_SERCOM3_PAD0 2
|
||||
#define PINMUX_PA22C_SERCOM3_PAD0 ((PIN_PA22C_SERCOM3_PAD0 << 16) | MUX_PA22C_SERCOM3_PAD0)
|
||||
#define PORT_PA22C_SERCOM3_PAD0 (1u << 22)
|
||||
#define PIN_PA17D_SERCOM3_PAD1 17 /**< \brief SERCOM3 signal: PAD1 on PA17 mux D */
|
||||
#define MUX_PA17D_SERCOM3_PAD1 3
|
||||
#define PINMUX_PA17D_SERCOM3_PAD1 ((PIN_PA17D_SERCOM3_PAD1 << 16) | MUX_PA17D_SERCOM3_PAD1)
|
||||
#define PORT_PA17D_SERCOM3_PAD1 (1u << 17)
|
||||
#define PIN_PA23C_SERCOM3_PAD1 23 /**< \brief SERCOM3 signal: PAD1 on PA23 mux C */
|
||||
#define MUX_PA23C_SERCOM3_PAD1 2
|
||||
#define PINMUX_PA23C_SERCOM3_PAD1 ((PIN_PA23C_SERCOM3_PAD1 << 16) | MUX_PA23C_SERCOM3_PAD1)
|
||||
#define PORT_PA23C_SERCOM3_PAD1 (1u << 23)
|
||||
#define PIN_PA18D_SERCOM3_PAD2 18 /**< \brief SERCOM3 signal: PAD2 on PA18 mux D */
|
||||
#define MUX_PA18D_SERCOM3_PAD2 3
|
||||
#define PINMUX_PA18D_SERCOM3_PAD2 ((PIN_PA18D_SERCOM3_PAD2 << 16) | MUX_PA18D_SERCOM3_PAD2)
|
||||
#define PORT_PA18D_SERCOM3_PAD2 (1u << 18)
|
||||
#define PIN_PA24C_SERCOM3_PAD2 24 /**< \brief SERCOM3 signal: PAD2 on PA24 mux C */
|
||||
#define MUX_PA24C_SERCOM3_PAD2 2
|
||||
#define PINMUX_PA24C_SERCOM3_PAD2 ((PIN_PA24C_SERCOM3_PAD2 << 16) | MUX_PA24C_SERCOM3_PAD2)
|
||||
#define PORT_PA24C_SERCOM3_PAD2 (1u << 24)
|
||||
#define PIN_PA19D_SERCOM3_PAD3 19 /**< \brief SERCOM3 signal: PAD3 on PA19 mux D */
|
||||
#define MUX_PA19D_SERCOM3_PAD3 3
|
||||
#define PINMUX_PA19D_SERCOM3_PAD3 ((PIN_PA19D_SERCOM3_PAD3 << 16) | MUX_PA19D_SERCOM3_PAD3)
|
||||
#define PORT_PA19D_SERCOM3_PAD3 (1u << 19)
|
||||
#define PIN_PA25C_SERCOM3_PAD3 25 /**< \brief SERCOM3 signal: PAD3 on PA25 mux C */
|
||||
#define MUX_PA25C_SERCOM3_PAD3 2
|
||||
#define PINMUX_PA25C_SERCOM3_PAD3 ((PIN_PA25C_SERCOM3_PAD3 << 16) | MUX_PA25C_SERCOM3_PAD3)
|
||||
#define PORT_PA25C_SERCOM3_PAD3 (1u << 25)
|
||||
/* ========== PORT definition for TC0 peripheral ========== */
|
||||
#define PIN_PA04F_TC0_WO0 4 /**< \brief TC0 signal: WO0 on PA04 mux F */
|
||||
#define MUX_PA04F_TC0_WO0 5
|
||||
#define PINMUX_PA04F_TC0_WO0 ((PIN_PA04F_TC0_WO0 << 16) | MUX_PA04F_TC0_WO0)
|
||||
#define PORT_PA04F_TC0_WO0 (1u << 4)
|
||||
#define PIN_PA08E_TC0_WO0 8 /**< \brief TC0 signal: WO0 on PA08 mux E */
|
||||
#define MUX_PA08E_TC0_WO0 4
|
||||
#define PINMUX_PA08E_TC0_WO0 ((PIN_PA08E_TC0_WO0 << 16) | MUX_PA08E_TC0_WO0)
|
||||
#define PORT_PA08E_TC0_WO0 (1u << 8)
|
||||
#define PIN_PA05F_TC0_WO1 5 /**< \brief TC0 signal: WO1 on PA05 mux F */
|
||||
#define MUX_PA05F_TC0_WO1 5
|
||||
#define PINMUX_PA05F_TC0_WO1 ((PIN_PA05F_TC0_WO1 << 16) | MUX_PA05F_TC0_WO1)
|
||||
#define PORT_PA05F_TC0_WO1 (1u << 5)
|
||||
#define PIN_PA09E_TC0_WO1 9 /**< \brief TC0 signal: WO1 on PA09 mux E */
|
||||
#define MUX_PA09E_TC0_WO1 4
|
||||
#define PINMUX_PA09E_TC0_WO1 ((PIN_PA09E_TC0_WO1 << 16) | MUX_PA09E_TC0_WO1)
|
||||
#define PORT_PA09E_TC0_WO1 (1u << 9)
|
||||
/* ========== PORT definition for TC1 peripheral ========== */
|
||||
#define PIN_PA06F_TC1_WO0 6 /**< \brief TC1 signal: WO0 on PA06 mux F */
|
||||
#define MUX_PA06F_TC1_WO0 5
|
||||
#define PINMUX_PA06F_TC1_WO0 ((PIN_PA06F_TC1_WO0 << 16) | MUX_PA06F_TC1_WO0)
|
||||
#define PORT_PA06F_TC1_WO0 (1u << 6)
|
||||
#define PIN_PA30F_TC1_WO0 30 /**< \brief TC1 signal: WO0 on PA30 mux F */
|
||||
#define MUX_PA30F_TC1_WO0 5
|
||||
#define PINMUX_PA30F_TC1_WO0 ((PIN_PA30F_TC1_WO0 << 16) | MUX_PA30F_TC1_WO0)
|
||||
#define PORT_PA30F_TC1_WO0 (1u << 30)
|
||||
#define PIN_PA10E_TC1_WO0 10 /**< \brief TC1 signal: WO0 on PA10 mux E */
|
||||
#define MUX_PA10E_TC1_WO0 4
|
||||
#define PINMUX_PA10E_TC1_WO0 ((PIN_PA10E_TC1_WO0 << 16) | MUX_PA10E_TC1_WO0)
|
||||
#define PORT_PA10E_TC1_WO0 (1u << 10)
|
||||
#define PIN_PA07F_TC1_WO1 7 /**< \brief TC1 signal: WO1 on PA07 mux F */
|
||||
#define MUX_PA07F_TC1_WO1 5
|
||||
#define PINMUX_PA07F_TC1_WO1 ((PIN_PA07F_TC1_WO1 << 16) | MUX_PA07F_TC1_WO1)
|
||||
#define PORT_PA07F_TC1_WO1 (1u << 7)
|
||||
#define PIN_PA31F_TC1_WO1 31 /**< \brief TC1 signal: WO1 on PA31 mux F */
|
||||
#define MUX_PA31F_TC1_WO1 5
|
||||
#define PINMUX_PA31F_TC1_WO1 ((PIN_PA31F_TC1_WO1 << 16) | MUX_PA31F_TC1_WO1)
|
||||
#define PORT_PA31F_TC1_WO1 (1u << 31)
|
||||
#define PIN_PA11E_TC1_WO1 11 /**< \brief TC1 signal: WO1 on PA11 mux E */
|
||||
#define MUX_PA11E_TC1_WO1 4
|
||||
#define PINMUX_PA11E_TC1_WO1 ((PIN_PA11E_TC1_WO1 << 16) | MUX_PA11E_TC1_WO1)
|
||||
#define PORT_PA11E_TC1_WO1 (1u << 11)
|
||||
/* ========== PORT definition for TC2 peripheral ========== */
|
||||
#define PIN_PA16F_TC2_WO0 16 /**< \brief TC2 signal: WO0 on PA16 mux F */
|
||||
#define MUX_PA16F_TC2_WO0 5
|
||||
#define PINMUX_PA16F_TC2_WO0 ((PIN_PA16F_TC2_WO0 << 16) | MUX_PA16F_TC2_WO0)
|
||||
#define PORT_PA16F_TC2_WO0 (1u << 16)
|
||||
#define PIN_PA00F_TC2_WO0 0 /**< \brief TC2 signal: WO0 on PA00 mux F */
|
||||
#define MUX_PA00F_TC2_WO0 5
|
||||
#define PINMUX_PA00F_TC2_WO0 ((PIN_PA00F_TC2_WO0 << 16) | MUX_PA00F_TC2_WO0)
|
||||
#define PORT_PA00F_TC2_WO0 (1u << 0)
|
||||
#define PIN_PA17F_TC2_WO1 17 /**< \brief TC2 signal: WO1 on PA17 mux F */
|
||||
#define MUX_PA17F_TC2_WO1 5
|
||||
#define PINMUX_PA17F_TC2_WO1 ((PIN_PA17F_TC2_WO1 << 16) | MUX_PA17F_TC2_WO1)
|
||||
#define PORT_PA17F_TC2_WO1 (1u << 17)
|
||||
#define PIN_PA01F_TC2_WO1 1 /**< \brief TC2 signal: WO1 on PA01 mux F */
|
||||
#define MUX_PA01F_TC2_WO1 5
|
||||
#define PINMUX_PA01F_TC2_WO1 ((PIN_PA01F_TC2_WO1 << 16) | MUX_PA01F_TC2_WO1)
|
||||
#define PORT_PA01F_TC2_WO1 (1u << 1)
|
||||
/* ========== PORT definition for TC3 peripheral ========== */
|
||||
#define PIN_PA18F_TC3_WO0 18 /**< \brief TC3 signal: WO0 on PA18 mux F */
|
||||
#define MUX_PA18F_TC3_WO0 5
|
||||
#define PINMUX_PA18F_TC3_WO0 ((PIN_PA18F_TC3_WO0 << 16) | MUX_PA18F_TC3_WO0)
|
||||
#define PORT_PA18F_TC3_WO0 (1u << 18)
|
||||
#define PIN_PA14E_TC3_WO0 14 /**< \brief TC3 signal: WO0 on PA14 mux E */
|
||||
#define MUX_PA14E_TC3_WO0 4
|
||||
#define PINMUX_PA14E_TC3_WO0 ((PIN_PA14E_TC3_WO0 << 16) | MUX_PA14E_TC3_WO0)
|
||||
#define PORT_PA14E_TC3_WO0 (1u << 14)
|
||||
#define PIN_PA19F_TC3_WO1 19 /**< \brief TC3 signal: WO1 on PA19 mux F */
|
||||
#define MUX_PA19F_TC3_WO1 5
|
||||
#define PINMUX_PA19F_TC3_WO1 ((PIN_PA19F_TC3_WO1 << 16) | MUX_PA19F_TC3_WO1)
|
||||
#define PORT_PA19F_TC3_WO1 (1u << 19)
|
||||
#define PIN_PA15E_TC3_WO1 15 /**< \brief TC3 signal: WO1 on PA15 mux E */
|
||||
#define MUX_PA15E_TC3_WO1 4
|
||||
#define PINMUX_PA15E_TC3_WO1 ((PIN_PA15E_TC3_WO1 << 16) | MUX_PA15E_TC3_WO1)
|
||||
#define PORT_PA15E_TC3_WO1 (1u << 15)
|
||||
/* ========== PORT definition for TC4 peripheral ========== */
|
||||
#define PIN_PA22F_TC4_WO0 22 /**< \brief TC4 signal: WO0 on PA22 mux F */
|
||||
#define MUX_PA22F_TC4_WO0 5
|
||||
#define PINMUX_PA22F_TC4_WO0 ((PIN_PA22F_TC4_WO0 << 16) | MUX_PA22F_TC4_WO0)
|
||||
#define PORT_PA22F_TC4_WO0 (1u << 22)
|
||||
#define PIN_PA23F_TC4_WO1 23 /**< \brief TC4 signal: WO1 on PA23 mux F */
|
||||
#define MUX_PA23F_TC4_WO1 5
|
||||
#define PINMUX_PA23F_TC4_WO1 ((PIN_PA23F_TC4_WO1 << 16) | MUX_PA23F_TC4_WO1)
|
||||
#define PORT_PA23F_TC4_WO1 (1u << 23)
|
||||
/* ========== PORT definition for TC5 peripheral ========== */
|
||||
#define PIN_PA24F_TC5_WO0 24 /**< \brief TC5 signal: WO0 on PA24 mux F */
|
||||
#define MUX_PA24F_TC5_WO0 5
|
||||
#define PINMUX_PA24F_TC5_WO0 ((PIN_PA24F_TC5_WO0 << 16) | MUX_PA24F_TC5_WO0)
|
||||
#define PORT_PA24F_TC5_WO0 (1u << 24)
|
||||
#define PIN_PA25F_TC5_WO1 25 /**< \brief TC5 signal: WO1 on PA25 mux F */
|
||||
#define MUX_PA25F_TC5_WO1 5
|
||||
#define PINMUX_PA25F_TC5_WO1 ((PIN_PA25F_TC5_WO1 << 16) | MUX_PA25F_TC5_WO1)
|
||||
#define PORT_PA25F_TC5_WO1 (1u << 25)
|
||||
/* ========== PORT definition for ADC peripheral ========== */
|
||||
#define PIN_PA02B_ADC_AIN0 2 /**< \brief ADC signal: AIN0 on PA02 mux B */
|
||||
#define MUX_PA02B_ADC_AIN0 1
|
||||
#define PINMUX_PA02B_ADC_AIN0 ((PIN_PA02B_ADC_AIN0 << 16) | MUX_PA02B_ADC_AIN0)
|
||||
#define PORT_PA02B_ADC_AIN0 (1u << 2)
|
||||
#define PIN_PA03B_ADC_AIN1 3 /**< \brief ADC signal: AIN1 on PA03 mux B */
|
||||
#define MUX_PA03B_ADC_AIN1 1
|
||||
#define PINMUX_PA03B_ADC_AIN1 ((PIN_PA03B_ADC_AIN1 << 16) | MUX_PA03B_ADC_AIN1)
|
||||
#define PORT_PA03B_ADC_AIN1 (1u << 3)
|
||||
#define PIN_PA04B_ADC_AIN4 4 /**< \brief ADC signal: AIN4 on PA04 mux B */
|
||||
#define MUX_PA04B_ADC_AIN4 1
|
||||
#define PINMUX_PA04B_ADC_AIN4 ((PIN_PA04B_ADC_AIN4 << 16) | MUX_PA04B_ADC_AIN4)
|
||||
#define PORT_PA04B_ADC_AIN4 (1u << 4)
|
||||
#define PIN_PA05B_ADC_AIN5 5 /**< \brief ADC signal: AIN5 on PA05 mux B */
|
||||
#define MUX_PA05B_ADC_AIN5 1
|
||||
#define PINMUX_PA05B_ADC_AIN5 ((PIN_PA05B_ADC_AIN5 << 16) | MUX_PA05B_ADC_AIN5)
|
||||
#define PORT_PA05B_ADC_AIN5 (1u << 5)
|
||||
#define PIN_PA06B_ADC_AIN6 6 /**< \brief ADC signal: AIN6 on PA06 mux B */
|
||||
#define MUX_PA06B_ADC_AIN6 1
|
||||
#define PINMUX_PA06B_ADC_AIN6 ((PIN_PA06B_ADC_AIN6 << 16) | MUX_PA06B_ADC_AIN6)
|
||||
#define PORT_PA06B_ADC_AIN6 (1u << 6)
|
||||
#define PIN_PA07B_ADC_AIN7 7 /**< \brief ADC signal: AIN7 on PA07 mux B */
|
||||
#define MUX_PA07B_ADC_AIN7 1
|
||||
#define PINMUX_PA07B_ADC_AIN7 ((PIN_PA07B_ADC_AIN7 << 16) | MUX_PA07B_ADC_AIN7)
|
||||
#define PORT_PA07B_ADC_AIN7 (1u << 7)
|
||||
#define PIN_PA08B_ADC_AIN16 8 /**< \brief ADC signal: AIN16 on PA08 mux B */
|
||||
#define MUX_PA08B_ADC_AIN16 1
|
||||
#define PINMUX_PA08B_ADC_AIN16 ((PIN_PA08B_ADC_AIN16 << 16) | MUX_PA08B_ADC_AIN16)
|
||||
#define PORT_PA08B_ADC_AIN16 (1u << 8)
|
||||
#define PIN_PA09B_ADC_AIN17 9 /**< \brief ADC signal: AIN17 on PA09 mux B */
|
||||
#define MUX_PA09B_ADC_AIN17 1
|
||||
#define PINMUX_PA09B_ADC_AIN17 ((PIN_PA09B_ADC_AIN17 << 16) | MUX_PA09B_ADC_AIN17)
|
||||
#define PORT_PA09B_ADC_AIN17 (1u << 9)
|
||||
#define PIN_PA10B_ADC_AIN18 10 /**< \brief ADC signal: AIN18 on PA10 mux B */
|
||||
#define MUX_PA10B_ADC_AIN18 1
|
||||
#define PINMUX_PA10B_ADC_AIN18 ((PIN_PA10B_ADC_AIN18 << 16) | MUX_PA10B_ADC_AIN18)
|
||||
#define PORT_PA10B_ADC_AIN18 (1u << 10)
|
||||
#define PIN_PA11B_ADC_AIN19 11 /**< \brief ADC signal: AIN19 on PA11 mux B */
|
||||
#define MUX_PA11B_ADC_AIN19 1
|
||||
#define PINMUX_PA11B_ADC_AIN19 ((PIN_PA11B_ADC_AIN19 << 16) | MUX_PA11B_ADC_AIN19)
|
||||
#define PORT_PA11B_ADC_AIN19 (1u << 11)
|
||||
#define PIN_PA04B_ADC_VREFP 4 /**< \brief ADC signal: VREFP on PA04 mux B */
|
||||
#define MUX_PA04B_ADC_VREFP 1
|
||||
#define PINMUX_PA04B_ADC_VREFP ((PIN_PA04B_ADC_VREFP << 16) | MUX_PA04B_ADC_VREFP)
|
||||
#define PORT_PA04B_ADC_VREFP (1u << 4)
|
||||
/* ========== PORT definition for AC peripheral ========== */
|
||||
#define PIN_PA04B_AC_AIN0 4 /**< \brief AC signal: AIN0 on PA04 mux B */
|
||||
#define MUX_PA04B_AC_AIN0 1
|
||||
#define PINMUX_PA04B_AC_AIN0 ((PIN_PA04B_AC_AIN0 << 16) | MUX_PA04B_AC_AIN0)
|
||||
#define PORT_PA04B_AC_AIN0 (1u << 4)
|
||||
#define PIN_PA05B_AC_AIN1 5 /**< \brief AC signal: AIN1 on PA05 mux B */
|
||||
#define MUX_PA05B_AC_AIN1 1
|
||||
#define PINMUX_PA05B_AC_AIN1 ((PIN_PA05B_AC_AIN1 << 16) | MUX_PA05B_AC_AIN1)
|
||||
#define PORT_PA05B_AC_AIN1 (1u << 5)
|
||||
#define PIN_PA06B_AC_AIN2 6 /**< \brief AC signal: AIN2 on PA06 mux B */
|
||||
#define MUX_PA06B_AC_AIN2 1
|
||||
#define PINMUX_PA06B_AC_AIN2 ((PIN_PA06B_AC_AIN2 << 16) | MUX_PA06B_AC_AIN2)
|
||||
#define PORT_PA06B_AC_AIN2 (1u << 6)
|
||||
#define PIN_PA07B_AC_AIN3 7 /**< \brief AC signal: AIN3 on PA07 mux B */
|
||||
#define MUX_PA07B_AC_AIN3 1
|
||||
#define PINMUX_PA07B_AC_AIN3 ((PIN_PA07B_AC_AIN3 << 16) | MUX_PA07B_AC_AIN3)
|
||||
#define PORT_PA07B_AC_AIN3 (1u << 7)
|
||||
#define PIN_PA18H_AC_CMP0 18 /**< \brief AC signal: CMP0 on PA18 mux H */
|
||||
#define MUX_PA18H_AC_CMP0 7
|
||||
#define PINMUX_PA18H_AC_CMP0 ((PIN_PA18H_AC_CMP0 << 16) | MUX_PA18H_AC_CMP0)
|
||||
#define PORT_PA18H_AC_CMP0 (1u << 18)
|
||||
#define PIN_PA19H_AC_CMP1 19 /**< \brief AC signal: CMP1 on PA19 mux H */
|
||||
#define MUX_PA19H_AC_CMP1 7
|
||||
#define PINMUX_PA19H_AC_CMP1 ((PIN_PA19H_AC_CMP1 << 16) | MUX_PA19H_AC_CMP1)
|
||||
#define PORT_PA19H_AC_CMP1 (1u << 19)
|
||||
/* ========== PORT definition for DAC peripheral ========== */
|
||||
#define PIN_PA02B_DAC_VOUT 2 /**< \brief DAC signal: VOUT on PA02 mux B */
|
||||
#define MUX_PA02B_DAC_VOUT 1
|
||||
#define PINMUX_PA02B_DAC_VOUT ((PIN_PA02B_DAC_VOUT << 16) | MUX_PA02B_DAC_VOUT)
|
||||
#define PORT_PA02B_DAC_VOUT (1u << 2)
|
||||
#define PIN_PA03B_DAC_VREFP 3 /**< \brief DAC signal: VREFP on PA03 mux B */
|
||||
#define MUX_PA03B_DAC_VREFP 1
|
||||
#define PINMUX_PA03B_DAC_VREFP ((PIN_PA03B_DAC_VREFP << 16) | MUX_PA03B_DAC_VREFP)
|
||||
#define PORT_PA03B_DAC_VREFP (1u << 3)
|
||||
|
||||
#endif /* _SAMD20E14_PIO_ */
|
|
@ -0,0 +1,552 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Peripheral I/O description for SAMD20E15
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20E15_PIO_
|
||||
#define _SAMD20E15_PIO_
|
||||
|
||||
#define PIN_PA00 0 /**< \brief Pin Number for PA00 */
|
||||
#define PORT_PA00 (1u << 0) /**< \brief PORT Mask for PA00 */
|
||||
#define PIN_PA01 1 /**< \brief Pin Number for PA01 */
|
||||
#define PORT_PA01 (1u << 1) /**< \brief PORT Mask for PA01 */
|
||||
#define PIN_PA02 2 /**< \brief Pin Number for PA02 */
|
||||
#define PORT_PA02 (1u << 2) /**< \brief PORT Mask for PA02 */
|
||||
#define PIN_PA03 3 /**< \brief Pin Number for PA03 */
|
||||
#define PORT_PA03 (1u << 3) /**< \brief PORT Mask for PA03 */
|
||||
#define PIN_PA04 4 /**< \brief Pin Number for PA04 */
|
||||
#define PORT_PA04 (1u << 4) /**< \brief PORT Mask for PA04 */
|
||||
#define PIN_PA05 5 /**< \brief Pin Number for PA05 */
|
||||
#define PORT_PA05 (1u << 5) /**< \brief PORT Mask for PA05 */
|
||||
#define PIN_PA06 6 /**< \brief Pin Number for PA06 */
|
||||
#define PORT_PA06 (1u << 6) /**< \brief PORT Mask for PA06 */
|
||||
#define PIN_PA07 7 /**< \brief Pin Number for PA07 */
|
||||
#define PORT_PA07 (1u << 7) /**< \brief PORT Mask for PA07 */
|
||||
#define PIN_PA08 8 /**< \brief Pin Number for PA08 */
|
||||
#define PORT_PA08 (1u << 8) /**< \brief PORT Mask for PA08 */
|
||||
#define PIN_PA09 9 /**< \brief Pin Number for PA09 */
|
||||
#define PORT_PA09 (1u << 9) /**< \brief PORT Mask for PA09 */
|
||||
#define PIN_PA10 10 /**< \brief Pin Number for PA10 */
|
||||
#define PORT_PA10 (1u << 10) /**< \brief PORT Mask for PA10 */
|
||||
#define PIN_PA11 11 /**< \brief Pin Number for PA11 */
|
||||
#define PORT_PA11 (1u << 11) /**< \brief PORT Mask for PA11 */
|
||||
#define PIN_PA14 14 /**< \brief Pin Number for PA14 */
|
||||
#define PORT_PA14 (1u << 14) /**< \brief PORT Mask for PA14 */
|
||||
#define PIN_PA15 15 /**< \brief Pin Number for PA15 */
|
||||
#define PORT_PA15 (1u << 15) /**< \brief PORT Mask for PA15 */
|
||||
#define PIN_PA16 16 /**< \brief Pin Number for PA16 */
|
||||
#define PORT_PA16 (1u << 16) /**< \brief PORT Mask for PA16 */
|
||||
#define PIN_PA17 17 /**< \brief Pin Number for PA17 */
|
||||
#define PORT_PA17 (1u << 17) /**< \brief PORT Mask for PA17 */
|
||||
#define PIN_PA18 18 /**< \brief Pin Number for PA18 */
|
||||
#define PORT_PA18 (1u << 18) /**< \brief PORT Mask for PA18 */
|
||||
#define PIN_PA19 19 /**< \brief Pin Number for PA19 */
|
||||
#define PORT_PA19 (1u << 19) /**< \brief PORT Mask for PA19 */
|
||||
#define PIN_PA22 22 /**< \brief Pin Number for PA22 */
|
||||
#define PORT_PA22 (1u << 22) /**< \brief PORT Mask for PA22 */
|
||||
#define PIN_PA23 23 /**< \brief Pin Number for PA23 */
|
||||
#define PORT_PA23 (1u << 23) /**< \brief PORT Mask for PA23 */
|
||||
#define PIN_PA24 24 /**< \brief Pin Number for PA24 */
|
||||
#define PORT_PA24 (1u << 24) /**< \brief PORT Mask for PA24 */
|
||||
#define PIN_PA25 25 /**< \brief Pin Number for PA25 */
|
||||
#define PORT_PA25 (1u << 25) /**< \brief PORT Mask for PA25 */
|
||||
#define PIN_PA27 27 /**< \brief Pin Number for PA27 */
|
||||
#define PORT_PA27 (1u << 27) /**< \brief PORT Mask for PA27 */
|
||||
#define PIN_PA28 28 /**< \brief Pin Number for PA28 */
|
||||
#define PORT_PA28 (1u << 28) /**< \brief PORT Mask for PA28 */
|
||||
#define PIN_PA30 30 /**< \brief Pin Number for PA30 */
|
||||
#define PORT_PA30 (1u << 30) /**< \brief PORT Mask for PA30 */
|
||||
#define PIN_PA31 31 /**< \brief Pin Number for PA31 */
|
||||
#define PORT_PA31 (1u << 31) /**< \brief PORT Mask for PA31 */
|
||||
/* ========== PORT definition for CORE peripheral ========== */
|
||||
#define PIN_PA30G_CORE_SWCLK 30 /**< \brief CORE signal: SWCLK on PA30 mux G */
|
||||
#define MUX_PA30G_CORE_SWCLK 6
|
||||
#define PINMUX_PA30G_CORE_SWCLK ((PIN_PA30G_CORE_SWCLK << 16) | MUX_PA30G_CORE_SWCLK)
|
||||
#define PORT_PA30G_CORE_SWCLK (1u << 30)
|
||||
/* ========== PORT definition for GCLK peripheral ========== */
|
||||
#define PIN_PA14H_GCLK_IO0 14 /**< \brief GCLK signal: IO0 on PA14 mux H */
|
||||
#define MUX_PA14H_GCLK_IO0 7
|
||||
#define PINMUX_PA14H_GCLK_IO0 ((PIN_PA14H_GCLK_IO0 << 16) | MUX_PA14H_GCLK_IO0)
|
||||
#define PORT_PA14H_GCLK_IO0 (1u << 14)
|
||||
#define PIN_PA27H_GCLK_IO0 27 /**< \brief GCLK signal: IO0 on PA27 mux H */
|
||||
#define MUX_PA27H_GCLK_IO0 7
|
||||
#define PINMUX_PA27H_GCLK_IO0 ((PIN_PA27H_GCLK_IO0 << 16) | MUX_PA27H_GCLK_IO0)
|
||||
#define PORT_PA27H_GCLK_IO0 (1u << 27)
|
||||
#define PIN_PA28H_GCLK_IO0 28 /**< \brief GCLK signal: IO0 on PA28 mux H */
|
||||
#define MUX_PA28H_GCLK_IO0 7
|
||||
#define PINMUX_PA28H_GCLK_IO0 ((PIN_PA28H_GCLK_IO0 << 16) | MUX_PA28H_GCLK_IO0)
|
||||
#define PORT_PA28H_GCLK_IO0 (1u << 28)
|
||||
#define PIN_PA30H_GCLK_IO0 30 /**< \brief GCLK signal: IO0 on PA30 mux H */
|
||||
#define MUX_PA30H_GCLK_IO0 7
|
||||
#define PINMUX_PA30H_GCLK_IO0 ((PIN_PA30H_GCLK_IO0 << 16) | MUX_PA30H_GCLK_IO0)
|
||||
#define PORT_PA30H_GCLK_IO0 (1u << 30)
|
||||
#define PIN_PA15H_GCLK_IO1 15 /**< \brief GCLK signal: IO1 on PA15 mux H */
|
||||
#define MUX_PA15H_GCLK_IO1 7
|
||||
#define PINMUX_PA15H_GCLK_IO1 ((PIN_PA15H_GCLK_IO1 << 16) | MUX_PA15H_GCLK_IO1)
|
||||
#define PORT_PA15H_GCLK_IO1 (1u << 15)
|
||||
#define PIN_PA16H_GCLK_IO2 16 /**< \brief GCLK signal: IO2 on PA16 mux H */
|
||||
#define MUX_PA16H_GCLK_IO2 7
|
||||
#define PINMUX_PA16H_GCLK_IO2 ((PIN_PA16H_GCLK_IO2 << 16) | MUX_PA16H_GCLK_IO2)
|
||||
#define PORT_PA16H_GCLK_IO2 (1u << 16)
|
||||
#define PIN_PA17H_GCLK_IO3 17 /**< \brief GCLK signal: IO3 on PA17 mux H */
|
||||
#define MUX_PA17H_GCLK_IO3 7
|
||||
#define PINMUX_PA17H_GCLK_IO3 ((PIN_PA17H_GCLK_IO3 << 16) | MUX_PA17H_GCLK_IO3)
|
||||
#define PORT_PA17H_GCLK_IO3 (1u << 17)
|
||||
#define PIN_PA10H_GCLK_IO4 10 /**< \brief GCLK signal: IO4 on PA10 mux H */
|
||||
#define MUX_PA10H_GCLK_IO4 7
|
||||
#define PINMUX_PA10H_GCLK_IO4 ((PIN_PA10H_GCLK_IO4 << 16) | MUX_PA10H_GCLK_IO4)
|
||||
#define PORT_PA10H_GCLK_IO4 (1u << 10)
|
||||
#define PIN_PA11H_GCLK_IO5 11 /**< \brief GCLK signal: IO5 on PA11 mux H */
|
||||
#define MUX_PA11H_GCLK_IO5 7
|
||||
#define PINMUX_PA11H_GCLK_IO5 ((PIN_PA11H_GCLK_IO5 << 16) | MUX_PA11H_GCLK_IO5)
|
||||
#define PORT_PA11H_GCLK_IO5 (1u << 11)
|
||||
#define PIN_PA22H_GCLK_IO6 22 /**< \brief GCLK signal: IO6 on PA22 mux H */
|
||||
#define MUX_PA22H_GCLK_IO6 7
|
||||
#define PINMUX_PA22H_GCLK_IO6 ((PIN_PA22H_GCLK_IO6 << 16) | MUX_PA22H_GCLK_IO6)
|
||||
#define PORT_PA22H_GCLK_IO6 (1u << 22)
|
||||
#define PIN_PA23H_GCLK_IO7 23 /**< \brief GCLK signal: IO7 on PA23 mux H */
|
||||
#define MUX_PA23H_GCLK_IO7 7
|
||||
#define PINMUX_PA23H_GCLK_IO7 ((PIN_PA23H_GCLK_IO7 << 16) | MUX_PA23H_GCLK_IO7)
|
||||
#define PORT_PA23H_GCLK_IO7 (1u << 23)
|
||||
/* ========== PORT definition for EIC peripheral ========== */
|
||||
#define PIN_PA16A_EIC_EXTINT0 16 /**< \brief EIC signal: EXTINT0 on PA16 mux A */
|
||||
#define MUX_PA16A_EIC_EXTINT0 0
|
||||
#define PINMUX_PA16A_EIC_EXTINT0 ((PIN_PA16A_EIC_EXTINT0 << 16) | MUX_PA16A_EIC_EXTINT0)
|
||||
#define PORT_PA16A_EIC_EXTINT0 (1u << 16)
|
||||
#define PIN_PA00A_EIC_EXTINT0 0 /**< \brief EIC signal: EXTINT0 on PA00 mux A */
|
||||
#define MUX_PA00A_EIC_EXTINT0 0
|
||||
#define PINMUX_PA00A_EIC_EXTINT0 ((PIN_PA00A_EIC_EXTINT0 << 16) | MUX_PA00A_EIC_EXTINT0)
|
||||
#define PORT_PA00A_EIC_EXTINT0 (1u << 0)
|
||||
#define PIN_PA17A_EIC_EXTINT1 17 /**< \brief EIC signal: EXTINT1 on PA17 mux A */
|
||||
#define MUX_PA17A_EIC_EXTINT1 0
|
||||
#define PINMUX_PA17A_EIC_EXTINT1 ((PIN_PA17A_EIC_EXTINT1 << 16) | MUX_PA17A_EIC_EXTINT1)
|
||||
#define PORT_PA17A_EIC_EXTINT1 (1u << 17)
|
||||
#define PIN_PA01A_EIC_EXTINT1 1 /**< \brief EIC signal: EXTINT1 on PA01 mux A */
|
||||
#define MUX_PA01A_EIC_EXTINT1 0
|
||||
#define PINMUX_PA01A_EIC_EXTINT1 ((PIN_PA01A_EIC_EXTINT1 << 16) | MUX_PA01A_EIC_EXTINT1)
|
||||
#define PORT_PA01A_EIC_EXTINT1 (1u << 1)
|
||||
#define PIN_PA02A_EIC_EXTINT2 2 /**< \brief EIC signal: EXTINT2 on PA02 mux A */
|
||||
#define MUX_PA02A_EIC_EXTINT2 0
|
||||
#define PINMUX_PA02A_EIC_EXTINT2 ((PIN_PA02A_EIC_EXTINT2 << 16) | MUX_PA02A_EIC_EXTINT2)
|
||||
#define PORT_PA02A_EIC_EXTINT2 (1u << 2)
|
||||
#define PIN_PA18A_EIC_EXTINT2 18 /**< \brief EIC signal: EXTINT2 on PA18 mux A */
|
||||
#define MUX_PA18A_EIC_EXTINT2 0
|
||||
#define PINMUX_PA18A_EIC_EXTINT2 ((PIN_PA18A_EIC_EXTINT2 << 16) | MUX_PA18A_EIC_EXTINT2)
|
||||
#define PORT_PA18A_EIC_EXTINT2 (1u << 18)
|
||||
#define PIN_PA03A_EIC_EXTINT3 3 /**< \brief EIC signal: EXTINT3 on PA03 mux A */
|
||||
#define MUX_PA03A_EIC_EXTINT3 0
|
||||
#define PINMUX_PA03A_EIC_EXTINT3 ((PIN_PA03A_EIC_EXTINT3 << 16) | MUX_PA03A_EIC_EXTINT3)
|
||||
#define PORT_PA03A_EIC_EXTINT3 (1u << 3)
|
||||
#define PIN_PA19A_EIC_EXTINT3 19 /**< \brief EIC signal: EXTINT3 on PA19 mux A */
|
||||
#define MUX_PA19A_EIC_EXTINT3 0
|
||||
#define PINMUX_PA19A_EIC_EXTINT3 ((PIN_PA19A_EIC_EXTINT3 << 16) | MUX_PA19A_EIC_EXTINT3)
|
||||
#define PORT_PA19A_EIC_EXTINT3 (1u << 19)
|
||||
#define PIN_PA04A_EIC_EXTINT4 4 /**< \brief EIC signal: EXTINT4 on PA04 mux A */
|
||||
#define MUX_PA04A_EIC_EXTINT4 0
|
||||
#define PINMUX_PA04A_EIC_EXTINT4 ((PIN_PA04A_EIC_EXTINT4 << 16) | MUX_PA04A_EIC_EXTINT4)
|
||||
#define PORT_PA04A_EIC_EXTINT4 (1u << 4)
|
||||
#define PIN_PA05A_EIC_EXTINT5 5 /**< \brief EIC signal: EXTINT5 on PA05 mux A */
|
||||
#define MUX_PA05A_EIC_EXTINT5 0
|
||||
#define PINMUX_PA05A_EIC_EXTINT5 ((PIN_PA05A_EIC_EXTINT5 << 16) | MUX_PA05A_EIC_EXTINT5)
|
||||
#define PORT_PA05A_EIC_EXTINT5 (1u << 5)
|
||||
#define PIN_PA06A_EIC_EXTINT6 6 /**< \brief EIC signal: EXTINT6 on PA06 mux A */
|
||||
#define MUX_PA06A_EIC_EXTINT6 0
|
||||
#define PINMUX_PA06A_EIC_EXTINT6 ((PIN_PA06A_EIC_EXTINT6 << 16) | MUX_PA06A_EIC_EXTINT6)
|
||||
#define PORT_PA06A_EIC_EXTINT6 (1u << 6)
|
||||
#define PIN_PA22A_EIC_EXTINT6 22 /**< \brief EIC signal: EXTINT6 on PA22 mux A */
|
||||
#define MUX_PA22A_EIC_EXTINT6 0
|
||||
#define PINMUX_PA22A_EIC_EXTINT6 ((PIN_PA22A_EIC_EXTINT6 << 16) | MUX_PA22A_EIC_EXTINT6)
|
||||
#define PORT_PA22A_EIC_EXTINT6 (1u << 22)
|
||||
#define PIN_PA07A_EIC_EXTINT7 7 /**< \brief EIC signal: EXTINT7 on PA07 mux A */
|
||||
#define MUX_PA07A_EIC_EXTINT7 0
|
||||
#define PINMUX_PA07A_EIC_EXTINT7 ((PIN_PA07A_EIC_EXTINT7 << 16) | MUX_PA07A_EIC_EXTINT7)
|
||||
#define PORT_PA07A_EIC_EXTINT7 (1u << 7)
|
||||
#define PIN_PA23A_EIC_EXTINT7 23 /**< \brief EIC signal: EXTINT7 on PA23 mux A */
|
||||
#define MUX_PA23A_EIC_EXTINT7 0
|
||||
#define PINMUX_PA23A_EIC_EXTINT7 ((PIN_PA23A_EIC_EXTINT7 << 16) | MUX_PA23A_EIC_EXTINT7)
|
||||
#define PORT_PA23A_EIC_EXTINT7 (1u << 23)
|
||||
#define PIN_PA28A_EIC_EXTINT8 28 /**< \brief EIC signal: EXTINT8 on PA28 mux A */
|
||||
#define MUX_PA28A_EIC_EXTINT8 0
|
||||
#define PINMUX_PA28A_EIC_EXTINT8 ((PIN_PA28A_EIC_EXTINT8 << 16) | MUX_PA28A_EIC_EXTINT8)
|
||||
#define PORT_PA28A_EIC_EXTINT8 (1u << 28)
|
||||
#define PIN_PA09A_EIC_EXTINT9 9 /**< \brief EIC signal: EXTINT9 on PA09 mux A */
|
||||
#define MUX_PA09A_EIC_EXTINT9 0
|
||||
#define PINMUX_PA09A_EIC_EXTINT9 ((PIN_PA09A_EIC_EXTINT9 << 16) | MUX_PA09A_EIC_EXTINT9)
|
||||
#define PORT_PA09A_EIC_EXTINT9 (1u << 9)
|
||||
#define PIN_PA10A_EIC_EXTINT10 10 /**< \brief EIC signal: EXTINT10 on PA10 mux A */
|
||||
#define MUX_PA10A_EIC_EXTINT10 0
|
||||
#define PINMUX_PA10A_EIC_EXTINT10 ((PIN_PA10A_EIC_EXTINT10 << 16) | MUX_PA10A_EIC_EXTINT10)
|
||||
#define PORT_PA10A_EIC_EXTINT10 (1u << 10)
|
||||
#define PIN_PA30A_EIC_EXTINT10 30 /**< \brief EIC signal: EXTINT10 on PA30 mux A */
|
||||
#define MUX_PA30A_EIC_EXTINT10 0
|
||||
#define PINMUX_PA30A_EIC_EXTINT10 ((PIN_PA30A_EIC_EXTINT10 << 16) | MUX_PA30A_EIC_EXTINT10)
|
||||
#define PORT_PA30A_EIC_EXTINT10 (1u << 30)
|
||||
#define PIN_PA11A_EIC_EXTINT11 11 /**< \brief EIC signal: EXTINT11 on PA11 mux A */
|
||||
#define MUX_PA11A_EIC_EXTINT11 0
|
||||
#define PINMUX_PA11A_EIC_EXTINT11 ((PIN_PA11A_EIC_EXTINT11 << 16) | MUX_PA11A_EIC_EXTINT11)
|
||||
#define PORT_PA11A_EIC_EXTINT11 (1u << 11)
|
||||
#define PIN_PA31A_EIC_EXTINT11 31 /**< \brief EIC signal: EXTINT11 on PA31 mux A */
|
||||
#define MUX_PA31A_EIC_EXTINT11 0
|
||||
#define PINMUX_PA31A_EIC_EXTINT11 ((PIN_PA31A_EIC_EXTINT11 << 16) | MUX_PA31A_EIC_EXTINT11)
|
||||
#define PORT_PA31A_EIC_EXTINT11 (1u << 31)
|
||||
#define PIN_PA24A_EIC_EXTINT12 24 /**< \brief EIC signal: EXTINT12 on PA24 mux A */
|
||||
#define MUX_PA24A_EIC_EXTINT12 0
|
||||
#define PINMUX_PA24A_EIC_EXTINT12 ((PIN_PA24A_EIC_EXTINT12 << 16) | MUX_PA24A_EIC_EXTINT12)
|
||||
#define PORT_PA24A_EIC_EXTINT12 (1u << 24)
|
||||
#define PIN_PA25A_EIC_EXTINT13 25 /**< \brief EIC signal: EXTINT13 on PA25 mux A */
|
||||
#define MUX_PA25A_EIC_EXTINT13 0
|
||||
#define PINMUX_PA25A_EIC_EXTINT13 ((PIN_PA25A_EIC_EXTINT13 << 16) | MUX_PA25A_EIC_EXTINT13)
|
||||
#define PORT_PA25A_EIC_EXTINT13 (1u << 25)
|
||||
#define PIN_PA14A_EIC_EXTINT14 14 /**< \brief EIC signal: EXTINT14 on PA14 mux A */
|
||||
#define MUX_PA14A_EIC_EXTINT14 0
|
||||
#define PINMUX_PA14A_EIC_EXTINT14 ((PIN_PA14A_EIC_EXTINT14 << 16) | MUX_PA14A_EIC_EXTINT14)
|
||||
#define PORT_PA14A_EIC_EXTINT14 (1u << 14)
|
||||
#define PIN_PA27A_EIC_EXTINT15 27 /**< \brief EIC signal: EXTINT15 on PA27 mux A */
|
||||
#define MUX_PA27A_EIC_EXTINT15 0
|
||||
#define PINMUX_PA27A_EIC_EXTINT15 ((PIN_PA27A_EIC_EXTINT15 << 16) | MUX_PA27A_EIC_EXTINT15)
|
||||
#define PORT_PA27A_EIC_EXTINT15 (1u << 27)
|
||||
#define PIN_PA15A_EIC_EXTINT15 15 /**< \brief EIC signal: EXTINT15 on PA15 mux A */
|
||||
#define MUX_PA15A_EIC_EXTINT15 0
|
||||
#define PINMUX_PA15A_EIC_EXTINT15 ((PIN_PA15A_EIC_EXTINT15 << 16) | MUX_PA15A_EIC_EXTINT15)
|
||||
#define PORT_PA15A_EIC_EXTINT15 (1u << 15)
|
||||
#define PIN_PA08A_EIC_NMI 8 /**< \brief EIC signal: NMI on PA08 mux A */
|
||||
#define MUX_PA08A_EIC_NMI 0
|
||||
#define PINMUX_PA08A_EIC_NMI ((PIN_PA08A_EIC_NMI << 16) | MUX_PA08A_EIC_NMI)
|
||||
#define PORT_PA08A_EIC_NMI (1u << 8)
|
||||
/* ========== PORT definition for SERCOM0 peripheral ========== */
|
||||
#define PIN_PA04D_SERCOM0_PAD0 4 /**< \brief SERCOM0 signal: PAD0 on PA04 mux D */
|
||||
#define MUX_PA04D_SERCOM0_PAD0 3
|
||||
#define PINMUX_PA04D_SERCOM0_PAD0 ((PIN_PA04D_SERCOM0_PAD0 << 16) | MUX_PA04D_SERCOM0_PAD0)
|
||||
#define PORT_PA04D_SERCOM0_PAD0 (1u << 4)
|
||||
#define PIN_PA08C_SERCOM0_PAD0 8 /**< \brief SERCOM0 signal: PAD0 on PA08 mux C */
|
||||
#define MUX_PA08C_SERCOM0_PAD0 2
|
||||
#define PINMUX_PA08C_SERCOM0_PAD0 ((PIN_PA08C_SERCOM0_PAD0 << 16) | MUX_PA08C_SERCOM0_PAD0)
|
||||
#define PORT_PA08C_SERCOM0_PAD0 (1u << 8)
|
||||
#define PIN_PA05D_SERCOM0_PAD1 5 /**< \brief SERCOM0 signal: PAD1 on PA05 mux D */
|
||||
#define MUX_PA05D_SERCOM0_PAD1 3
|
||||
#define PINMUX_PA05D_SERCOM0_PAD1 ((PIN_PA05D_SERCOM0_PAD1 << 16) | MUX_PA05D_SERCOM0_PAD1)
|
||||
#define PORT_PA05D_SERCOM0_PAD1 (1u << 5)
|
||||
#define PIN_PA09C_SERCOM0_PAD1 9 /**< \brief SERCOM0 signal: PAD1 on PA09 mux C */
|
||||
#define MUX_PA09C_SERCOM0_PAD1 2
|
||||
#define PINMUX_PA09C_SERCOM0_PAD1 ((PIN_PA09C_SERCOM0_PAD1 << 16) | MUX_PA09C_SERCOM0_PAD1)
|
||||
#define PORT_PA09C_SERCOM0_PAD1 (1u << 9)
|
||||
#define PIN_PA06D_SERCOM0_PAD2 6 /**< \brief SERCOM0 signal: PAD2 on PA06 mux D */
|
||||
#define MUX_PA06D_SERCOM0_PAD2 3
|
||||
#define PINMUX_PA06D_SERCOM0_PAD2 ((PIN_PA06D_SERCOM0_PAD2 << 16) | MUX_PA06D_SERCOM0_PAD2)
|
||||
#define PORT_PA06D_SERCOM0_PAD2 (1u << 6)
|
||||
#define PIN_PA10C_SERCOM0_PAD2 10 /**< \brief SERCOM0 signal: PAD2 on PA10 mux C */
|
||||
#define MUX_PA10C_SERCOM0_PAD2 2
|
||||
#define PINMUX_PA10C_SERCOM0_PAD2 ((PIN_PA10C_SERCOM0_PAD2 << 16) | MUX_PA10C_SERCOM0_PAD2)
|
||||
#define PORT_PA10C_SERCOM0_PAD2 (1u << 10)
|
||||
#define PIN_PA07D_SERCOM0_PAD3 7 /**< \brief SERCOM0 signal: PAD3 on PA07 mux D */
|
||||
#define MUX_PA07D_SERCOM0_PAD3 3
|
||||
#define PINMUX_PA07D_SERCOM0_PAD3 ((PIN_PA07D_SERCOM0_PAD3 << 16) | MUX_PA07D_SERCOM0_PAD3)
|
||||
#define PORT_PA07D_SERCOM0_PAD3 (1u << 7)
|
||||
#define PIN_PA11C_SERCOM0_PAD3 11 /**< \brief SERCOM0 signal: PAD3 on PA11 mux C */
|
||||
#define MUX_PA11C_SERCOM0_PAD3 2
|
||||
#define PINMUX_PA11C_SERCOM0_PAD3 ((PIN_PA11C_SERCOM0_PAD3 << 16) | MUX_PA11C_SERCOM0_PAD3)
|
||||
#define PORT_PA11C_SERCOM0_PAD3 (1u << 11)
|
||||
/* ========== PORT definition for SERCOM1 peripheral ========== */
|
||||
#define PIN_PA16C_SERCOM1_PAD0 16 /**< \brief SERCOM1 signal: PAD0 on PA16 mux C */
|
||||
#define MUX_PA16C_SERCOM1_PAD0 2
|
||||
#define PINMUX_PA16C_SERCOM1_PAD0 ((PIN_PA16C_SERCOM1_PAD0 << 16) | MUX_PA16C_SERCOM1_PAD0)
|
||||
#define PORT_PA16C_SERCOM1_PAD0 (1u << 16)
|
||||
#define PIN_PA00D_SERCOM1_PAD0 0 /**< \brief SERCOM1 signal: PAD0 on PA00 mux D */
|
||||
#define MUX_PA00D_SERCOM1_PAD0 3
|
||||
#define PINMUX_PA00D_SERCOM1_PAD0 ((PIN_PA00D_SERCOM1_PAD0 << 16) | MUX_PA00D_SERCOM1_PAD0)
|
||||
#define PORT_PA00D_SERCOM1_PAD0 (1u << 0)
|
||||
#define PIN_PA17C_SERCOM1_PAD1 17 /**< \brief SERCOM1 signal: PAD1 on PA17 mux C */
|
||||
#define MUX_PA17C_SERCOM1_PAD1 2
|
||||
#define PINMUX_PA17C_SERCOM1_PAD1 ((PIN_PA17C_SERCOM1_PAD1 << 16) | MUX_PA17C_SERCOM1_PAD1)
|
||||
#define PORT_PA17C_SERCOM1_PAD1 (1u << 17)
|
||||
#define PIN_PA01D_SERCOM1_PAD1 1 /**< \brief SERCOM1 signal: PAD1 on PA01 mux D */
|
||||
#define MUX_PA01D_SERCOM1_PAD1 3
|
||||
#define PINMUX_PA01D_SERCOM1_PAD1 ((PIN_PA01D_SERCOM1_PAD1 << 16) | MUX_PA01D_SERCOM1_PAD1)
|
||||
#define PORT_PA01D_SERCOM1_PAD1 (1u << 1)
|
||||
#define PIN_PA30D_SERCOM1_PAD2 30 /**< \brief SERCOM1 signal: PAD2 on PA30 mux D */
|
||||
#define MUX_PA30D_SERCOM1_PAD2 3
|
||||
#define PINMUX_PA30D_SERCOM1_PAD2 ((PIN_PA30D_SERCOM1_PAD2 << 16) | MUX_PA30D_SERCOM1_PAD2)
|
||||
#define PORT_PA30D_SERCOM1_PAD2 (1u << 30)
|
||||
#define PIN_PA18C_SERCOM1_PAD2 18 /**< \brief SERCOM1 signal: PAD2 on PA18 mux C */
|
||||
#define MUX_PA18C_SERCOM1_PAD2 2
|
||||
#define PINMUX_PA18C_SERCOM1_PAD2 ((PIN_PA18C_SERCOM1_PAD2 << 16) | MUX_PA18C_SERCOM1_PAD2)
|
||||
#define PORT_PA18C_SERCOM1_PAD2 (1u << 18)
|
||||
#define PIN_PA31D_SERCOM1_PAD3 31 /**< \brief SERCOM1 signal: PAD3 on PA31 mux D */
|
||||
#define MUX_PA31D_SERCOM1_PAD3 3
|
||||
#define PINMUX_PA31D_SERCOM1_PAD3 ((PIN_PA31D_SERCOM1_PAD3 << 16) | MUX_PA31D_SERCOM1_PAD3)
|
||||
#define PORT_PA31D_SERCOM1_PAD3 (1u << 31)
|
||||
#define PIN_PA19C_SERCOM1_PAD3 19 /**< \brief SERCOM1 signal: PAD3 on PA19 mux C */
|
||||
#define MUX_PA19C_SERCOM1_PAD3 2
|
||||
#define PINMUX_PA19C_SERCOM1_PAD3 ((PIN_PA19C_SERCOM1_PAD3 << 16) | MUX_PA19C_SERCOM1_PAD3)
|
||||
#define PORT_PA19C_SERCOM1_PAD3 (1u << 19)
|
||||
/* ========== PORT definition for SERCOM2 peripheral ========== */
|
||||
#define PIN_PA08D_SERCOM2_PAD0 8 /**< \brief SERCOM2 signal: PAD0 on PA08 mux D */
|
||||
#define MUX_PA08D_SERCOM2_PAD0 3
|
||||
#define PINMUX_PA08D_SERCOM2_PAD0 ((PIN_PA08D_SERCOM2_PAD0 << 16) | MUX_PA08D_SERCOM2_PAD0)
|
||||
#define PORT_PA08D_SERCOM2_PAD0 (1u << 8)
|
||||
#define PIN_PA09D_SERCOM2_PAD1 9 /**< \brief SERCOM2 signal: PAD1 on PA09 mux D */
|
||||
#define MUX_PA09D_SERCOM2_PAD1 3
|
||||
#define PINMUX_PA09D_SERCOM2_PAD1 ((PIN_PA09D_SERCOM2_PAD1 << 16) | MUX_PA09D_SERCOM2_PAD1)
|
||||
#define PORT_PA09D_SERCOM2_PAD1 (1u << 9)
|
||||
#define PIN_PA10D_SERCOM2_PAD2 10 /**< \brief SERCOM2 signal: PAD2 on PA10 mux D */
|
||||
#define MUX_PA10D_SERCOM2_PAD2 3
|
||||
#define PINMUX_PA10D_SERCOM2_PAD2 ((PIN_PA10D_SERCOM2_PAD2 << 16) | MUX_PA10D_SERCOM2_PAD2)
|
||||
#define PORT_PA10D_SERCOM2_PAD2 (1u << 10)
|
||||
#define PIN_PA14C_SERCOM2_PAD2 14 /**< \brief SERCOM2 signal: PAD2 on PA14 mux C */
|
||||
#define MUX_PA14C_SERCOM2_PAD2 2
|
||||
#define PINMUX_PA14C_SERCOM2_PAD2 ((PIN_PA14C_SERCOM2_PAD2 << 16) | MUX_PA14C_SERCOM2_PAD2)
|
||||
#define PORT_PA14C_SERCOM2_PAD2 (1u << 14)
|
||||
#define PIN_PA11D_SERCOM2_PAD3 11 /**< \brief SERCOM2 signal: PAD3 on PA11 mux D */
|
||||
#define MUX_PA11D_SERCOM2_PAD3 3
|
||||
#define PINMUX_PA11D_SERCOM2_PAD3 ((PIN_PA11D_SERCOM2_PAD3 << 16) | MUX_PA11D_SERCOM2_PAD3)
|
||||
#define PORT_PA11D_SERCOM2_PAD3 (1u << 11)
|
||||
#define PIN_PA15C_SERCOM2_PAD3 15 /**< \brief SERCOM2 signal: PAD3 on PA15 mux C */
|
||||
#define MUX_PA15C_SERCOM2_PAD3 2
|
||||
#define PINMUX_PA15C_SERCOM2_PAD3 ((PIN_PA15C_SERCOM2_PAD3 << 16) | MUX_PA15C_SERCOM2_PAD3)
|
||||
#define PORT_PA15C_SERCOM2_PAD3 (1u << 15)
|
||||
/* ========== PORT definition for SERCOM3 peripheral ========== */
|
||||
#define PIN_PA16D_SERCOM3_PAD0 16 /**< \brief SERCOM3 signal: PAD0 on PA16 mux D */
|
||||
#define MUX_PA16D_SERCOM3_PAD0 3
|
||||
#define PINMUX_PA16D_SERCOM3_PAD0 ((PIN_PA16D_SERCOM3_PAD0 << 16) | MUX_PA16D_SERCOM3_PAD0)
|
||||
#define PORT_PA16D_SERCOM3_PAD0 (1u << 16)
|
||||
#define PIN_PA22C_SERCOM3_PAD0 22 /**< \brief SERCOM3 signal: PAD0 on PA22 mux C */
|
||||
#define MUX_PA22C_SERCOM3_PAD0 2
|
||||
#define PINMUX_PA22C_SERCOM3_PAD0 ((PIN_PA22C_SERCOM3_PAD0 << 16) | MUX_PA22C_SERCOM3_PAD0)
|
||||
#define PORT_PA22C_SERCOM3_PAD0 (1u << 22)
|
||||
#define PIN_PA17D_SERCOM3_PAD1 17 /**< \brief SERCOM3 signal: PAD1 on PA17 mux D */
|
||||
#define MUX_PA17D_SERCOM3_PAD1 3
|
||||
#define PINMUX_PA17D_SERCOM3_PAD1 ((PIN_PA17D_SERCOM3_PAD1 << 16) | MUX_PA17D_SERCOM3_PAD1)
|
||||
#define PORT_PA17D_SERCOM3_PAD1 (1u << 17)
|
||||
#define PIN_PA23C_SERCOM3_PAD1 23 /**< \brief SERCOM3 signal: PAD1 on PA23 mux C */
|
||||
#define MUX_PA23C_SERCOM3_PAD1 2
|
||||
#define PINMUX_PA23C_SERCOM3_PAD1 ((PIN_PA23C_SERCOM3_PAD1 << 16) | MUX_PA23C_SERCOM3_PAD1)
|
||||
#define PORT_PA23C_SERCOM3_PAD1 (1u << 23)
|
||||
#define PIN_PA18D_SERCOM3_PAD2 18 /**< \brief SERCOM3 signal: PAD2 on PA18 mux D */
|
||||
#define MUX_PA18D_SERCOM3_PAD2 3
|
||||
#define PINMUX_PA18D_SERCOM3_PAD2 ((PIN_PA18D_SERCOM3_PAD2 << 16) | MUX_PA18D_SERCOM3_PAD2)
|
||||
#define PORT_PA18D_SERCOM3_PAD2 (1u << 18)
|
||||
#define PIN_PA24C_SERCOM3_PAD2 24 /**< \brief SERCOM3 signal: PAD2 on PA24 mux C */
|
||||
#define MUX_PA24C_SERCOM3_PAD2 2
|
||||
#define PINMUX_PA24C_SERCOM3_PAD2 ((PIN_PA24C_SERCOM3_PAD2 << 16) | MUX_PA24C_SERCOM3_PAD2)
|
||||
#define PORT_PA24C_SERCOM3_PAD2 (1u << 24)
|
||||
#define PIN_PA19D_SERCOM3_PAD3 19 /**< \brief SERCOM3 signal: PAD3 on PA19 mux D */
|
||||
#define MUX_PA19D_SERCOM3_PAD3 3
|
||||
#define PINMUX_PA19D_SERCOM3_PAD3 ((PIN_PA19D_SERCOM3_PAD3 << 16) | MUX_PA19D_SERCOM3_PAD3)
|
||||
#define PORT_PA19D_SERCOM3_PAD3 (1u << 19)
|
||||
#define PIN_PA25C_SERCOM3_PAD3 25 /**< \brief SERCOM3 signal: PAD3 on PA25 mux C */
|
||||
#define MUX_PA25C_SERCOM3_PAD3 2
|
||||
#define PINMUX_PA25C_SERCOM3_PAD3 ((PIN_PA25C_SERCOM3_PAD3 << 16) | MUX_PA25C_SERCOM3_PAD3)
|
||||
#define PORT_PA25C_SERCOM3_PAD3 (1u << 25)
|
||||
/* ========== PORT definition for TC0 peripheral ========== */
|
||||
#define PIN_PA04F_TC0_WO0 4 /**< \brief TC0 signal: WO0 on PA04 mux F */
|
||||
#define MUX_PA04F_TC0_WO0 5
|
||||
#define PINMUX_PA04F_TC0_WO0 ((PIN_PA04F_TC0_WO0 << 16) | MUX_PA04F_TC0_WO0)
|
||||
#define PORT_PA04F_TC0_WO0 (1u << 4)
|
||||
#define PIN_PA08E_TC0_WO0 8 /**< \brief TC0 signal: WO0 on PA08 mux E */
|
||||
#define MUX_PA08E_TC0_WO0 4
|
||||
#define PINMUX_PA08E_TC0_WO0 ((PIN_PA08E_TC0_WO0 << 16) | MUX_PA08E_TC0_WO0)
|
||||
#define PORT_PA08E_TC0_WO0 (1u << 8)
|
||||
#define PIN_PA05F_TC0_WO1 5 /**< \brief TC0 signal: WO1 on PA05 mux F */
|
||||
#define MUX_PA05F_TC0_WO1 5
|
||||
#define PINMUX_PA05F_TC0_WO1 ((PIN_PA05F_TC0_WO1 << 16) | MUX_PA05F_TC0_WO1)
|
||||
#define PORT_PA05F_TC0_WO1 (1u << 5)
|
||||
#define PIN_PA09E_TC0_WO1 9 /**< \brief TC0 signal: WO1 on PA09 mux E */
|
||||
#define MUX_PA09E_TC0_WO1 4
|
||||
#define PINMUX_PA09E_TC0_WO1 ((PIN_PA09E_TC0_WO1 << 16) | MUX_PA09E_TC0_WO1)
|
||||
#define PORT_PA09E_TC0_WO1 (1u << 9)
|
||||
/* ========== PORT definition for TC1 peripheral ========== */
|
||||
#define PIN_PA06F_TC1_WO0 6 /**< \brief TC1 signal: WO0 on PA06 mux F */
|
||||
#define MUX_PA06F_TC1_WO0 5
|
||||
#define PINMUX_PA06F_TC1_WO0 ((PIN_PA06F_TC1_WO0 << 16) | MUX_PA06F_TC1_WO0)
|
||||
#define PORT_PA06F_TC1_WO0 (1u << 6)
|
||||
#define PIN_PA30F_TC1_WO0 30 /**< \brief TC1 signal: WO0 on PA30 mux F */
|
||||
#define MUX_PA30F_TC1_WO0 5
|
||||
#define PINMUX_PA30F_TC1_WO0 ((PIN_PA30F_TC1_WO0 << 16) | MUX_PA30F_TC1_WO0)
|
||||
#define PORT_PA30F_TC1_WO0 (1u << 30)
|
||||
#define PIN_PA10E_TC1_WO0 10 /**< \brief TC1 signal: WO0 on PA10 mux E */
|
||||
#define MUX_PA10E_TC1_WO0 4
|
||||
#define PINMUX_PA10E_TC1_WO0 ((PIN_PA10E_TC1_WO0 << 16) | MUX_PA10E_TC1_WO0)
|
||||
#define PORT_PA10E_TC1_WO0 (1u << 10)
|
||||
#define PIN_PA07F_TC1_WO1 7 /**< \brief TC1 signal: WO1 on PA07 mux F */
|
||||
#define MUX_PA07F_TC1_WO1 5
|
||||
#define PINMUX_PA07F_TC1_WO1 ((PIN_PA07F_TC1_WO1 << 16) | MUX_PA07F_TC1_WO1)
|
||||
#define PORT_PA07F_TC1_WO1 (1u << 7)
|
||||
#define PIN_PA31F_TC1_WO1 31 /**< \brief TC1 signal: WO1 on PA31 mux F */
|
||||
#define MUX_PA31F_TC1_WO1 5
|
||||
#define PINMUX_PA31F_TC1_WO1 ((PIN_PA31F_TC1_WO1 << 16) | MUX_PA31F_TC1_WO1)
|
||||
#define PORT_PA31F_TC1_WO1 (1u << 31)
|
||||
#define PIN_PA11E_TC1_WO1 11 /**< \brief TC1 signal: WO1 on PA11 mux E */
|
||||
#define MUX_PA11E_TC1_WO1 4
|
||||
#define PINMUX_PA11E_TC1_WO1 ((PIN_PA11E_TC1_WO1 << 16) | MUX_PA11E_TC1_WO1)
|
||||
#define PORT_PA11E_TC1_WO1 (1u << 11)
|
||||
/* ========== PORT definition for TC2 peripheral ========== */
|
||||
#define PIN_PA16F_TC2_WO0 16 /**< \brief TC2 signal: WO0 on PA16 mux F */
|
||||
#define MUX_PA16F_TC2_WO0 5
|
||||
#define PINMUX_PA16F_TC2_WO0 ((PIN_PA16F_TC2_WO0 << 16) | MUX_PA16F_TC2_WO0)
|
||||
#define PORT_PA16F_TC2_WO0 (1u << 16)
|
||||
#define PIN_PA00F_TC2_WO0 0 /**< \brief TC2 signal: WO0 on PA00 mux F */
|
||||
#define MUX_PA00F_TC2_WO0 5
|
||||
#define PINMUX_PA00F_TC2_WO0 ((PIN_PA00F_TC2_WO0 << 16) | MUX_PA00F_TC2_WO0)
|
||||
#define PORT_PA00F_TC2_WO0 (1u << 0)
|
||||
#define PIN_PA17F_TC2_WO1 17 /**< \brief TC2 signal: WO1 on PA17 mux F */
|
||||
#define MUX_PA17F_TC2_WO1 5
|
||||
#define PINMUX_PA17F_TC2_WO1 ((PIN_PA17F_TC2_WO1 << 16) | MUX_PA17F_TC2_WO1)
|
||||
#define PORT_PA17F_TC2_WO1 (1u << 17)
|
||||
#define PIN_PA01F_TC2_WO1 1 /**< \brief TC2 signal: WO1 on PA01 mux F */
|
||||
#define MUX_PA01F_TC2_WO1 5
|
||||
#define PINMUX_PA01F_TC2_WO1 ((PIN_PA01F_TC2_WO1 << 16) | MUX_PA01F_TC2_WO1)
|
||||
#define PORT_PA01F_TC2_WO1 (1u << 1)
|
||||
/* ========== PORT definition for TC3 peripheral ========== */
|
||||
#define PIN_PA18F_TC3_WO0 18 /**< \brief TC3 signal: WO0 on PA18 mux F */
|
||||
#define MUX_PA18F_TC3_WO0 5
|
||||
#define PINMUX_PA18F_TC3_WO0 ((PIN_PA18F_TC3_WO0 << 16) | MUX_PA18F_TC3_WO0)
|
||||
#define PORT_PA18F_TC3_WO0 (1u << 18)
|
||||
#define PIN_PA14E_TC3_WO0 14 /**< \brief TC3 signal: WO0 on PA14 mux E */
|
||||
#define MUX_PA14E_TC3_WO0 4
|
||||
#define PINMUX_PA14E_TC3_WO0 ((PIN_PA14E_TC3_WO0 << 16) | MUX_PA14E_TC3_WO0)
|
||||
#define PORT_PA14E_TC3_WO0 (1u << 14)
|
||||
#define PIN_PA19F_TC3_WO1 19 /**< \brief TC3 signal: WO1 on PA19 mux F */
|
||||
#define MUX_PA19F_TC3_WO1 5
|
||||
#define PINMUX_PA19F_TC3_WO1 ((PIN_PA19F_TC3_WO1 << 16) | MUX_PA19F_TC3_WO1)
|
||||
#define PORT_PA19F_TC3_WO1 (1u << 19)
|
||||
#define PIN_PA15E_TC3_WO1 15 /**< \brief TC3 signal: WO1 on PA15 mux E */
|
||||
#define MUX_PA15E_TC3_WO1 4
|
||||
#define PINMUX_PA15E_TC3_WO1 ((PIN_PA15E_TC3_WO1 << 16) | MUX_PA15E_TC3_WO1)
|
||||
#define PORT_PA15E_TC3_WO1 (1u << 15)
|
||||
/* ========== PORT definition for TC4 peripheral ========== */
|
||||
#define PIN_PA22F_TC4_WO0 22 /**< \brief TC4 signal: WO0 on PA22 mux F */
|
||||
#define MUX_PA22F_TC4_WO0 5
|
||||
#define PINMUX_PA22F_TC4_WO0 ((PIN_PA22F_TC4_WO0 << 16) | MUX_PA22F_TC4_WO0)
|
||||
#define PORT_PA22F_TC4_WO0 (1u << 22)
|
||||
#define PIN_PA23F_TC4_WO1 23 /**< \brief TC4 signal: WO1 on PA23 mux F */
|
||||
#define MUX_PA23F_TC4_WO1 5
|
||||
#define PINMUX_PA23F_TC4_WO1 ((PIN_PA23F_TC4_WO1 << 16) | MUX_PA23F_TC4_WO1)
|
||||
#define PORT_PA23F_TC4_WO1 (1u << 23)
|
||||
/* ========== PORT definition for TC5 peripheral ========== */
|
||||
#define PIN_PA24F_TC5_WO0 24 /**< \brief TC5 signal: WO0 on PA24 mux F */
|
||||
#define MUX_PA24F_TC5_WO0 5
|
||||
#define PINMUX_PA24F_TC5_WO0 ((PIN_PA24F_TC5_WO0 << 16) | MUX_PA24F_TC5_WO0)
|
||||
#define PORT_PA24F_TC5_WO0 (1u << 24)
|
||||
#define PIN_PA25F_TC5_WO1 25 /**< \brief TC5 signal: WO1 on PA25 mux F */
|
||||
#define MUX_PA25F_TC5_WO1 5
|
||||
#define PINMUX_PA25F_TC5_WO1 ((PIN_PA25F_TC5_WO1 << 16) | MUX_PA25F_TC5_WO1)
|
||||
#define PORT_PA25F_TC5_WO1 (1u << 25)
|
||||
/* ========== PORT definition for ADC peripheral ========== */
|
||||
#define PIN_PA02B_ADC_AIN0 2 /**< \brief ADC signal: AIN0 on PA02 mux B */
|
||||
#define MUX_PA02B_ADC_AIN0 1
|
||||
#define PINMUX_PA02B_ADC_AIN0 ((PIN_PA02B_ADC_AIN0 << 16) | MUX_PA02B_ADC_AIN0)
|
||||
#define PORT_PA02B_ADC_AIN0 (1u << 2)
|
||||
#define PIN_PA03B_ADC_AIN1 3 /**< \brief ADC signal: AIN1 on PA03 mux B */
|
||||
#define MUX_PA03B_ADC_AIN1 1
|
||||
#define PINMUX_PA03B_ADC_AIN1 ((PIN_PA03B_ADC_AIN1 << 16) | MUX_PA03B_ADC_AIN1)
|
||||
#define PORT_PA03B_ADC_AIN1 (1u << 3)
|
||||
#define PIN_PA04B_ADC_AIN4 4 /**< \brief ADC signal: AIN4 on PA04 mux B */
|
||||
#define MUX_PA04B_ADC_AIN4 1
|
||||
#define PINMUX_PA04B_ADC_AIN4 ((PIN_PA04B_ADC_AIN4 << 16) | MUX_PA04B_ADC_AIN4)
|
||||
#define PORT_PA04B_ADC_AIN4 (1u << 4)
|
||||
#define PIN_PA05B_ADC_AIN5 5 /**< \brief ADC signal: AIN5 on PA05 mux B */
|
||||
#define MUX_PA05B_ADC_AIN5 1
|
||||
#define PINMUX_PA05B_ADC_AIN5 ((PIN_PA05B_ADC_AIN5 << 16) | MUX_PA05B_ADC_AIN5)
|
||||
#define PORT_PA05B_ADC_AIN5 (1u << 5)
|
||||
#define PIN_PA06B_ADC_AIN6 6 /**< \brief ADC signal: AIN6 on PA06 mux B */
|
||||
#define MUX_PA06B_ADC_AIN6 1
|
||||
#define PINMUX_PA06B_ADC_AIN6 ((PIN_PA06B_ADC_AIN6 << 16) | MUX_PA06B_ADC_AIN6)
|
||||
#define PORT_PA06B_ADC_AIN6 (1u << 6)
|
||||
#define PIN_PA07B_ADC_AIN7 7 /**< \brief ADC signal: AIN7 on PA07 mux B */
|
||||
#define MUX_PA07B_ADC_AIN7 1
|
||||
#define PINMUX_PA07B_ADC_AIN7 ((PIN_PA07B_ADC_AIN7 << 16) | MUX_PA07B_ADC_AIN7)
|
||||
#define PORT_PA07B_ADC_AIN7 (1u << 7)
|
||||
#define PIN_PA08B_ADC_AIN16 8 /**< \brief ADC signal: AIN16 on PA08 mux B */
|
||||
#define MUX_PA08B_ADC_AIN16 1
|
||||
#define PINMUX_PA08B_ADC_AIN16 ((PIN_PA08B_ADC_AIN16 << 16) | MUX_PA08B_ADC_AIN16)
|
||||
#define PORT_PA08B_ADC_AIN16 (1u << 8)
|
||||
#define PIN_PA09B_ADC_AIN17 9 /**< \brief ADC signal: AIN17 on PA09 mux B */
|
||||
#define MUX_PA09B_ADC_AIN17 1
|
||||
#define PINMUX_PA09B_ADC_AIN17 ((PIN_PA09B_ADC_AIN17 << 16) | MUX_PA09B_ADC_AIN17)
|
||||
#define PORT_PA09B_ADC_AIN17 (1u << 9)
|
||||
#define PIN_PA10B_ADC_AIN18 10 /**< \brief ADC signal: AIN18 on PA10 mux B */
|
||||
#define MUX_PA10B_ADC_AIN18 1
|
||||
#define PINMUX_PA10B_ADC_AIN18 ((PIN_PA10B_ADC_AIN18 << 16) | MUX_PA10B_ADC_AIN18)
|
||||
#define PORT_PA10B_ADC_AIN18 (1u << 10)
|
||||
#define PIN_PA11B_ADC_AIN19 11 /**< \brief ADC signal: AIN19 on PA11 mux B */
|
||||
#define MUX_PA11B_ADC_AIN19 1
|
||||
#define PINMUX_PA11B_ADC_AIN19 ((PIN_PA11B_ADC_AIN19 << 16) | MUX_PA11B_ADC_AIN19)
|
||||
#define PORT_PA11B_ADC_AIN19 (1u << 11)
|
||||
#define PIN_PA04B_ADC_VREFP 4 /**< \brief ADC signal: VREFP on PA04 mux B */
|
||||
#define MUX_PA04B_ADC_VREFP 1
|
||||
#define PINMUX_PA04B_ADC_VREFP ((PIN_PA04B_ADC_VREFP << 16) | MUX_PA04B_ADC_VREFP)
|
||||
#define PORT_PA04B_ADC_VREFP (1u << 4)
|
||||
/* ========== PORT definition for AC peripheral ========== */
|
||||
#define PIN_PA04B_AC_AIN0 4 /**< \brief AC signal: AIN0 on PA04 mux B */
|
||||
#define MUX_PA04B_AC_AIN0 1
|
||||
#define PINMUX_PA04B_AC_AIN0 ((PIN_PA04B_AC_AIN0 << 16) | MUX_PA04B_AC_AIN0)
|
||||
#define PORT_PA04B_AC_AIN0 (1u << 4)
|
||||
#define PIN_PA05B_AC_AIN1 5 /**< \brief AC signal: AIN1 on PA05 mux B */
|
||||
#define MUX_PA05B_AC_AIN1 1
|
||||
#define PINMUX_PA05B_AC_AIN1 ((PIN_PA05B_AC_AIN1 << 16) | MUX_PA05B_AC_AIN1)
|
||||
#define PORT_PA05B_AC_AIN1 (1u << 5)
|
||||
#define PIN_PA06B_AC_AIN2 6 /**< \brief AC signal: AIN2 on PA06 mux B */
|
||||
#define MUX_PA06B_AC_AIN2 1
|
||||
#define PINMUX_PA06B_AC_AIN2 ((PIN_PA06B_AC_AIN2 << 16) | MUX_PA06B_AC_AIN2)
|
||||
#define PORT_PA06B_AC_AIN2 (1u << 6)
|
||||
#define PIN_PA07B_AC_AIN3 7 /**< \brief AC signal: AIN3 on PA07 mux B */
|
||||
#define MUX_PA07B_AC_AIN3 1
|
||||
#define PINMUX_PA07B_AC_AIN3 ((PIN_PA07B_AC_AIN3 << 16) | MUX_PA07B_AC_AIN3)
|
||||
#define PORT_PA07B_AC_AIN3 (1u << 7)
|
||||
#define PIN_PA18H_AC_CMP0 18 /**< \brief AC signal: CMP0 on PA18 mux H */
|
||||
#define MUX_PA18H_AC_CMP0 7
|
||||
#define PINMUX_PA18H_AC_CMP0 ((PIN_PA18H_AC_CMP0 << 16) | MUX_PA18H_AC_CMP0)
|
||||
#define PORT_PA18H_AC_CMP0 (1u << 18)
|
||||
#define PIN_PA19H_AC_CMP1 19 /**< \brief AC signal: CMP1 on PA19 mux H */
|
||||
#define MUX_PA19H_AC_CMP1 7
|
||||
#define PINMUX_PA19H_AC_CMP1 ((PIN_PA19H_AC_CMP1 << 16) | MUX_PA19H_AC_CMP1)
|
||||
#define PORT_PA19H_AC_CMP1 (1u << 19)
|
||||
/* ========== PORT definition for DAC peripheral ========== */
|
||||
#define PIN_PA02B_DAC_VOUT 2 /**< \brief DAC signal: VOUT on PA02 mux B */
|
||||
#define MUX_PA02B_DAC_VOUT 1
|
||||
#define PINMUX_PA02B_DAC_VOUT ((PIN_PA02B_DAC_VOUT << 16) | MUX_PA02B_DAC_VOUT)
|
||||
#define PORT_PA02B_DAC_VOUT (1u << 2)
|
||||
#define PIN_PA03B_DAC_VREFP 3 /**< \brief DAC signal: VREFP on PA03 mux B */
|
||||
#define MUX_PA03B_DAC_VREFP 1
|
||||
#define PINMUX_PA03B_DAC_VREFP ((PIN_PA03B_DAC_VREFP << 16) | MUX_PA03B_DAC_VREFP)
|
||||
#define PORT_PA03B_DAC_VREFP (1u << 3)
|
||||
|
||||
#endif /* _SAMD20E15_PIO_ */
|
|
@ -0,0 +1,552 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Peripheral I/O description for SAMD20E16
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20E16_PIO_
|
||||
#define _SAMD20E16_PIO_
|
||||
|
||||
#define PIN_PA00 0 /**< \brief Pin Number for PA00 */
|
||||
#define PORT_PA00 (1u << 0) /**< \brief PORT Mask for PA00 */
|
||||
#define PIN_PA01 1 /**< \brief Pin Number for PA01 */
|
||||
#define PORT_PA01 (1u << 1) /**< \brief PORT Mask for PA01 */
|
||||
#define PIN_PA02 2 /**< \brief Pin Number for PA02 */
|
||||
#define PORT_PA02 (1u << 2) /**< \brief PORT Mask for PA02 */
|
||||
#define PIN_PA03 3 /**< \brief Pin Number for PA03 */
|
||||
#define PORT_PA03 (1u << 3) /**< \brief PORT Mask for PA03 */
|
||||
#define PIN_PA04 4 /**< \brief Pin Number for PA04 */
|
||||
#define PORT_PA04 (1u << 4) /**< \brief PORT Mask for PA04 */
|
||||
#define PIN_PA05 5 /**< \brief Pin Number for PA05 */
|
||||
#define PORT_PA05 (1u << 5) /**< \brief PORT Mask for PA05 */
|
||||
#define PIN_PA06 6 /**< \brief Pin Number for PA06 */
|
||||
#define PORT_PA06 (1u << 6) /**< \brief PORT Mask for PA06 */
|
||||
#define PIN_PA07 7 /**< \brief Pin Number for PA07 */
|
||||
#define PORT_PA07 (1u << 7) /**< \brief PORT Mask for PA07 */
|
||||
#define PIN_PA08 8 /**< \brief Pin Number for PA08 */
|
||||
#define PORT_PA08 (1u << 8) /**< \brief PORT Mask for PA08 */
|
||||
#define PIN_PA09 9 /**< \brief Pin Number for PA09 */
|
||||
#define PORT_PA09 (1u << 9) /**< \brief PORT Mask for PA09 */
|
||||
#define PIN_PA10 10 /**< \brief Pin Number for PA10 */
|
||||
#define PORT_PA10 (1u << 10) /**< \brief PORT Mask for PA10 */
|
||||
#define PIN_PA11 11 /**< \brief Pin Number for PA11 */
|
||||
#define PORT_PA11 (1u << 11) /**< \brief PORT Mask for PA11 */
|
||||
#define PIN_PA14 14 /**< \brief Pin Number for PA14 */
|
||||
#define PORT_PA14 (1u << 14) /**< \brief PORT Mask for PA14 */
|
||||
#define PIN_PA15 15 /**< \brief Pin Number for PA15 */
|
||||
#define PORT_PA15 (1u << 15) /**< \brief PORT Mask for PA15 */
|
||||
#define PIN_PA16 16 /**< \brief Pin Number for PA16 */
|
||||
#define PORT_PA16 (1u << 16) /**< \brief PORT Mask for PA16 */
|
||||
#define PIN_PA17 17 /**< \brief Pin Number for PA17 */
|
||||
#define PORT_PA17 (1u << 17) /**< \brief PORT Mask for PA17 */
|
||||
#define PIN_PA18 18 /**< \brief Pin Number for PA18 */
|
||||
#define PORT_PA18 (1u << 18) /**< \brief PORT Mask for PA18 */
|
||||
#define PIN_PA19 19 /**< \brief Pin Number for PA19 */
|
||||
#define PORT_PA19 (1u << 19) /**< \brief PORT Mask for PA19 */
|
||||
#define PIN_PA22 22 /**< \brief Pin Number for PA22 */
|
||||
#define PORT_PA22 (1u << 22) /**< \brief PORT Mask for PA22 */
|
||||
#define PIN_PA23 23 /**< \brief Pin Number for PA23 */
|
||||
#define PORT_PA23 (1u << 23) /**< \brief PORT Mask for PA23 */
|
||||
#define PIN_PA24 24 /**< \brief Pin Number for PA24 */
|
||||
#define PORT_PA24 (1u << 24) /**< \brief PORT Mask for PA24 */
|
||||
#define PIN_PA25 25 /**< \brief Pin Number for PA25 */
|
||||
#define PORT_PA25 (1u << 25) /**< \brief PORT Mask for PA25 */
|
||||
#define PIN_PA27 27 /**< \brief Pin Number for PA27 */
|
||||
#define PORT_PA27 (1u << 27) /**< \brief PORT Mask for PA27 */
|
||||
#define PIN_PA28 28 /**< \brief Pin Number for PA28 */
|
||||
#define PORT_PA28 (1u << 28) /**< \brief PORT Mask for PA28 */
|
||||
#define PIN_PA30 30 /**< \brief Pin Number for PA30 */
|
||||
#define PORT_PA30 (1u << 30) /**< \brief PORT Mask for PA30 */
|
||||
#define PIN_PA31 31 /**< \brief Pin Number for PA31 */
|
||||
#define PORT_PA31 (1u << 31) /**< \brief PORT Mask for PA31 */
|
||||
/* ========== PORT definition for CORE peripheral ========== */
|
||||
#define PIN_PA30G_CORE_SWCLK 30 /**< \brief CORE signal: SWCLK on PA30 mux G */
|
||||
#define MUX_PA30G_CORE_SWCLK 6
|
||||
#define PINMUX_PA30G_CORE_SWCLK ((PIN_PA30G_CORE_SWCLK << 16) | MUX_PA30G_CORE_SWCLK)
|
||||
#define PORT_PA30G_CORE_SWCLK (1u << 30)
|
||||
/* ========== PORT definition for GCLK peripheral ========== */
|
||||
#define PIN_PA14H_GCLK_IO0 14 /**< \brief GCLK signal: IO0 on PA14 mux H */
|
||||
#define MUX_PA14H_GCLK_IO0 7
|
||||
#define PINMUX_PA14H_GCLK_IO0 ((PIN_PA14H_GCLK_IO0 << 16) | MUX_PA14H_GCLK_IO0)
|
||||
#define PORT_PA14H_GCLK_IO0 (1u << 14)
|
||||
#define PIN_PA27H_GCLK_IO0 27 /**< \brief GCLK signal: IO0 on PA27 mux H */
|
||||
#define MUX_PA27H_GCLK_IO0 7
|
||||
#define PINMUX_PA27H_GCLK_IO0 ((PIN_PA27H_GCLK_IO0 << 16) | MUX_PA27H_GCLK_IO0)
|
||||
#define PORT_PA27H_GCLK_IO0 (1u << 27)
|
||||
#define PIN_PA28H_GCLK_IO0 28 /**< \brief GCLK signal: IO0 on PA28 mux H */
|
||||
#define MUX_PA28H_GCLK_IO0 7
|
||||
#define PINMUX_PA28H_GCLK_IO0 ((PIN_PA28H_GCLK_IO0 << 16) | MUX_PA28H_GCLK_IO0)
|
||||
#define PORT_PA28H_GCLK_IO0 (1u << 28)
|
||||
#define PIN_PA30H_GCLK_IO0 30 /**< \brief GCLK signal: IO0 on PA30 mux H */
|
||||
#define MUX_PA30H_GCLK_IO0 7
|
||||
#define PINMUX_PA30H_GCLK_IO0 ((PIN_PA30H_GCLK_IO0 << 16) | MUX_PA30H_GCLK_IO0)
|
||||
#define PORT_PA30H_GCLK_IO0 (1u << 30)
|
||||
#define PIN_PA15H_GCLK_IO1 15 /**< \brief GCLK signal: IO1 on PA15 mux H */
|
||||
#define MUX_PA15H_GCLK_IO1 7
|
||||
#define PINMUX_PA15H_GCLK_IO1 ((PIN_PA15H_GCLK_IO1 << 16) | MUX_PA15H_GCLK_IO1)
|
||||
#define PORT_PA15H_GCLK_IO1 (1u << 15)
|
||||
#define PIN_PA16H_GCLK_IO2 16 /**< \brief GCLK signal: IO2 on PA16 mux H */
|
||||
#define MUX_PA16H_GCLK_IO2 7
|
||||
#define PINMUX_PA16H_GCLK_IO2 ((PIN_PA16H_GCLK_IO2 << 16) | MUX_PA16H_GCLK_IO2)
|
||||
#define PORT_PA16H_GCLK_IO2 (1u << 16)
|
||||
#define PIN_PA17H_GCLK_IO3 17 /**< \brief GCLK signal: IO3 on PA17 mux H */
|
||||
#define MUX_PA17H_GCLK_IO3 7
|
||||
#define PINMUX_PA17H_GCLK_IO3 ((PIN_PA17H_GCLK_IO3 << 16) | MUX_PA17H_GCLK_IO3)
|
||||
#define PORT_PA17H_GCLK_IO3 (1u << 17)
|
||||
#define PIN_PA10H_GCLK_IO4 10 /**< \brief GCLK signal: IO4 on PA10 mux H */
|
||||
#define MUX_PA10H_GCLK_IO4 7
|
||||
#define PINMUX_PA10H_GCLK_IO4 ((PIN_PA10H_GCLK_IO4 << 16) | MUX_PA10H_GCLK_IO4)
|
||||
#define PORT_PA10H_GCLK_IO4 (1u << 10)
|
||||
#define PIN_PA11H_GCLK_IO5 11 /**< \brief GCLK signal: IO5 on PA11 mux H */
|
||||
#define MUX_PA11H_GCLK_IO5 7
|
||||
#define PINMUX_PA11H_GCLK_IO5 ((PIN_PA11H_GCLK_IO5 << 16) | MUX_PA11H_GCLK_IO5)
|
||||
#define PORT_PA11H_GCLK_IO5 (1u << 11)
|
||||
#define PIN_PA22H_GCLK_IO6 22 /**< \brief GCLK signal: IO6 on PA22 mux H */
|
||||
#define MUX_PA22H_GCLK_IO6 7
|
||||
#define PINMUX_PA22H_GCLK_IO6 ((PIN_PA22H_GCLK_IO6 << 16) | MUX_PA22H_GCLK_IO6)
|
||||
#define PORT_PA22H_GCLK_IO6 (1u << 22)
|
||||
#define PIN_PA23H_GCLK_IO7 23 /**< \brief GCLK signal: IO7 on PA23 mux H */
|
||||
#define MUX_PA23H_GCLK_IO7 7
|
||||
#define PINMUX_PA23H_GCLK_IO7 ((PIN_PA23H_GCLK_IO7 << 16) | MUX_PA23H_GCLK_IO7)
|
||||
#define PORT_PA23H_GCLK_IO7 (1u << 23)
|
||||
/* ========== PORT definition for EIC peripheral ========== */
|
||||
#define PIN_PA16A_EIC_EXTINT0 16 /**< \brief EIC signal: EXTINT0 on PA16 mux A */
|
||||
#define MUX_PA16A_EIC_EXTINT0 0
|
||||
#define PINMUX_PA16A_EIC_EXTINT0 ((PIN_PA16A_EIC_EXTINT0 << 16) | MUX_PA16A_EIC_EXTINT0)
|
||||
#define PORT_PA16A_EIC_EXTINT0 (1u << 16)
|
||||
#define PIN_PA00A_EIC_EXTINT0 0 /**< \brief EIC signal: EXTINT0 on PA00 mux A */
|
||||
#define MUX_PA00A_EIC_EXTINT0 0
|
||||
#define PINMUX_PA00A_EIC_EXTINT0 ((PIN_PA00A_EIC_EXTINT0 << 16) | MUX_PA00A_EIC_EXTINT0)
|
||||
#define PORT_PA00A_EIC_EXTINT0 (1u << 0)
|
||||
#define PIN_PA17A_EIC_EXTINT1 17 /**< \brief EIC signal: EXTINT1 on PA17 mux A */
|
||||
#define MUX_PA17A_EIC_EXTINT1 0
|
||||
#define PINMUX_PA17A_EIC_EXTINT1 ((PIN_PA17A_EIC_EXTINT1 << 16) | MUX_PA17A_EIC_EXTINT1)
|
||||
#define PORT_PA17A_EIC_EXTINT1 (1u << 17)
|
||||
#define PIN_PA01A_EIC_EXTINT1 1 /**< \brief EIC signal: EXTINT1 on PA01 mux A */
|
||||
#define MUX_PA01A_EIC_EXTINT1 0
|
||||
#define PINMUX_PA01A_EIC_EXTINT1 ((PIN_PA01A_EIC_EXTINT1 << 16) | MUX_PA01A_EIC_EXTINT1)
|
||||
#define PORT_PA01A_EIC_EXTINT1 (1u << 1)
|
||||
#define PIN_PA02A_EIC_EXTINT2 2 /**< \brief EIC signal: EXTINT2 on PA02 mux A */
|
||||
#define MUX_PA02A_EIC_EXTINT2 0
|
||||
#define PINMUX_PA02A_EIC_EXTINT2 ((PIN_PA02A_EIC_EXTINT2 << 16) | MUX_PA02A_EIC_EXTINT2)
|
||||
#define PORT_PA02A_EIC_EXTINT2 (1u << 2)
|
||||
#define PIN_PA18A_EIC_EXTINT2 18 /**< \brief EIC signal: EXTINT2 on PA18 mux A */
|
||||
#define MUX_PA18A_EIC_EXTINT2 0
|
||||
#define PINMUX_PA18A_EIC_EXTINT2 ((PIN_PA18A_EIC_EXTINT2 << 16) | MUX_PA18A_EIC_EXTINT2)
|
||||
#define PORT_PA18A_EIC_EXTINT2 (1u << 18)
|
||||
#define PIN_PA03A_EIC_EXTINT3 3 /**< \brief EIC signal: EXTINT3 on PA03 mux A */
|
||||
#define MUX_PA03A_EIC_EXTINT3 0
|
||||
#define PINMUX_PA03A_EIC_EXTINT3 ((PIN_PA03A_EIC_EXTINT3 << 16) | MUX_PA03A_EIC_EXTINT3)
|
||||
#define PORT_PA03A_EIC_EXTINT3 (1u << 3)
|
||||
#define PIN_PA19A_EIC_EXTINT3 19 /**< \brief EIC signal: EXTINT3 on PA19 mux A */
|
||||
#define MUX_PA19A_EIC_EXTINT3 0
|
||||
#define PINMUX_PA19A_EIC_EXTINT3 ((PIN_PA19A_EIC_EXTINT3 << 16) | MUX_PA19A_EIC_EXTINT3)
|
||||
#define PORT_PA19A_EIC_EXTINT3 (1u << 19)
|
||||
#define PIN_PA04A_EIC_EXTINT4 4 /**< \brief EIC signal: EXTINT4 on PA04 mux A */
|
||||
#define MUX_PA04A_EIC_EXTINT4 0
|
||||
#define PINMUX_PA04A_EIC_EXTINT4 ((PIN_PA04A_EIC_EXTINT4 << 16) | MUX_PA04A_EIC_EXTINT4)
|
||||
#define PORT_PA04A_EIC_EXTINT4 (1u << 4)
|
||||
#define PIN_PA05A_EIC_EXTINT5 5 /**< \brief EIC signal: EXTINT5 on PA05 mux A */
|
||||
#define MUX_PA05A_EIC_EXTINT5 0
|
||||
#define PINMUX_PA05A_EIC_EXTINT5 ((PIN_PA05A_EIC_EXTINT5 << 16) | MUX_PA05A_EIC_EXTINT5)
|
||||
#define PORT_PA05A_EIC_EXTINT5 (1u << 5)
|
||||
#define PIN_PA06A_EIC_EXTINT6 6 /**< \brief EIC signal: EXTINT6 on PA06 mux A */
|
||||
#define MUX_PA06A_EIC_EXTINT6 0
|
||||
#define PINMUX_PA06A_EIC_EXTINT6 ((PIN_PA06A_EIC_EXTINT6 << 16) | MUX_PA06A_EIC_EXTINT6)
|
||||
#define PORT_PA06A_EIC_EXTINT6 (1u << 6)
|
||||
#define PIN_PA22A_EIC_EXTINT6 22 /**< \brief EIC signal: EXTINT6 on PA22 mux A */
|
||||
#define MUX_PA22A_EIC_EXTINT6 0
|
||||
#define PINMUX_PA22A_EIC_EXTINT6 ((PIN_PA22A_EIC_EXTINT6 << 16) | MUX_PA22A_EIC_EXTINT6)
|
||||
#define PORT_PA22A_EIC_EXTINT6 (1u << 22)
|
||||
#define PIN_PA07A_EIC_EXTINT7 7 /**< \brief EIC signal: EXTINT7 on PA07 mux A */
|
||||
#define MUX_PA07A_EIC_EXTINT7 0
|
||||
#define PINMUX_PA07A_EIC_EXTINT7 ((PIN_PA07A_EIC_EXTINT7 << 16) | MUX_PA07A_EIC_EXTINT7)
|
||||
#define PORT_PA07A_EIC_EXTINT7 (1u << 7)
|
||||
#define PIN_PA23A_EIC_EXTINT7 23 /**< \brief EIC signal: EXTINT7 on PA23 mux A */
|
||||
#define MUX_PA23A_EIC_EXTINT7 0
|
||||
#define PINMUX_PA23A_EIC_EXTINT7 ((PIN_PA23A_EIC_EXTINT7 << 16) | MUX_PA23A_EIC_EXTINT7)
|
||||
#define PORT_PA23A_EIC_EXTINT7 (1u << 23)
|
||||
#define PIN_PA28A_EIC_EXTINT8 28 /**< \brief EIC signal: EXTINT8 on PA28 mux A */
|
||||
#define MUX_PA28A_EIC_EXTINT8 0
|
||||
#define PINMUX_PA28A_EIC_EXTINT8 ((PIN_PA28A_EIC_EXTINT8 << 16) | MUX_PA28A_EIC_EXTINT8)
|
||||
#define PORT_PA28A_EIC_EXTINT8 (1u << 28)
|
||||
#define PIN_PA09A_EIC_EXTINT9 9 /**< \brief EIC signal: EXTINT9 on PA09 mux A */
|
||||
#define MUX_PA09A_EIC_EXTINT9 0
|
||||
#define PINMUX_PA09A_EIC_EXTINT9 ((PIN_PA09A_EIC_EXTINT9 << 16) | MUX_PA09A_EIC_EXTINT9)
|
||||
#define PORT_PA09A_EIC_EXTINT9 (1u << 9)
|
||||
#define PIN_PA10A_EIC_EXTINT10 10 /**< \brief EIC signal: EXTINT10 on PA10 mux A */
|
||||
#define MUX_PA10A_EIC_EXTINT10 0
|
||||
#define PINMUX_PA10A_EIC_EXTINT10 ((PIN_PA10A_EIC_EXTINT10 << 16) | MUX_PA10A_EIC_EXTINT10)
|
||||
#define PORT_PA10A_EIC_EXTINT10 (1u << 10)
|
||||
#define PIN_PA30A_EIC_EXTINT10 30 /**< \brief EIC signal: EXTINT10 on PA30 mux A */
|
||||
#define MUX_PA30A_EIC_EXTINT10 0
|
||||
#define PINMUX_PA30A_EIC_EXTINT10 ((PIN_PA30A_EIC_EXTINT10 << 16) | MUX_PA30A_EIC_EXTINT10)
|
||||
#define PORT_PA30A_EIC_EXTINT10 (1u << 30)
|
||||
#define PIN_PA11A_EIC_EXTINT11 11 /**< \brief EIC signal: EXTINT11 on PA11 mux A */
|
||||
#define MUX_PA11A_EIC_EXTINT11 0
|
||||
#define PINMUX_PA11A_EIC_EXTINT11 ((PIN_PA11A_EIC_EXTINT11 << 16) | MUX_PA11A_EIC_EXTINT11)
|
||||
#define PORT_PA11A_EIC_EXTINT11 (1u << 11)
|
||||
#define PIN_PA31A_EIC_EXTINT11 31 /**< \brief EIC signal: EXTINT11 on PA31 mux A */
|
||||
#define MUX_PA31A_EIC_EXTINT11 0
|
||||
#define PINMUX_PA31A_EIC_EXTINT11 ((PIN_PA31A_EIC_EXTINT11 << 16) | MUX_PA31A_EIC_EXTINT11)
|
||||
#define PORT_PA31A_EIC_EXTINT11 (1u << 31)
|
||||
#define PIN_PA24A_EIC_EXTINT12 24 /**< \brief EIC signal: EXTINT12 on PA24 mux A */
|
||||
#define MUX_PA24A_EIC_EXTINT12 0
|
||||
#define PINMUX_PA24A_EIC_EXTINT12 ((PIN_PA24A_EIC_EXTINT12 << 16) | MUX_PA24A_EIC_EXTINT12)
|
||||
#define PORT_PA24A_EIC_EXTINT12 (1u << 24)
|
||||
#define PIN_PA25A_EIC_EXTINT13 25 /**< \brief EIC signal: EXTINT13 on PA25 mux A */
|
||||
#define MUX_PA25A_EIC_EXTINT13 0
|
||||
#define PINMUX_PA25A_EIC_EXTINT13 ((PIN_PA25A_EIC_EXTINT13 << 16) | MUX_PA25A_EIC_EXTINT13)
|
||||
#define PORT_PA25A_EIC_EXTINT13 (1u << 25)
|
||||
#define PIN_PA14A_EIC_EXTINT14 14 /**< \brief EIC signal: EXTINT14 on PA14 mux A */
|
||||
#define MUX_PA14A_EIC_EXTINT14 0
|
||||
#define PINMUX_PA14A_EIC_EXTINT14 ((PIN_PA14A_EIC_EXTINT14 << 16) | MUX_PA14A_EIC_EXTINT14)
|
||||
#define PORT_PA14A_EIC_EXTINT14 (1u << 14)
|
||||
#define PIN_PA27A_EIC_EXTINT15 27 /**< \brief EIC signal: EXTINT15 on PA27 mux A */
|
||||
#define MUX_PA27A_EIC_EXTINT15 0
|
||||
#define PINMUX_PA27A_EIC_EXTINT15 ((PIN_PA27A_EIC_EXTINT15 << 16) | MUX_PA27A_EIC_EXTINT15)
|
||||
#define PORT_PA27A_EIC_EXTINT15 (1u << 27)
|
||||
#define PIN_PA15A_EIC_EXTINT15 15 /**< \brief EIC signal: EXTINT15 on PA15 mux A */
|
||||
#define MUX_PA15A_EIC_EXTINT15 0
|
||||
#define PINMUX_PA15A_EIC_EXTINT15 ((PIN_PA15A_EIC_EXTINT15 << 16) | MUX_PA15A_EIC_EXTINT15)
|
||||
#define PORT_PA15A_EIC_EXTINT15 (1u << 15)
|
||||
#define PIN_PA08A_EIC_NMI 8 /**< \brief EIC signal: NMI on PA08 mux A */
|
||||
#define MUX_PA08A_EIC_NMI 0
|
||||
#define PINMUX_PA08A_EIC_NMI ((PIN_PA08A_EIC_NMI << 16) | MUX_PA08A_EIC_NMI)
|
||||
#define PORT_PA08A_EIC_NMI (1u << 8)
|
||||
/* ========== PORT definition for SERCOM0 peripheral ========== */
|
||||
#define PIN_PA04D_SERCOM0_PAD0 4 /**< \brief SERCOM0 signal: PAD0 on PA04 mux D */
|
||||
#define MUX_PA04D_SERCOM0_PAD0 3
|
||||
#define PINMUX_PA04D_SERCOM0_PAD0 ((PIN_PA04D_SERCOM0_PAD0 << 16) | MUX_PA04D_SERCOM0_PAD0)
|
||||
#define PORT_PA04D_SERCOM0_PAD0 (1u << 4)
|
||||
#define PIN_PA08C_SERCOM0_PAD0 8 /**< \brief SERCOM0 signal: PAD0 on PA08 mux C */
|
||||
#define MUX_PA08C_SERCOM0_PAD0 2
|
||||
#define PINMUX_PA08C_SERCOM0_PAD0 ((PIN_PA08C_SERCOM0_PAD0 << 16) | MUX_PA08C_SERCOM0_PAD0)
|
||||
#define PORT_PA08C_SERCOM0_PAD0 (1u << 8)
|
||||
#define PIN_PA05D_SERCOM0_PAD1 5 /**< \brief SERCOM0 signal: PAD1 on PA05 mux D */
|
||||
#define MUX_PA05D_SERCOM0_PAD1 3
|
||||
#define PINMUX_PA05D_SERCOM0_PAD1 ((PIN_PA05D_SERCOM0_PAD1 << 16) | MUX_PA05D_SERCOM0_PAD1)
|
||||
#define PORT_PA05D_SERCOM0_PAD1 (1u << 5)
|
||||
#define PIN_PA09C_SERCOM0_PAD1 9 /**< \brief SERCOM0 signal: PAD1 on PA09 mux C */
|
||||
#define MUX_PA09C_SERCOM0_PAD1 2
|
||||
#define PINMUX_PA09C_SERCOM0_PAD1 ((PIN_PA09C_SERCOM0_PAD1 << 16) | MUX_PA09C_SERCOM0_PAD1)
|
||||
#define PORT_PA09C_SERCOM0_PAD1 (1u << 9)
|
||||
#define PIN_PA06D_SERCOM0_PAD2 6 /**< \brief SERCOM0 signal: PAD2 on PA06 mux D */
|
||||
#define MUX_PA06D_SERCOM0_PAD2 3
|
||||
#define PINMUX_PA06D_SERCOM0_PAD2 ((PIN_PA06D_SERCOM0_PAD2 << 16) | MUX_PA06D_SERCOM0_PAD2)
|
||||
#define PORT_PA06D_SERCOM0_PAD2 (1u << 6)
|
||||
#define PIN_PA10C_SERCOM0_PAD2 10 /**< \brief SERCOM0 signal: PAD2 on PA10 mux C */
|
||||
#define MUX_PA10C_SERCOM0_PAD2 2
|
||||
#define PINMUX_PA10C_SERCOM0_PAD2 ((PIN_PA10C_SERCOM0_PAD2 << 16) | MUX_PA10C_SERCOM0_PAD2)
|
||||
#define PORT_PA10C_SERCOM0_PAD2 (1u << 10)
|
||||
#define PIN_PA07D_SERCOM0_PAD3 7 /**< \brief SERCOM0 signal: PAD3 on PA07 mux D */
|
||||
#define MUX_PA07D_SERCOM0_PAD3 3
|
||||
#define PINMUX_PA07D_SERCOM0_PAD3 ((PIN_PA07D_SERCOM0_PAD3 << 16) | MUX_PA07D_SERCOM0_PAD3)
|
||||
#define PORT_PA07D_SERCOM0_PAD3 (1u << 7)
|
||||
#define PIN_PA11C_SERCOM0_PAD3 11 /**< \brief SERCOM0 signal: PAD3 on PA11 mux C */
|
||||
#define MUX_PA11C_SERCOM0_PAD3 2
|
||||
#define PINMUX_PA11C_SERCOM0_PAD3 ((PIN_PA11C_SERCOM0_PAD3 << 16) | MUX_PA11C_SERCOM0_PAD3)
|
||||
#define PORT_PA11C_SERCOM0_PAD3 (1u << 11)
|
||||
/* ========== PORT definition for SERCOM1 peripheral ========== */
|
||||
#define PIN_PA16C_SERCOM1_PAD0 16 /**< \brief SERCOM1 signal: PAD0 on PA16 mux C */
|
||||
#define MUX_PA16C_SERCOM1_PAD0 2
|
||||
#define PINMUX_PA16C_SERCOM1_PAD0 ((PIN_PA16C_SERCOM1_PAD0 << 16) | MUX_PA16C_SERCOM1_PAD0)
|
||||
#define PORT_PA16C_SERCOM1_PAD0 (1u << 16)
|
||||
#define PIN_PA00D_SERCOM1_PAD0 0 /**< \brief SERCOM1 signal: PAD0 on PA00 mux D */
|
||||
#define MUX_PA00D_SERCOM1_PAD0 3
|
||||
#define PINMUX_PA00D_SERCOM1_PAD0 ((PIN_PA00D_SERCOM1_PAD0 << 16) | MUX_PA00D_SERCOM1_PAD0)
|
||||
#define PORT_PA00D_SERCOM1_PAD0 (1u << 0)
|
||||
#define PIN_PA17C_SERCOM1_PAD1 17 /**< \brief SERCOM1 signal: PAD1 on PA17 mux C */
|
||||
#define MUX_PA17C_SERCOM1_PAD1 2
|
||||
#define PINMUX_PA17C_SERCOM1_PAD1 ((PIN_PA17C_SERCOM1_PAD1 << 16) | MUX_PA17C_SERCOM1_PAD1)
|
||||
#define PORT_PA17C_SERCOM1_PAD1 (1u << 17)
|
||||
#define PIN_PA01D_SERCOM1_PAD1 1 /**< \brief SERCOM1 signal: PAD1 on PA01 mux D */
|
||||
#define MUX_PA01D_SERCOM1_PAD1 3
|
||||
#define PINMUX_PA01D_SERCOM1_PAD1 ((PIN_PA01D_SERCOM1_PAD1 << 16) | MUX_PA01D_SERCOM1_PAD1)
|
||||
#define PORT_PA01D_SERCOM1_PAD1 (1u << 1)
|
||||
#define PIN_PA30D_SERCOM1_PAD2 30 /**< \brief SERCOM1 signal: PAD2 on PA30 mux D */
|
||||
#define MUX_PA30D_SERCOM1_PAD2 3
|
||||
#define PINMUX_PA30D_SERCOM1_PAD2 ((PIN_PA30D_SERCOM1_PAD2 << 16) | MUX_PA30D_SERCOM1_PAD2)
|
||||
#define PORT_PA30D_SERCOM1_PAD2 (1u << 30)
|
||||
#define PIN_PA18C_SERCOM1_PAD2 18 /**< \brief SERCOM1 signal: PAD2 on PA18 mux C */
|
||||
#define MUX_PA18C_SERCOM1_PAD2 2
|
||||
#define PINMUX_PA18C_SERCOM1_PAD2 ((PIN_PA18C_SERCOM1_PAD2 << 16) | MUX_PA18C_SERCOM1_PAD2)
|
||||
#define PORT_PA18C_SERCOM1_PAD2 (1u << 18)
|
||||
#define PIN_PA31D_SERCOM1_PAD3 31 /**< \brief SERCOM1 signal: PAD3 on PA31 mux D */
|
||||
#define MUX_PA31D_SERCOM1_PAD3 3
|
||||
#define PINMUX_PA31D_SERCOM1_PAD3 ((PIN_PA31D_SERCOM1_PAD3 << 16) | MUX_PA31D_SERCOM1_PAD3)
|
||||
#define PORT_PA31D_SERCOM1_PAD3 (1u << 31)
|
||||
#define PIN_PA19C_SERCOM1_PAD3 19 /**< \brief SERCOM1 signal: PAD3 on PA19 mux C */
|
||||
#define MUX_PA19C_SERCOM1_PAD3 2
|
||||
#define PINMUX_PA19C_SERCOM1_PAD3 ((PIN_PA19C_SERCOM1_PAD3 << 16) | MUX_PA19C_SERCOM1_PAD3)
|
||||
#define PORT_PA19C_SERCOM1_PAD3 (1u << 19)
|
||||
/* ========== PORT definition for SERCOM2 peripheral ========== */
|
||||
#define PIN_PA08D_SERCOM2_PAD0 8 /**< \brief SERCOM2 signal: PAD0 on PA08 mux D */
|
||||
#define MUX_PA08D_SERCOM2_PAD0 3
|
||||
#define PINMUX_PA08D_SERCOM2_PAD0 ((PIN_PA08D_SERCOM2_PAD0 << 16) | MUX_PA08D_SERCOM2_PAD0)
|
||||
#define PORT_PA08D_SERCOM2_PAD0 (1u << 8)
|
||||
#define PIN_PA09D_SERCOM2_PAD1 9 /**< \brief SERCOM2 signal: PAD1 on PA09 mux D */
|
||||
#define MUX_PA09D_SERCOM2_PAD1 3
|
||||
#define PINMUX_PA09D_SERCOM2_PAD1 ((PIN_PA09D_SERCOM2_PAD1 << 16) | MUX_PA09D_SERCOM2_PAD1)
|
||||
#define PORT_PA09D_SERCOM2_PAD1 (1u << 9)
|
||||
#define PIN_PA10D_SERCOM2_PAD2 10 /**< \brief SERCOM2 signal: PAD2 on PA10 mux D */
|
||||
#define MUX_PA10D_SERCOM2_PAD2 3
|
||||
#define PINMUX_PA10D_SERCOM2_PAD2 ((PIN_PA10D_SERCOM2_PAD2 << 16) | MUX_PA10D_SERCOM2_PAD2)
|
||||
#define PORT_PA10D_SERCOM2_PAD2 (1u << 10)
|
||||
#define PIN_PA14C_SERCOM2_PAD2 14 /**< \brief SERCOM2 signal: PAD2 on PA14 mux C */
|
||||
#define MUX_PA14C_SERCOM2_PAD2 2
|
||||
#define PINMUX_PA14C_SERCOM2_PAD2 ((PIN_PA14C_SERCOM2_PAD2 << 16) | MUX_PA14C_SERCOM2_PAD2)
|
||||
#define PORT_PA14C_SERCOM2_PAD2 (1u << 14)
|
||||
#define PIN_PA11D_SERCOM2_PAD3 11 /**< \brief SERCOM2 signal: PAD3 on PA11 mux D */
|
||||
#define MUX_PA11D_SERCOM2_PAD3 3
|
||||
#define PINMUX_PA11D_SERCOM2_PAD3 ((PIN_PA11D_SERCOM2_PAD3 << 16) | MUX_PA11D_SERCOM2_PAD3)
|
||||
#define PORT_PA11D_SERCOM2_PAD3 (1u << 11)
|
||||
#define PIN_PA15C_SERCOM2_PAD3 15 /**< \brief SERCOM2 signal: PAD3 on PA15 mux C */
|
||||
#define MUX_PA15C_SERCOM2_PAD3 2
|
||||
#define PINMUX_PA15C_SERCOM2_PAD3 ((PIN_PA15C_SERCOM2_PAD3 << 16) | MUX_PA15C_SERCOM2_PAD3)
|
||||
#define PORT_PA15C_SERCOM2_PAD3 (1u << 15)
|
||||
/* ========== PORT definition for SERCOM3 peripheral ========== */
|
||||
#define PIN_PA16D_SERCOM3_PAD0 16 /**< \brief SERCOM3 signal: PAD0 on PA16 mux D */
|
||||
#define MUX_PA16D_SERCOM3_PAD0 3
|
||||
#define PINMUX_PA16D_SERCOM3_PAD0 ((PIN_PA16D_SERCOM3_PAD0 << 16) | MUX_PA16D_SERCOM3_PAD0)
|
||||
#define PORT_PA16D_SERCOM3_PAD0 (1u << 16)
|
||||
#define PIN_PA22C_SERCOM3_PAD0 22 /**< \brief SERCOM3 signal: PAD0 on PA22 mux C */
|
||||
#define MUX_PA22C_SERCOM3_PAD0 2
|
||||
#define PINMUX_PA22C_SERCOM3_PAD0 ((PIN_PA22C_SERCOM3_PAD0 << 16) | MUX_PA22C_SERCOM3_PAD0)
|
||||
#define PORT_PA22C_SERCOM3_PAD0 (1u << 22)
|
||||
#define PIN_PA17D_SERCOM3_PAD1 17 /**< \brief SERCOM3 signal: PAD1 on PA17 mux D */
|
||||
#define MUX_PA17D_SERCOM3_PAD1 3
|
||||
#define PINMUX_PA17D_SERCOM3_PAD1 ((PIN_PA17D_SERCOM3_PAD1 << 16) | MUX_PA17D_SERCOM3_PAD1)
|
||||
#define PORT_PA17D_SERCOM3_PAD1 (1u << 17)
|
||||
#define PIN_PA23C_SERCOM3_PAD1 23 /**< \brief SERCOM3 signal: PAD1 on PA23 mux C */
|
||||
#define MUX_PA23C_SERCOM3_PAD1 2
|
||||
#define PINMUX_PA23C_SERCOM3_PAD1 ((PIN_PA23C_SERCOM3_PAD1 << 16) | MUX_PA23C_SERCOM3_PAD1)
|
||||
#define PORT_PA23C_SERCOM3_PAD1 (1u << 23)
|
||||
#define PIN_PA18D_SERCOM3_PAD2 18 /**< \brief SERCOM3 signal: PAD2 on PA18 mux D */
|
||||
#define MUX_PA18D_SERCOM3_PAD2 3
|
||||
#define PINMUX_PA18D_SERCOM3_PAD2 ((PIN_PA18D_SERCOM3_PAD2 << 16) | MUX_PA18D_SERCOM3_PAD2)
|
||||
#define PORT_PA18D_SERCOM3_PAD2 (1u << 18)
|
||||
#define PIN_PA24C_SERCOM3_PAD2 24 /**< \brief SERCOM3 signal: PAD2 on PA24 mux C */
|
||||
#define MUX_PA24C_SERCOM3_PAD2 2
|
||||
#define PINMUX_PA24C_SERCOM3_PAD2 ((PIN_PA24C_SERCOM3_PAD2 << 16) | MUX_PA24C_SERCOM3_PAD2)
|
||||
#define PORT_PA24C_SERCOM3_PAD2 (1u << 24)
|
||||
#define PIN_PA19D_SERCOM3_PAD3 19 /**< \brief SERCOM3 signal: PAD3 on PA19 mux D */
|
||||
#define MUX_PA19D_SERCOM3_PAD3 3
|
||||
#define PINMUX_PA19D_SERCOM3_PAD3 ((PIN_PA19D_SERCOM3_PAD3 << 16) | MUX_PA19D_SERCOM3_PAD3)
|
||||
#define PORT_PA19D_SERCOM3_PAD3 (1u << 19)
|
||||
#define PIN_PA25C_SERCOM3_PAD3 25 /**< \brief SERCOM3 signal: PAD3 on PA25 mux C */
|
||||
#define MUX_PA25C_SERCOM3_PAD3 2
|
||||
#define PINMUX_PA25C_SERCOM3_PAD3 ((PIN_PA25C_SERCOM3_PAD3 << 16) | MUX_PA25C_SERCOM3_PAD3)
|
||||
#define PORT_PA25C_SERCOM3_PAD3 (1u << 25)
|
||||
/* ========== PORT definition for TC0 peripheral ========== */
|
||||
#define PIN_PA04F_TC0_WO0 4 /**< \brief TC0 signal: WO0 on PA04 mux F */
|
||||
#define MUX_PA04F_TC0_WO0 5
|
||||
#define PINMUX_PA04F_TC0_WO0 ((PIN_PA04F_TC0_WO0 << 16) | MUX_PA04F_TC0_WO0)
|
||||
#define PORT_PA04F_TC0_WO0 (1u << 4)
|
||||
#define PIN_PA08E_TC0_WO0 8 /**< \brief TC0 signal: WO0 on PA08 mux E */
|
||||
#define MUX_PA08E_TC0_WO0 4
|
||||
#define PINMUX_PA08E_TC0_WO0 ((PIN_PA08E_TC0_WO0 << 16) | MUX_PA08E_TC0_WO0)
|
||||
#define PORT_PA08E_TC0_WO0 (1u << 8)
|
||||
#define PIN_PA05F_TC0_WO1 5 /**< \brief TC0 signal: WO1 on PA05 mux F */
|
||||
#define MUX_PA05F_TC0_WO1 5
|
||||
#define PINMUX_PA05F_TC0_WO1 ((PIN_PA05F_TC0_WO1 << 16) | MUX_PA05F_TC0_WO1)
|
||||
#define PORT_PA05F_TC0_WO1 (1u << 5)
|
||||
#define PIN_PA09E_TC0_WO1 9 /**< \brief TC0 signal: WO1 on PA09 mux E */
|
||||
#define MUX_PA09E_TC0_WO1 4
|
||||
#define PINMUX_PA09E_TC0_WO1 ((PIN_PA09E_TC0_WO1 << 16) | MUX_PA09E_TC0_WO1)
|
||||
#define PORT_PA09E_TC0_WO1 (1u << 9)
|
||||
/* ========== PORT definition for TC1 peripheral ========== */
|
||||
#define PIN_PA06F_TC1_WO0 6 /**< \brief TC1 signal: WO0 on PA06 mux F */
|
||||
#define MUX_PA06F_TC1_WO0 5
|
||||
#define PINMUX_PA06F_TC1_WO0 ((PIN_PA06F_TC1_WO0 << 16) | MUX_PA06F_TC1_WO0)
|
||||
#define PORT_PA06F_TC1_WO0 (1u << 6)
|
||||
#define PIN_PA30F_TC1_WO0 30 /**< \brief TC1 signal: WO0 on PA30 mux F */
|
||||
#define MUX_PA30F_TC1_WO0 5
|
||||
#define PINMUX_PA30F_TC1_WO0 ((PIN_PA30F_TC1_WO0 << 16) | MUX_PA30F_TC1_WO0)
|
||||
#define PORT_PA30F_TC1_WO0 (1u << 30)
|
||||
#define PIN_PA10E_TC1_WO0 10 /**< \brief TC1 signal: WO0 on PA10 mux E */
|
||||
#define MUX_PA10E_TC1_WO0 4
|
||||
#define PINMUX_PA10E_TC1_WO0 ((PIN_PA10E_TC1_WO0 << 16) | MUX_PA10E_TC1_WO0)
|
||||
#define PORT_PA10E_TC1_WO0 (1u << 10)
|
||||
#define PIN_PA07F_TC1_WO1 7 /**< \brief TC1 signal: WO1 on PA07 mux F */
|
||||
#define MUX_PA07F_TC1_WO1 5
|
||||
#define PINMUX_PA07F_TC1_WO1 ((PIN_PA07F_TC1_WO1 << 16) | MUX_PA07F_TC1_WO1)
|
||||
#define PORT_PA07F_TC1_WO1 (1u << 7)
|
||||
#define PIN_PA31F_TC1_WO1 31 /**< \brief TC1 signal: WO1 on PA31 mux F */
|
||||
#define MUX_PA31F_TC1_WO1 5
|
||||
#define PINMUX_PA31F_TC1_WO1 ((PIN_PA31F_TC1_WO1 << 16) | MUX_PA31F_TC1_WO1)
|
||||
#define PORT_PA31F_TC1_WO1 (1u << 31)
|
||||
#define PIN_PA11E_TC1_WO1 11 /**< \brief TC1 signal: WO1 on PA11 mux E */
|
||||
#define MUX_PA11E_TC1_WO1 4
|
||||
#define PINMUX_PA11E_TC1_WO1 ((PIN_PA11E_TC1_WO1 << 16) | MUX_PA11E_TC1_WO1)
|
||||
#define PORT_PA11E_TC1_WO1 (1u << 11)
|
||||
/* ========== PORT definition for TC2 peripheral ========== */
|
||||
#define PIN_PA16F_TC2_WO0 16 /**< \brief TC2 signal: WO0 on PA16 mux F */
|
||||
#define MUX_PA16F_TC2_WO0 5
|
||||
#define PINMUX_PA16F_TC2_WO0 ((PIN_PA16F_TC2_WO0 << 16) | MUX_PA16F_TC2_WO0)
|
||||
#define PORT_PA16F_TC2_WO0 (1u << 16)
|
||||
#define PIN_PA00F_TC2_WO0 0 /**< \brief TC2 signal: WO0 on PA00 mux F */
|
||||
#define MUX_PA00F_TC2_WO0 5
|
||||
#define PINMUX_PA00F_TC2_WO0 ((PIN_PA00F_TC2_WO0 << 16) | MUX_PA00F_TC2_WO0)
|
||||
#define PORT_PA00F_TC2_WO0 (1u << 0)
|
||||
#define PIN_PA17F_TC2_WO1 17 /**< \brief TC2 signal: WO1 on PA17 mux F */
|
||||
#define MUX_PA17F_TC2_WO1 5
|
||||
#define PINMUX_PA17F_TC2_WO1 ((PIN_PA17F_TC2_WO1 << 16) | MUX_PA17F_TC2_WO1)
|
||||
#define PORT_PA17F_TC2_WO1 (1u << 17)
|
||||
#define PIN_PA01F_TC2_WO1 1 /**< \brief TC2 signal: WO1 on PA01 mux F */
|
||||
#define MUX_PA01F_TC2_WO1 5
|
||||
#define PINMUX_PA01F_TC2_WO1 ((PIN_PA01F_TC2_WO1 << 16) | MUX_PA01F_TC2_WO1)
|
||||
#define PORT_PA01F_TC2_WO1 (1u << 1)
|
||||
/* ========== PORT definition for TC3 peripheral ========== */
|
||||
#define PIN_PA18F_TC3_WO0 18 /**< \brief TC3 signal: WO0 on PA18 mux F */
|
||||
#define MUX_PA18F_TC3_WO0 5
|
||||
#define PINMUX_PA18F_TC3_WO0 ((PIN_PA18F_TC3_WO0 << 16) | MUX_PA18F_TC3_WO0)
|
||||
#define PORT_PA18F_TC3_WO0 (1u << 18)
|
||||
#define PIN_PA14E_TC3_WO0 14 /**< \brief TC3 signal: WO0 on PA14 mux E */
|
||||
#define MUX_PA14E_TC3_WO0 4
|
||||
#define PINMUX_PA14E_TC3_WO0 ((PIN_PA14E_TC3_WO0 << 16) | MUX_PA14E_TC3_WO0)
|
||||
#define PORT_PA14E_TC3_WO0 (1u << 14)
|
||||
#define PIN_PA19F_TC3_WO1 19 /**< \brief TC3 signal: WO1 on PA19 mux F */
|
||||
#define MUX_PA19F_TC3_WO1 5
|
||||
#define PINMUX_PA19F_TC3_WO1 ((PIN_PA19F_TC3_WO1 << 16) | MUX_PA19F_TC3_WO1)
|
||||
#define PORT_PA19F_TC3_WO1 (1u << 19)
|
||||
#define PIN_PA15E_TC3_WO1 15 /**< \brief TC3 signal: WO1 on PA15 mux E */
|
||||
#define MUX_PA15E_TC3_WO1 4
|
||||
#define PINMUX_PA15E_TC3_WO1 ((PIN_PA15E_TC3_WO1 << 16) | MUX_PA15E_TC3_WO1)
|
||||
#define PORT_PA15E_TC3_WO1 (1u << 15)
|
||||
/* ========== PORT definition for TC4 peripheral ========== */
|
||||
#define PIN_PA22F_TC4_WO0 22 /**< \brief TC4 signal: WO0 on PA22 mux F */
|
||||
#define MUX_PA22F_TC4_WO0 5
|
||||
#define PINMUX_PA22F_TC4_WO0 ((PIN_PA22F_TC4_WO0 << 16) | MUX_PA22F_TC4_WO0)
|
||||
#define PORT_PA22F_TC4_WO0 (1u << 22)
|
||||
#define PIN_PA23F_TC4_WO1 23 /**< \brief TC4 signal: WO1 on PA23 mux F */
|
||||
#define MUX_PA23F_TC4_WO1 5
|
||||
#define PINMUX_PA23F_TC4_WO1 ((PIN_PA23F_TC4_WO1 << 16) | MUX_PA23F_TC4_WO1)
|
||||
#define PORT_PA23F_TC4_WO1 (1u << 23)
|
||||
/* ========== PORT definition for TC5 peripheral ========== */
|
||||
#define PIN_PA24F_TC5_WO0 24 /**< \brief TC5 signal: WO0 on PA24 mux F */
|
||||
#define MUX_PA24F_TC5_WO0 5
|
||||
#define PINMUX_PA24F_TC5_WO0 ((PIN_PA24F_TC5_WO0 << 16) | MUX_PA24F_TC5_WO0)
|
||||
#define PORT_PA24F_TC5_WO0 (1u << 24)
|
||||
#define PIN_PA25F_TC5_WO1 25 /**< \brief TC5 signal: WO1 on PA25 mux F */
|
||||
#define MUX_PA25F_TC5_WO1 5
|
||||
#define PINMUX_PA25F_TC5_WO1 ((PIN_PA25F_TC5_WO1 << 16) | MUX_PA25F_TC5_WO1)
|
||||
#define PORT_PA25F_TC5_WO1 (1u << 25)
|
||||
/* ========== PORT definition for ADC peripheral ========== */
|
||||
#define PIN_PA02B_ADC_AIN0 2 /**< \brief ADC signal: AIN0 on PA02 mux B */
|
||||
#define MUX_PA02B_ADC_AIN0 1
|
||||
#define PINMUX_PA02B_ADC_AIN0 ((PIN_PA02B_ADC_AIN0 << 16) | MUX_PA02B_ADC_AIN0)
|
||||
#define PORT_PA02B_ADC_AIN0 (1u << 2)
|
||||
#define PIN_PA03B_ADC_AIN1 3 /**< \brief ADC signal: AIN1 on PA03 mux B */
|
||||
#define MUX_PA03B_ADC_AIN1 1
|
||||
#define PINMUX_PA03B_ADC_AIN1 ((PIN_PA03B_ADC_AIN1 << 16) | MUX_PA03B_ADC_AIN1)
|
||||
#define PORT_PA03B_ADC_AIN1 (1u << 3)
|
||||
#define PIN_PA04B_ADC_AIN4 4 /**< \brief ADC signal: AIN4 on PA04 mux B */
|
||||
#define MUX_PA04B_ADC_AIN4 1
|
||||
#define PINMUX_PA04B_ADC_AIN4 ((PIN_PA04B_ADC_AIN4 << 16) | MUX_PA04B_ADC_AIN4)
|
||||
#define PORT_PA04B_ADC_AIN4 (1u << 4)
|
||||
#define PIN_PA05B_ADC_AIN5 5 /**< \brief ADC signal: AIN5 on PA05 mux B */
|
||||
#define MUX_PA05B_ADC_AIN5 1
|
||||
#define PINMUX_PA05B_ADC_AIN5 ((PIN_PA05B_ADC_AIN5 << 16) | MUX_PA05B_ADC_AIN5)
|
||||
#define PORT_PA05B_ADC_AIN5 (1u << 5)
|
||||
#define PIN_PA06B_ADC_AIN6 6 /**< \brief ADC signal: AIN6 on PA06 mux B */
|
||||
#define MUX_PA06B_ADC_AIN6 1
|
||||
#define PINMUX_PA06B_ADC_AIN6 ((PIN_PA06B_ADC_AIN6 << 16) | MUX_PA06B_ADC_AIN6)
|
||||
#define PORT_PA06B_ADC_AIN6 (1u << 6)
|
||||
#define PIN_PA07B_ADC_AIN7 7 /**< \brief ADC signal: AIN7 on PA07 mux B */
|
||||
#define MUX_PA07B_ADC_AIN7 1
|
||||
#define PINMUX_PA07B_ADC_AIN7 ((PIN_PA07B_ADC_AIN7 << 16) | MUX_PA07B_ADC_AIN7)
|
||||
#define PORT_PA07B_ADC_AIN7 (1u << 7)
|
||||
#define PIN_PA08B_ADC_AIN16 8 /**< \brief ADC signal: AIN16 on PA08 mux B */
|
||||
#define MUX_PA08B_ADC_AIN16 1
|
||||
#define PINMUX_PA08B_ADC_AIN16 ((PIN_PA08B_ADC_AIN16 << 16) | MUX_PA08B_ADC_AIN16)
|
||||
#define PORT_PA08B_ADC_AIN16 (1u << 8)
|
||||
#define PIN_PA09B_ADC_AIN17 9 /**< \brief ADC signal: AIN17 on PA09 mux B */
|
||||
#define MUX_PA09B_ADC_AIN17 1
|
||||
#define PINMUX_PA09B_ADC_AIN17 ((PIN_PA09B_ADC_AIN17 << 16) | MUX_PA09B_ADC_AIN17)
|
||||
#define PORT_PA09B_ADC_AIN17 (1u << 9)
|
||||
#define PIN_PA10B_ADC_AIN18 10 /**< \brief ADC signal: AIN18 on PA10 mux B */
|
||||
#define MUX_PA10B_ADC_AIN18 1
|
||||
#define PINMUX_PA10B_ADC_AIN18 ((PIN_PA10B_ADC_AIN18 << 16) | MUX_PA10B_ADC_AIN18)
|
||||
#define PORT_PA10B_ADC_AIN18 (1u << 10)
|
||||
#define PIN_PA11B_ADC_AIN19 11 /**< \brief ADC signal: AIN19 on PA11 mux B */
|
||||
#define MUX_PA11B_ADC_AIN19 1
|
||||
#define PINMUX_PA11B_ADC_AIN19 ((PIN_PA11B_ADC_AIN19 << 16) | MUX_PA11B_ADC_AIN19)
|
||||
#define PORT_PA11B_ADC_AIN19 (1u << 11)
|
||||
#define PIN_PA04B_ADC_VREFP 4 /**< \brief ADC signal: VREFP on PA04 mux B */
|
||||
#define MUX_PA04B_ADC_VREFP 1
|
||||
#define PINMUX_PA04B_ADC_VREFP ((PIN_PA04B_ADC_VREFP << 16) | MUX_PA04B_ADC_VREFP)
|
||||
#define PORT_PA04B_ADC_VREFP (1u << 4)
|
||||
/* ========== PORT definition for AC peripheral ========== */
|
||||
#define PIN_PA04B_AC_AIN0 4 /**< \brief AC signal: AIN0 on PA04 mux B */
|
||||
#define MUX_PA04B_AC_AIN0 1
|
||||
#define PINMUX_PA04B_AC_AIN0 ((PIN_PA04B_AC_AIN0 << 16) | MUX_PA04B_AC_AIN0)
|
||||
#define PORT_PA04B_AC_AIN0 (1u << 4)
|
||||
#define PIN_PA05B_AC_AIN1 5 /**< \brief AC signal: AIN1 on PA05 mux B */
|
||||
#define MUX_PA05B_AC_AIN1 1
|
||||
#define PINMUX_PA05B_AC_AIN1 ((PIN_PA05B_AC_AIN1 << 16) | MUX_PA05B_AC_AIN1)
|
||||
#define PORT_PA05B_AC_AIN1 (1u << 5)
|
||||
#define PIN_PA06B_AC_AIN2 6 /**< \brief AC signal: AIN2 on PA06 mux B */
|
||||
#define MUX_PA06B_AC_AIN2 1
|
||||
#define PINMUX_PA06B_AC_AIN2 ((PIN_PA06B_AC_AIN2 << 16) | MUX_PA06B_AC_AIN2)
|
||||
#define PORT_PA06B_AC_AIN2 (1u << 6)
|
||||
#define PIN_PA07B_AC_AIN3 7 /**< \brief AC signal: AIN3 on PA07 mux B */
|
||||
#define MUX_PA07B_AC_AIN3 1
|
||||
#define PINMUX_PA07B_AC_AIN3 ((PIN_PA07B_AC_AIN3 << 16) | MUX_PA07B_AC_AIN3)
|
||||
#define PORT_PA07B_AC_AIN3 (1u << 7)
|
||||
#define PIN_PA18H_AC_CMP0 18 /**< \brief AC signal: CMP0 on PA18 mux H */
|
||||
#define MUX_PA18H_AC_CMP0 7
|
||||
#define PINMUX_PA18H_AC_CMP0 ((PIN_PA18H_AC_CMP0 << 16) | MUX_PA18H_AC_CMP0)
|
||||
#define PORT_PA18H_AC_CMP0 (1u << 18)
|
||||
#define PIN_PA19H_AC_CMP1 19 /**< \brief AC signal: CMP1 on PA19 mux H */
|
||||
#define MUX_PA19H_AC_CMP1 7
|
||||
#define PINMUX_PA19H_AC_CMP1 ((PIN_PA19H_AC_CMP1 << 16) | MUX_PA19H_AC_CMP1)
|
||||
#define PORT_PA19H_AC_CMP1 (1u << 19)
|
||||
/* ========== PORT definition for DAC peripheral ========== */
|
||||
#define PIN_PA02B_DAC_VOUT 2 /**< \brief DAC signal: VOUT on PA02 mux B */
|
||||
#define MUX_PA02B_DAC_VOUT 1
|
||||
#define PINMUX_PA02B_DAC_VOUT ((PIN_PA02B_DAC_VOUT << 16) | MUX_PA02B_DAC_VOUT)
|
||||
#define PORT_PA02B_DAC_VOUT (1u << 2)
|
||||
#define PIN_PA03B_DAC_VREFP 3 /**< \brief DAC signal: VREFP on PA03 mux B */
|
||||
#define MUX_PA03B_DAC_VREFP 1
|
||||
#define PINMUX_PA03B_DAC_VREFP ((PIN_PA03B_DAC_VREFP << 16) | MUX_PA03B_DAC_VREFP)
|
||||
#define PORT_PA03B_DAC_VREFP (1u << 3)
|
||||
|
||||
#endif /* _SAMD20E16_PIO_ */
|
|
@ -0,0 +1,552 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Peripheral I/O description for SAMD20E17
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20E17_PIO_
|
||||
#define _SAMD20E17_PIO_
|
||||
|
||||
#define PIN_PA00 0 /**< \brief Pin Number for PA00 */
|
||||
#define PORT_PA00 (1u << 0) /**< \brief PORT Mask for PA00 */
|
||||
#define PIN_PA01 1 /**< \brief Pin Number for PA01 */
|
||||
#define PORT_PA01 (1u << 1) /**< \brief PORT Mask for PA01 */
|
||||
#define PIN_PA02 2 /**< \brief Pin Number for PA02 */
|
||||
#define PORT_PA02 (1u << 2) /**< \brief PORT Mask for PA02 */
|
||||
#define PIN_PA03 3 /**< \brief Pin Number for PA03 */
|
||||
#define PORT_PA03 (1u << 3) /**< \brief PORT Mask for PA03 */
|
||||
#define PIN_PA04 4 /**< \brief Pin Number for PA04 */
|
||||
#define PORT_PA04 (1u << 4) /**< \brief PORT Mask for PA04 */
|
||||
#define PIN_PA05 5 /**< \brief Pin Number for PA05 */
|
||||
#define PORT_PA05 (1u << 5) /**< \brief PORT Mask for PA05 */
|
||||
#define PIN_PA06 6 /**< \brief Pin Number for PA06 */
|
||||
#define PORT_PA06 (1u << 6) /**< \brief PORT Mask for PA06 */
|
||||
#define PIN_PA07 7 /**< \brief Pin Number for PA07 */
|
||||
#define PORT_PA07 (1u << 7) /**< \brief PORT Mask for PA07 */
|
||||
#define PIN_PA08 8 /**< \brief Pin Number for PA08 */
|
||||
#define PORT_PA08 (1u << 8) /**< \brief PORT Mask for PA08 */
|
||||
#define PIN_PA09 9 /**< \brief Pin Number for PA09 */
|
||||
#define PORT_PA09 (1u << 9) /**< \brief PORT Mask for PA09 */
|
||||
#define PIN_PA10 10 /**< \brief Pin Number for PA10 */
|
||||
#define PORT_PA10 (1u << 10) /**< \brief PORT Mask for PA10 */
|
||||
#define PIN_PA11 11 /**< \brief Pin Number for PA11 */
|
||||
#define PORT_PA11 (1u << 11) /**< \brief PORT Mask for PA11 */
|
||||
#define PIN_PA14 14 /**< \brief Pin Number for PA14 */
|
||||
#define PORT_PA14 (1u << 14) /**< \brief PORT Mask for PA14 */
|
||||
#define PIN_PA15 15 /**< \brief Pin Number for PA15 */
|
||||
#define PORT_PA15 (1u << 15) /**< \brief PORT Mask for PA15 */
|
||||
#define PIN_PA16 16 /**< \brief Pin Number for PA16 */
|
||||
#define PORT_PA16 (1u << 16) /**< \brief PORT Mask for PA16 */
|
||||
#define PIN_PA17 17 /**< \brief Pin Number for PA17 */
|
||||
#define PORT_PA17 (1u << 17) /**< \brief PORT Mask for PA17 */
|
||||
#define PIN_PA18 18 /**< \brief Pin Number for PA18 */
|
||||
#define PORT_PA18 (1u << 18) /**< \brief PORT Mask for PA18 */
|
||||
#define PIN_PA19 19 /**< \brief Pin Number for PA19 */
|
||||
#define PORT_PA19 (1u << 19) /**< \brief PORT Mask for PA19 */
|
||||
#define PIN_PA22 22 /**< \brief Pin Number for PA22 */
|
||||
#define PORT_PA22 (1u << 22) /**< \brief PORT Mask for PA22 */
|
||||
#define PIN_PA23 23 /**< \brief Pin Number for PA23 */
|
||||
#define PORT_PA23 (1u << 23) /**< \brief PORT Mask for PA23 */
|
||||
#define PIN_PA24 24 /**< \brief Pin Number for PA24 */
|
||||
#define PORT_PA24 (1u << 24) /**< \brief PORT Mask for PA24 */
|
||||
#define PIN_PA25 25 /**< \brief Pin Number for PA25 */
|
||||
#define PORT_PA25 (1u << 25) /**< \brief PORT Mask for PA25 */
|
||||
#define PIN_PA27 27 /**< \brief Pin Number for PA27 */
|
||||
#define PORT_PA27 (1u << 27) /**< \brief PORT Mask for PA27 */
|
||||
#define PIN_PA28 28 /**< \brief Pin Number for PA28 */
|
||||
#define PORT_PA28 (1u << 28) /**< \brief PORT Mask for PA28 */
|
||||
#define PIN_PA30 30 /**< \brief Pin Number for PA30 */
|
||||
#define PORT_PA30 (1u << 30) /**< \brief PORT Mask for PA30 */
|
||||
#define PIN_PA31 31 /**< \brief Pin Number for PA31 */
|
||||
#define PORT_PA31 (1u << 31) /**< \brief PORT Mask for PA31 */
|
||||
/* ========== PORT definition for CORE peripheral ========== */
|
||||
#define PIN_PA30G_CORE_SWCLK 30 /**< \brief CORE signal: SWCLK on PA30 mux G */
|
||||
#define MUX_PA30G_CORE_SWCLK 6
|
||||
#define PINMUX_PA30G_CORE_SWCLK ((PIN_PA30G_CORE_SWCLK << 16) | MUX_PA30G_CORE_SWCLK)
|
||||
#define PORT_PA30G_CORE_SWCLK (1u << 30)
|
||||
/* ========== PORT definition for GCLK peripheral ========== */
|
||||
#define PIN_PA14H_GCLK_IO0 14 /**< \brief GCLK signal: IO0 on PA14 mux H */
|
||||
#define MUX_PA14H_GCLK_IO0 7
|
||||
#define PINMUX_PA14H_GCLK_IO0 ((PIN_PA14H_GCLK_IO0 << 16) | MUX_PA14H_GCLK_IO0)
|
||||
#define PORT_PA14H_GCLK_IO0 (1u << 14)
|
||||
#define PIN_PA27H_GCLK_IO0 27 /**< \brief GCLK signal: IO0 on PA27 mux H */
|
||||
#define MUX_PA27H_GCLK_IO0 7
|
||||
#define PINMUX_PA27H_GCLK_IO0 ((PIN_PA27H_GCLK_IO0 << 16) | MUX_PA27H_GCLK_IO0)
|
||||
#define PORT_PA27H_GCLK_IO0 (1u << 27)
|
||||
#define PIN_PA28H_GCLK_IO0 28 /**< \brief GCLK signal: IO0 on PA28 mux H */
|
||||
#define MUX_PA28H_GCLK_IO0 7
|
||||
#define PINMUX_PA28H_GCLK_IO0 ((PIN_PA28H_GCLK_IO0 << 16) | MUX_PA28H_GCLK_IO0)
|
||||
#define PORT_PA28H_GCLK_IO0 (1u << 28)
|
||||
#define PIN_PA30H_GCLK_IO0 30 /**< \brief GCLK signal: IO0 on PA30 mux H */
|
||||
#define MUX_PA30H_GCLK_IO0 7
|
||||
#define PINMUX_PA30H_GCLK_IO0 ((PIN_PA30H_GCLK_IO0 << 16) | MUX_PA30H_GCLK_IO0)
|
||||
#define PORT_PA30H_GCLK_IO0 (1u << 30)
|
||||
#define PIN_PA15H_GCLK_IO1 15 /**< \brief GCLK signal: IO1 on PA15 mux H */
|
||||
#define MUX_PA15H_GCLK_IO1 7
|
||||
#define PINMUX_PA15H_GCLK_IO1 ((PIN_PA15H_GCLK_IO1 << 16) | MUX_PA15H_GCLK_IO1)
|
||||
#define PORT_PA15H_GCLK_IO1 (1u << 15)
|
||||
#define PIN_PA16H_GCLK_IO2 16 /**< \brief GCLK signal: IO2 on PA16 mux H */
|
||||
#define MUX_PA16H_GCLK_IO2 7
|
||||
#define PINMUX_PA16H_GCLK_IO2 ((PIN_PA16H_GCLK_IO2 << 16) | MUX_PA16H_GCLK_IO2)
|
||||
#define PORT_PA16H_GCLK_IO2 (1u << 16)
|
||||
#define PIN_PA17H_GCLK_IO3 17 /**< \brief GCLK signal: IO3 on PA17 mux H */
|
||||
#define MUX_PA17H_GCLK_IO3 7
|
||||
#define PINMUX_PA17H_GCLK_IO3 ((PIN_PA17H_GCLK_IO3 << 16) | MUX_PA17H_GCLK_IO3)
|
||||
#define PORT_PA17H_GCLK_IO3 (1u << 17)
|
||||
#define PIN_PA10H_GCLK_IO4 10 /**< \brief GCLK signal: IO4 on PA10 mux H */
|
||||
#define MUX_PA10H_GCLK_IO4 7
|
||||
#define PINMUX_PA10H_GCLK_IO4 ((PIN_PA10H_GCLK_IO4 << 16) | MUX_PA10H_GCLK_IO4)
|
||||
#define PORT_PA10H_GCLK_IO4 (1u << 10)
|
||||
#define PIN_PA11H_GCLK_IO5 11 /**< \brief GCLK signal: IO5 on PA11 mux H */
|
||||
#define MUX_PA11H_GCLK_IO5 7
|
||||
#define PINMUX_PA11H_GCLK_IO5 ((PIN_PA11H_GCLK_IO5 << 16) | MUX_PA11H_GCLK_IO5)
|
||||
#define PORT_PA11H_GCLK_IO5 (1u << 11)
|
||||
#define PIN_PA22H_GCLK_IO6 22 /**< \brief GCLK signal: IO6 on PA22 mux H */
|
||||
#define MUX_PA22H_GCLK_IO6 7
|
||||
#define PINMUX_PA22H_GCLK_IO6 ((PIN_PA22H_GCLK_IO6 << 16) | MUX_PA22H_GCLK_IO6)
|
||||
#define PORT_PA22H_GCLK_IO6 (1u << 22)
|
||||
#define PIN_PA23H_GCLK_IO7 23 /**< \brief GCLK signal: IO7 on PA23 mux H */
|
||||
#define MUX_PA23H_GCLK_IO7 7
|
||||
#define PINMUX_PA23H_GCLK_IO7 ((PIN_PA23H_GCLK_IO7 << 16) | MUX_PA23H_GCLK_IO7)
|
||||
#define PORT_PA23H_GCLK_IO7 (1u << 23)
|
||||
/* ========== PORT definition for EIC peripheral ========== */
|
||||
#define PIN_PA16A_EIC_EXTINT0 16 /**< \brief EIC signal: EXTINT0 on PA16 mux A */
|
||||
#define MUX_PA16A_EIC_EXTINT0 0
|
||||
#define PINMUX_PA16A_EIC_EXTINT0 ((PIN_PA16A_EIC_EXTINT0 << 16) | MUX_PA16A_EIC_EXTINT0)
|
||||
#define PORT_PA16A_EIC_EXTINT0 (1u << 16)
|
||||
#define PIN_PA00A_EIC_EXTINT0 0 /**< \brief EIC signal: EXTINT0 on PA00 mux A */
|
||||
#define MUX_PA00A_EIC_EXTINT0 0
|
||||
#define PINMUX_PA00A_EIC_EXTINT0 ((PIN_PA00A_EIC_EXTINT0 << 16) | MUX_PA00A_EIC_EXTINT0)
|
||||
#define PORT_PA00A_EIC_EXTINT0 (1u << 0)
|
||||
#define PIN_PA17A_EIC_EXTINT1 17 /**< \brief EIC signal: EXTINT1 on PA17 mux A */
|
||||
#define MUX_PA17A_EIC_EXTINT1 0
|
||||
#define PINMUX_PA17A_EIC_EXTINT1 ((PIN_PA17A_EIC_EXTINT1 << 16) | MUX_PA17A_EIC_EXTINT1)
|
||||
#define PORT_PA17A_EIC_EXTINT1 (1u << 17)
|
||||
#define PIN_PA01A_EIC_EXTINT1 1 /**< \brief EIC signal: EXTINT1 on PA01 mux A */
|
||||
#define MUX_PA01A_EIC_EXTINT1 0
|
||||
#define PINMUX_PA01A_EIC_EXTINT1 ((PIN_PA01A_EIC_EXTINT1 << 16) | MUX_PA01A_EIC_EXTINT1)
|
||||
#define PORT_PA01A_EIC_EXTINT1 (1u << 1)
|
||||
#define PIN_PA02A_EIC_EXTINT2 2 /**< \brief EIC signal: EXTINT2 on PA02 mux A */
|
||||
#define MUX_PA02A_EIC_EXTINT2 0
|
||||
#define PINMUX_PA02A_EIC_EXTINT2 ((PIN_PA02A_EIC_EXTINT2 << 16) | MUX_PA02A_EIC_EXTINT2)
|
||||
#define PORT_PA02A_EIC_EXTINT2 (1u << 2)
|
||||
#define PIN_PA18A_EIC_EXTINT2 18 /**< \brief EIC signal: EXTINT2 on PA18 mux A */
|
||||
#define MUX_PA18A_EIC_EXTINT2 0
|
||||
#define PINMUX_PA18A_EIC_EXTINT2 ((PIN_PA18A_EIC_EXTINT2 << 16) | MUX_PA18A_EIC_EXTINT2)
|
||||
#define PORT_PA18A_EIC_EXTINT2 (1u << 18)
|
||||
#define PIN_PA03A_EIC_EXTINT3 3 /**< \brief EIC signal: EXTINT3 on PA03 mux A */
|
||||
#define MUX_PA03A_EIC_EXTINT3 0
|
||||
#define PINMUX_PA03A_EIC_EXTINT3 ((PIN_PA03A_EIC_EXTINT3 << 16) | MUX_PA03A_EIC_EXTINT3)
|
||||
#define PORT_PA03A_EIC_EXTINT3 (1u << 3)
|
||||
#define PIN_PA19A_EIC_EXTINT3 19 /**< \brief EIC signal: EXTINT3 on PA19 mux A */
|
||||
#define MUX_PA19A_EIC_EXTINT3 0
|
||||
#define PINMUX_PA19A_EIC_EXTINT3 ((PIN_PA19A_EIC_EXTINT3 << 16) | MUX_PA19A_EIC_EXTINT3)
|
||||
#define PORT_PA19A_EIC_EXTINT3 (1u << 19)
|
||||
#define PIN_PA04A_EIC_EXTINT4 4 /**< \brief EIC signal: EXTINT4 on PA04 mux A */
|
||||
#define MUX_PA04A_EIC_EXTINT4 0
|
||||
#define PINMUX_PA04A_EIC_EXTINT4 ((PIN_PA04A_EIC_EXTINT4 << 16) | MUX_PA04A_EIC_EXTINT4)
|
||||
#define PORT_PA04A_EIC_EXTINT4 (1u << 4)
|
||||
#define PIN_PA05A_EIC_EXTINT5 5 /**< \brief EIC signal: EXTINT5 on PA05 mux A */
|
||||
#define MUX_PA05A_EIC_EXTINT5 0
|
||||
#define PINMUX_PA05A_EIC_EXTINT5 ((PIN_PA05A_EIC_EXTINT5 << 16) | MUX_PA05A_EIC_EXTINT5)
|
||||
#define PORT_PA05A_EIC_EXTINT5 (1u << 5)
|
||||
#define PIN_PA06A_EIC_EXTINT6 6 /**< \brief EIC signal: EXTINT6 on PA06 mux A */
|
||||
#define MUX_PA06A_EIC_EXTINT6 0
|
||||
#define PINMUX_PA06A_EIC_EXTINT6 ((PIN_PA06A_EIC_EXTINT6 << 16) | MUX_PA06A_EIC_EXTINT6)
|
||||
#define PORT_PA06A_EIC_EXTINT6 (1u << 6)
|
||||
#define PIN_PA22A_EIC_EXTINT6 22 /**< \brief EIC signal: EXTINT6 on PA22 mux A */
|
||||
#define MUX_PA22A_EIC_EXTINT6 0
|
||||
#define PINMUX_PA22A_EIC_EXTINT6 ((PIN_PA22A_EIC_EXTINT6 << 16) | MUX_PA22A_EIC_EXTINT6)
|
||||
#define PORT_PA22A_EIC_EXTINT6 (1u << 22)
|
||||
#define PIN_PA07A_EIC_EXTINT7 7 /**< \brief EIC signal: EXTINT7 on PA07 mux A */
|
||||
#define MUX_PA07A_EIC_EXTINT7 0
|
||||
#define PINMUX_PA07A_EIC_EXTINT7 ((PIN_PA07A_EIC_EXTINT7 << 16) | MUX_PA07A_EIC_EXTINT7)
|
||||
#define PORT_PA07A_EIC_EXTINT7 (1u << 7)
|
||||
#define PIN_PA23A_EIC_EXTINT7 23 /**< \brief EIC signal: EXTINT7 on PA23 mux A */
|
||||
#define MUX_PA23A_EIC_EXTINT7 0
|
||||
#define PINMUX_PA23A_EIC_EXTINT7 ((PIN_PA23A_EIC_EXTINT7 << 16) | MUX_PA23A_EIC_EXTINT7)
|
||||
#define PORT_PA23A_EIC_EXTINT7 (1u << 23)
|
||||
#define PIN_PA28A_EIC_EXTINT8 28 /**< \brief EIC signal: EXTINT8 on PA28 mux A */
|
||||
#define MUX_PA28A_EIC_EXTINT8 0
|
||||
#define PINMUX_PA28A_EIC_EXTINT8 ((PIN_PA28A_EIC_EXTINT8 << 16) | MUX_PA28A_EIC_EXTINT8)
|
||||
#define PORT_PA28A_EIC_EXTINT8 (1u << 28)
|
||||
#define PIN_PA09A_EIC_EXTINT9 9 /**< \brief EIC signal: EXTINT9 on PA09 mux A */
|
||||
#define MUX_PA09A_EIC_EXTINT9 0
|
||||
#define PINMUX_PA09A_EIC_EXTINT9 ((PIN_PA09A_EIC_EXTINT9 << 16) | MUX_PA09A_EIC_EXTINT9)
|
||||
#define PORT_PA09A_EIC_EXTINT9 (1u << 9)
|
||||
#define PIN_PA10A_EIC_EXTINT10 10 /**< \brief EIC signal: EXTINT10 on PA10 mux A */
|
||||
#define MUX_PA10A_EIC_EXTINT10 0
|
||||
#define PINMUX_PA10A_EIC_EXTINT10 ((PIN_PA10A_EIC_EXTINT10 << 16) | MUX_PA10A_EIC_EXTINT10)
|
||||
#define PORT_PA10A_EIC_EXTINT10 (1u << 10)
|
||||
#define PIN_PA30A_EIC_EXTINT10 30 /**< \brief EIC signal: EXTINT10 on PA30 mux A */
|
||||
#define MUX_PA30A_EIC_EXTINT10 0
|
||||
#define PINMUX_PA30A_EIC_EXTINT10 ((PIN_PA30A_EIC_EXTINT10 << 16) | MUX_PA30A_EIC_EXTINT10)
|
||||
#define PORT_PA30A_EIC_EXTINT10 (1u << 30)
|
||||
#define PIN_PA11A_EIC_EXTINT11 11 /**< \brief EIC signal: EXTINT11 on PA11 mux A */
|
||||
#define MUX_PA11A_EIC_EXTINT11 0
|
||||
#define PINMUX_PA11A_EIC_EXTINT11 ((PIN_PA11A_EIC_EXTINT11 << 16) | MUX_PA11A_EIC_EXTINT11)
|
||||
#define PORT_PA11A_EIC_EXTINT11 (1u << 11)
|
||||
#define PIN_PA31A_EIC_EXTINT11 31 /**< \brief EIC signal: EXTINT11 on PA31 mux A */
|
||||
#define MUX_PA31A_EIC_EXTINT11 0
|
||||
#define PINMUX_PA31A_EIC_EXTINT11 ((PIN_PA31A_EIC_EXTINT11 << 16) | MUX_PA31A_EIC_EXTINT11)
|
||||
#define PORT_PA31A_EIC_EXTINT11 (1u << 31)
|
||||
#define PIN_PA24A_EIC_EXTINT12 24 /**< \brief EIC signal: EXTINT12 on PA24 mux A */
|
||||
#define MUX_PA24A_EIC_EXTINT12 0
|
||||
#define PINMUX_PA24A_EIC_EXTINT12 ((PIN_PA24A_EIC_EXTINT12 << 16) | MUX_PA24A_EIC_EXTINT12)
|
||||
#define PORT_PA24A_EIC_EXTINT12 (1u << 24)
|
||||
#define PIN_PA25A_EIC_EXTINT13 25 /**< \brief EIC signal: EXTINT13 on PA25 mux A */
|
||||
#define MUX_PA25A_EIC_EXTINT13 0
|
||||
#define PINMUX_PA25A_EIC_EXTINT13 ((PIN_PA25A_EIC_EXTINT13 << 16) | MUX_PA25A_EIC_EXTINT13)
|
||||
#define PORT_PA25A_EIC_EXTINT13 (1u << 25)
|
||||
#define PIN_PA14A_EIC_EXTINT14 14 /**< \brief EIC signal: EXTINT14 on PA14 mux A */
|
||||
#define MUX_PA14A_EIC_EXTINT14 0
|
||||
#define PINMUX_PA14A_EIC_EXTINT14 ((PIN_PA14A_EIC_EXTINT14 << 16) | MUX_PA14A_EIC_EXTINT14)
|
||||
#define PORT_PA14A_EIC_EXTINT14 (1u << 14)
|
||||
#define PIN_PA27A_EIC_EXTINT15 27 /**< \brief EIC signal: EXTINT15 on PA27 mux A */
|
||||
#define MUX_PA27A_EIC_EXTINT15 0
|
||||
#define PINMUX_PA27A_EIC_EXTINT15 ((PIN_PA27A_EIC_EXTINT15 << 16) | MUX_PA27A_EIC_EXTINT15)
|
||||
#define PORT_PA27A_EIC_EXTINT15 (1u << 27)
|
||||
#define PIN_PA15A_EIC_EXTINT15 15 /**< \brief EIC signal: EXTINT15 on PA15 mux A */
|
||||
#define MUX_PA15A_EIC_EXTINT15 0
|
||||
#define PINMUX_PA15A_EIC_EXTINT15 ((PIN_PA15A_EIC_EXTINT15 << 16) | MUX_PA15A_EIC_EXTINT15)
|
||||
#define PORT_PA15A_EIC_EXTINT15 (1u << 15)
|
||||
#define PIN_PA08A_EIC_NMI 8 /**< \brief EIC signal: NMI on PA08 mux A */
|
||||
#define MUX_PA08A_EIC_NMI 0
|
||||
#define PINMUX_PA08A_EIC_NMI ((PIN_PA08A_EIC_NMI << 16) | MUX_PA08A_EIC_NMI)
|
||||
#define PORT_PA08A_EIC_NMI (1u << 8)
|
||||
/* ========== PORT definition for SERCOM0 peripheral ========== */
|
||||
#define PIN_PA04D_SERCOM0_PAD0 4 /**< \brief SERCOM0 signal: PAD0 on PA04 mux D */
|
||||
#define MUX_PA04D_SERCOM0_PAD0 3
|
||||
#define PINMUX_PA04D_SERCOM0_PAD0 ((PIN_PA04D_SERCOM0_PAD0 << 16) | MUX_PA04D_SERCOM0_PAD0)
|
||||
#define PORT_PA04D_SERCOM0_PAD0 (1u << 4)
|
||||
#define PIN_PA08C_SERCOM0_PAD0 8 /**< \brief SERCOM0 signal: PAD0 on PA08 mux C */
|
||||
#define MUX_PA08C_SERCOM0_PAD0 2
|
||||
#define PINMUX_PA08C_SERCOM0_PAD0 ((PIN_PA08C_SERCOM0_PAD0 << 16) | MUX_PA08C_SERCOM0_PAD0)
|
||||
#define PORT_PA08C_SERCOM0_PAD0 (1u << 8)
|
||||
#define PIN_PA05D_SERCOM0_PAD1 5 /**< \brief SERCOM0 signal: PAD1 on PA05 mux D */
|
||||
#define MUX_PA05D_SERCOM0_PAD1 3
|
||||
#define PINMUX_PA05D_SERCOM0_PAD1 ((PIN_PA05D_SERCOM0_PAD1 << 16) | MUX_PA05D_SERCOM0_PAD1)
|
||||
#define PORT_PA05D_SERCOM0_PAD1 (1u << 5)
|
||||
#define PIN_PA09C_SERCOM0_PAD1 9 /**< \brief SERCOM0 signal: PAD1 on PA09 mux C */
|
||||
#define MUX_PA09C_SERCOM0_PAD1 2
|
||||
#define PINMUX_PA09C_SERCOM0_PAD1 ((PIN_PA09C_SERCOM0_PAD1 << 16) | MUX_PA09C_SERCOM0_PAD1)
|
||||
#define PORT_PA09C_SERCOM0_PAD1 (1u << 9)
|
||||
#define PIN_PA06D_SERCOM0_PAD2 6 /**< \brief SERCOM0 signal: PAD2 on PA06 mux D */
|
||||
#define MUX_PA06D_SERCOM0_PAD2 3
|
||||
#define PINMUX_PA06D_SERCOM0_PAD2 ((PIN_PA06D_SERCOM0_PAD2 << 16) | MUX_PA06D_SERCOM0_PAD2)
|
||||
#define PORT_PA06D_SERCOM0_PAD2 (1u << 6)
|
||||
#define PIN_PA10C_SERCOM0_PAD2 10 /**< \brief SERCOM0 signal: PAD2 on PA10 mux C */
|
||||
#define MUX_PA10C_SERCOM0_PAD2 2
|
||||
#define PINMUX_PA10C_SERCOM0_PAD2 ((PIN_PA10C_SERCOM0_PAD2 << 16) | MUX_PA10C_SERCOM0_PAD2)
|
||||
#define PORT_PA10C_SERCOM0_PAD2 (1u << 10)
|
||||
#define PIN_PA07D_SERCOM0_PAD3 7 /**< \brief SERCOM0 signal: PAD3 on PA07 mux D */
|
||||
#define MUX_PA07D_SERCOM0_PAD3 3
|
||||
#define PINMUX_PA07D_SERCOM0_PAD3 ((PIN_PA07D_SERCOM0_PAD3 << 16) | MUX_PA07D_SERCOM0_PAD3)
|
||||
#define PORT_PA07D_SERCOM0_PAD3 (1u << 7)
|
||||
#define PIN_PA11C_SERCOM0_PAD3 11 /**< \brief SERCOM0 signal: PAD3 on PA11 mux C */
|
||||
#define MUX_PA11C_SERCOM0_PAD3 2
|
||||
#define PINMUX_PA11C_SERCOM0_PAD3 ((PIN_PA11C_SERCOM0_PAD3 << 16) | MUX_PA11C_SERCOM0_PAD3)
|
||||
#define PORT_PA11C_SERCOM0_PAD3 (1u << 11)
|
||||
/* ========== PORT definition for SERCOM1 peripheral ========== */
|
||||
#define PIN_PA16C_SERCOM1_PAD0 16 /**< \brief SERCOM1 signal: PAD0 on PA16 mux C */
|
||||
#define MUX_PA16C_SERCOM1_PAD0 2
|
||||
#define PINMUX_PA16C_SERCOM1_PAD0 ((PIN_PA16C_SERCOM1_PAD0 << 16) | MUX_PA16C_SERCOM1_PAD0)
|
||||
#define PORT_PA16C_SERCOM1_PAD0 (1u << 16)
|
||||
#define PIN_PA00D_SERCOM1_PAD0 0 /**< \brief SERCOM1 signal: PAD0 on PA00 mux D */
|
||||
#define MUX_PA00D_SERCOM1_PAD0 3
|
||||
#define PINMUX_PA00D_SERCOM1_PAD0 ((PIN_PA00D_SERCOM1_PAD0 << 16) | MUX_PA00D_SERCOM1_PAD0)
|
||||
#define PORT_PA00D_SERCOM1_PAD0 (1u << 0)
|
||||
#define PIN_PA17C_SERCOM1_PAD1 17 /**< \brief SERCOM1 signal: PAD1 on PA17 mux C */
|
||||
#define MUX_PA17C_SERCOM1_PAD1 2
|
||||
#define PINMUX_PA17C_SERCOM1_PAD1 ((PIN_PA17C_SERCOM1_PAD1 << 16) | MUX_PA17C_SERCOM1_PAD1)
|
||||
#define PORT_PA17C_SERCOM1_PAD1 (1u << 17)
|
||||
#define PIN_PA01D_SERCOM1_PAD1 1 /**< \brief SERCOM1 signal: PAD1 on PA01 mux D */
|
||||
#define MUX_PA01D_SERCOM1_PAD1 3
|
||||
#define PINMUX_PA01D_SERCOM1_PAD1 ((PIN_PA01D_SERCOM1_PAD1 << 16) | MUX_PA01D_SERCOM1_PAD1)
|
||||
#define PORT_PA01D_SERCOM1_PAD1 (1u << 1)
|
||||
#define PIN_PA30D_SERCOM1_PAD2 30 /**< \brief SERCOM1 signal: PAD2 on PA30 mux D */
|
||||
#define MUX_PA30D_SERCOM1_PAD2 3
|
||||
#define PINMUX_PA30D_SERCOM1_PAD2 ((PIN_PA30D_SERCOM1_PAD2 << 16) | MUX_PA30D_SERCOM1_PAD2)
|
||||
#define PORT_PA30D_SERCOM1_PAD2 (1u << 30)
|
||||
#define PIN_PA18C_SERCOM1_PAD2 18 /**< \brief SERCOM1 signal: PAD2 on PA18 mux C */
|
||||
#define MUX_PA18C_SERCOM1_PAD2 2
|
||||
#define PINMUX_PA18C_SERCOM1_PAD2 ((PIN_PA18C_SERCOM1_PAD2 << 16) | MUX_PA18C_SERCOM1_PAD2)
|
||||
#define PORT_PA18C_SERCOM1_PAD2 (1u << 18)
|
||||
#define PIN_PA31D_SERCOM1_PAD3 31 /**< \brief SERCOM1 signal: PAD3 on PA31 mux D */
|
||||
#define MUX_PA31D_SERCOM1_PAD3 3
|
||||
#define PINMUX_PA31D_SERCOM1_PAD3 ((PIN_PA31D_SERCOM1_PAD3 << 16) | MUX_PA31D_SERCOM1_PAD3)
|
||||
#define PORT_PA31D_SERCOM1_PAD3 (1u << 31)
|
||||
#define PIN_PA19C_SERCOM1_PAD3 19 /**< \brief SERCOM1 signal: PAD3 on PA19 mux C */
|
||||
#define MUX_PA19C_SERCOM1_PAD3 2
|
||||
#define PINMUX_PA19C_SERCOM1_PAD3 ((PIN_PA19C_SERCOM1_PAD3 << 16) | MUX_PA19C_SERCOM1_PAD3)
|
||||
#define PORT_PA19C_SERCOM1_PAD3 (1u << 19)
|
||||
/* ========== PORT definition for SERCOM2 peripheral ========== */
|
||||
#define PIN_PA08D_SERCOM2_PAD0 8 /**< \brief SERCOM2 signal: PAD0 on PA08 mux D */
|
||||
#define MUX_PA08D_SERCOM2_PAD0 3
|
||||
#define PINMUX_PA08D_SERCOM2_PAD0 ((PIN_PA08D_SERCOM2_PAD0 << 16) | MUX_PA08D_SERCOM2_PAD0)
|
||||
#define PORT_PA08D_SERCOM2_PAD0 (1u << 8)
|
||||
#define PIN_PA09D_SERCOM2_PAD1 9 /**< \brief SERCOM2 signal: PAD1 on PA09 mux D */
|
||||
#define MUX_PA09D_SERCOM2_PAD1 3
|
||||
#define PINMUX_PA09D_SERCOM2_PAD1 ((PIN_PA09D_SERCOM2_PAD1 << 16) | MUX_PA09D_SERCOM2_PAD1)
|
||||
#define PORT_PA09D_SERCOM2_PAD1 (1u << 9)
|
||||
#define PIN_PA10D_SERCOM2_PAD2 10 /**< \brief SERCOM2 signal: PAD2 on PA10 mux D */
|
||||
#define MUX_PA10D_SERCOM2_PAD2 3
|
||||
#define PINMUX_PA10D_SERCOM2_PAD2 ((PIN_PA10D_SERCOM2_PAD2 << 16) | MUX_PA10D_SERCOM2_PAD2)
|
||||
#define PORT_PA10D_SERCOM2_PAD2 (1u << 10)
|
||||
#define PIN_PA14C_SERCOM2_PAD2 14 /**< \brief SERCOM2 signal: PAD2 on PA14 mux C */
|
||||
#define MUX_PA14C_SERCOM2_PAD2 2
|
||||
#define PINMUX_PA14C_SERCOM2_PAD2 ((PIN_PA14C_SERCOM2_PAD2 << 16) | MUX_PA14C_SERCOM2_PAD2)
|
||||
#define PORT_PA14C_SERCOM2_PAD2 (1u << 14)
|
||||
#define PIN_PA11D_SERCOM2_PAD3 11 /**< \brief SERCOM2 signal: PAD3 on PA11 mux D */
|
||||
#define MUX_PA11D_SERCOM2_PAD3 3
|
||||
#define PINMUX_PA11D_SERCOM2_PAD3 ((PIN_PA11D_SERCOM2_PAD3 << 16) | MUX_PA11D_SERCOM2_PAD3)
|
||||
#define PORT_PA11D_SERCOM2_PAD3 (1u << 11)
|
||||
#define PIN_PA15C_SERCOM2_PAD3 15 /**< \brief SERCOM2 signal: PAD3 on PA15 mux C */
|
||||
#define MUX_PA15C_SERCOM2_PAD3 2
|
||||
#define PINMUX_PA15C_SERCOM2_PAD3 ((PIN_PA15C_SERCOM2_PAD3 << 16) | MUX_PA15C_SERCOM2_PAD3)
|
||||
#define PORT_PA15C_SERCOM2_PAD3 (1u << 15)
|
||||
/* ========== PORT definition for SERCOM3 peripheral ========== */
|
||||
#define PIN_PA16D_SERCOM3_PAD0 16 /**< \brief SERCOM3 signal: PAD0 on PA16 mux D */
|
||||
#define MUX_PA16D_SERCOM3_PAD0 3
|
||||
#define PINMUX_PA16D_SERCOM3_PAD0 ((PIN_PA16D_SERCOM3_PAD0 << 16) | MUX_PA16D_SERCOM3_PAD0)
|
||||
#define PORT_PA16D_SERCOM3_PAD0 (1u << 16)
|
||||
#define PIN_PA22C_SERCOM3_PAD0 22 /**< \brief SERCOM3 signal: PAD0 on PA22 mux C */
|
||||
#define MUX_PA22C_SERCOM3_PAD0 2
|
||||
#define PINMUX_PA22C_SERCOM3_PAD0 ((PIN_PA22C_SERCOM3_PAD0 << 16) | MUX_PA22C_SERCOM3_PAD0)
|
||||
#define PORT_PA22C_SERCOM3_PAD0 (1u << 22)
|
||||
#define PIN_PA17D_SERCOM3_PAD1 17 /**< \brief SERCOM3 signal: PAD1 on PA17 mux D */
|
||||
#define MUX_PA17D_SERCOM3_PAD1 3
|
||||
#define PINMUX_PA17D_SERCOM3_PAD1 ((PIN_PA17D_SERCOM3_PAD1 << 16) | MUX_PA17D_SERCOM3_PAD1)
|
||||
#define PORT_PA17D_SERCOM3_PAD1 (1u << 17)
|
||||
#define PIN_PA23C_SERCOM3_PAD1 23 /**< \brief SERCOM3 signal: PAD1 on PA23 mux C */
|
||||
#define MUX_PA23C_SERCOM3_PAD1 2
|
||||
#define PINMUX_PA23C_SERCOM3_PAD1 ((PIN_PA23C_SERCOM3_PAD1 << 16) | MUX_PA23C_SERCOM3_PAD1)
|
||||
#define PORT_PA23C_SERCOM3_PAD1 (1u << 23)
|
||||
#define PIN_PA18D_SERCOM3_PAD2 18 /**< \brief SERCOM3 signal: PAD2 on PA18 mux D */
|
||||
#define MUX_PA18D_SERCOM3_PAD2 3
|
||||
#define PINMUX_PA18D_SERCOM3_PAD2 ((PIN_PA18D_SERCOM3_PAD2 << 16) | MUX_PA18D_SERCOM3_PAD2)
|
||||
#define PORT_PA18D_SERCOM3_PAD2 (1u << 18)
|
||||
#define PIN_PA24C_SERCOM3_PAD2 24 /**< \brief SERCOM3 signal: PAD2 on PA24 mux C */
|
||||
#define MUX_PA24C_SERCOM3_PAD2 2
|
||||
#define PINMUX_PA24C_SERCOM3_PAD2 ((PIN_PA24C_SERCOM3_PAD2 << 16) | MUX_PA24C_SERCOM3_PAD2)
|
||||
#define PORT_PA24C_SERCOM3_PAD2 (1u << 24)
|
||||
#define PIN_PA19D_SERCOM3_PAD3 19 /**< \brief SERCOM3 signal: PAD3 on PA19 mux D */
|
||||
#define MUX_PA19D_SERCOM3_PAD3 3
|
||||
#define PINMUX_PA19D_SERCOM3_PAD3 ((PIN_PA19D_SERCOM3_PAD3 << 16) | MUX_PA19D_SERCOM3_PAD3)
|
||||
#define PORT_PA19D_SERCOM3_PAD3 (1u << 19)
|
||||
#define PIN_PA25C_SERCOM3_PAD3 25 /**< \brief SERCOM3 signal: PAD3 on PA25 mux C */
|
||||
#define MUX_PA25C_SERCOM3_PAD3 2
|
||||
#define PINMUX_PA25C_SERCOM3_PAD3 ((PIN_PA25C_SERCOM3_PAD3 << 16) | MUX_PA25C_SERCOM3_PAD3)
|
||||
#define PORT_PA25C_SERCOM3_PAD3 (1u << 25)
|
||||
/* ========== PORT definition for TC0 peripheral ========== */
|
||||
#define PIN_PA04F_TC0_WO0 4 /**< \brief TC0 signal: WO0 on PA04 mux F */
|
||||
#define MUX_PA04F_TC0_WO0 5
|
||||
#define PINMUX_PA04F_TC0_WO0 ((PIN_PA04F_TC0_WO0 << 16) | MUX_PA04F_TC0_WO0)
|
||||
#define PORT_PA04F_TC0_WO0 (1u << 4)
|
||||
#define PIN_PA08E_TC0_WO0 8 /**< \brief TC0 signal: WO0 on PA08 mux E */
|
||||
#define MUX_PA08E_TC0_WO0 4
|
||||
#define PINMUX_PA08E_TC0_WO0 ((PIN_PA08E_TC0_WO0 << 16) | MUX_PA08E_TC0_WO0)
|
||||
#define PORT_PA08E_TC0_WO0 (1u << 8)
|
||||
#define PIN_PA05F_TC0_WO1 5 /**< \brief TC0 signal: WO1 on PA05 mux F */
|
||||
#define MUX_PA05F_TC0_WO1 5
|
||||
#define PINMUX_PA05F_TC0_WO1 ((PIN_PA05F_TC0_WO1 << 16) | MUX_PA05F_TC0_WO1)
|
||||
#define PORT_PA05F_TC0_WO1 (1u << 5)
|
||||
#define PIN_PA09E_TC0_WO1 9 /**< \brief TC0 signal: WO1 on PA09 mux E */
|
||||
#define MUX_PA09E_TC0_WO1 4
|
||||
#define PINMUX_PA09E_TC0_WO1 ((PIN_PA09E_TC0_WO1 << 16) | MUX_PA09E_TC0_WO1)
|
||||
#define PORT_PA09E_TC0_WO1 (1u << 9)
|
||||
/* ========== PORT definition for TC1 peripheral ========== */
|
||||
#define PIN_PA06F_TC1_WO0 6 /**< \brief TC1 signal: WO0 on PA06 mux F */
|
||||
#define MUX_PA06F_TC1_WO0 5
|
||||
#define PINMUX_PA06F_TC1_WO0 ((PIN_PA06F_TC1_WO0 << 16) | MUX_PA06F_TC1_WO0)
|
||||
#define PORT_PA06F_TC1_WO0 (1u << 6)
|
||||
#define PIN_PA30F_TC1_WO0 30 /**< \brief TC1 signal: WO0 on PA30 mux F */
|
||||
#define MUX_PA30F_TC1_WO0 5
|
||||
#define PINMUX_PA30F_TC1_WO0 ((PIN_PA30F_TC1_WO0 << 16) | MUX_PA30F_TC1_WO0)
|
||||
#define PORT_PA30F_TC1_WO0 (1u << 30)
|
||||
#define PIN_PA10E_TC1_WO0 10 /**< \brief TC1 signal: WO0 on PA10 mux E */
|
||||
#define MUX_PA10E_TC1_WO0 4
|
||||
#define PINMUX_PA10E_TC1_WO0 ((PIN_PA10E_TC1_WO0 << 16) | MUX_PA10E_TC1_WO0)
|
||||
#define PORT_PA10E_TC1_WO0 (1u << 10)
|
||||
#define PIN_PA07F_TC1_WO1 7 /**< \brief TC1 signal: WO1 on PA07 mux F */
|
||||
#define MUX_PA07F_TC1_WO1 5
|
||||
#define PINMUX_PA07F_TC1_WO1 ((PIN_PA07F_TC1_WO1 << 16) | MUX_PA07F_TC1_WO1)
|
||||
#define PORT_PA07F_TC1_WO1 (1u << 7)
|
||||
#define PIN_PA31F_TC1_WO1 31 /**< \brief TC1 signal: WO1 on PA31 mux F */
|
||||
#define MUX_PA31F_TC1_WO1 5
|
||||
#define PINMUX_PA31F_TC1_WO1 ((PIN_PA31F_TC1_WO1 << 16) | MUX_PA31F_TC1_WO1)
|
||||
#define PORT_PA31F_TC1_WO1 (1u << 31)
|
||||
#define PIN_PA11E_TC1_WO1 11 /**< \brief TC1 signal: WO1 on PA11 mux E */
|
||||
#define MUX_PA11E_TC1_WO1 4
|
||||
#define PINMUX_PA11E_TC1_WO1 ((PIN_PA11E_TC1_WO1 << 16) | MUX_PA11E_TC1_WO1)
|
||||
#define PORT_PA11E_TC1_WO1 (1u << 11)
|
||||
/* ========== PORT definition for TC2 peripheral ========== */
|
||||
#define PIN_PA16F_TC2_WO0 16 /**< \brief TC2 signal: WO0 on PA16 mux F */
|
||||
#define MUX_PA16F_TC2_WO0 5
|
||||
#define PINMUX_PA16F_TC2_WO0 ((PIN_PA16F_TC2_WO0 << 16) | MUX_PA16F_TC2_WO0)
|
||||
#define PORT_PA16F_TC2_WO0 (1u << 16)
|
||||
#define PIN_PA00F_TC2_WO0 0 /**< \brief TC2 signal: WO0 on PA00 mux F */
|
||||
#define MUX_PA00F_TC2_WO0 5
|
||||
#define PINMUX_PA00F_TC2_WO0 ((PIN_PA00F_TC2_WO0 << 16) | MUX_PA00F_TC2_WO0)
|
||||
#define PORT_PA00F_TC2_WO0 (1u << 0)
|
||||
#define PIN_PA17F_TC2_WO1 17 /**< \brief TC2 signal: WO1 on PA17 mux F */
|
||||
#define MUX_PA17F_TC2_WO1 5
|
||||
#define PINMUX_PA17F_TC2_WO1 ((PIN_PA17F_TC2_WO1 << 16) | MUX_PA17F_TC2_WO1)
|
||||
#define PORT_PA17F_TC2_WO1 (1u << 17)
|
||||
#define PIN_PA01F_TC2_WO1 1 /**< \brief TC2 signal: WO1 on PA01 mux F */
|
||||
#define MUX_PA01F_TC2_WO1 5
|
||||
#define PINMUX_PA01F_TC2_WO1 ((PIN_PA01F_TC2_WO1 << 16) | MUX_PA01F_TC2_WO1)
|
||||
#define PORT_PA01F_TC2_WO1 (1u << 1)
|
||||
/* ========== PORT definition for TC3 peripheral ========== */
|
||||
#define PIN_PA18F_TC3_WO0 18 /**< \brief TC3 signal: WO0 on PA18 mux F */
|
||||
#define MUX_PA18F_TC3_WO0 5
|
||||
#define PINMUX_PA18F_TC3_WO0 ((PIN_PA18F_TC3_WO0 << 16) | MUX_PA18F_TC3_WO0)
|
||||
#define PORT_PA18F_TC3_WO0 (1u << 18)
|
||||
#define PIN_PA14E_TC3_WO0 14 /**< \brief TC3 signal: WO0 on PA14 mux E */
|
||||
#define MUX_PA14E_TC3_WO0 4
|
||||
#define PINMUX_PA14E_TC3_WO0 ((PIN_PA14E_TC3_WO0 << 16) | MUX_PA14E_TC3_WO0)
|
||||
#define PORT_PA14E_TC3_WO0 (1u << 14)
|
||||
#define PIN_PA19F_TC3_WO1 19 /**< \brief TC3 signal: WO1 on PA19 mux F */
|
||||
#define MUX_PA19F_TC3_WO1 5
|
||||
#define PINMUX_PA19F_TC3_WO1 ((PIN_PA19F_TC3_WO1 << 16) | MUX_PA19F_TC3_WO1)
|
||||
#define PORT_PA19F_TC3_WO1 (1u << 19)
|
||||
#define PIN_PA15E_TC3_WO1 15 /**< \brief TC3 signal: WO1 on PA15 mux E */
|
||||
#define MUX_PA15E_TC3_WO1 4
|
||||
#define PINMUX_PA15E_TC3_WO1 ((PIN_PA15E_TC3_WO1 << 16) | MUX_PA15E_TC3_WO1)
|
||||
#define PORT_PA15E_TC3_WO1 (1u << 15)
|
||||
/* ========== PORT definition for TC4 peripheral ========== */
|
||||
#define PIN_PA22F_TC4_WO0 22 /**< \brief TC4 signal: WO0 on PA22 mux F */
|
||||
#define MUX_PA22F_TC4_WO0 5
|
||||
#define PINMUX_PA22F_TC4_WO0 ((PIN_PA22F_TC4_WO0 << 16) | MUX_PA22F_TC4_WO0)
|
||||
#define PORT_PA22F_TC4_WO0 (1u << 22)
|
||||
#define PIN_PA23F_TC4_WO1 23 /**< \brief TC4 signal: WO1 on PA23 mux F */
|
||||
#define MUX_PA23F_TC4_WO1 5
|
||||
#define PINMUX_PA23F_TC4_WO1 ((PIN_PA23F_TC4_WO1 << 16) | MUX_PA23F_TC4_WO1)
|
||||
#define PORT_PA23F_TC4_WO1 (1u << 23)
|
||||
/* ========== PORT definition for TC5 peripheral ========== */
|
||||
#define PIN_PA24F_TC5_WO0 24 /**< \brief TC5 signal: WO0 on PA24 mux F */
|
||||
#define MUX_PA24F_TC5_WO0 5
|
||||
#define PINMUX_PA24F_TC5_WO0 ((PIN_PA24F_TC5_WO0 << 16) | MUX_PA24F_TC5_WO0)
|
||||
#define PORT_PA24F_TC5_WO0 (1u << 24)
|
||||
#define PIN_PA25F_TC5_WO1 25 /**< \brief TC5 signal: WO1 on PA25 mux F */
|
||||
#define MUX_PA25F_TC5_WO1 5
|
||||
#define PINMUX_PA25F_TC5_WO1 ((PIN_PA25F_TC5_WO1 << 16) | MUX_PA25F_TC5_WO1)
|
||||
#define PORT_PA25F_TC5_WO1 (1u << 25)
|
||||
/* ========== PORT definition for ADC peripheral ========== */
|
||||
#define PIN_PA02B_ADC_AIN0 2 /**< \brief ADC signal: AIN0 on PA02 mux B */
|
||||
#define MUX_PA02B_ADC_AIN0 1
|
||||
#define PINMUX_PA02B_ADC_AIN0 ((PIN_PA02B_ADC_AIN0 << 16) | MUX_PA02B_ADC_AIN0)
|
||||
#define PORT_PA02B_ADC_AIN0 (1u << 2)
|
||||
#define PIN_PA03B_ADC_AIN1 3 /**< \brief ADC signal: AIN1 on PA03 mux B */
|
||||
#define MUX_PA03B_ADC_AIN1 1
|
||||
#define PINMUX_PA03B_ADC_AIN1 ((PIN_PA03B_ADC_AIN1 << 16) | MUX_PA03B_ADC_AIN1)
|
||||
#define PORT_PA03B_ADC_AIN1 (1u << 3)
|
||||
#define PIN_PA04B_ADC_AIN4 4 /**< \brief ADC signal: AIN4 on PA04 mux B */
|
||||
#define MUX_PA04B_ADC_AIN4 1
|
||||
#define PINMUX_PA04B_ADC_AIN4 ((PIN_PA04B_ADC_AIN4 << 16) | MUX_PA04B_ADC_AIN4)
|
||||
#define PORT_PA04B_ADC_AIN4 (1u << 4)
|
||||
#define PIN_PA05B_ADC_AIN5 5 /**< \brief ADC signal: AIN5 on PA05 mux B */
|
||||
#define MUX_PA05B_ADC_AIN5 1
|
||||
#define PINMUX_PA05B_ADC_AIN5 ((PIN_PA05B_ADC_AIN5 << 16) | MUX_PA05B_ADC_AIN5)
|
||||
#define PORT_PA05B_ADC_AIN5 (1u << 5)
|
||||
#define PIN_PA06B_ADC_AIN6 6 /**< \brief ADC signal: AIN6 on PA06 mux B */
|
||||
#define MUX_PA06B_ADC_AIN6 1
|
||||
#define PINMUX_PA06B_ADC_AIN6 ((PIN_PA06B_ADC_AIN6 << 16) | MUX_PA06B_ADC_AIN6)
|
||||
#define PORT_PA06B_ADC_AIN6 (1u << 6)
|
||||
#define PIN_PA07B_ADC_AIN7 7 /**< \brief ADC signal: AIN7 on PA07 mux B */
|
||||
#define MUX_PA07B_ADC_AIN7 1
|
||||
#define PINMUX_PA07B_ADC_AIN7 ((PIN_PA07B_ADC_AIN7 << 16) | MUX_PA07B_ADC_AIN7)
|
||||
#define PORT_PA07B_ADC_AIN7 (1u << 7)
|
||||
#define PIN_PA08B_ADC_AIN16 8 /**< \brief ADC signal: AIN16 on PA08 mux B */
|
||||
#define MUX_PA08B_ADC_AIN16 1
|
||||
#define PINMUX_PA08B_ADC_AIN16 ((PIN_PA08B_ADC_AIN16 << 16) | MUX_PA08B_ADC_AIN16)
|
||||
#define PORT_PA08B_ADC_AIN16 (1u << 8)
|
||||
#define PIN_PA09B_ADC_AIN17 9 /**< \brief ADC signal: AIN17 on PA09 mux B */
|
||||
#define MUX_PA09B_ADC_AIN17 1
|
||||
#define PINMUX_PA09B_ADC_AIN17 ((PIN_PA09B_ADC_AIN17 << 16) | MUX_PA09B_ADC_AIN17)
|
||||
#define PORT_PA09B_ADC_AIN17 (1u << 9)
|
||||
#define PIN_PA10B_ADC_AIN18 10 /**< \brief ADC signal: AIN18 on PA10 mux B */
|
||||
#define MUX_PA10B_ADC_AIN18 1
|
||||
#define PINMUX_PA10B_ADC_AIN18 ((PIN_PA10B_ADC_AIN18 << 16) | MUX_PA10B_ADC_AIN18)
|
||||
#define PORT_PA10B_ADC_AIN18 (1u << 10)
|
||||
#define PIN_PA11B_ADC_AIN19 11 /**< \brief ADC signal: AIN19 on PA11 mux B */
|
||||
#define MUX_PA11B_ADC_AIN19 1
|
||||
#define PINMUX_PA11B_ADC_AIN19 ((PIN_PA11B_ADC_AIN19 << 16) | MUX_PA11B_ADC_AIN19)
|
||||
#define PORT_PA11B_ADC_AIN19 (1u << 11)
|
||||
#define PIN_PA04B_ADC_VREFP 4 /**< \brief ADC signal: VREFP on PA04 mux B */
|
||||
#define MUX_PA04B_ADC_VREFP 1
|
||||
#define PINMUX_PA04B_ADC_VREFP ((PIN_PA04B_ADC_VREFP << 16) | MUX_PA04B_ADC_VREFP)
|
||||
#define PORT_PA04B_ADC_VREFP (1u << 4)
|
||||
/* ========== PORT definition for AC peripheral ========== */
|
||||
#define PIN_PA04B_AC_AIN0 4 /**< \brief AC signal: AIN0 on PA04 mux B */
|
||||
#define MUX_PA04B_AC_AIN0 1
|
||||
#define PINMUX_PA04B_AC_AIN0 ((PIN_PA04B_AC_AIN0 << 16) | MUX_PA04B_AC_AIN0)
|
||||
#define PORT_PA04B_AC_AIN0 (1u << 4)
|
||||
#define PIN_PA05B_AC_AIN1 5 /**< \brief AC signal: AIN1 on PA05 mux B */
|
||||
#define MUX_PA05B_AC_AIN1 1
|
||||
#define PINMUX_PA05B_AC_AIN1 ((PIN_PA05B_AC_AIN1 << 16) | MUX_PA05B_AC_AIN1)
|
||||
#define PORT_PA05B_AC_AIN1 (1u << 5)
|
||||
#define PIN_PA06B_AC_AIN2 6 /**< \brief AC signal: AIN2 on PA06 mux B */
|
||||
#define MUX_PA06B_AC_AIN2 1
|
||||
#define PINMUX_PA06B_AC_AIN2 ((PIN_PA06B_AC_AIN2 << 16) | MUX_PA06B_AC_AIN2)
|
||||
#define PORT_PA06B_AC_AIN2 (1u << 6)
|
||||
#define PIN_PA07B_AC_AIN3 7 /**< \brief AC signal: AIN3 on PA07 mux B */
|
||||
#define MUX_PA07B_AC_AIN3 1
|
||||
#define PINMUX_PA07B_AC_AIN3 ((PIN_PA07B_AC_AIN3 << 16) | MUX_PA07B_AC_AIN3)
|
||||
#define PORT_PA07B_AC_AIN3 (1u << 7)
|
||||
#define PIN_PA18H_AC_CMP0 18 /**< \brief AC signal: CMP0 on PA18 mux H */
|
||||
#define MUX_PA18H_AC_CMP0 7
|
||||
#define PINMUX_PA18H_AC_CMP0 ((PIN_PA18H_AC_CMP0 << 16) | MUX_PA18H_AC_CMP0)
|
||||
#define PORT_PA18H_AC_CMP0 (1u << 18)
|
||||
#define PIN_PA19H_AC_CMP1 19 /**< \brief AC signal: CMP1 on PA19 mux H */
|
||||
#define MUX_PA19H_AC_CMP1 7
|
||||
#define PINMUX_PA19H_AC_CMP1 ((PIN_PA19H_AC_CMP1 << 16) | MUX_PA19H_AC_CMP1)
|
||||
#define PORT_PA19H_AC_CMP1 (1u << 19)
|
||||
/* ========== PORT definition for DAC peripheral ========== */
|
||||
#define PIN_PA02B_DAC_VOUT 2 /**< \brief DAC signal: VOUT on PA02 mux B */
|
||||
#define MUX_PA02B_DAC_VOUT 1
|
||||
#define PINMUX_PA02B_DAC_VOUT ((PIN_PA02B_DAC_VOUT << 16) | MUX_PA02B_DAC_VOUT)
|
||||
#define PORT_PA02B_DAC_VOUT (1u << 2)
|
||||
#define PIN_PA03B_DAC_VREFP 3 /**< \brief DAC signal: VREFP on PA03 mux B */
|
||||
#define MUX_PA03B_DAC_VREFP 1
|
||||
#define PINMUX_PA03B_DAC_VREFP ((PIN_PA03B_DAC_VREFP << 16) | MUX_PA03B_DAC_VREFP)
|
||||
#define PORT_PA03B_DAC_VREFP (1u << 3)
|
||||
|
||||
#endif /* _SAMD20E17_PIO_ */
|
|
@ -0,0 +1,552 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Peripheral I/O description for SAMD20E18
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20E18_PIO_
|
||||
#define _SAMD20E18_PIO_
|
||||
|
||||
#define PIN_PA00 0 /**< \brief Pin Number for PA00 */
|
||||
#define PORT_PA00 (1u << 0) /**< \brief PORT Mask for PA00 */
|
||||
#define PIN_PA01 1 /**< \brief Pin Number for PA01 */
|
||||
#define PORT_PA01 (1u << 1) /**< \brief PORT Mask for PA01 */
|
||||
#define PIN_PA02 2 /**< \brief Pin Number for PA02 */
|
||||
#define PORT_PA02 (1u << 2) /**< \brief PORT Mask for PA02 */
|
||||
#define PIN_PA03 3 /**< \brief Pin Number for PA03 */
|
||||
#define PORT_PA03 (1u << 3) /**< \brief PORT Mask for PA03 */
|
||||
#define PIN_PA04 4 /**< \brief Pin Number for PA04 */
|
||||
#define PORT_PA04 (1u << 4) /**< \brief PORT Mask for PA04 */
|
||||
#define PIN_PA05 5 /**< \brief Pin Number for PA05 */
|
||||
#define PORT_PA05 (1u << 5) /**< \brief PORT Mask for PA05 */
|
||||
#define PIN_PA06 6 /**< \brief Pin Number for PA06 */
|
||||
#define PORT_PA06 (1u << 6) /**< \brief PORT Mask for PA06 */
|
||||
#define PIN_PA07 7 /**< \brief Pin Number for PA07 */
|
||||
#define PORT_PA07 (1u << 7) /**< \brief PORT Mask for PA07 */
|
||||
#define PIN_PA08 8 /**< \brief Pin Number for PA08 */
|
||||
#define PORT_PA08 (1u << 8) /**< \brief PORT Mask for PA08 */
|
||||
#define PIN_PA09 9 /**< \brief Pin Number for PA09 */
|
||||
#define PORT_PA09 (1u << 9) /**< \brief PORT Mask for PA09 */
|
||||
#define PIN_PA10 10 /**< \brief Pin Number for PA10 */
|
||||
#define PORT_PA10 (1u << 10) /**< \brief PORT Mask for PA10 */
|
||||
#define PIN_PA11 11 /**< \brief Pin Number for PA11 */
|
||||
#define PORT_PA11 (1u << 11) /**< \brief PORT Mask for PA11 */
|
||||
#define PIN_PA14 14 /**< \brief Pin Number for PA14 */
|
||||
#define PORT_PA14 (1u << 14) /**< \brief PORT Mask for PA14 */
|
||||
#define PIN_PA15 15 /**< \brief Pin Number for PA15 */
|
||||
#define PORT_PA15 (1u << 15) /**< \brief PORT Mask for PA15 */
|
||||
#define PIN_PA16 16 /**< \brief Pin Number for PA16 */
|
||||
#define PORT_PA16 (1u << 16) /**< \brief PORT Mask for PA16 */
|
||||
#define PIN_PA17 17 /**< \brief Pin Number for PA17 */
|
||||
#define PORT_PA17 (1u << 17) /**< \brief PORT Mask for PA17 */
|
||||
#define PIN_PA18 18 /**< \brief Pin Number for PA18 */
|
||||
#define PORT_PA18 (1u << 18) /**< \brief PORT Mask for PA18 */
|
||||
#define PIN_PA19 19 /**< \brief Pin Number for PA19 */
|
||||
#define PORT_PA19 (1u << 19) /**< \brief PORT Mask for PA19 */
|
||||
#define PIN_PA22 22 /**< \brief Pin Number for PA22 */
|
||||
#define PORT_PA22 (1u << 22) /**< \brief PORT Mask for PA22 */
|
||||
#define PIN_PA23 23 /**< \brief Pin Number for PA23 */
|
||||
#define PORT_PA23 (1u << 23) /**< \brief PORT Mask for PA23 */
|
||||
#define PIN_PA24 24 /**< \brief Pin Number for PA24 */
|
||||
#define PORT_PA24 (1u << 24) /**< \brief PORT Mask for PA24 */
|
||||
#define PIN_PA25 25 /**< \brief Pin Number for PA25 */
|
||||
#define PORT_PA25 (1u << 25) /**< \brief PORT Mask for PA25 */
|
||||
#define PIN_PA27 27 /**< \brief Pin Number for PA27 */
|
||||
#define PORT_PA27 (1u << 27) /**< \brief PORT Mask for PA27 */
|
||||
#define PIN_PA28 28 /**< \brief Pin Number for PA28 */
|
||||
#define PORT_PA28 (1u << 28) /**< \brief PORT Mask for PA28 */
|
||||
#define PIN_PA30 30 /**< \brief Pin Number for PA30 */
|
||||
#define PORT_PA30 (1u << 30) /**< \brief PORT Mask for PA30 */
|
||||
#define PIN_PA31 31 /**< \brief Pin Number for PA31 */
|
||||
#define PORT_PA31 (1u << 31) /**< \brief PORT Mask for PA31 */
|
||||
/* ========== PORT definition for CORE peripheral ========== */
|
||||
#define PIN_PA30G_CORE_SWCLK 30 /**< \brief CORE signal: SWCLK on PA30 mux G */
|
||||
#define MUX_PA30G_CORE_SWCLK 6
|
||||
#define PINMUX_PA30G_CORE_SWCLK ((PIN_PA30G_CORE_SWCLK << 16) | MUX_PA30G_CORE_SWCLK)
|
||||
#define PORT_PA30G_CORE_SWCLK (1u << 30)
|
||||
/* ========== PORT definition for GCLK peripheral ========== */
|
||||
#define PIN_PA14H_GCLK_IO0 14 /**< \brief GCLK signal: IO0 on PA14 mux H */
|
||||
#define MUX_PA14H_GCLK_IO0 7
|
||||
#define PINMUX_PA14H_GCLK_IO0 ((PIN_PA14H_GCLK_IO0 << 16) | MUX_PA14H_GCLK_IO0)
|
||||
#define PORT_PA14H_GCLK_IO0 (1u << 14)
|
||||
#define PIN_PA27H_GCLK_IO0 27 /**< \brief GCLK signal: IO0 on PA27 mux H */
|
||||
#define MUX_PA27H_GCLK_IO0 7
|
||||
#define PINMUX_PA27H_GCLK_IO0 ((PIN_PA27H_GCLK_IO0 << 16) | MUX_PA27H_GCLK_IO0)
|
||||
#define PORT_PA27H_GCLK_IO0 (1u << 27)
|
||||
#define PIN_PA28H_GCLK_IO0 28 /**< \brief GCLK signal: IO0 on PA28 mux H */
|
||||
#define MUX_PA28H_GCLK_IO0 7
|
||||
#define PINMUX_PA28H_GCLK_IO0 ((PIN_PA28H_GCLK_IO0 << 16) | MUX_PA28H_GCLK_IO0)
|
||||
#define PORT_PA28H_GCLK_IO0 (1u << 28)
|
||||
#define PIN_PA30H_GCLK_IO0 30 /**< \brief GCLK signal: IO0 on PA30 mux H */
|
||||
#define MUX_PA30H_GCLK_IO0 7
|
||||
#define PINMUX_PA30H_GCLK_IO0 ((PIN_PA30H_GCLK_IO0 << 16) | MUX_PA30H_GCLK_IO0)
|
||||
#define PORT_PA30H_GCLK_IO0 (1u << 30)
|
||||
#define PIN_PA15H_GCLK_IO1 15 /**< \brief GCLK signal: IO1 on PA15 mux H */
|
||||
#define MUX_PA15H_GCLK_IO1 7
|
||||
#define PINMUX_PA15H_GCLK_IO1 ((PIN_PA15H_GCLK_IO1 << 16) | MUX_PA15H_GCLK_IO1)
|
||||
#define PORT_PA15H_GCLK_IO1 (1u << 15)
|
||||
#define PIN_PA16H_GCLK_IO2 16 /**< \brief GCLK signal: IO2 on PA16 mux H */
|
||||
#define MUX_PA16H_GCLK_IO2 7
|
||||
#define PINMUX_PA16H_GCLK_IO2 ((PIN_PA16H_GCLK_IO2 << 16) | MUX_PA16H_GCLK_IO2)
|
||||
#define PORT_PA16H_GCLK_IO2 (1u << 16)
|
||||
#define PIN_PA17H_GCLK_IO3 17 /**< \brief GCLK signal: IO3 on PA17 mux H */
|
||||
#define MUX_PA17H_GCLK_IO3 7
|
||||
#define PINMUX_PA17H_GCLK_IO3 ((PIN_PA17H_GCLK_IO3 << 16) | MUX_PA17H_GCLK_IO3)
|
||||
#define PORT_PA17H_GCLK_IO3 (1u << 17)
|
||||
#define PIN_PA10H_GCLK_IO4 10 /**< \brief GCLK signal: IO4 on PA10 mux H */
|
||||
#define MUX_PA10H_GCLK_IO4 7
|
||||
#define PINMUX_PA10H_GCLK_IO4 ((PIN_PA10H_GCLK_IO4 << 16) | MUX_PA10H_GCLK_IO4)
|
||||
#define PORT_PA10H_GCLK_IO4 (1u << 10)
|
||||
#define PIN_PA11H_GCLK_IO5 11 /**< \brief GCLK signal: IO5 on PA11 mux H */
|
||||
#define MUX_PA11H_GCLK_IO5 7
|
||||
#define PINMUX_PA11H_GCLK_IO5 ((PIN_PA11H_GCLK_IO5 << 16) | MUX_PA11H_GCLK_IO5)
|
||||
#define PORT_PA11H_GCLK_IO5 (1u << 11)
|
||||
#define PIN_PA22H_GCLK_IO6 22 /**< \brief GCLK signal: IO6 on PA22 mux H */
|
||||
#define MUX_PA22H_GCLK_IO6 7
|
||||
#define PINMUX_PA22H_GCLK_IO6 ((PIN_PA22H_GCLK_IO6 << 16) | MUX_PA22H_GCLK_IO6)
|
||||
#define PORT_PA22H_GCLK_IO6 (1u << 22)
|
||||
#define PIN_PA23H_GCLK_IO7 23 /**< \brief GCLK signal: IO7 on PA23 mux H */
|
||||
#define MUX_PA23H_GCLK_IO7 7
|
||||
#define PINMUX_PA23H_GCLK_IO7 ((PIN_PA23H_GCLK_IO7 << 16) | MUX_PA23H_GCLK_IO7)
|
||||
#define PORT_PA23H_GCLK_IO7 (1u << 23)
|
||||
/* ========== PORT definition for EIC peripheral ========== */
|
||||
#define PIN_PA16A_EIC_EXTINT0 16 /**< \brief EIC signal: EXTINT0 on PA16 mux A */
|
||||
#define MUX_PA16A_EIC_EXTINT0 0
|
||||
#define PINMUX_PA16A_EIC_EXTINT0 ((PIN_PA16A_EIC_EXTINT0 << 16) | MUX_PA16A_EIC_EXTINT0)
|
||||
#define PORT_PA16A_EIC_EXTINT0 (1u << 16)
|
||||
#define PIN_PA00A_EIC_EXTINT0 0 /**< \brief EIC signal: EXTINT0 on PA00 mux A */
|
||||
#define MUX_PA00A_EIC_EXTINT0 0
|
||||
#define PINMUX_PA00A_EIC_EXTINT0 ((PIN_PA00A_EIC_EXTINT0 << 16) | MUX_PA00A_EIC_EXTINT0)
|
||||
#define PORT_PA00A_EIC_EXTINT0 (1u << 0)
|
||||
#define PIN_PA17A_EIC_EXTINT1 17 /**< \brief EIC signal: EXTINT1 on PA17 mux A */
|
||||
#define MUX_PA17A_EIC_EXTINT1 0
|
||||
#define PINMUX_PA17A_EIC_EXTINT1 ((PIN_PA17A_EIC_EXTINT1 << 16) | MUX_PA17A_EIC_EXTINT1)
|
||||
#define PORT_PA17A_EIC_EXTINT1 (1u << 17)
|
||||
#define PIN_PA01A_EIC_EXTINT1 1 /**< \brief EIC signal: EXTINT1 on PA01 mux A */
|
||||
#define MUX_PA01A_EIC_EXTINT1 0
|
||||
#define PINMUX_PA01A_EIC_EXTINT1 ((PIN_PA01A_EIC_EXTINT1 << 16) | MUX_PA01A_EIC_EXTINT1)
|
||||
#define PORT_PA01A_EIC_EXTINT1 (1u << 1)
|
||||
#define PIN_PA02A_EIC_EXTINT2 2 /**< \brief EIC signal: EXTINT2 on PA02 mux A */
|
||||
#define MUX_PA02A_EIC_EXTINT2 0
|
||||
#define PINMUX_PA02A_EIC_EXTINT2 ((PIN_PA02A_EIC_EXTINT2 << 16) | MUX_PA02A_EIC_EXTINT2)
|
||||
#define PORT_PA02A_EIC_EXTINT2 (1u << 2)
|
||||
#define PIN_PA18A_EIC_EXTINT2 18 /**< \brief EIC signal: EXTINT2 on PA18 mux A */
|
||||
#define MUX_PA18A_EIC_EXTINT2 0
|
||||
#define PINMUX_PA18A_EIC_EXTINT2 ((PIN_PA18A_EIC_EXTINT2 << 16) | MUX_PA18A_EIC_EXTINT2)
|
||||
#define PORT_PA18A_EIC_EXTINT2 (1u << 18)
|
||||
#define PIN_PA03A_EIC_EXTINT3 3 /**< \brief EIC signal: EXTINT3 on PA03 mux A */
|
||||
#define MUX_PA03A_EIC_EXTINT3 0
|
||||
#define PINMUX_PA03A_EIC_EXTINT3 ((PIN_PA03A_EIC_EXTINT3 << 16) | MUX_PA03A_EIC_EXTINT3)
|
||||
#define PORT_PA03A_EIC_EXTINT3 (1u << 3)
|
||||
#define PIN_PA19A_EIC_EXTINT3 19 /**< \brief EIC signal: EXTINT3 on PA19 mux A */
|
||||
#define MUX_PA19A_EIC_EXTINT3 0
|
||||
#define PINMUX_PA19A_EIC_EXTINT3 ((PIN_PA19A_EIC_EXTINT3 << 16) | MUX_PA19A_EIC_EXTINT3)
|
||||
#define PORT_PA19A_EIC_EXTINT3 (1u << 19)
|
||||
#define PIN_PA04A_EIC_EXTINT4 4 /**< \brief EIC signal: EXTINT4 on PA04 mux A */
|
||||
#define MUX_PA04A_EIC_EXTINT4 0
|
||||
#define PINMUX_PA04A_EIC_EXTINT4 ((PIN_PA04A_EIC_EXTINT4 << 16) | MUX_PA04A_EIC_EXTINT4)
|
||||
#define PORT_PA04A_EIC_EXTINT4 (1u << 4)
|
||||
#define PIN_PA05A_EIC_EXTINT5 5 /**< \brief EIC signal: EXTINT5 on PA05 mux A */
|
||||
#define MUX_PA05A_EIC_EXTINT5 0
|
||||
#define PINMUX_PA05A_EIC_EXTINT5 ((PIN_PA05A_EIC_EXTINT5 << 16) | MUX_PA05A_EIC_EXTINT5)
|
||||
#define PORT_PA05A_EIC_EXTINT5 (1u << 5)
|
||||
#define PIN_PA06A_EIC_EXTINT6 6 /**< \brief EIC signal: EXTINT6 on PA06 mux A */
|
||||
#define MUX_PA06A_EIC_EXTINT6 0
|
||||
#define PINMUX_PA06A_EIC_EXTINT6 ((PIN_PA06A_EIC_EXTINT6 << 16) | MUX_PA06A_EIC_EXTINT6)
|
||||
#define PORT_PA06A_EIC_EXTINT6 (1u << 6)
|
||||
#define PIN_PA22A_EIC_EXTINT6 22 /**< \brief EIC signal: EXTINT6 on PA22 mux A */
|
||||
#define MUX_PA22A_EIC_EXTINT6 0
|
||||
#define PINMUX_PA22A_EIC_EXTINT6 ((PIN_PA22A_EIC_EXTINT6 << 16) | MUX_PA22A_EIC_EXTINT6)
|
||||
#define PORT_PA22A_EIC_EXTINT6 (1u << 22)
|
||||
#define PIN_PA07A_EIC_EXTINT7 7 /**< \brief EIC signal: EXTINT7 on PA07 mux A */
|
||||
#define MUX_PA07A_EIC_EXTINT7 0
|
||||
#define PINMUX_PA07A_EIC_EXTINT7 ((PIN_PA07A_EIC_EXTINT7 << 16) | MUX_PA07A_EIC_EXTINT7)
|
||||
#define PORT_PA07A_EIC_EXTINT7 (1u << 7)
|
||||
#define PIN_PA23A_EIC_EXTINT7 23 /**< \brief EIC signal: EXTINT7 on PA23 mux A */
|
||||
#define MUX_PA23A_EIC_EXTINT7 0
|
||||
#define PINMUX_PA23A_EIC_EXTINT7 ((PIN_PA23A_EIC_EXTINT7 << 16) | MUX_PA23A_EIC_EXTINT7)
|
||||
#define PORT_PA23A_EIC_EXTINT7 (1u << 23)
|
||||
#define PIN_PA28A_EIC_EXTINT8 28 /**< \brief EIC signal: EXTINT8 on PA28 mux A */
|
||||
#define MUX_PA28A_EIC_EXTINT8 0
|
||||
#define PINMUX_PA28A_EIC_EXTINT8 ((PIN_PA28A_EIC_EXTINT8 << 16) | MUX_PA28A_EIC_EXTINT8)
|
||||
#define PORT_PA28A_EIC_EXTINT8 (1u << 28)
|
||||
#define PIN_PA09A_EIC_EXTINT9 9 /**< \brief EIC signal: EXTINT9 on PA09 mux A */
|
||||
#define MUX_PA09A_EIC_EXTINT9 0
|
||||
#define PINMUX_PA09A_EIC_EXTINT9 ((PIN_PA09A_EIC_EXTINT9 << 16) | MUX_PA09A_EIC_EXTINT9)
|
||||
#define PORT_PA09A_EIC_EXTINT9 (1u << 9)
|
||||
#define PIN_PA10A_EIC_EXTINT10 10 /**< \brief EIC signal: EXTINT10 on PA10 mux A */
|
||||
#define MUX_PA10A_EIC_EXTINT10 0
|
||||
#define PINMUX_PA10A_EIC_EXTINT10 ((PIN_PA10A_EIC_EXTINT10 << 16) | MUX_PA10A_EIC_EXTINT10)
|
||||
#define PORT_PA10A_EIC_EXTINT10 (1u << 10)
|
||||
#define PIN_PA30A_EIC_EXTINT10 30 /**< \brief EIC signal: EXTINT10 on PA30 mux A */
|
||||
#define MUX_PA30A_EIC_EXTINT10 0
|
||||
#define PINMUX_PA30A_EIC_EXTINT10 ((PIN_PA30A_EIC_EXTINT10 << 16) | MUX_PA30A_EIC_EXTINT10)
|
||||
#define PORT_PA30A_EIC_EXTINT10 (1u << 30)
|
||||
#define PIN_PA11A_EIC_EXTINT11 11 /**< \brief EIC signal: EXTINT11 on PA11 mux A */
|
||||
#define MUX_PA11A_EIC_EXTINT11 0
|
||||
#define PINMUX_PA11A_EIC_EXTINT11 ((PIN_PA11A_EIC_EXTINT11 << 16) | MUX_PA11A_EIC_EXTINT11)
|
||||
#define PORT_PA11A_EIC_EXTINT11 (1u << 11)
|
||||
#define PIN_PA31A_EIC_EXTINT11 31 /**< \brief EIC signal: EXTINT11 on PA31 mux A */
|
||||
#define MUX_PA31A_EIC_EXTINT11 0
|
||||
#define PINMUX_PA31A_EIC_EXTINT11 ((PIN_PA31A_EIC_EXTINT11 << 16) | MUX_PA31A_EIC_EXTINT11)
|
||||
#define PORT_PA31A_EIC_EXTINT11 (1u << 31)
|
||||
#define PIN_PA24A_EIC_EXTINT12 24 /**< \brief EIC signal: EXTINT12 on PA24 mux A */
|
||||
#define MUX_PA24A_EIC_EXTINT12 0
|
||||
#define PINMUX_PA24A_EIC_EXTINT12 ((PIN_PA24A_EIC_EXTINT12 << 16) | MUX_PA24A_EIC_EXTINT12)
|
||||
#define PORT_PA24A_EIC_EXTINT12 (1u << 24)
|
||||
#define PIN_PA25A_EIC_EXTINT13 25 /**< \brief EIC signal: EXTINT13 on PA25 mux A */
|
||||
#define MUX_PA25A_EIC_EXTINT13 0
|
||||
#define PINMUX_PA25A_EIC_EXTINT13 ((PIN_PA25A_EIC_EXTINT13 << 16) | MUX_PA25A_EIC_EXTINT13)
|
||||
#define PORT_PA25A_EIC_EXTINT13 (1u << 25)
|
||||
#define PIN_PA14A_EIC_EXTINT14 14 /**< \brief EIC signal: EXTINT14 on PA14 mux A */
|
||||
#define MUX_PA14A_EIC_EXTINT14 0
|
||||
#define PINMUX_PA14A_EIC_EXTINT14 ((PIN_PA14A_EIC_EXTINT14 << 16) | MUX_PA14A_EIC_EXTINT14)
|
||||
#define PORT_PA14A_EIC_EXTINT14 (1u << 14)
|
||||
#define PIN_PA27A_EIC_EXTINT15 27 /**< \brief EIC signal: EXTINT15 on PA27 mux A */
|
||||
#define MUX_PA27A_EIC_EXTINT15 0
|
||||
#define PINMUX_PA27A_EIC_EXTINT15 ((PIN_PA27A_EIC_EXTINT15 << 16) | MUX_PA27A_EIC_EXTINT15)
|
||||
#define PORT_PA27A_EIC_EXTINT15 (1u << 27)
|
||||
#define PIN_PA15A_EIC_EXTINT15 15 /**< \brief EIC signal: EXTINT15 on PA15 mux A */
|
||||
#define MUX_PA15A_EIC_EXTINT15 0
|
||||
#define PINMUX_PA15A_EIC_EXTINT15 ((PIN_PA15A_EIC_EXTINT15 << 16) | MUX_PA15A_EIC_EXTINT15)
|
||||
#define PORT_PA15A_EIC_EXTINT15 (1u << 15)
|
||||
#define PIN_PA08A_EIC_NMI 8 /**< \brief EIC signal: NMI on PA08 mux A */
|
||||
#define MUX_PA08A_EIC_NMI 0
|
||||
#define PINMUX_PA08A_EIC_NMI ((PIN_PA08A_EIC_NMI << 16) | MUX_PA08A_EIC_NMI)
|
||||
#define PORT_PA08A_EIC_NMI (1u << 8)
|
||||
/* ========== PORT definition for SERCOM0 peripheral ========== */
|
||||
#define PIN_PA04D_SERCOM0_PAD0 4 /**< \brief SERCOM0 signal: PAD0 on PA04 mux D */
|
||||
#define MUX_PA04D_SERCOM0_PAD0 3
|
||||
#define PINMUX_PA04D_SERCOM0_PAD0 ((PIN_PA04D_SERCOM0_PAD0 << 16) | MUX_PA04D_SERCOM0_PAD0)
|
||||
#define PORT_PA04D_SERCOM0_PAD0 (1u << 4)
|
||||
#define PIN_PA08C_SERCOM0_PAD0 8 /**< \brief SERCOM0 signal: PAD0 on PA08 mux C */
|
||||
#define MUX_PA08C_SERCOM0_PAD0 2
|
||||
#define PINMUX_PA08C_SERCOM0_PAD0 ((PIN_PA08C_SERCOM0_PAD0 << 16) | MUX_PA08C_SERCOM0_PAD0)
|
||||
#define PORT_PA08C_SERCOM0_PAD0 (1u << 8)
|
||||
#define PIN_PA05D_SERCOM0_PAD1 5 /**< \brief SERCOM0 signal: PAD1 on PA05 mux D */
|
||||
#define MUX_PA05D_SERCOM0_PAD1 3
|
||||
#define PINMUX_PA05D_SERCOM0_PAD1 ((PIN_PA05D_SERCOM0_PAD1 << 16) | MUX_PA05D_SERCOM0_PAD1)
|
||||
#define PORT_PA05D_SERCOM0_PAD1 (1u << 5)
|
||||
#define PIN_PA09C_SERCOM0_PAD1 9 /**< \brief SERCOM0 signal: PAD1 on PA09 mux C */
|
||||
#define MUX_PA09C_SERCOM0_PAD1 2
|
||||
#define PINMUX_PA09C_SERCOM0_PAD1 ((PIN_PA09C_SERCOM0_PAD1 << 16) | MUX_PA09C_SERCOM0_PAD1)
|
||||
#define PORT_PA09C_SERCOM0_PAD1 (1u << 9)
|
||||
#define PIN_PA06D_SERCOM0_PAD2 6 /**< \brief SERCOM0 signal: PAD2 on PA06 mux D */
|
||||
#define MUX_PA06D_SERCOM0_PAD2 3
|
||||
#define PINMUX_PA06D_SERCOM0_PAD2 ((PIN_PA06D_SERCOM0_PAD2 << 16) | MUX_PA06D_SERCOM0_PAD2)
|
||||
#define PORT_PA06D_SERCOM0_PAD2 (1u << 6)
|
||||
#define PIN_PA10C_SERCOM0_PAD2 10 /**< \brief SERCOM0 signal: PAD2 on PA10 mux C */
|
||||
#define MUX_PA10C_SERCOM0_PAD2 2
|
||||
#define PINMUX_PA10C_SERCOM0_PAD2 ((PIN_PA10C_SERCOM0_PAD2 << 16) | MUX_PA10C_SERCOM0_PAD2)
|
||||
#define PORT_PA10C_SERCOM0_PAD2 (1u << 10)
|
||||
#define PIN_PA07D_SERCOM0_PAD3 7 /**< \brief SERCOM0 signal: PAD3 on PA07 mux D */
|
||||
#define MUX_PA07D_SERCOM0_PAD3 3
|
||||
#define PINMUX_PA07D_SERCOM0_PAD3 ((PIN_PA07D_SERCOM0_PAD3 << 16) | MUX_PA07D_SERCOM0_PAD3)
|
||||
#define PORT_PA07D_SERCOM0_PAD3 (1u << 7)
|
||||
#define PIN_PA11C_SERCOM0_PAD3 11 /**< \brief SERCOM0 signal: PAD3 on PA11 mux C */
|
||||
#define MUX_PA11C_SERCOM0_PAD3 2
|
||||
#define PINMUX_PA11C_SERCOM0_PAD3 ((PIN_PA11C_SERCOM0_PAD3 << 16) | MUX_PA11C_SERCOM0_PAD3)
|
||||
#define PORT_PA11C_SERCOM0_PAD3 (1u << 11)
|
||||
/* ========== PORT definition for SERCOM1 peripheral ========== */
|
||||
#define PIN_PA16C_SERCOM1_PAD0 16 /**< \brief SERCOM1 signal: PAD0 on PA16 mux C */
|
||||
#define MUX_PA16C_SERCOM1_PAD0 2
|
||||
#define PINMUX_PA16C_SERCOM1_PAD0 ((PIN_PA16C_SERCOM1_PAD0 << 16) | MUX_PA16C_SERCOM1_PAD0)
|
||||
#define PORT_PA16C_SERCOM1_PAD0 (1u << 16)
|
||||
#define PIN_PA00D_SERCOM1_PAD0 0 /**< \brief SERCOM1 signal: PAD0 on PA00 mux D */
|
||||
#define MUX_PA00D_SERCOM1_PAD0 3
|
||||
#define PINMUX_PA00D_SERCOM1_PAD0 ((PIN_PA00D_SERCOM1_PAD0 << 16) | MUX_PA00D_SERCOM1_PAD0)
|
||||
#define PORT_PA00D_SERCOM1_PAD0 (1u << 0)
|
||||
#define PIN_PA17C_SERCOM1_PAD1 17 /**< \brief SERCOM1 signal: PAD1 on PA17 mux C */
|
||||
#define MUX_PA17C_SERCOM1_PAD1 2
|
||||
#define PINMUX_PA17C_SERCOM1_PAD1 ((PIN_PA17C_SERCOM1_PAD1 << 16) | MUX_PA17C_SERCOM1_PAD1)
|
||||
#define PORT_PA17C_SERCOM1_PAD1 (1u << 17)
|
||||
#define PIN_PA01D_SERCOM1_PAD1 1 /**< \brief SERCOM1 signal: PAD1 on PA01 mux D */
|
||||
#define MUX_PA01D_SERCOM1_PAD1 3
|
||||
#define PINMUX_PA01D_SERCOM1_PAD1 ((PIN_PA01D_SERCOM1_PAD1 << 16) | MUX_PA01D_SERCOM1_PAD1)
|
||||
#define PORT_PA01D_SERCOM1_PAD1 (1u << 1)
|
||||
#define PIN_PA30D_SERCOM1_PAD2 30 /**< \brief SERCOM1 signal: PAD2 on PA30 mux D */
|
||||
#define MUX_PA30D_SERCOM1_PAD2 3
|
||||
#define PINMUX_PA30D_SERCOM1_PAD2 ((PIN_PA30D_SERCOM1_PAD2 << 16) | MUX_PA30D_SERCOM1_PAD2)
|
||||
#define PORT_PA30D_SERCOM1_PAD2 (1u << 30)
|
||||
#define PIN_PA18C_SERCOM1_PAD2 18 /**< \brief SERCOM1 signal: PAD2 on PA18 mux C */
|
||||
#define MUX_PA18C_SERCOM1_PAD2 2
|
||||
#define PINMUX_PA18C_SERCOM1_PAD2 ((PIN_PA18C_SERCOM1_PAD2 << 16) | MUX_PA18C_SERCOM1_PAD2)
|
||||
#define PORT_PA18C_SERCOM1_PAD2 (1u << 18)
|
||||
#define PIN_PA31D_SERCOM1_PAD3 31 /**< \brief SERCOM1 signal: PAD3 on PA31 mux D */
|
||||
#define MUX_PA31D_SERCOM1_PAD3 3
|
||||
#define PINMUX_PA31D_SERCOM1_PAD3 ((PIN_PA31D_SERCOM1_PAD3 << 16) | MUX_PA31D_SERCOM1_PAD3)
|
||||
#define PORT_PA31D_SERCOM1_PAD3 (1u << 31)
|
||||
#define PIN_PA19C_SERCOM1_PAD3 19 /**< \brief SERCOM1 signal: PAD3 on PA19 mux C */
|
||||
#define MUX_PA19C_SERCOM1_PAD3 2
|
||||
#define PINMUX_PA19C_SERCOM1_PAD3 ((PIN_PA19C_SERCOM1_PAD3 << 16) | MUX_PA19C_SERCOM1_PAD3)
|
||||
#define PORT_PA19C_SERCOM1_PAD3 (1u << 19)
|
||||
/* ========== PORT definition for SERCOM2 peripheral ========== */
|
||||
#define PIN_PA08D_SERCOM2_PAD0 8 /**< \brief SERCOM2 signal: PAD0 on PA08 mux D */
|
||||
#define MUX_PA08D_SERCOM2_PAD0 3
|
||||
#define PINMUX_PA08D_SERCOM2_PAD0 ((PIN_PA08D_SERCOM2_PAD0 << 16) | MUX_PA08D_SERCOM2_PAD0)
|
||||
#define PORT_PA08D_SERCOM2_PAD0 (1u << 8)
|
||||
#define PIN_PA09D_SERCOM2_PAD1 9 /**< \brief SERCOM2 signal: PAD1 on PA09 mux D */
|
||||
#define MUX_PA09D_SERCOM2_PAD1 3
|
||||
#define PINMUX_PA09D_SERCOM2_PAD1 ((PIN_PA09D_SERCOM2_PAD1 << 16) | MUX_PA09D_SERCOM2_PAD1)
|
||||
#define PORT_PA09D_SERCOM2_PAD1 (1u << 9)
|
||||
#define PIN_PA10D_SERCOM2_PAD2 10 /**< \brief SERCOM2 signal: PAD2 on PA10 mux D */
|
||||
#define MUX_PA10D_SERCOM2_PAD2 3
|
||||
#define PINMUX_PA10D_SERCOM2_PAD2 ((PIN_PA10D_SERCOM2_PAD2 << 16) | MUX_PA10D_SERCOM2_PAD2)
|
||||
#define PORT_PA10D_SERCOM2_PAD2 (1u << 10)
|
||||
#define PIN_PA14C_SERCOM2_PAD2 14 /**< \brief SERCOM2 signal: PAD2 on PA14 mux C */
|
||||
#define MUX_PA14C_SERCOM2_PAD2 2
|
||||
#define PINMUX_PA14C_SERCOM2_PAD2 ((PIN_PA14C_SERCOM2_PAD2 << 16) | MUX_PA14C_SERCOM2_PAD2)
|
||||
#define PORT_PA14C_SERCOM2_PAD2 (1u << 14)
|
||||
#define PIN_PA11D_SERCOM2_PAD3 11 /**< \brief SERCOM2 signal: PAD3 on PA11 mux D */
|
||||
#define MUX_PA11D_SERCOM2_PAD3 3
|
||||
#define PINMUX_PA11D_SERCOM2_PAD3 ((PIN_PA11D_SERCOM2_PAD3 << 16) | MUX_PA11D_SERCOM2_PAD3)
|
||||
#define PORT_PA11D_SERCOM2_PAD3 (1u << 11)
|
||||
#define PIN_PA15C_SERCOM2_PAD3 15 /**< \brief SERCOM2 signal: PAD3 on PA15 mux C */
|
||||
#define MUX_PA15C_SERCOM2_PAD3 2
|
||||
#define PINMUX_PA15C_SERCOM2_PAD3 ((PIN_PA15C_SERCOM2_PAD3 << 16) | MUX_PA15C_SERCOM2_PAD3)
|
||||
#define PORT_PA15C_SERCOM2_PAD3 (1u << 15)
|
||||
/* ========== PORT definition for SERCOM3 peripheral ========== */
|
||||
#define PIN_PA16D_SERCOM3_PAD0 16 /**< \brief SERCOM3 signal: PAD0 on PA16 mux D */
|
||||
#define MUX_PA16D_SERCOM3_PAD0 3
|
||||
#define PINMUX_PA16D_SERCOM3_PAD0 ((PIN_PA16D_SERCOM3_PAD0 << 16) | MUX_PA16D_SERCOM3_PAD0)
|
||||
#define PORT_PA16D_SERCOM3_PAD0 (1u << 16)
|
||||
#define PIN_PA22C_SERCOM3_PAD0 22 /**< \brief SERCOM3 signal: PAD0 on PA22 mux C */
|
||||
#define MUX_PA22C_SERCOM3_PAD0 2
|
||||
#define PINMUX_PA22C_SERCOM3_PAD0 ((PIN_PA22C_SERCOM3_PAD0 << 16) | MUX_PA22C_SERCOM3_PAD0)
|
||||
#define PORT_PA22C_SERCOM3_PAD0 (1u << 22)
|
||||
#define PIN_PA17D_SERCOM3_PAD1 17 /**< \brief SERCOM3 signal: PAD1 on PA17 mux D */
|
||||
#define MUX_PA17D_SERCOM3_PAD1 3
|
||||
#define PINMUX_PA17D_SERCOM3_PAD1 ((PIN_PA17D_SERCOM3_PAD1 << 16) | MUX_PA17D_SERCOM3_PAD1)
|
||||
#define PORT_PA17D_SERCOM3_PAD1 (1u << 17)
|
||||
#define PIN_PA23C_SERCOM3_PAD1 23 /**< \brief SERCOM3 signal: PAD1 on PA23 mux C */
|
||||
#define MUX_PA23C_SERCOM3_PAD1 2
|
||||
#define PINMUX_PA23C_SERCOM3_PAD1 ((PIN_PA23C_SERCOM3_PAD1 << 16) | MUX_PA23C_SERCOM3_PAD1)
|
||||
#define PORT_PA23C_SERCOM3_PAD1 (1u << 23)
|
||||
#define PIN_PA18D_SERCOM3_PAD2 18 /**< \brief SERCOM3 signal: PAD2 on PA18 mux D */
|
||||
#define MUX_PA18D_SERCOM3_PAD2 3
|
||||
#define PINMUX_PA18D_SERCOM3_PAD2 ((PIN_PA18D_SERCOM3_PAD2 << 16) | MUX_PA18D_SERCOM3_PAD2)
|
||||
#define PORT_PA18D_SERCOM3_PAD2 (1u << 18)
|
||||
#define PIN_PA24C_SERCOM3_PAD2 24 /**< \brief SERCOM3 signal: PAD2 on PA24 mux C */
|
||||
#define MUX_PA24C_SERCOM3_PAD2 2
|
||||
#define PINMUX_PA24C_SERCOM3_PAD2 ((PIN_PA24C_SERCOM3_PAD2 << 16) | MUX_PA24C_SERCOM3_PAD2)
|
||||
#define PORT_PA24C_SERCOM3_PAD2 (1u << 24)
|
||||
#define PIN_PA19D_SERCOM3_PAD3 19 /**< \brief SERCOM3 signal: PAD3 on PA19 mux D */
|
||||
#define MUX_PA19D_SERCOM3_PAD3 3
|
||||
#define PINMUX_PA19D_SERCOM3_PAD3 ((PIN_PA19D_SERCOM3_PAD3 << 16) | MUX_PA19D_SERCOM3_PAD3)
|
||||
#define PORT_PA19D_SERCOM3_PAD3 (1u << 19)
|
||||
#define PIN_PA25C_SERCOM3_PAD3 25 /**< \brief SERCOM3 signal: PAD3 on PA25 mux C */
|
||||
#define MUX_PA25C_SERCOM3_PAD3 2
|
||||
#define PINMUX_PA25C_SERCOM3_PAD3 ((PIN_PA25C_SERCOM3_PAD3 << 16) | MUX_PA25C_SERCOM3_PAD3)
|
||||
#define PORT_PA25C_SERCOM3_PAD3 (1u << 25)
|
||||
/* ========== PORT definition for TC0 peripheral ========== */
|
||||
#define PIN_PA04F_TC0_WO0 4 /**< \brief TC0 signal: WO0 on PA04 mux F */
|
||||
#define MUX_PA04F_TC0_WO0 5
|
||||
#define PINMUX_PA04F_TC0_WO0 ((PIN_PA04F_TC0_WO0 << 16) | MUX_PA04F_TC0_WO0)
|
||||
#define PORT_PA04F_TC0_WO0 (1u << 4)
|
||||
#define PIN_PA08E_TC0_WO0 8 /**< \brief TC0 signal: WO0 on PA08 mux E */
|
||||
#define MUX_PA08E_TC0_WO0 4
|
||||
#define PINMUX_PA08E_TC0_WO0 ((PIN_PA08E_TC0_WO0 << 16) | MUX_PA08E_TC0_WO0)
|
||||
#define PORT_PA08E_TC0_WO0 (1u << 8)
|
||||
#define PIN_PA05F_TC0_WO1 5 /**< \brief TC0 signal: WO1 on PA05 mux F */
|
||||
#define MUX_PA05F_TC0_WO1 5
|
||||
#define PINMUX_PA05F_TC0_WO1 ((PIN_PA05F_TC0_WO1 << 16) | MUX_PA05F_TC0_WO1)
|
||||
#define PORT_PA05F_TC0_WO1 (1u << 5)
|
||||
#define PIN_PA09E_TC0_WO1 9 /**< \brief TC0 signal: WO1 on PA09 mux E */
|
||||
#define MUX_PA09E_TC0_WO1 4
|
||||
#define PINMUX_PA09E_TC0_WO1 ((PIN_PA09E_TC0_WO1 << 16) | MUX_PA09E_TC0_WO1)
|
||||
#define PORT_PA09E_TC0_WO1 (1u << 9)
|
||||
/* ========== PORT definition for TC1 peripheral ========== */
|
||||
#define PIN_PA06F_TC1_WO0 6 /**< \brief TC1 signal: WO0 on PA06 mux F */
|
||||
#define MUX_PA06F_TC1_WO0 5
|
||||
#define PINMUX_PA06F_TC1_WO0 ((PIN_PA06F_TC1_WO0 << 16) | MUX_PA06F_TC1_WO0)
|
||||
#define PORT_PA06F_TC1_WO0 (1u << 6)
|
||||
#define PIN_PA30F_TC1_WO0 30 /**< \brief TC1 signal: WO0 on PA30 mux F */
|
||||
#define MUX_PA30F_TC1_WO0 5
|
||||
#define PINMUX_PA30F_TC1_WO0 ((PIN_PA30F_TC1_WO0 << 16) | MUX_PA30F_TC1_WO0)
|
||||
#define PORT_PA30F_TC1_WO0 (1u << 30)
|
||||
#define PIN_PA10E_TC1_WO0 10 /**< \brief TC1 signal: WO0 on PA10 mux E */
|
||||
#define MUX_PA10E_TC1_WO0 4
|
||||
#define PINMUX_PA10E_TC1_WO0 ((PIN_PA10E_TC1_WO0 << 16) | MUX_PA10E_TC1_WO0)
|
||||
#define PORT_PA10E_TC1_WO0 (1u << 10)
|
||||
#define PIN_PA07F_TC1_WO1 7 /**< \brief TC1 signal: WO1 on PA07 mux F */
|
||||
#define MUX_PA07F_TC1_WO1 5
|
||||
#define PINMUX_PA07F_TC1_WO1 ((PIN_PA07F_TC1_WO1 << 16) | MUX_PA07F_TC1_WO1)
|
||||
#define PORT_PA07F_TC1_WO1 (1u << 7)
|
||||
#define PIN_PA31F_TC1_WO1 31 /**< \brief TC1 signal: WO1 on PA31 mux F */
|
||||
#define MUX_PA31F_TC1_WO1 5
|
||||
#define PINMUX_PA31F_TC1_WO1 ((PIN_PA31F_TC1_WO1 << 16) | MUX_PA31F_TC1_WO1)
|
||||
#define PORT_PA31F_TC1_WO1 (1u << 31)
|
||||
#define PIN_PA11E_TC1_WO1 11 /**< \brief TC1 signal: WO1 on PA11 mux E */
|
||||
#define MUX_PA11E_TC1_WO1 4
|
||||
#define PINMUX_PA11E_TC1_WO1 ((PIN_PA11E_TC1_WO1 << 16) | MUX_PA11E_TC1_WO1)
|
||||
#define PORT_PA11E_TC1_WO1 (1u << 11)
|
||||
/* ========== PORT definition for TC2 peripheral ========== */
|
||||
#define PIN_PA16F_TC2_WO0 16 /**< \brief TC2 signal: WO0 on PA16 mux F */
|
||||
#define MUX_PA16F_TC2_WO0 5
|
||||
#define PINMUX_PA16F_TC2_WO0 ((PIN_PA16F_TC2_WO0 << 16) | MUX_PA16F_TC2_WO0)
|
||||
#define PORT_PA16F_TC2_WO0 (1u << 16)
|
||||
#define PIN_PA00F_TC2_WO0 0 /**< \brief TC2 signal: WO0 on PA00 mux F */
|
||||
#define MUX_PA00F_TC2_WO0 5
|
||||
#define PINMUX_PA00F_TC2_WO0 ((PIN_PA00F_TC2_WO0 << 16) | MUX_PA00F_TC2_WO0)
|
||||
#define PORT_PA00F_TC2_WO0 (1u << 0)
|
||||
#define PIN_PA17F_TC2_WO1 17 /**< \brief TC2 signal: WO1 on PA17 mux F */
|
||||
#define MUX_PA17F_TC2_WO1 5
|
||||
#define PINMUX_PA17F_TC2_WO1 ((PIN_PA17F_TC2_WO1 << 16) | MUX_PA17F_TC2_WO1)
|
||||
#define PORT_PA17F_TC2_WO1 (1u << 17)
|
||||
#define PIN_PA01F_TC2_WO1 1 /**< \brief TC2 signal: WO1 on PA01 mux F */
|
||||
#define MUX_PA01F_TC2_WO1 5
|
||||
#define PINMUX_PA01F_TC2_WO1 ((PIN_PA01F_TC2_WO1 << 16) | MUX_PA01F_TC2_WO1)
|
||||
#define PORT_PA01F_TC2_WO1 (1u << 1)
|
||||
/* ========== PORT definition for TC3 peripheral ========== */
|
||||
#define PIN_PA18F_TC3_WO0 18 /**< \brief TC3 signal: WO0 on PA18 mux F */
|
||||
#define MUX_PA18F_TC3_WO0 5
|
||||
#define PINMUX_PA18F_TC3_WO0 ((PIN_PA18F_TC3_WO0 << 16) | MUX_PA18F_TC3_WO0)
|
||||
#define PORT_PA18F_TC3_WO0 (1u << 18)
|
||||
#define PIN_PA14E_TC3_WO0 14 /**< \brief TC3 signal: WO0 on PA14 mux E */
|
||||
#define MUX_PA14E_TC3_WO0 4
|
||||
#define PINMUX_PA14E_TC3_WO0 ((PIN_PA14E_TC3_WO0 << 16) | MUX_PA14E_TC3_WO0)
|
||||
#define PORT_PA14E_TC3_WO0 (1u << 14)
|
||||
#define PIN_PA19F_TC3_WO1 19 /**< \brief TC3 signal: WO1 on PA19 mux F */
|
||||
#define MUX_PA19F_TC3_WO1 5
|
||||
#define PINMUX_PA19F_TC3_WO1 ((PIN_PA19F_TC3_WO1 << 16) | MUX_PA19F_TC3_WO1)
|
||||
#define PORT_PA19F_TC3_WO1 (1u << 19)
|
||||
#define PIN_PA15E_TC3_WO1 15 /**< \brief TC3 signal: WO1 on PA15 mux E */
|
||||
#define MUX_PA15E_TC3_WO1 4
|
||||
#define PINMUX_PA15E_TC3_WO1 ((PIN_PA15E_TC3_WO1 << 16) | MUX_PA15E_TC3_WO1)
|
||||
#define PORT_PA15E_TC3_WO1 (1u << 15)
|
||||
/* ========== PORT definition for TC4 peripheral ========== */
|
||||
#define PIN_PA22F_TC4_WO0 22 /**< \brief TC4 signal: WO0 on PA22 mux F */
|
||||
#define MUX_PA22F_TC4_WO0 5
|
||||
#define PINMUX_PA22F_TC4_WO0 ((PIN_PA22F_TC4_WO0 << 16) | MUX_PA22F_TC4_WO0)
|
||||
#define PORT_PA22F_TC4_WO0 (1u << 22)
|
||||
#define PIN_PA23F_TC4_WO1 23 /**< \brief TC4 signal: WO1 on PA23 mux F */
|
||||
#define MUX_PA23F_TC4_WO1 5
|
||||
#define PINMUX_PA23F_TC4_WO1 ((PIN_PA23F_TC4_WO1 << 16) | MUX_PA23F_TC4_WO1)
|
||||
#define PORT_PA23F_TC4_WO1 (1u << 23)
|
||||
/* ========== PORT definition for TC5 peripheral ========== */
|
||||
#define PIN_PA24F_TC5_WO0 24 /**< \brief TC5 signal: WO0 on PA24 mux F */
|
||||
#define MUX_PA24F_TC5_WO0 5
|
||||
#define PINMUX_PA24F_TC5_WO0 ((PIN_PA24F_TC5_WO0 << 16) | MUX_PA24F_TC5_WO0)
|
||||
#define PORT_PA24F_TC5_WO0 (1u << 24)
|
||||
#define PIN_PA25F_TC5_WO1 25 /**< \brief TC5 signal: WO1 on PA25 mux F */
|
||||
#define MUX_PA25F_TC5_WO1 5
|
||||
#define PINMUX_PA25F_TC5_WO1 ((PIN_PA25F_TC5_WO1 << 16) | MUX_PA25F_TC5_WO1)
|
||||
#define PORT_PA25F_TC5_WO1 (1u << 25)
|
||||
/* ========== PORT definition for ADC peripheral ========== */
|
||||
#define PIN_PA02B_ADC_AIN0 2 /**< \brief ADC signal: AIN0 on PA02 mux B */
|
||||
#define MUX_PA02B_ADC_AIN0 1
|
||||
#define PINMUX_PA02B_ADC_AIN0 ((PIN_PA02B_ADC_AIN0 << 16) | MUX_PA02B_ADC_AIN0)
|
||||
#define PORT_PA02B_ADC_AIN0 (1u << 2)
|
||||
#define PIN_PA03B_ADC_AIN1 3 /**< \brief ADC signal: AIN1 on PA03 mux B */
|
||||
#define MUX_PA03B_ADC_AIN1 1
|
||||
#define PINMUX_PA03B_ADC_AIN1 ((PIN_PA03B_ADC_AIN1 << 16) | MUX_PA03B_ADC_AIN1)
|
||||
#define PORT_PA03B_ADC_AIN1 (1u << 3)
|
||||
#define PIN_PA04B_ADC_AIN4 4 /**< \brief ADC signal: AIN4 on PA04 mux B */
|
||||
#define MUX_PA04B_ADC_AIN4 1
|
||||
#define PINMUX_PA04B_ADC_AIN4 ((PIN_PA04B_ADC_AIN4 << 16) | MUX_PA04B_ADC_AIN4)
|
||||
#define PORT_PA04B_ADC_AIN4 (1u << 4)
|
||||
#define PIN_PA05B_ADC_AIN5 5 /**< \brief ADC signal: AIN5 on PA05 mux B */
|
||||
#define MUX_PA05B_ADC_AIN5 1
|
||||
#define PINMUX_PA05B_ADC_AIN5 ((PIN_PA05B_ADC_AIN5 << 16) | MUX_PA05B_ADC_AIN5)
|
||||
#define PORT_PA05B_ADC_AIN5 (1u << 5)
|
||||
#define PIN_PA06B_ADC_AIN6 6 /**< \brief ADC signal: AIN6 on PA06 mux B */
|
||||
#define MUX_PA06B_ADC_AIN6 1
|
||||
#define PINMUX_PA06B_ADC_AIN6 ((PIN_PA06B_ADC_AIN6 << 16) | MUX_PA06B_ADC_AIN6)
|
||||
#define PORT_PA06B_ADC_AIN6 (1u << 6)
|
||||
#define PIN_PA07B_ADC_AIN7 7 /**< \brief ADC signal: AIN7 on PA07 mux B */
|
||||
#define MUX_PA07B_ADC_AIN7 1
|
||||
#define PINMUX_PA07B_ADC_AIN7 ((PIN_PA07B_ADC_AIN7 << 16) | MUX_PA07B_ADC_AIN7)
|
||||
#define PORT_PA07B_ADC_AIN7 (1u << 7)
|
||||
#define PIN_PA08B_ADC_AIN16 8 /**< \brief ADC signal: AIN16 on PA08 mux B */
|
||||
#define MUX_PA08B_ADC_AIN16 1
|
||||
#define PINMUX_PA08B_ADC_AIN16 ((PIN_PA08B_ADC_AIN16 << 16) | MUX_PA08B_ADC_AIN16)
|
||||
#define PORT_PA08B_ADC_AIN16 (1u << 8)
|
||||
#define PIN_PA09B_ADC_AIN17 9 /**< \brief ADC signal: AIN17 on PA09 mux B */
|
||||
#define MUX_PA09B_ADC_AIN17 1
|
||||
#define PINMUX_PA09B_ADC_AIN17 ((PIN_PA09B_ADC_AIN17 << 16) | MUX_PA09B_ADC_AIN17)
|
||||
#define PORT_PA09B_ADC_AIN17 (1u << 9)
|
||||
#define PIN_PA10B_ADC_AIN18 10 /**< \brief ADC signal: AIN18 on PA10 mux B */
|
||||
#define MUX_PA10B_ADC_AIN18 1
|
||||
#define PINMUX_PA10B_ADC_AIN18 ((PIN_PA10B_ADC_AIN18 << 16) | MUX_PA10B_ADC_AIN18)
|
||||
#define PORT_PA10B_ADC_AIN18 (1u << 10)
|
||||
#define PIN_PA11B_ADC_AIN19 11 /**< \brief ADC signal: AIN19 on PA11 mux B */
|
||||
#define MUX_PA11B_ADC_AIN19 1
|
||||
#define PINMUX_PA11B_ADC_AIN19 ((PIN_PA11B_ADC_AIN19 << 16) | MUX_PA11B_ADC_AIN19)
|
||||
#define PORT_PA11B_ADC_AIN19 (1u << 11)
|
||||
#define PIN_PA04B_ADC_VREFP 4 /**< \brief ADC signal: VREFP on PA04 mux B */
|
||||
#define MUX_PA04B_ADC_VREFP 1
|
||||
#define PINMUX_PA04B_ADC_VREFP ((PIN_PA04B_ADC_VREFP << 16) | MUX_PA04B_ADC_VREFP)
|
||||
#define PORT_PA04B_ADC_VREFP (1u << 4)
|
||||
/* ========== PORT definition for AC peripheral ========== */
|
||||
#define PIN_PA04B_AC_AIN0 4 /**< \brief AC signal: AIN0 on PA04 mux B */
|
||||
#define MUX_PA04B_AC_AIN0 1
|
||||
#define PINMUX_PA04B_AC_AIN0 ((PIN_PA04B_AC_AIN0 << 16) | MUX_PA04B_AC_AIN0)
|
||||
#define PORT_PA04B_AC_AIN0 (1u << 4)
|
||||
#define PIN_PA05B_AC_AIN1 5 /**< \brief AC signal: AIN1 on PA05 mux B */
|
||||
#define MUX_PA05B_AC_AIN1 1
|
||||
#define PINMUX_PA05B_AC_AIN1 ((PIN_PA05B_AC_AIN1 << 16) | MUX_PA05B_AC_AIN1)
|
||||
#define PORT_PA05B_AC_AIN1 (1u << 5)
|
||||
#define PIN_PA06B_AC_AIN2 6 /**< \brief AC signal: AIN2 on PA06 mux B */
|
||||
#define MUX_PA06B_AC_AIN2 1
|
||||
#define PINMUX_PA06B_AC_AIN2 ((PIN_PA06B_AC_AIN2 << 16) | MUX_PA06B_AC_AIN2)
|
||||
#define PORT_PA06B_AC_AIN2 (1u << 6)
|
||||
#define PIN_PA07B_AC_AIN3 7 /**< \brief AC signal: AIN3 on PA07 mux B */
|
||||
#define MUX_PA07B_AC_AIN3 1
|
||||
#define PINMUX_PA07B_AC_AIN3 ((PIN_PA07B_AC_AIN3 << 16) | MUX_PA07B_AC_AIN3)
|
||||
#define PORT_PA07B_AC_AIN3 (1u << 7)
|
||||
#define PIN_PA18H_AC_CMP0 18 /**< \brief AC signal: CMP0 on PA18 mux H */
|
||||
#define MUX_PA18H_AC_CMP0 7
|
||||
#define PINMUX_PA18H_AC_CMP0 ((PIN_PA18H_AC_CMP0 << 16) | MUX_PA18H_AC_CMP0)
|
||||
#define PORT_PA18H_AC_CMP0 (1u << 18)
|
||||
#define PIN_PA19H_AC_CMP1 19 /**< \brief AC signal: CMP1 on PA19 mux H */
|
||||
#define MUX_PA19H_AC_CMP1 7
|
||||
#define PINMUX_PA19H_AC_CMP1 ((PIN_PA19H_AC_CMP1 << 16) | MUX_PA19H_AC_CMP1)
|
||||
#define PORT_PA19H_AC_CMP1 (1u << 19)
|
||||
/* ========== PORT definition for DAC peripheral ========== */
|
||||
#define PIN_PA02B_DAC_VOUT 2 /**< \brief DAC signal: VOUT on PA02 mux B */
|
||||
#define MUX_PA02B_DAC_VOUT 1
|
||||
#define PINMUX_PA02B_DAC_VOUT ((PIN_PA02B_DAC_VOUT << 16) | MUX_PA02B_DAC_VOUT)
|
||||
#define PORT_PA02B_DAC_VOUT (1u << 2)
|
||||
#define PIN_PA03B_DAC_VREFP 3 /**< \brief DAC signal: VREFP on PA03 mux B */
|
||||
#define MUX_PA03B_DAC_VREFP 1
|
||||
#define PINMUX_PA03B_DAC_VREFP ((PIN_PA03B_DAC_VREFP << 16) | MUX_PA03B_DAC_VREFP)
|
||||
#define PORT_PA03B_DAC_VREFP (1u << 3)
|
||||
|
||||
#endif /* _SAMD20E18_PIO_ */
|
|
@ -0,0 +1,812 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Peripheral I/O description for SAMD20G14
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20G14_PIO_
|
||||
#define _SAMD20G14_PIO_
|
||||
|
||||
#define PIN_PA00 0 /**< \brief Pin Number for PA00 */
|
||||
#define PORT_PA00 (1u << 0) /**< \brief PORT Mask for PA00 */
|
||||
#define PIN_PA01 1 /**< \brief Pin Number for PA01 */
|
||||
#define PORT_PA01 (1u << 1) /**< \brief PORT Mask for PA01 */
|
||||
#define PIN_PA02 2 /**< \brief Pin Number for PA02 */
|
||||
#define PORT_PA02 (1u << 2) /**< \brief PORT Mask for PA02 */
|
||||
#define PIN_PA03 3 /**< \brief Pin Number for PA03 */
|
||||
#define PORT_PA03 (1u << 3) /**< \brief PORT Mask for PA03 */
|
||||
#define PIN_PA04 4 /**< \brief Pin Number for PA04 */
|
||||
#define PORT_PA04 (1u << 4) /**< \brief PORT Mask for PA04 */
|
||||
#define PIN_PA05 5 /**< \brief Pin Number for PA05 */
|
||||
#define PORT_PA05 (1u << 5) /**< \brief PORT Mask for PA05 */
|
||||
#define PIN_PA06 6 /**< \brief Pin Number for PA06 */
|
||||
#define PORT_PA06 (1u << 6) /**< \brief PORT Mask for PA06 */
|
||||
#define PIN_PA07 7 /**< \brief Pin Number for PA07 */
|
||||
#define PORT_PA07 (1u << 7) /**< \brief PORT Mask for PA07 */
|
||||
#define PIN_PA08 8 /**< \brief Pin Number for PA08 */
|
||||
#define PORT_PA08 (1u << 8) /**< \brief PORT Mask for PA08 */
|
||||
#define PIN_PA09 9 /**< \brief Pin Number for PA09 */
|
||||
#define PORT_PA09 (1u << 9) /**< \brief PORT Mask for PA09 */
|
||||
#define PIN_PA10 10 /**< \brief Pin Number for PA10 */
|
||||
#define PORT_PA10 (1u << 10) /**< \brief PORT Mask for PA10 */
|
||||
#define PIN_PA11 11 /**< \brief Pin Number for PA11 */
|
||||
#define PORT_PA11 (1u << 11) /**< \brief PORT Mask for PA11 */
|
||||
#define PIN_PA12 12 /**< \brief Pin Number for PA12 */
|
||||
#define PORT_PA12 (1u << 12) /**< \brief PORT Mask for PA12 */
|
||||
#define PIN_PA13 13 /**< \brief Pin Number for PA13 */
|
||||
#define PORT_PA13 (1u << 13) /**< \brief PORT Mask for PA13 */
|
||||
#define PIN_PA14 14 /**< \brief Pin Number for PA14 */
|
||||
#define PORT_PA14 (1u << 14) /**< \brief PORT Mask for PA14 */
|
||||
#define PIN_PA15 15 /**< \brief Pin Number for PA15 */
|
||||
#define PORT_PA15 (1u << 15) /**< \brief PORT Mask for PA15 */
|
||||
#define PIN_PA16 16 /**< \brief Pin Number for PA16 */
|
||||
#define PORT_PA16 (1u << 16) /**< \brief PORT Mask for PA16 */
|
||||
#define PIN_PA17 17 /**< \brief Pin Number for PA17 */
|
||||
#define PORT_PA17 (1u << 17) /**< \brief PORT Mask for PA17 */
|
||||
#define PIN_PA18 18 /**< \brief Pin Number for PA18 */
|
||||
#define PORT_PA18 (1u << 18) /**< \brief PORT Mask for PA18 */
|
||||
#define PIN_PA19 19 /**< \brief Pin Number for PA19 */
|
||||
#define PORT_PA19 (1u << 19) /**< \brief PORT Mask for PA19 */
|
||||
#define PIN_PA20 20 /**< \brief Pin Number for PA20 */
|
||||
#define PORT_PA20 (1u << 20) /**< \brief PORT Mask for PA20 */
|
||||
#define PIN_PA21 21 /**< \brief Pin Number for PA21 */
|
||||
#define PORT_PA21 (1u << 21) /**< \brief PORT Mask for PA21 */
|
||||
#define PIN_PA22 22 /**< \brief Pin Number for PA22 */
|
||||
#define PORT_PA22 (1u << 22) /**< \brief PORT Mask for PA22 */
|
||||
#define PIN_PA23 23 /**< \brief Pin Number for PA23 */
|
||||
#define PORT_PA23 (1u << 23) /**< \brief PORT Mask for PA23 */
|
||||
#define PIN_PA24 24 /**< \brief Pin Number for PA24 */
|
||||
#define PORT_PA24 (1u << 24) /**< \brief PORT Mask for PA24 */
|
||||
#define PIN_PA25 25 /**< \brief Pin Number for PA25 */
|
||||
#define PORT_PA25 (1u << 25) /**< \brief PORT Mask for PA25 */
|
||||
#define PIN_PA27 27 /**< \brief Pin Number for PA27 */
|
||||
#define PORT_PA27 (1u << 27) /**< \brief PORT Mask for PA27 */
|
||||
#define PIN_PA28 28 /**< \brief Pin Number for PA28 */
|
||||
#define PORT_PA28 (1u << 28) /**< \brief PORT Mask for PA28 */
|
||||
#define PIN_PA30 30 /**< \brief Pin Number for PA30 */
|
||||
#define PORT_PA30 (1u << 30) /**< \brief PORT Mask for PA30 */
|
||||
#define PIN_PA31 31 /**< \brief Pin Number for PA31 */
|
||||
#define PORT_PA31 (1u << 31) /**< \brief PORT Mask for PA31 */
|
||||
#define PIN_PB02 34 /**< \brief Pin Number for PB02 */
|
||||
#define PORT_PB02 (1u << 2) /**< \brief PORT Mask for PB02 */
|
||||
#define PIN_PB03 35 /**< \brief Pin Number for PB03 */
|
||||
#define PORT_PB03 (1u << 3) /**< \brief PORT Mask for PB03 */
|
||||
#define PIN_PB08 40 /**< \brief Pin Number for PB08 */
|
||||
#define PORT_PB08 (1u << 8) /**< \brief PORT Mask for PB08 */
|
||||
#define PIN_PB09 41 /**< \brief Pin Number for PB09 */
|
||||
#define PORT_PB09 (1u << 9) /**< \brief PORT Mask for PB09 */
|
||||
#define PIN_PB10 42 /**< \brief Pin Number for PB10 */
|
||||
#define PORT_PB10 (1u << 10) /**< \brief PORT Mask for PB10 */
|
||||
#define PIN_PB11 43 /**< \brief Pin Number for PB11 */
|
||||
#define PORT_PB11 (1u << 11) /**< \brief PORT Mask for PB11 */
|
||||
#define PIN_PB22 54 /**< \brief Pin Number for PB22 */
|
||||
#define PORT_PB22 (1u << 22) /**< \brief PORT Mask for PB22 */
|
||||
#define PIN_PB23 55 /**< \brief Pin Number for PB23 */
|
||||
#define PORT_PB23 (1u << 23) /**< \brief PORT Mask for PB23 */
|
||||
/* ========== PORT definition for CORE peripheral ========== */
|
||||
#define PIN_PA30G_CORE_SWCLK 30 /**< \brief CORE signal: SWCLK on PA30 mux G */
|
||||
#define MUX_PA30G_CORE_SWCLK 6
|
||||
#define PINMUX_PA30G_CORE_SWCLK ((PIN_PA30G_CORE_SWCLK << 16) | MUX_PA30G_CORE_SWCLK)
|
||||
#define PORT_PA30G_CORE_SWCLK (1u << 30)
|
||||
/* ========== PORT definition for GCLK peripheral ========== */
|
||||
#define PIN_PB22H_GCLK_IO0 54 /**< \brief GCLK signal: IO0 on PB22 mux H */
|
||||
#define MUX_PB22H_GCLK_IO0 7
|
||||
#define PINMUX_PB22H_GCLK_IO0 ((PIN_PB22H_GCLK_IO0 << 16) | MUX_PB22H_GCLK_IO0)
|
||||
#define PORT_PB22H_GCLK_IO0 (1u << 22)
|
||||
#define PIN_PA14H_GCLK_IO0 14 /**< \brief GCLK signal: IO0 on PA14 mux H */
|
||||
#define MUX_PA14H_GCLK_IO0 7
|
||||
#define PINMUX_PA14H_GCLK_IO0 ((PIN_PA14H_GCLK_IO0 << 16) | MUX_PA14H_GCLK_IO0)
|
||||
#define PORT_PA14H_GCLK_IO0 (1u << 14)
|
||||
#define PIN_PA27H_GCLK_IO0 27 /**< \brief GCLK signal: IO0 on PA27 mux H */
|
||||
#define MUX_PA27H_GCLK_IO0 7
|
||||
#define PINMUX_PA27H_GCLK_IO0 ((PIN_PA27H_GCLK_IO0 << 16) | MUX_PA27H_GCLK_IO0)
|
||||
#define PORT_PA27H_GCLK_IO0 (1u << 27)
|
||||
#define PIN_PA28H_GCLK_IO0 28 /**< \brief GCLK signal: IO0 on PA28 mux H */
|
||||
#define MUX_PA28H_GCLK_IO0 7
|
||||
#define PINMUX_PA28H_GCLK_IO0 ((PIN_PA28H_GCLK_IO0 << 16) | MUX_PA28H_GCLK_IO0)
|
||||
#define PORT_PA28H_GCLK_IO0 (1u << 28)
|
||||
#define PIN_PA30H_GCLK_IO0 30 /**< \brief GCLK signal: IO0 on PA30 mux H */
|
||||
#define MUX_PA30H_GCLK_IO0 7
|
||||
#define PINMUX_PA30H_GCLK_IO0 ((PIN_PA30H_GCLK_IO0 << 16) | MUX_PA30H_GCLK_IO0)
|
||||
#define PORT_PA30H_GCLK_IO0 (1u << 30)
|
||||
#define PIN_PB23H_GCLK_IO1 55 /**< \brief GCLK signal: IO1 on PB23 mux H */
|
||||
#define MUX_PB23H_GCLK_IO1 7
|
||||
#define PINMUX_PB23H_GCLK_IO1 ((PIN_PB23H_GCLK_IO1 << 16) | MUX_PB23H_GCLK_IO1)
|
||||
#define PORT_PB23H_GCLK_IO1 (1u << 23)
|
||||
#define PIN_PA15H_GCLK_IO1 15 /**< \brief GCLK signal: IO1 on PA15 mux H */
|
||||
#define MUX_PA15H_GCLK_IO1 7
|
||||
#define PINMUX_PA15H_GCLK_IO1 ((PIN_PA15H_GCLK_IO1 << 16) | MUX_PA15H_GCLK_IO1)
|
||||
#define PORT_PA15H_GCLK_IO1 (1u << 15)
|
||||
#define PIN_PA16H_GCLK_IO2 16 /**< \brief GCLK signal: IO2 on PA16 mux H */
|
||||
#define MUX_PA16H_GCLK_IO2 7
|
||||
#define PINMUX_PA16H_GCLK_IO2 ((PIN_PA16H_GCLK_IO2 << 16) | MUX_PA16H_GCLK_IO2)
|
||||
#define PORT_PA16H_GCLK_IO2 (1u << 16)
|
||||
#define PIN_PA17H_GCLK_IO3 17 /**< \brief GCLK signal: IO3 on PA17 mux H */
|
||||
#define MUX_PA17H_GCLK_IO3 7
|
||||
#define PINMUX_PA17H_GCLK_IO3 ((PIN_PA17H_GCLK_IO3 << 16) | MUX_PA17H_GCLK_IO3)
|
||||
#define PORT_PA17H_GCLK_IO3 (1u << 17)
|
||||
#define PIN_PA10H_GCLK_IO4 10 /**< \brief GCLK signal: IO4 on PA10 mux H */
|
||||
#define MUX_PA10H_GCLK_IO4 7
|
||||
#define PINMUX_PA10H_GCLK_IO4 ((PIN_PA10H_GCLK_IO4 << 16) | MUX_PA10H_GCLK_IO4)
|
||||
#define PORT_PA10H_GCLK_IO4 (1u << 10)
|
||||
#define PIN_PA20H_GCLK_IO4 20 /**< \brief GCLK signal: IO4 on PA20 mux H */
|
||||
#define MUX_PA20H_GCLK_IO4 7
|
||||
#define PINMUX_PA20H_GCLK_IO4 ((PIN_PA20H_GCLK_IO4 << 16) | MUX_PA20H_GCLK_IO4)
|
||||
#define PORT_PA20H_GCLK_IO4 (1u << 20)
|
||||
#define PIN_PB10H_GCLK_IO4 42 /**< \brief GCLK signal: IO4 on PB10 mux H */
|
||||
#define MUX_PB10H_GCLK_IO4 7
|
||||
#define PINMUX_PB10H_GCLK_IO4 ((PIN_PB10H_GCLK_IO4 << 16) | MUX_PB10H_GCLK_IO4)
|
||||
#define PORT_PB10H_GCLK_IO4 (1u << 10)
|
||||
#define PIN_PA11H_GCLK_IO5 11 /**< \brief GCLK signal: IO5 on PA11 mux H */
|
||||
#define MUX_PA11H_GCLK_IO5 7
|
||||
#define PINMUX_PA11H_GCLK_IO5 ((PIN_PA11H_GCLK_IO5 << 16) | MUX_PA11H_GCLK_IO5)
|
||||
#define PORT_PA11H_GCLK_IO5 (1u << 11)
|
||||
#define PIN_PA21H_GCLK_IO5 21 /**< \brief GCLK signal: IO5 on PA21 mux H */
|
||||
#define MUX_PA21H_GCLK_IO5 7
|
||||
#define PINMUX_PA21H_GCLK_IO5 ((PIN_PA21H_GCLK_IO5 << 16) | MUX_PA21H_GCLK_IO5)
|
||||
#define PORT_PA21H_GCLK_IO5 (1u << 21)
|
||||
#define PIN_PB11H_GCLK_IO5 43 /**< \brief GCLK signal: IO5 on PB11 mux H */
|
||||
#define MUX_PB11H_GCLK_IO5 7
|
||||
#define PINMUX_PB11H_GCLK_IO5 ((PIN_PB11H_GCLK_IO5 << 16) | MUX_PB11H_GCLK_IO5)
|
||||
#define PORT_PB11H_GCLK_IO5 (1u << 11)
|
||||
#define PIN_PA22H_GCLK_IO6 22 /**< \brief GCLK signal: IO6 on PA22 mux H */
|
||||
#define MUX_PA22H_GCLK_IO6 7
|
||||
#define PINMUX_PA22H_GCLK_IO6 ((PIN_PA22H_GCLK_IO6 << 16) | MUX_PA22H_GCLK_IO6)
|
||||
#define PORT_PA22H_GCLK_IO6 (1u << 22)
|
||||
#define PIN_PA23H_GCLK_IO7 23 /**< \brief GCLK signal: IO7 on PA23 mux H */
|
||||
#define MUX_PA23H_GCLK_IO7 7
|
||||
#define PINMUX_PA23H_GCLK_IO7 ((PIN_PA23H_GCLK_IO7 << 16) | MUX_PA23H_GCLK_IO7)
|
||||
#define PORT_PA23H_GCLK_IO7 (1u << 23)
|
||||
/* ========== PORT definition for EIC peripheral ========== */
|
||||
#define PIN_PA16A_EIC_EXTINT0 16 /**< \brief EIC signal: EXTINT0 on PA16 mux A */
|
||||
#define MUX_PA16A_EIC_EXTINT0 0
|
||||
#define PINMUX_PA16A_EIC_EXTINT0 ((PIN_PA16A_EIC_EXTINT0 << 16) | MUX_PA16A_EIC_EXTINT0)
|
||||
#define PORT_PA16A_EIC_EXTINT0 (1u << 16)
|
||||
#define PIN_PA00A_EIC_EXTINT0 0 /**< \brief EIC signal: EXTINT0 on PA00 mux A */
|
||||
#define MUX_PA00A_EIC_EXTINT0 0
|
||||
#define PINMUX_PA00A_EIC_EXTINT0 ((PIN_PA00A_EIC_EXTINT0 << 16) | MUX_PA00A_EIC_EXTINT0)
|
||||
#define PORT_PA00A_EIC_EXTINT0 (1u << 0)
|
||||
#define PIN_PA17A_EIC_EXTINT1 17 /**< \brief EIC signal: EXTINT1 on PA17 mux A */
|
||||
#define MUX_PA17A_EIC_EXTINT1 0
|
||||
#define PINMUX_PA17A_EIC_EXTINT1 ((PIN_PA17A_EIC_EXTINT1 << 16) | MUX_PA17A_EIC_EXTINT1)
|
||||
#define PORT_PA17A_EIC_EXTINT1 (1u << 17)
|
||||
#define PIN_PA01A_EIC_EXTINT1 1 /**< \brief EIC signal: EXTINT1 on PA01 mux A */
|
||||
#define MUX_PA01A_EIC_EXTINT1 0
|
||||
#define PINMUX_PA01A_EIC_EXTINT1 ((PIN_PA01A_EIC_EXTINT1 << 16) | MUX_PA01A_EIC_EXTINT1)
|
||||
#define PORT_PA01A_EIC_EXTINT1 (1u << 1)
|
||||
#define PIN_PA02A_EIC_EXTINT2 2 /**< \brief EIC signal: EXTINT2 on PA02 mux A */
|
||||
#define MUX_PA02A_EIC_EXTINT2 0
|
||||
#define PINMUX_PA02A_EIC_EXTINT2 ((PIN_PA02A_EIC_EXTINT2 << 16) | MUX_PA02A_EIC_EXTINT2)
|
||||
#define PORT_PA02A_EIC_EXTINT2 (1u << 2)
|
||||
#define PIN_PA18A_EIC_EXTINT2 18 /**< \brief EIC signal: EXTINT2 on PA18 mux A */
|
||||
#define MUX_PA18A_EIC_EXTINT2 0
|
||||
#define PINMUX_PA18A_EIC_EXTINT2 ((PIN_PA18A_EIC_EXTINT2 << 16) | MUX_PA18A_EIC_EXTINT2)
|
||||
#define PORT_PA18A_EIC_EXTINT2 (1u << 18)
|
||||
#define PIN_PB02A_EIC_EXTINT2 34 /**< \brief EIC signal: EXTINT2 on PB02 mux A */
|
||||
#define MUX_PB02A_EIC_EXTINT2 0
|
||||
#define PINMUX_PB02A_EIC_EXTINT2 ((PIN_PB02A_EIC_EXTINT2 << 16) | MUX_PB02A_EIC_EXTINT2)
|
||||
#define PORT_PB02A_EIC_EXTINT2 (1u << 2)
|
||||
#define PIN_PA03A_EIC_EXTINT3 3 /**< \brief EIC signal: EXTINT3 on PA03 mux A */
|
||||
#define MUX_PA03A_EIC_EXTINT3 0
|
||||
#define PINMUX_PA03A_EIC_EXTINT3 ((PIN_PA03A_EIC_EXTINT3 << 16) | MUX_PA03A_EIC_EXTINT3)
|
||||
#define PORT_PA03A_EIC_EXTINT3 (1u << 3)
|
||||
#define PIN_PA19A_EIC_EXTINT3 19 /**< \brief EIC signal: EXTINT3 on PA19 mux A */
|
||||
#define MUX_PA19A_EIC_EXTINT3 0
|
||||
#define PINMUX_PA19A_EIC_EXTINT3 ((PIN_PA19A_EIC_EXTINT3 << 16) | MUX_PA19A_EIC_EXTINT3)
|
||||
#define PORT_PA19A_EIC_EXTINT3 (1u << 19)
|
||||
#define PIN_PB03A_EIC_EXTINT3 35 /**< \brief EIC signal: EXTINT3 on PB03 mux A */
|
||||
#define MUX_PB03A_EIC_EXTINT3 0
|
||||
#define PINMUX_PB03A_EIC_EXTINT3 ((PIN_PB03A_EIC_EXTINT3 << 16) | MUX_PB03A_EIC_EXTINT3)
|
||||
#define PORT_PB03A_EIC_EXTINT3 (1u << 3)
|
||||
#define PIN_PA04A_EIC_EXTINT4 4 /**< \brief EIC signal: EXTINT4 on PA04 mux A */
|
||||
#define MUX_PA04A_EIC_EXTINT4 0
|
||||
#define PINMUX_PA04A_EIC_EXTINT4 ((PIN_PA04A_EIC_EXTINT4 << 16) | MUX_PA04A_EIC_EXTINT4)
|
||||
#define PORT_PA04A_EIC_EXTINT4 (1u << 4)
|
||||
#define PIN_PA20A_EIC_EXTINT4 20 /**< \brief EIC signal: EXTINT4 on PA20 mux A */
|
||||
#define MUX_PA20A_EIC_EXTINT4 0
|
||||
#define PINMUX_PA20A_EIC_EXTINT4 ((PIN_PA20A_EIC_EXTINT4 << 16) | MUX_PA20A_EIC_EXTINT4)
|
||||
#define PORT_PA20A_EIC_EXTINT4 (1u << 20)
|
||||
#define PIN_PA05A_EIC_EXTINT5 5 /**< \brief EIC signal: EXTINT5 on PA05 mux A */
|
||||
#define MUX_PA05A_EIC_EXTINT5 0
|
||||
#define PINMUX_PA05A_EIC_EXTINT5 ((PIN_PA05A_EIC_EXTINT5 << 16) | MUX_PA05A_EIC_EXTINT5)
|
||||
#define PORT_PA05A_EIC_EXTINT5 (1u << 5)
|
||||
#define PIN_PA21A_EIC_EXTINT5 21 /**< \brief EIC signal: EXTINT5 on PA21 mux A */
|
||||
#define MUX_PA21A_EIC_EXTINT5 0
|
||||
#define PINMUX_PA21A_EIC_EXTINT5 ((PIN_PA21A_EIC_EXTINT5 << 16) | MUX_PA21A_EIC_EXTINT5)
|
||||
#define PORT_PA21A_EIC_EXTINT5 (1u << 21)
|
||||
#define PIN_PA06A_EIC_EXTINT6 6 /**< \brief EIC signal: EXTINT6 on PA06 mux A */
|
||||
#define MUX_PA06A_EIC_EXTINT6 0
|
||||
#define PINMUX_PA06A_EIC_EXTINT6 ((PIN_PA06A_EIC_EXTINT6 << 16) | MUX_PA06A_EIC_EXTINT6)
|
||||
#define PORT_PA06A_EIC_EXTINT6 (1u << 6)
|
||||
#define PIN_PA22A_EIC_EXTINT6 22 /**< \brief EIC signal: EXTINT6 on PA22 mux A */
|
||||
#define MUX_PA22A_EIC_EXTINT6 0
|
||||
#define PINMUX_PA22A_EIC_EXTINT6 ((PIN_PA22A_EIC_EXTINT6 << 16) | MUX_PA22A_EIC_EXTINT6)
|
||||
#define PORT_PA22A_EIC_EXTINT6 (1u << 22)
|
||||
#define PIN_PB22A_EIC_EXTINT6 54 /**< \brief EIC signal: EXTINT6 on PB22 mux A */
|
||||
#define MUX_PB22A_EIC_EXTINT6 0
|
||||
#define PINMUX_PB22A_EIC_EXTINT6 ((PIN_PB22A_EIC_EXTINT6 << 16) | MUX_PB22A_EIC_EXTINT6)
|
||||
#define PORT_PB22A_EIC_EXTINT6 (1u << 22)
|
||||
#define PIN_PA07A_EIC_EXTINT7 7 /**< \brief EIC signal: EXTINT7 on PA07 mux A */
|
||||
#define MUX_PA07A_EIC_EXTINT7 0
|
||||
#define PINMUX_PA07A_EIC_EXTINT7 ((PIN_PA07A_EIC_EXTINT7 << 16) | MUX_PA07A_EIC_EXTINT7)
|
||||
#define PORT_PA07A_EIC_EXTINT7 (1u << 7)
|
||||
#define PIN_PA23A_EIC_EXTINT7 23 /**< \brief EIC signal: EXTINT7 on PA23 mux A */
|
||||
#define MUX_PA23A_EIC_EXTINT7 0
|
||||
#define PINMUX_PA23A_EIC_EXTINT7 ((PIN_PA23A_EIC_EXTINT7 << 16) | MUX_PA23A_EIC_EXTINT7)
|
||||
#define PORT_PA23A_EIC_EXTINT7 (1u << 23)
|
||||
#define PIN_PB23A_EIC_EXTINT7 55 /**< \brief EIC signal: EXTINT7 on PB23 mux A */
|
||||
#define MUX_PB23A_EIC_EXTINT7 0
|
||||
#define PINMUX_PB23A_EIC_EXTINT7 ((PIN_PB23A_EIC_EXTINT7 << 16) | MUX_PB23A_EIC_EXTINT7)
|
||||
#define PORT_PB23A_EIC_EXTINT7 (1u << 23)
|
||||
#define PIN_PA28A_EIC_EXTINT8 28 /**< \brief EIC signal: EXTINT8 on PA28 mux A */
|
||||
#define MUX_PA28A_EIC_EXTINT8 0
|
||||
#define PINMUX_PA28A_EIC_EXTINT8 ((PIN_PA28A_EIC_EXTINT8 << 16) | MUX_PA28A_EIC_EXTINT8)
|
||||
#define PORT_PA28A_EIC_EXTINT8 (1u << 28)
|
||||
#define PIN_PB08A_EIC_EXTINT8 40 /**< \brief EIC signal: EXTINT8 on PB08 mux A */
|
||||
#define MUX_PB08A_EIC_EXTINT8 0
|
||||
#define PINMUX_PB08A_EIC_EXTINT8 ((PIN_PB08A_EIC_EXTINT8 << 16) | MUX_PB08A_EIC_EXTINT8)
|
||||
#define PORT_PB08A_EIC_EXTINT8 (1u << 8)
|
||||
#define PIN_PA09A_EIC_EXTINT9 9 /**< \brief EIC signal: EXTINT9 on PA09 mux A */
|
||||
#define MUX_PA09A_EIC_EXTINT9 0
|
||||
#define PINMUX_PA09A_EIC_EXTINT9 ((PIN_PA09A_EIC_EXTINT9 << 16) | MUX_PA09A_EIC_EXTINT9)
|
||||
#define PORT_PA09A_EIC_EXTINT9 (1u << 9)
|
||||
#define PIN_PB09A_EIC_EXTINT9 41 /**< \brief EIC signal: EXTINT9 on PB09 mux A */
|
||||
#define MUX_PB09A_EIC_EXTINT9 0
|
||||
#define PINMUX_PB09A_EIC_EXTINT9 ((PIN_PB09A_EIC_EXTINT9 << 16) | MUX_PB09A_EIC_EXTINT9)
|
||||
#define PORT_PB09A_EIC_EXTINT9 (1u << 9)
|
||||
#define PIN_PA10A_EIC_EXTINT10 10 /**< \brief EIC signal: EXTINT10 on PA10 mux A */
|
||||
#define MUX_PA10A_EIC_EXTINT10 0
|
||||
#define PINMUX_PA10A_EIC_EXTINT10 ((PIN_PA10A_EIC_EXTINT10 << 16) | MUX_PA10A_EIC_EXTINT10)
|
||||
#define PORT_PA10A_EIC_EXTINT10 (1u << 10)
|
||||
#define PIN_PA30A_EIC_EXTINT10 30 /**< \brief EIC signal: EXTINT10 on PA30 mux A */
|
||||
#define MUX_PA30A_EIC_EXTINT10 0
|
||||
#define PINMUX_PA30A_EIC_EXTINT10 ((PIN_PA30A_EIC_EXTINT10 << 16) | MUX_PA30A_EIC_EXTINT10)
|
||||
#define PORT_PA30A_EIC_EXTINT10 (1u << 30)
|
||||
#define PIN_PB10A_EIC_EXTINT10 42 /**< \brief EIC signal: EXTINT10 on PB10 mux A */
|
||||
#define MUX_PB10A_EIC_EXTINT10 0
|
||||
#define PINMUX_PB10A_EIC_EXTINT10 ((PIN_PB10A_EIC_EXTINT10 << 16) | MUX_PB10A_EIC_EXTINT10)
|
||||
#define PORT_PB10A_EIC_EXTINT10 (1u << 10)
|
||||
#define PIN_PA11A_EIC_EXTINT11 11 /**< \brief EIC signal: EXTINT11 on PA11 mux A */
|
||||
#define MUX_PA11A_EIC_EXTINT11 0
|
||||
#define PINMUX_PA11A_EIC_EXTINT11 ((PIN_PA11A_EIC_EXTINT11 << 16) | MUX_PA11A_EIC_EXTINT11)
|
||||
#define PORT_PA11A_EIC_EXTINT11 (1u << 11)
|
||||
#define PIN_PA31A_EIC_EXTINT11 31 /**< \brief EIC signal: EXTINT11 on PA31 mux A */
|
||||
#define MUX_PA31A_EIC_EXTINT11 0
|
||||
#define PINMUX_PA31A_EIC_EXTINT11 ((PIN_PA31A_EIC_EXTINT11 << 16) | MUX_PA31A_EIC_EXTINT11)
|
||||
#define PORT_PA31A_EIC_EXTINT11 (1u << 31)
|
||||
#define PIN_PB11A_EIC_EXTINT11 43 /**< \brief EIC signal: EXTINT11 on PB11 mux A */
|
||||
#define MUX_PB11A_EIC_EXTINT11 0
|
||||
#define PINMUX_PB11A_EIC_EXTINT11 ((PIN_PB11A_EIC_EXTINT11 << 16) | MUX_PB11A_EIC_EXTINT11)
|
||||
#define PORT_PB11A_EIC_EXTINT11 (1u << 11)
|
||||
#define PIN_PA12A_EIC_EXTINT12 12 /**< \brief EIC signal: EXTINT12 on PA12 mux A */
|
||||
#define MUX_PA12A_EIC_EXTINT12 0
|
||||
#define PINMUX_PA12A_EIC_EXTINT12 ((PIN_PA12A_EIC_EXTINT12 << 16) | MUX_PA12A_EIC_EXTINT12)
|
||||
#define PORT_PA12A_EIC_EXTINT12 (1u << 12)
|
||||
#define PIN_PA24A_EIC_EXTINT12 24 /**< \brief EIC signal: EXTINT12 on PA24 mux A */
|
||||
#define MUX_PA24A_EIC_EXTINT12 0
|
||||
#define PINMUX_PA24A_EIC_EXTINT12 ((PIN_PA24A_EIC_EXTINT12 << 16) | MUX_PA24A_EIC_EXTINT12)
|
||||
#define PORT_PA24A_EIC_EXTINT12 (1u << 24)
|
||||
#define PIN_PA13A_EIC_EXTINT13 13 /**< \brief EIC signal: EXTINT13 on PA13 mux A */
|
||||
#define MUX_PA13A_EIC_EXTINT13 0
|
||||
#define PINMUX_PA13A_EIC_EXTINT13 ((PIN_PA13A_EIC_EXTINT13 << 16) | MUX_PA13A_EIC_EXTINT13)
|
||||
#define PORT_PA13A_EIC_EXTINT13 (1u << 13)
|
||||
#define PIN_PA25A_EIC_EXTINT13 25 /**< \brief EIC signal: EXTINT13 on PA25 mux A */
|
||||
#define MUX_PA25A_EIC_EXTINT13 0
|
||||
#define PINMUX_PA25A_EIC_EXTINT13 ((PIN_PA25A_EIC_EXTINT13 << 16) | MUX_PA25A_EIC_EXTINT13)
|
||||
#define PORT_PA25A_EIC_EXTINT13 (1u << 25)
|
||||
#define PIN_PA14A_EIC_EXTINT14 14 /**< \brief EIC signal: EXTINT14 on PA14 mux A */
|
||||
#define MUX_PA14A_EIC_EXTINT14 0
|
||||
#define PINMUX_PA14A_EIC_EXTINT14 ((PIN_PA14A_EIC_EXTINT14 << 16) | MUX_PA14A_EIC_EXTINT14)
|
||||
#define PORT_PA14A_EIC_EXTINT14 (1u << 14)
|
||||
#define PIN_PA27A_EIC_EXTINT15 27 /**< \brief EIC signal: EXTINT15 on PA27 mux A */
|
||||
#define MUX_PA27A_EIC_EXTINT15 0
|
||||
#define PINMUX_PA27A_EIC_EXTINT15 ((PIN_PA27A_EIC_EXTINT15 << 16) | MUX_PA27A_EIC_EXTINT15)
|
||||
#define PORT_PA27A_EIC_EXTINT15 (1u << 27)
|
||||
#define PIN_PA15A_EIC_EXTINT15 15 /**< \brief EIC signal: EXTINT15 on PA15 mux A */
|
||||
#define MUX_PA15A_EIC_EXTINT15 0
|
||||
#define PINMUX_PA15A_EIC_EXTINT15 ((PIN_PA15A_EIC_EXTINT15 << 16) | MUX_PA15A_EIC_EXTINT15)
|
||||
#define PORT_PA15A_EIC_EXTINT15 (1u << 15)
|
||||
#define PIN_PA08A_EIC_NMI 8 /**< \brief EIC signal: NMI on PA08 mux A */
|
||||
#define MUX_PA08A_EIC_NMI 0
|
||||
#define PINMUX_PA08A_EIC_NMI ((PIN_PA08A_EIC_NMI << 16) | MUX_PA08A_EIC_NMI)
|
||||
#define PORT_PA08A_EIC_NMI (1u << 8)
|
||||
/* ========== PORT definition for SERCOM0 peripheral ========== */
|
||||
#define PIN_PA04D_SERCOM0_PAD0 4 /**< \brief SERCOM0 signal: PAD0 on PA04 mux D */
|
||||
#define MUX_PA04D_SERCOM0_PAD0 3
|
||||
#define PINMUX_PA04D_SERCOM0_PAD0 ((PIN_PA04D_SERCOM0_PAD0 << 16) | MUX_PA04D_SERCOM0_PAD0)
|
||||
#define PORT_PA04D_SERCOM0_PAD0 (1u << 4)
|
||||
#define PIN_PA08C_SERCOM0_PAD0 8 /**< \brief SERCOM0 signal: PAD0 on PA08 mux C */
|
||||
#define MUX_PA08C_SERCOM0_PAD0 2
|
||||
#define PINMUX_PA08C_SERCOM0_PAD0 ((PIN_PA08C_SERCOM0_PAD0 << 16) | MUX_PA08C_SERCOM0_PAD0)
|
||||
#define PORT_PA08C_SERCOM0_PAD0 (1u << 8)
|
||||
#define PIN_PA05D_SERCOM0_PAD1 5 /**< \brief SERCOM0 signal: PAD1 on PA05 mux D */
|
||||
#define MUX_PA05D_SERCOM0_PAD1 3
|
||||
#define PINMUX_PA05D_SERCOM0_PAD1 ((PIN_PA05D_SERCOM0_PAD1 << 16) | MUX_PA05D_SERCOM0_PAD1)
|
||||
#define PORT_PA05D_SERCOM0_PAD1 (1u << 5)
|
||||
#define PIN_PA09C_SERCOM0_PAD1 9 /**< \brief SERCOM0 signal: PAD1 on PA09 mux C */
|
||||
#define MUX_PA09C_SERCOM0_PAD1 2
|
||||
#define PINMUX_PA09C_SERCOM0_PAD1 ((PIN_PA09C_SERCOM0_PAD1 << 16) | MUX_PA09C_SERCOM0_PAD1)
|
||||
#define PORT_PA09C_SERCOM0_PAD1 (1u << 9)
|
||||
#define PIN_PA06D_SERCOM0_PAD2 6 /**< \brief SERCOM0 signal: PAD2 on PA06 mux D */
|
||||
#define MUX_PA06D_SERCOM0_PAD2 3
|
||||
#define PINMUX_PA06D_SERCOM0_PAD2 ((PIN_PA06D_SERCOM0_PAD2 << 16) | MUX_PA06D_SERCOM0_PAD2)
|
||||
#define PORT_PA06D_SERCOM0_PAD2 (1u << 6)
|
||||
#define PIN_PA10C_SERCOM0_PAD2 10 /**< \brief SERCOM0 signal: PAD2 on PA10 mux C */
|
||||
#define MUX_PA10C_SERCOM0_PAD2 2
|
||||
#define PINMUX_PA10C_SERCOM0_PAD2 ((PIN_PA10C_SERCOM0_PAD2 << 16) | MUX_PA10C_SERCOM0_PAD2)
|
||||
#define PORT_PA10C_SERCOM0_PAD2 (1u << 10)
|
||||
#define PIN_PA07D_SERCOM0_PAD3 7 /**< \brief SERCOM0 signal: PAD3 on PA07 mux D */
|
||||
#define MUX_PA07D_SERCOM0_PAD3 3
|
||||
#define PINMUX_PA07D_SERCOM0_PAD3 ((PIN_PA07D_SERCOM0_PAD3 << 16) | MUX_PA07D_SERCOM0_PAD3)
|
||||
#define PORT_PA07D_SERCOM0_PAD3 (1u << 7)
|
||||
#define PIN_PA11C_SERCOM0_PAD3 11 /**< \brief SERCOM0 signal: PAD3 on PA11 mux C */
|
||||
#define MUX_PA11C_SERCOM0_PAD3 2
|
||||
#define PINMUX_PA11C_SERCOM0_PAD3 ((PIN_PA11C_SERCOM0_PAD3 << 16) | MUX_PA11C_SERCOM0_PAD3)
|
||||
#define PORT_PA11C_SERCOM0_PAD3 (1u << 11)
|
||||
/* ========== PORT definition for SERCOM1 peripheral ========== */
|
||||
#define PIN_PA16C_SERCOM1_PAD0 16 /**< \brief SERCOM1 signal: PAD0 on PA16 mux C */
|
||||
#define MUX_PA16C_SERCOM1_PAD0 2
|
||||
#define PINMUX_PA16C_SERCOM1_PAD0 ((PIN_PA16C_SERCOM1_PAD0 << 16) | MUX_PA16C_SERCOM1_PAD0)
|
||||
#define PORT_PA16C_SERCOM1_PAD0 (1u << 16)
|
||||
#define PIN_PA00D_SERCOM1_PAD0 0 /**< \brief SERCOM1 signal: PAD0 on PA00 mux D */
|
||||
#define MUX_PA00D_SERCOM1_PAD0 3
|
||||
#define PINMUX_PA00D_SERCOM1_PAD0 ((PIN_PA00D_SERCOM1_PAD0 << 16) | MUX_PA00D_SERCOM1_PAD0)
|
||||
#define PORT_PA00D_SERCOM1_PAD0 (1u << 0)
|
||||
#define PIN_PA17C_SERCOM1_PAD1 17 /**< \brief SERCOM1 signal: PAD1 on PA17 mux C */
|
||||
#define MUX_PA17C_SERCOM1_PAD1 2
|
||||
#define PINMUX_PA17C_SERCOM1_PAD1 ((PIN_PA17C_SERCOM1_PAD1 << 16) | MUX_PA17C_SERCOM1_PAD1)
|
||||
#define PORT_PA17C_SERCOM1_PAD1 (1u << 17)
|
||||
#define PIN_PA01D_SERCOM1_PAD1 1 /**< \brief SERCOM1 signal: PAD1 on PA01 mux D */
|
||||
#define MUX_PA01D_SERCOM1_PAD1 3
|
||||
#define PINMUX_PA01D_SERCOM1_PAD1 ((PIN_PA01D_SERCOM1_PAD1 << 16) | MUX_PA01D_SERCOM1_PAD1)
|
||||
#define PORT_PA01D_SERCOM1_PAD1 (1u << 1)
|
||||
#define PIN_PA30D_SERCOM1_PAD2 30 /**< \brief SERCOM1 signal: PAD2 on PA30 mux D */
|
||||
#define MUX_PA30D_SERCOM1_PAD2 3
|
||||
#define PINMUX_PA30D_SERCOM1_PAD2 ((PIN_PA30D_SERCOM1_PAD2 << 16) | MUX_PA30D_SERCOM1_PAD2)
|
||||
#define PORT_PA30D_SERCOM1_PAD2 (1u << 30)
|
||||
#define PIN_PA18C_SERCOM1_PAD2 18 /**< \brief SERCOM1 signal: PAD2 on PA18 mux C */
|
||||
#define MUX_PA18C_SERCOM1_PAD2 2
|
||||
#define PINMUX_PA18C_SERCOM1_PAD2 ((PIN_PA18C_SERCOM1_PAD2 << 16) | MUX_PA18C_SERCOM1_PAD2)
|
||||
#define PORT_PA18C_SERCOM1_PAD2 (1u << 18)
|
||||
#define PIN_PA31D_SERCOM1_PAD3 31 /**< \brief SERCOM1 signal: PAD3 on PA31 mux D */
|
||||
#define MUX_PA31D_SERCOM1_PAD3 3
|
||||
#define PINMUX_PA31D_SERCOM1_PAD3 ((PIN_PA31D_SERCOM1_PAD3 << 16) | MUX_PA31D_SERCOM1_PAD3)
|
||||
#define PORT_PA31D_SERCOM1_PAD3 (1u << 31)
|
||||
#define PIN_PA19C_SERCOM1_PAD3 19 /**< \brief SERCOM1 signal: PAD3 on PA19 mux C */
|
||||
#define MUX_PA19C_SERCOM1_PAD3 2
|
||||
#define PINMUX_PA19C_SERCOM1_PAD3 ((PIN_PA19C_SERCOM1_PAD3 << 16) | MUX_PA19C_SERCOM1_PAD3)
|
||||
#define PORT_PA19C_SERCOM1_PAD3 (1u << 19)
|
||||
/* ========== PORT definition for SERCOM2 peripheral ========== */
|
||||
#define PIN_PA08D_SERCOM2_PAD0 8 /**< \brief SERCOM2 signal: PAD0 on PA08 mux D */
|
||||
#define MUX_PA08D_SERCOM2_PAD0 3
|
||||
#define PINMUX_PA08D_SERCOM2_PAD0 ((PIN_PA08D_SERCOM2_PAD0 << 16) | MUX_PA08D_SERCOM2_PAD0)
|
||||
#define PORT_PA08D_SERCOM2_PAD0 (1u << 8)
|
||||
#define PIN_PA12C_SERCOM2_PAD0 12 /**< \brief SERCOM2 signal: PAD0 on PA12 mux C */
|
||||
#define MUX_PA12C_SERCOM2_PAD0 2
|
||||
#define PINMUX_PA12C_SERCOM2_PAD0 ((PIN_PA12C_SERCOM2_PAD0 << 16) | MUX_PA12C_SERCOM2_PAD0)
|
||||
#define PORT_PA12C_SERCOM2_PAD0 (1u << 12)
|
||||
#define PIN_PA09D_SERCOM2_PAD1 9 /**< \brief SERCOM2 signal: PAD1 on PA09 mux D */
|
||||
#define MUX_PA09D_SERCOM2_PAD1 3
|
||||
#define PINMUX_PA09D_SERCOM2_PAD1 ((PIN_PA09D_SERCOM2_PAD1 << 16) | MUX_PA09D_SERCOM2_PAD1)
|
||||
#define PORT_PA09D_SERCOM2_PAD1 (1u << 9)
|
||||
#define PIN_PA13C_SERCOM2_PAD1 13 /**< \brief SERCOM2 signal: PAD1 on PA13 mux C */
|
||||
#define MUX_PA13C_SERCOM2_PAD1 2
|
||||
#define PINMUX_PA13C_SERCOM2_PAD1 ((PIN_PA13C_SERCOM2_PAD1 << 16) | MUX_PA13C_SERCOM2_PAD1)
|
||||
#define PORT_PA13C_SERCOM2_PAD1 (1u << 13)
|
||||
#define PIN_PA10D_SERCOM2_PAD2 10 /**< \brief SERCOM2 signal: PAD2 on PA10 mux D */
|
||||
#define MUX_PA10D_SERCOM2_PAD2 3
|
||||
#define PINMUX_PA10D_SERCOM2_PAD2 ((PIN_PA10D_SERCOM2_PAD2 << 16) | MUX_PA10D_SERCOM2_PAD2)
|
||||
#define PORT_PA10D_SERCOM2_PAD2 (1u << 10)
|
||||
#define PIN_PA14C_SERCOM2_PAD2 14 /**< \brief SERCOM2 signal: PAD2 on PA14 mux C */
|
||||
#define MUX_PA14C_SERCOM2_PAD2 2
|
||||
#define PINMUX_PA14C_SERCOM2_PAD2 ((PIN_PA14C_SERCOM2_PAD2 << 16) | MUX_PA14C_SERCOM2_PAD2)
|
||||
#define PORT_PA14C_SERCOM2_PAD2 (1u << 14)
|
||||
#define PIN_PA11D_SERCOM2_PAD3 11 /**< \brief SERCOM2 signal: PAD3 on PA11 mux D */
|
||||
#define MUX_PA11D_SERCOM2_PAD3 3
|
||||
#define PINMUX_PA11D_SERCOM2_PAD3 ((PIN_PA11D_SERCOM2_PAD3 << 16) | MUX_PA11D_SERCOM2_PAD3)
|
||||
#define PORT_PA11D_SERCOM2_PAD3 (1u << 11)
|
||||
#define PIN_PA15C_SERCOM2_PAD3 15 /**< \brief SERCOM2 signal: PAD3 on PA15 mux C */
|
||||
#define MUX_PA15C_SERCOM2_PAD3 2
|
||||
#define PINMUX_PA15C_SERCOM2_PAD3 ((PIN_PA15C_SERCOM2_PAD3 << 16) | MUX_PA15C_SERCOM2_PAD3)
|
||||
#define PORT_PA15C_SERCOM2_PAD3 (1u << 15)
|
||||
/* ========== PORT definition for SERCOM3 peripheral ========== */
|
||||
#define PIN_PA16D_SERCOM3_PAD0 16 /**< \brief SERCOM3 signal: PAD0 on PA16 mux D */
|
||||
#define MUX_PA16D_SERCOM3_PAD0 3
|
||||
#define PINMUX_PA16D_SERCOM3_PAD0 ((PIN_PA16D_SERCOM3_PAD0 << 16) | MUX_PA16D_SERCOM3_PAD0)
|
||||
#define PORT_PA16D_SERCOM3_PAD0 (1u << 16)
|
||||
#define PIN_PA22C_SERCOM3_PAD0 22 /**< \brief SERCOM3 signal: PAD0 on PA22 mux C */
|
||||
#define MUX_PA22C_SERCOM3_PAD0 2
|
||||
#define PINMUX_PA22C_SERCOM3_PAD0 ((PIN_PA22C_SERCOM3_PAD0 << 16) | MUX_PA22C_SERCOM3_PAD0)
|
||||
#define PORT_PA22C_SERCOM3_PAD0 (1u << 22)
|
||||
#define PIN_PA17D_SERCOM3_PAD1 17 /**< \brief SERCOM3 signal: PAD1 on PA17 mux D */
|
||||
#define MUX_PA17D_SERCOM3_PAD1 3
|
||||
#define PINMUX_PA17D_SERCOM3_PAD1 ((PIN_PA17D_SERCOM3_PAD1 << 16) | MUX_PA17D_SERCOM3_PAD1)
|
||||
#define PORT_PA17D_SERCOM3_PAD1 (1u << 17)
|
||||
#define PIN_PA23C_SERCOM3_PAD1 23 /**< \brief SERCOM3 signal: PAD1 on PA23 mux C */
|
||||
#define MUX_PA23C_SERCOM3_PAD1 2
|
||||
#define PINMUX_PA23C_SERCOM3_PAD1 ((PIN_PA23C_SERCOM3_PAD1 << 16) | MUX_PA23C_SERCOM3_PAD1)
|
||||
#define PORT_PA23C_SERCOM3_PAD1 (1u << 23)
|
||||
#define PIN_PA18D_SERCOM3_PAD2 18 /**< \brief SERCOM3 signal: PAD2 on PA18 mux D */
|
||||
#define MUX_PA18D_SERCOM3_PAD2 3
|
||||
#define PINMUX_PA18D_SERCOM3_PAD2 ((PIN_PA18D_SERCOM3_PAD2 << 16) | MUX_PA18D_SERCOM3_PAD2)
|
||||
#define PORT_PA18D_SERCOM3_PAD2 (1u << 18)
|
||||
#define PIN_PA20D_SERCOM3_PAD2 20 /**< \brief SERCOM3 signal: PAD2 on PA20 mux D */
|
||||
#define MUX_PA20D_SERCOM3_PAD2 3
|
||||
#define PINMUX_PA20D_SERCOM3_PAD2 ((PIN_PA20D_SERCOM3_PAD2 << 16) | MUX_PA20D_SERCOM3_PAD2)
|
||||
#define PORT_PA20D_SERCOM3_PAD2 (1u << 20)
|
||||
#define PIN_PA24C_SERCOM3_PAD2 24 /**< \brief SERCOM3 signal: PAD2 on PA24 mux C */
|
||||
#define MUX_PA24C_SERCOM3_PAD2 2
|
||||
#define PINMUX_PA24C_SERCOM3_PAD2 ((PIN_PA24C_SERCOM3_PAD2 << 16) | MUX_PA24C_SERCOM3_PAD2)
|
||||
#define PORT_PA24C_SERCOM3_PAD2 (1u << 24)
|
||||
#define PIN_PA19D_SERCOM3_PAD3 19 /**< \brief SERCOM3 signal: PAD3 on PA19 mux D */
|
||||
#define MUX_PA19D_SERCOM3_PAD3 3
|
||||
#define PINMUX_PA19D_SERCOM3_PAD3 ((PIN_PA19D_SERCOM3_PAD3 << 16) | MUX_PA19D_SERCOM3_PAD3)
|
||||
#define PORT_PA19D_SERCOM3_PAD3 (1u << 19)
|
||||
#define PIN_PA21D_SERCOM3_PAD3 21 /**< \brief SERCOM3 signal: PAD3 on PA21 mux D */
|
||||
#define MUX_PA21D_SERCOM3_PAD3 3
|
||||
#define PINMUX_PA21D_SERCOM3_PAD3 ((PIN_PA21D_SERCOM3_PAD3 << 16) | MUX_PA21D_SERCOM3_PAD3)
|
||||
#define PORT_PA21D_SERCOM3_PAD3 (1u << 21)
|
||||
#define PIN_PA25C_SERCOM3_PAD3 25 /**< \brief SERCOM3 signal: PAD3 on PA25 mux C */
|
||||
#define MUX_PA25C_SERCOM3_PAD3 2
|
||||
#define PINMUX_PA25C_SERCOM3_PAD3 ((PIN_PA25C_SERCOM3_PAD3 << 16) | MUX_PA25C_SERCOM3_PAD3)
|
||||
#define PORT_PA25C_SERCOM3_PAD3 (1u << 25)
|
||||
/* ========== PORT definition for SERCOM4 peripheral ========== */
|
||||
#define PIN_PA12D_SERCOM4_PAD0 12 /**< \brief SERCOM4 signal: PAD0 on PA12 mux D */
|
||||
#define MUX_PA12D_SERCOM4_PAD0 3
|
||||
#define PINMUX_PA12D_SERCOM4_PAD0 ((PIN_PA12D_SERCOM4_PAD0 << 16) | MUX_PA12D_SERCOM4_PAD0)
|
||||
#define PORT_PA12D_SERCOM4_PAD0 (1u << 12)
|
||||
#define PIN_PB08D_SERCOM4_PAD0 40 /**< \brief SERCOM4 signal: PAD0 on PB08 mux D */
|
||||
#define MUX_PB08D_SERCOM4_PAD0 3
|
||||
#define PINMUX_PB08D_SERCOM4_PAD0 ((PIN_PB08D_SERCOM4_PAD0 << 16) | MUX_PB08D_SERCOM4_PAD0)
|
||||
#define PORT_PB08D_SERCOM4_PAD0 (1u << 8)
|
||||
#define PIN_PA13D_SERCOM4_PAD1 13 /**< \brief SERCOM4 signal: PAD1 on PA13 mux D */
|
||||
#define MUX_PA13D_SERCOM4_PAD1 3
|
||||
#define PINMUX_PA13D_SERCOM4_PAD1 ((PIN_PA13D_SERCOM4_PAD1 << 16) | MUX_PA13D_SERCOM4_PAD1)
|
||||
#define PORT_PA13D_SERCOM4_PAD1 (1u << 13)
|
||||
#define PIN_PB09D_SERCOM4_PAD1 41 /**< \brief SERCOM4 signal: PAD1 on PB09 mux D */
|
||||
#define MUX_PB09D_SERCOM4_PAD1 3
|
||||
#define PINMUX_PB09D_SERCOM4_PAD1 ((PIN_PB09D_SERCOM4_PAD1 << 16) | MUX_PB09D_SERCOM4_PAD1)
|
||||
#define PORT_PB09D_SERCOM4_PAD1 (1u << 9)
|
||||
#define PIN_PA14D_SERCOM4_PAD2 14 /**< \brief SERCOM4 signal: PAD2 on PA14 mux D */
|
||||
#define MUX_PA14D_SERCOM4_PAD2 3
|
||||
#define PINMUX_PA14D_SERCOM4_PAD2 ((PIN_PA14D_SERCOM4_PAD2 << 16) | MUX_PA14D_SERCOM4_PAD2)
|
||||
#define PORT_PA14D_SERCOM4_PAD2 (1u << 14)
|
||||
#define PIN_PB10D_SERCOM4_PAD2 42 /**< \brief SERCOM4 signal: PAD2 on PB10 mux D */
|
||||
#define MUX_PB10D_SERCOM4_PAD2 3
|
||||
#define PINMUX_PB10D_SERCOM4_PAD2 ((PIN_PB10D_SERCOM4_PAD2 << 16) | MUX_PB10D_SERCOM4_PAD2)
|
||||
#define PORT_PB10D_SERCOM4_PAD2 (1u << 10)
|
||||
#define PIN_PA15D_SERCOM4_PAD3 15 /**< \brief SERCOM4 signal: PAD3 on PA15 mux D */
|
||||
#define MUX_PA15D_SERCOM4_PAD3 3
|
||||
#define PINMUX_PA15D_SERCOM4_PAD3 ((PIN_PA15D_SERCOM4_PAD3 << 16) | MUX_PA15D_SERCOM4_PAD3)
|
||||
#define PORT_PA15D_SERCOM4_PAD3 (1u << 15)
|
||||
#define PIN_PB11D_SERCOM4_PAD3 43 /**< \brief SERCOM4 signal: PAD3 on PB11 mux D */
|
||||
#define MUX_PB11D_SERCOM4_PAD3 3
|
||||
#define PINMUX_PB11D_SERCOM4_PAD3 ((PIN_PB11D_SERCOM4_PAD3 << 16) | MUX_PB11D_SERCOM4_PAD3)
|
||||
#define PORT_PB11D_SERCOM4_PAD3 (1u << 11)
|
||||
/* ========== PORT definition for SERCOM5 peripheral ========== */
|
||||
#define PIN_PA22D_SERCOM5_PAD0 22 /**< \brief SERCOM5 signal: PAD0 on PA22 mux D */
|
||||
#define MUX_PA22D_SERCOM5_PAD0 3
|
||||
#define PINMUX_PA22D_SERCOM5_PAD0 ((PIN_PA22D_SERCOM5_PAD0 << 16) | MUX_PA22D_SERCOM5_PAD0)
|
||||
#define PORT_PA22D_SERCOM5_PAD0 (1u << 22)
|
||||
#define PIN_PB02D_SERCOM5_PAD0 34 /**< \brief SERCOM5 signal: PAD0 on PB02 mux D */
|
||||
#define MUX_PB02D_SERCOM5_PAD0 3
|
||||
#define PINMUX_PB02D_SERCOM5_PAD0 ((PIN_PB02D_SERCOM5_PAD0 << 16) | MUX_PB02D_SERCOM5_PAD0)
|
||||
#define PORT_PB02D_SERCOM5_PAD0 (1u << 2)
|
||||
#define PIN_PA23D_SERCOM5_PAD1 23 /**< \brief SERCOM5 signal: PAD1 on PA23 mux D */
|
||||
#define MUX_PA23D_SERCOM5_PAD1 3
|
||||
#define PINMUX_PA23D_SERCOM5_PAD1 ((PIN_PA23D_SERCOM5_PAD1 << 16) | MUX_PA23D_SERCOM5_PAD1)
|
||||
#define PORT_PA23D_SERCOM5_PAD1 (1u << 23)
|
||||
#define PIN_PB03D_SERCOM5_PAD1 35 /**< \brief SERCOM5 signal: PAD1 on PB03 mux D */
|
||||
#define MUX_PB03D_SERCOM5_PAD1 3
|
||||
#define PINMUX_PB03D_SERCOM5_PAD1 ((PIN_PB03D_SERCOM5_PAD1 << 16) | MUX_PB03D_SERCOM5_PAD1)
|
||||
#define PORT_PB03D_SERCOM5_PAD1 (1u << 3)
|
||||
#define PIN_PA24D_SERCOM5_PAD2 24 /**< \brief SERCOM5 signal: PAD2 on PA24 mux D */
|
||||
#define MUX_PA24D_SERCOM5_PAD2 3
|
||||
#define PINMUX_PA24D_SERCOM5_PAD2 ((PIN_PA24D_SERCOM5_PAD2 << 16) | MUX_PA24D_SERCOM5_PAD2)
|
||||
#define PORT_PA24D_SERCOM5_PAD2 (1u << 24)
|
||||
#define PIN_PB22D_SERCOM5_PAD2 54 /**< \brief SERCOM5 signal: PAD2 on PB22 mux D */
|
||||
#define MUX_PB22D_SERCOM5_PAD2 3
|
||||
#define PINMUX_PB22D_SERCOM5_PAD2 ((PIN_PB22D_SERCOM5_PAD2 << 16) | MUX_PB22D_SERCOM5_PAD2)
|
||||
#define PORT_PB22D_SERCOM5_PAD2 (1u << 22)
|
||||
#define PIN_PA20C_SERCOM5_PAD2 20 /**< \brief SERCOM5 signal: PAD2 on PA20 mux C */
|
||||
#define MUX_PA20C_SERCOM5_PAD2 2
|
||||
#define PINMUX_PA20C_SERCOM5_PAD2 ((PIN_PA20C_SERCOM5_PAD2 << 16) | MUX_PA20C_SERCOM5_PAD2)
|
||||
#define PORT_PA20C_SERCOM5_PAD2 (1u << 20)
|
||||
#define PIN_PA25D_SERCOM5_PAD3 25 /**< \brief SERCOM5 signal: PAD3 on PA25 mux D */
|
||||
#define MUX_PA25D_SERCOM5_PAD3 3
|
||||
#define PINMUX_PA25D_SERCOM5_PAD3 ((PIN_PA25D_SERCOM5_PAD3 << 16) | MUX_PA25D_SERCOM5_PAD3)
|
||||
#define PORT_PA25D_SERCOM5_PAD3 (1u << 25)
|
||||
#define PIN_PB23D_SERCOM5_PAD3 55 /**< \brief SERCOM5 signal: PAD3 on PB23 mux D */
|
||||
#define MUX_PB23D_SERCOM5_PAD3 3
|
||||
#define PINMUX_PB23D_SERCOM5_PAD3 ((PIN_PB23D_SERCOM5_PAD3 << 16) | MUX_PB23D_SERCOM5_PAD3)
|
||||
#define PORT_PB23D_SERCOM5_PAD3 (1u << 23)
|
||||
#define PIN_PA21C_SERCOM5_PAD3 21 /**< \brief SERCOM5 signal: PAD3 on PA21 mux C */
|
||||
#define MUX_PA21C_SERCOM5_PAD3 2
|
||||
#define PINMUX_PA21C_SERCOM5_PAD3 ((PIN_PA21C_SERCOM5_PAD3 << 16) | MUX_PA21C_SERCOM5_PAD3)
|
||||
#define PORT_PA21C_SERCOM5_PAD3 (1u << 21)
|
||||
/* ========== PORT definition for TC0 peripheral ========== */
|
||||
#define PIN_PA04F_TC0_WO0 4 /**< \brief TC0 signal: WO0 on PA04 mux F */
|
||||
#define MUX_PA04F_TC0_WO0 5
|
||||
#define PINMUX_PA04F_TC0_WO0 ((PIN_PA04F_TC0_WO0 << 16) | MUX_PA04F_TC0_WO0)
|
||||
#define PORT_PA04F_TC0_WO0 (1u << 4)
|
||||
#define PIN_PA08E_TC0_WO0 8 /**< \brief TC0 signal: WO0 on PA08 mux E */
|
||||
#define MUX_PA08E_TC0_WO0 4
|
||||
#define PINMUX_PA08E_TC0_WO0 ((PIN_PA08E_TC0_WO0 << 16) | MUX_PA08E_TC0_WO0)
|
||||
#define PORT_PA08E_TC0_WO0 (1u << 8)
|
||||
#define PIN_PA05F_TC0_WO1 5 /**< \brief TC0 signal: WO1 on PA05 mux F */
|
||||
#define MUX_PA05F_TC0_WO1 5
|
||||
#define PINMUX_PA05F_TC0_WO1 ((PIN_PA05F_TC0_WO1 << 16) | MUX_PA05F_TC0_WO1)
|
||||
#define PORT_PA05F_TC0_WO1 (1u << 5)
|
||||
#define PIN_PA09E_TC0_WO1 9 /**< \brief TC0 signal: WO1 on PA09 mux E */
|
||||
#define MUX_PA09E_TC0_WO1 4
|
||||
#define PINMUX_PA09E_TC0_WO1 ((PIN_PA09E_TC0_WO1 << 16) | MUX_PA09E_TC0_WO1)
|
||||
#define PORT_PA09E_TC0_WO1 (1u << 9)
|
||||
/* ========== PORT definition for TC1 peripheral ========== */
|
||||
#define PIN_PA06F_TC1_WO0 6 /**< \brief TC1 signal: WO0 on PA06 mux F */
|
||||
#define MUX_PA06F_TC1_WO0 5
|
||||
#define PINMUX_PA06F_TC1_WO0 ((PIN_PA06F_TC1_WO0 << 16) | MUX_PA06F_TC1_WO0)
|
||||
#define PORT_PA06F_TC1_WO0 (1u << 6)
|
||||
#define PIN_PA30F_TC1_WO0 30 /**< \brief TC1 signal: WO0 on PA30 mux F */
|
||||
#define MUX_PA30F_TC1_WO0 5
|
||||
#define PINMUX_PA30F_TC1_WO0 ((PIN_PA30F_TC1_WO0 << 16) | MUX_PA30F_TC1_WO0)
|
||||
#define PORT_PA30F_TC1_WO0 (1u << 30)
|
||||
#define PIN_PA10E_TC1_WO0 10 /**< \brief TC1 signal: WO0 on PA10 mux E */
|
||||
#define MUX_PA10E_TC1_WO0 4
|
||||
#define PINMUX_PA10E_TC1_WO0 ((PIN_PA10E_TC1_WO0 << 16) | MUX_PA10E_TC1_WO0)
|
||||
#define PORT_PA10E_TC1_WO0 (1u << 10)
|
||||
#define PIN_PA07F_TC1_WO1 7 /**< \brief TC1 signal: WO1 on PA07 mux F */
|
||||
#define MUX_PA07F_TC1_WO1 5
|
||||
#define PINMUX_PA07F_TC1_WO1 ((PIN_PA07F_TC1_WO1 << 16) | MUX_PA07F_TC1_WO1)
|
||||
#define PORT_PA07F_TC1_WO1 (1u << 7)
|
||||
#define PIN_PA31F_TC1_WO1 31 /**< \brief TC1 signal: WO1 on PA31 mux F */
|
||||
#define MUX_PA31F_TC1_WO1 5
|
||||
#define PINMUX_PA31F_TC1_WO1 ((PIN_PA31F_TC1_WO1 << 16) | MUX_PA31F_TC1_WO1)
|
||||
#define PORT_PA31F_TC1_WO1 (1u << 31)
|
||||
#define PIN_PA11E_TC1_WO1 11 /**< \brief TC1 signal: WO1 on PA11 mux E */
|
||||
#define MUX_PA11E_TC1_WO1 4
|
||||
#define PINMUX_PA11E_TC1_WO1 ((PIN_PA11E_TC1_WO1 << 16) | MUX_PA11E_TC1_WO1)
|
||||
#define PORT_PA11E_TC1_WO1 (1u << 11)
|
||||
/* ========== PORT definition for TC2 peripheral ========== */
|
||||
#define PIN_PA16F_TC2_WO0 16 /**< \brief TC2 signal: WO0 on PA16 mux F */
|
||||
#define MUX_PA16F_TC2_WO0 5
|
||||
#define PINMUX_PA16F_TC2_WO0 ((PIN_PA16F_TC2_WO0 << 16) | MUX_PA16F_TC2_WO0)
|
||||
#define PORT_PA16F_TC2_WO0 (1u << 16)
|
||||
#define PIN_PA12E_TC2_WO0 12 /**< \brief TC2 signal: WO0 on PA12 mux E */
|
||||
#define MUX_PA12E_TC2_WO0 4
|
||||
#define PINMUX_PA12E_TC2_WO0 ((PIN_PA12E_TC2_WO0 << 16) | MUX_PA12E_TC2_WO0)
|
||||
#define PORT_PA12E_TC2_WO0 (1u << 12)
|
||||
#define PIN_PA00F_TC2_WO0 0 /**< \brief TC2 signal: WO0 on PA00 mux F */
|
||||
#define MUX_PA00F_TC2_WO0 5
|
||||
#define PINMUX_PA00F_TC2_WO0 ((PIN_PA00F_TC2_WO0 << 16) | MUX_PA00F_TC2_WO0)
|
||||
#define PORT_PA00F_TC2_WO0 (1u << 0)
|
||||
#define PIN_PA17F_TC2_WO1 17 /**< \brief TC2 signal: WO1 on PA17 mux F */
|
||||
#define MUX_PA17F_TC2_WO1 5
|
||||
#define PINMUX_PA17F_TC2_WO1 ((PIN_PA17F_TC2_WO1 << 16) | MUX_PA17F_TC2_WO1)
|
||||
#define PORT_PA17F_TC2_WO1 (1u << 17)
|
||||
#define PIN_PA13E_TC2_WO1 13 /**< \brief TC2 signal: WO1 on PA13 mux E */
|
||||
#define MUX_PA13E_TC2_WO1 4
|
||||
#define PINMUX_PA13E_TC2_WO1 ((PIN_PA13E_TC2_WO1 << 16) | MUX_PA13E_TC2_WO1)
|
||||
#define PORT_PA13E_TC2_WO1 (1u << 13)
|
||||
#define PIN_PA01F_TC2_WO1 1 /**< \brief TC2 signal: WO1 on PA01 mux F */
|
||||
#define MUX_PA01F_TC2_WO1 5
|
||||
#define PINMUX_PA01F_TC2_WO1 ((PIN_PA01F_TC2_WO1 << 16) | MUX_PA01F_TC2_WO1)
|
||||
#define PORT_PA01F_TC2_WO1 (1u << 1)
|
||||
/* ========== PORT definition for TC3 peripheral ========== */
|
||||
#define PIN_PA18F_TC3_WO0 18 /**< \brief TC3 signal: WO0 on PA18 mux F */
|
||||
#define MUX_PA18F_TC3_WO0 5
|
||||
#define PINMUX_PA18F_TC3_WO0 ((PIN_PA18F_TC3_WO0 << 16) | MUX_PA18F_TC3_WO0)
|
||||
#define PORT_PA18F_TC3_WO0 (1u << 18)
|
||||
#define PIN_PA14E_TC3_WO0 14 /**< \brief TC3 signal: WO0 on PA14 mux E */
|
||||
#define MUX_PA14E_TC3_WO0 4
|
||||
#define PINMUX_PA14E_TC3_WO0 ((PIN_PA14E_TC3_WO0 << 16) | MUX_PA14E_TC3_WO0)
|
||||
#define PORT_PA14E_TC3_WO0 (1u << 14)
|
||||
#define PIN_PA19F_TC3_WO1 19 /**< \brief TC3 signal: WO1 on PA19 mux F */
|
||||
#define MUX_PA19F_TC3_WO1 5
|
||||
#define PINMUX_PA19F_TC3_WO1 ((PIN_PA19F_TC3_WO1 << 16) | MUX_PA19F_TC3_WO1)
|
||||
#define PORT_PA19F_TC3_WO1 (1u << 19)
|
||||
#define PIN_PA15E_TC3_WO1 15 /**< \brief TC3 signal: WO1 on PA15 mux E */
|
||||
#define MUX_PA15E_TC3_WO1 4
|
||||
#define PINMUX_PA15E_TC3_WO1 ((PIN_PA15E_TC3_WO1 << 16) | MUX_PA15E_TC3_WO1)
|
||||
#define PORT_PA15E_TC3_WO1 (1u << 15)
|
||||
/* ========== PORT definition for TC4 peripheral ========== */
|
||||
#define PIN_PA22F_TC4_WO0 22 /**< \brief TC4 signal: WO0 on PA22 mux F */
|
||||
#define MUX_PA22F_TC4_WO0 5
|
||||
#define PINMUX_PA22F_TC4_WO0 ((PIN_PA22F_TC4_WO0 << 16) | MUX_PA22F_TC4_WO0)
|
||||
#define PORT_PA22F_TC4_WO0 (1u << 22)
|
||||
#define PIN_PB08F_TC4_WO0 40 /**< \brief TC4 signal: WO0 on PB08 mux F */
|
||||
#define MUX_PB08F_TC4_WO0 5
|
||||
#define PINMUX_PB08F_TC4_WO0 ((PIN_PB08F_TC4_WO0 << 16) | MUX_PB08F_TC4_WO0)
|
||||
#define PORT_PB08F_TC4_WO0 (1u << 8)
|
||||
#define PIN_PA23F_TC4_WO1 23 /**< \brief TC4 signal: WO1 on PA23 mux F */
|
||||
#define MUX_PA23F_TC4_WO1 5
|
||||
#define PINMUX_PA23F_TC4_WO1 ((PIN_PA23F_TC4_WO1 << 16) | MUX_PA23F_TC4_WO1)
|
||||
#define PORT_PA23F_TC4_WO1 (1u << 23)
|
||||
#define PIN_PB09F_TC4_WO1 41 /**< \brief TC4 signal: WO1 on PB09 mux F */
|
||||
#define MUX_PB09F_TC4_WO1 5
|
||||
#define PINMUX_PB09F_TC4_WO1 ((PIN_PB09F_TC4_WO1 << 16) | MUX_PB09F_TC4_WO1)
|
||||
#define PORT_PB09F_TC4_WO1 (1u << 9)
|
||||
/* ========== PORT definition for TC5 peripheral ========== */
|
||||
#define PIN_PA24F_TC5_WO0 24 /**< \brief TC5 signal: WO0 on PA24 mux F */
|
||||
#define MUX_PA24F_TC5_WO0 5
|
||||
#define PINMUX_PA24F_TC5_WO0 ((PIN_PA24F_TC5_WO0 << 16) | MUX_PA24F_TC5_WO0)
|
||||
#define PORT_PA24F_TC5_WO0 (1u << 24)
|
||||
#define PIN_PB10F_TC5_WO0 42 /**< \brief TC5 signal: WO0 on PB10 mux F */
|
||||
#define MUX_PB10F_TC5_WO0 5
|
||||
#define PINMUX_PB10F_TC5_WO0 ((PIN_PB10F_TC5_WO0 << 16) | MUX_PB10F_TC5_WO0)
|
||||
#define PORT_PB10F_TC5_WO0 (1u << 10)
|
||||
#define PIN_PA25F_TC5_WO1 25 /**< \brief TC5 signal: WO1 on PA25 mux F */
|
||||
#define MUX_PA25F_TC5_WO1 5
|
||||
#define PINMUX_PA25F_TC5_WO1 ((PIN_PA25F_TC5_WO1 << 16) | MUX_PA25F_TC5_WO1)
|
||||
#define PORT_PA25F_TC5_WO1 (1u << 25)
|
||||
#define PIN_PB11F_TC5_WO1 43 /**< \brief TC5 signal: WO1 on PB11 mux F */
|
||||
#define MUX_PB11F_TC5_WO1 5
|
||||
#define PINMUX_PB11F_TC5_WO1 ((PIN_PB11F_TC5_WO1 << 16) | MUX_PB11F_TC5_WO1)
|
||||
#define PORT_PB11F_TC5_WO1 (1u << 11)
|
||||
/* ========== PORT definition for TC6 peripheral ========== */
|
||||
#define PIN_PB02F_TC6_WO0 34 /**< \brief TC6 signal: WO0 on PB02 mux F */
|
||||
#define MUX_PB02F_TC6_WO0 5
|
||||
#define PINMUX_PB02F_TC6_WO0 ((PIN_PB02F_TC6_WO0 << 16) | MUX_PB02F_TC6_WO0)
|
||||
#define PORT_PB02F_TC6_WO0 (1u << 2)
|
||||
#define PIN_PB03F_TC6_WO1 35 /**< \brief TC6 signal: WO1 on PB03 mux F */
|
||||
#define MUX_PB03F_TC6_WO1 5
|
||||
#define PINMUX_PB03F_TC6_WO1 ((PIN_PB03F_TC6_WO1 << 16) | MUX_PB03F_TC6_WO1)
|
||||
#define PORT_PB03F_TC6_WO1 (1u << 3)
|
||||
/* ========== PORT definition for TC7 peripheral ========== */
|
||||
#define PIN_PB22F_TC7_WO0 54 /**< \brief TC7 signal: WO0 on PB22 mux F */
|
||||
#define MUX_PB22F_TC7_WO0 5
|
||||
#define PINMUX_PB22F_TC7_WO0 ((PIN_PB22F_TC7_WO0 << 16) | MUX_PB22F_TC7_WO0)
|
||||
#define PORT_PB22F_TC7_WO0 (1u << 22)
|
||||
#define PIN_PA20E_TC7_WO0 20 /**< \brief TC7 signal: WO0 on PA20 mux E */
|
||||
#define MUX_PA20E_TC7_WO0 4
|
||||
#define PINMUX_PA20E_TC7_WO0 ((PIN_PA20E_TC7_WO0 << 16) | MUX_PA20E_TC7_WO0)
|
||||
#define PORT_PA20E_TC7_WO0 (1u << 20)
|
||||
#define PIN_PB23F_TC7_WO1 55 /**< \brief TC7 signal: WO1 on PB23 mux F */
|
||||
#define MUX_PB23F_TC7_WO1 5
|
||||
#define PINMUX_PB23F_TC7_WO1 ((PIN_PB23F_TC7_WO1 << 16) | MUX_PB23F_TC7_WO1)
|
||||
#define PORT_PB23F_TC7_WO1 (1u << 23)
|
||||
#define PIN_PA21E_TC7_WO1 21 /**< \brief TC7 signal: WO1 on PA21 mux E */
|
||||
#define MUX_PA21E_TC7_WO1 4
|
||||
#define PINMUX_PA21E_TC7_WO1 ((PIN_PA21E_TC7_WO1 << 16) | MUX_PA21E_TC7_WO1)
|
||||
#define PORT_PA21E_TC7_WO1 (1u << 21)
|
||||
/* ========== PORT definition for ADC peripheral ========== */
|
||||
#define PIN_PA02B_ADC_AIN0 2 /**< \brief ADC signal: AIN0 on PA02 mux B */
|
||||
#define MUX_PA02B_ADC_AIN0 1
|
||||
#define PINMUX_PA02B_ADC_AIN0 ((PIN_PA02B_ADC_AIN0 << 16) | MUX_PA02B_ADC_AIN0)
|
||||
#define PORT_PA02B_ADC_AIN0 (1u << 2)
|
||||
#define PIN_PA03B_ADC_AIN1 3 /**< \brief ADC signal: AIN1 on PA03 mux B */
|
||||
#define MUX_PA03B_ADC_AIN1 1
|
||||
#define PINMUX_PA03B_ADC_AIN1 ((PIN_PA03B_ADC_AIN1 << 16) | MUX_PA03B_ADC_AIN1)
|
||||
#define PORT_PA03B_ADC_AIN1 (1u << 3)
|
||||
#define PIN_PB08B_ADC_AIN2 40 /**< \brief ADC signal: AIN2 on PB08 mux B */
|
||||
#define MUX_PB08B_ADC_AIN2 1
|
||||
#define PINMUX_PB08B_ADC_AIN2 ((PIN_PB08B_ADC_AIN2 << 16) | MUX_PB08B_ADC_AIN2)
|
||||
#define PORT_PB08B_ADC_AIN2 (1u << 8)
|
||||
#define PIN_PB09B_ADC_AIN3 41 /**< \brief ADC signal: AIN3 on PB09 mux B */
|
||||
#define MUX_PB09B_ADC_AIN3 1
|
||||
#define PINMUX_PB09B_ADC_AIN3 ((PIN_PB09B_ADC_AIN3 << 16) | MUX_PB09B_ADC_AIN3)
|
||||
#define PORT_PB09B_ADC_AIN3 (1u << 9)
|
||||
#define PIN_PA04B_ADC_AIN4 4 /**< \brief ADC signal: AIN4 on PA04 mux B */
|
||||
#define MUX_PA04B_ADC_AIN4 1
|
||||
#define PINMUX_PA04B_ADC_AIN4 ((PIN_PA04B_ADC_AIN4 << 16) | MUX_PA04B_ADC_AIN4)
|
||||
#define PORT_PA04B_ADC_AIN4 (1u << 4)
|
||||
#define PIN_PA05B_ADC_AIN5 5 /**< \brief ADC signal: AIN5 on PA05 mux B */
|
||||
#define MUX_PA05B_ADC_AIN5 1
|
||||
#define PINMUX_PA05B_ADC_AIN5 ((PIN_PA05B_ADC_AIN5 << 16) | MUX_PA05B_ADC_AIN5)
|
||||
#define PORT_PA05B_ADC_AIN5 (1u << 5)
|
||||
#define PIN_PA06B_ADC_AIN6 6 /**< \brief ADC signal: AIN6 on PA06 mux B */
|
||||
#define MUX_PA06B_ADC_AIN6 1
|
||||
#define PINMUX_PA06B_ADC_AIN6 ((PIN_PA06B_ADC_AIN6 << 16) | MUX_PA06B_ADC_AIN6)
|
||||
#define PORT_PA06B_ADC_AIN6 (1u << 6)
|
||||
#define PIN_PA07B_ADC_AIN7 7 /**< \brief ADC signal: AIN7 on PA07 mux B */
|
||||
#define MUX_PA07B_ADC_AIN7 1
|
||||
#define PINMUX_PA07B_ADC_AIN7 ((PIN_PA07B_ADC_AIN7 << 16) | MUX_PA07B_ADC_AIN7)
|
||||
#define PORT_PA07B_ADC_AIN7 (1u << 7)
|
||||
#define PIN_PB02B_ADC_AIN10 34 /**< \brief ADC signal: AIN10 on PB02 mux B */
|
||||
#define MUX_PB02B_ADC_AIN10 1
|
||||
#define PINMUX_PB02B_ADC_AIN10 ((PIN_PB02B_ADC_AIN10 << 16) | MUX_PB02B_ADC_AIN10)
|
||||
#define PORT_PB02B_ADC_AIN10 (1u << 2)
|
||||
#define PIN_PB03B_ADC_AIN11 35 /**< \brief ADC signal: AIN11 on PB03 mux B */
|
||||
#define MUX_PB03B_ADC_AIN11 1
|
||||
#define PINMUX_PB03B_ADC_AIN11 ((PIN_PB03B_ADC_AIN11 << 16) | MUX_PB03B_ADC_AIN11)
|
||||
#define PORT_PB03B_ADC_AIN11 (1u << 3)
|
||||
#define PIN_PA08B_ADC_AIN16 8 /**< \brief ADC signal: AIN16 on PA08 mux B */
|
||||
#define MUX_PA08B_ADC_AIN16 1
|
||||
#define PINMUX_PA08B_ADC_AIN16 ((PIN_PA08B_ADC_AIN16 << 16) | MUX_PA08B_ADC_AIN16)
|
||||
#define PORT_PA08B_ADC_AIN16 (1u << 8)
|
||||
#define PIN_PA09B_ADC_AIN17 9 /**< \brief ADC signal: AIN17 on PA09 mux B */
|
||||
#define MUX_PA09B_ADC_AIN17 1
|
||||
#define PINMUX_PA09B_ADC_AIN17 ((PIN_PA09B_ADC_AIN17 << 16) | MUX_PA09B_ADC_AIN17)
|
||||
#define PORT_PA09B_ADC_AIN17 (1u << 9)
|
||||
#define PIN_PA10B_ADC_AIN18 10 /**< \brief ADC signal: AIN18 on PA10 mux B */
|
||||
#define MUX_PA10B_ADC_AIN18 1
|
||||
#define PINMUX_PA10B_ADC_AIN18 ((PIN_PA10B_ADC_AIN18 << 16) | MUX_PA10B_ADC_AIN18)
|
||||
#define PORT_PA10B_ADC_AIN18 (1u << 10)
|
||||
#define PIN_PA11B_ADC_AIN19 11 /**< \brief ADC signal: AIN19 on PA11 mux B */
|
||||
#define MUX_PA11B_ADC_AIN19 1
|
||||
#define PINMUX_PA11B_ADC_AIN19 ((PIN_PA11B_ADC_AIN19 << 16) | MUX_PA11B_ADC_AIN19)
|
||||
#define PORT_PA11B_ADC_AIN19 (1u << 11)
|
||||
#define PIN_PA04B_ADC_VREFP 4 /**< \brief ADC signal: VREFP on PA04 mux B */
|
||||
#define MUX_PA04B_ADC_VREFP 1
|
||||
#define PINMUX_PA04B_ADC_VREFP ((PIN_PA04B_ADC_VREFP << 16) | MUX_PA04B_ADC_VREFP)
|
||||
#define PORT_PA04B_ADC_VREFP (1u << 4)
|
||||
/* ========== PORT definition for AC peripheral ========== */
|
||||
#define PIN_PA04B_AC_AIN0 4 /**< \brief AC signal: AIN0 on PA04 mux B */
|
||||
#define MUX_PA04B_AC_AIN0 1
|
||||
#define PINMUX_PA04B_AC_AIN0 ((PIN_PA04B_AC_AIN0 << 16) | MUX_PA04B_AC_AIN0)
|
||||
#define PORT_PA04B_AC_AIN0 (1u << 4)
|
||||
#define PIN_PA05B_AC_AIN1 5 /**< \brief AC signal: AIN1 on PA05 mux B */
|
||||
#define MUX_PA05B_AC_AIN1 1
|
||||
#define PINMUX_PA05B_AC_AIN1 ((PIN_PA05B_AC_AIN1 << 16) | MUX_PA05B_AC_AIN1)
|
||||
#define PORT_PA05B_AC_AIN1 (1u << 5)
|
||||
#define PIN_PA06B_AC_AIN2 6 /**< \brief AC signal: AIN2 on PA06 mux B */
|
||||
#define MUX_PA06B_AC_AIN2 1
|
||||
#define PINMUX_PA06B_AC_AIN2 ((PIN_PA06B_AC_AIN2 << 16) | MUX_PA06B_AC_AIN2)
|
||||
#define PORT_PA06B_AC_AIN2 (1u << 6)
|
||||
#define PIN_PA07B_AC_AIN3 7 /**< \brief AC signal: AIN3 on PA07 mux B */
|
||||
#define MUX_PA07B_AC_AIN3 1
|
||||
#define PINMUX_PA07B_AC_AIN3 ((PIN_PA07B_AC_AIN3 << 16) | MUX_PA07B_AC_AIN3)
|
||||
#define PORT_PA07B_AC_AIN3 (1u << 7)
|
||||
#define PIN_PA12H_AC_CMP0 12 /**< \brief AC signal: CMP0 on PA12 mux H */
|
||||
#define MUX_PA12H_AC_CMP0 7
|
||||
#define PINMUX_PA12H_AC_CMP0 ((PIN_PA12H_AC_CMP0 << 16) | MUX_PA12H_AC_CMP0)
|
||||
#define PORT_PA12H_AC_CMP0 (1u << 12)
|
||||
#define PIN_PA18H_AC_CMP0 18 /**< \brief AC signal: CMP0 on PA18 mux H */
|
||||
#define MUX_PA18H_AC_CMP0 7
|
||||
#define PINMUX_PA18H_AC_CMP0 ((PIN_PA18H_AC_CMP0 << 16) | MUX_PA18H_AC_CMP0)
|
||||
#define PORT_PA18H_AC_CMP0 (1u << 18)
|
||||
#define PIN_PA13H_AC_CMP1 13 /**< \brief AC signal: CMP1 on PA13 mux H */
|
||||
#define MUX_PA13H_AC_CMP1 7
|
||||
#define PINMUX_PA13H_AC_CMP1 ((PIN_PA13H_AC_CMP1 << 16) | MUX_PA13H_AC_CMP1)
|
||||
#define PORT_PA13H_AC_CMP1 (1u << 13)
|
||||
#define PIN_PA19H_AC_CMP1 19 /**< \brief AC signal: CMP1 on PA19 mux H */
|
||||
#define MUX_PA19H_AC_CMP1 7
|
||||
#define PINMUX_PA19H_AC_CMP1 ((PIN_PA19H_AC_CMP1 << 16) | MUX_PA19H_AC_CMP1)
|
||||
#define PORT_PA19H_AC_CMP1 (1u << 19)
|
||||
/* ========== PORT definition for DAC peripheral ========== */
|
||||
#define PIN_PA02B_DAC_VOUT 2 /**< \brief DAC signal: VOUT on PA02 mux B */
|
||||
#define MUX_PA02B_DAC_VOUT 1
|
||||
#define PINMUX_PA02B_DAC_VOUT ((PIN_PA02B_DAC_VOUT << 16) | MUX_PA02B_DAC_VOUT)
|
||||
#define PORT_PA02B_DAC_VOUT (1u << 2)
|
||||
#define PIN_PA03B_DAC_VREFP 3 /**< \brief DAC signal: VREFP on PA03 mux B */
|
||||
#define MUX_PA03B_DAC_VREFP 1
|
||||
#define PINMUX_PA03B_DAC_VREFP ((PIN_PA03B_DAC_VREFP << 16) | MUX_PA03B_DAC_VREFP)
|
||||
#define PORT_PA03B_DAC_VREFP (1u << 3)
|
||||
|
||||
#endif /* _SAMD20G14_PIO_ */
|
|
@ -0,0 +1,812 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Peripheral I/O description for SAMD20G15
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20G15_PIO_
|
||||
#define _SAMD20G15_PIO_
|
||||
|
||||
#define PIN_PA00 0 /**< \brief Pin Number for PA00 */
|
||||
#define PORT_PA00 (1u << 0) /**< \brief PORT Mask for PA00 */
|
||||
#define PIN_PA01 1 /**< \brief Pin Number for PA01 */
|
||||
#define PORT_PA01 (1u << 1) /**< \brief PORT Mask for PA01 */
|
||||
#define PIN_PA02 2 /**< \brief Pin Number for PA02 */
|
||||
#define PORT_PA02 (1u << 2) /**< \brief PORT Mask for PA02 */
|
||||
#define PIN_PA03 3 /**< \brief Pin Number for PA03 */
|
||||
#define PORT_PA03 (1u << 3) /**< \brief PORT Mask for PA03 */
|
||||
#define PIN_PA04 4 /**< \brief Pin Number for PA04 */
|
||||
#define PORT_PA04 (1u << 4) /**< \brief PORT Mask for PA04 */
|
||||
#define PIN_PA05 5 /**< \brief Pin Number for PA05 */
|
||||
#define PORT_PA05 (1u << 5) /**< \brief PORT Mask for PA05 */
|
||||
#define PIN_PA06 6 /**< \brief Pin Number for PA06 */
|
||||
#define PORT_PA06 (1u << 6) /**< \brief PORT Mask for PA06 */
|
||||
#define PIN_PA07 7 /**< \brief Pin Number for PA07 */
|
||||
#define PORT_PA07 (1u << 7) /**< \brief PORT Mask for PA07 */
|
||||
#define PIN_PA08 8 /**< \brief Pin Number for PA08 */
|
||||
#define PORT_PA08 (1u << 8) /**< \brief PORT Mask for PA08 */
|
||||
#define PIN_PA09 9 /**< \brief Pin Number for PA09 */
|
||||
#define PORT_PA09 (1u << 9) /**< \brief PORT Mask for PA09 */
|
||||
#define PIN_PA10 10 /**< \brief Pin Number for PA10 */
|
||||
#define PORT_PA10 (1u << 10) /**< \brief PORT Mask for PA10 */
|
||||
#define PIN_PA11 11 /**< \brief Pin Number for PA11 */
|
||||
#define PORT_PA11 (1u << 11) /**< \brief PORT Mask for PA11 */
|
||||
#define PIN_PA12 12 /**< \brief Pin Number for PA12 */
|
||||
#define PORT_PA12 (1u << 12) /**< \brief PORT Mask for PA12 */
|
||||
#define PIN_PA13 13 /**< \brief Pin Number for PA13 */
|
||||
#define PORT_PA13 (1u << 13) /**< \brief PORT Mask for PA13 */
|
||||
#define PIN_PA14 14 /**< \brief Pin Number for PA14 */
|
||||
#define PORT_PA14 (1u << 14) /**< \brief PORT Mask for PA14 */
|
||||
#define PIN_PA15 15 /**< \brief Pin Number for PA15 */
|
||||
#define PORT_PA15 (1u << 15) /**< \brief PORT Mask for PA15 */
|
||||
#define PIN_PA16 16 /**< \brief Pin Number for PA16 */
|
||||
#define PORT_PA16 (1u << 16) /**< \brief PORT Mask for PA16 */
|
||||
#define PIN_PA17 17 /**< \brief Pin Number for PA17 */
|
||||
#define PORT_PA17 (1u << 17) /**< \brief PORT Mask for PA17 */
|
||||
#define PIN_PA18 18 /**< \brief Pin Number for PA18 */
|
||||
#define PORT_PA18 (1u << 18) /**< \brief PORT Mask for PA18 */
|
||||
#define PIN_PA19 19 /**< \brief Pin Number for PA19 */
|
||||
#define PORT_PA19 (1u << 19) /**< \brief PORT Mask for PA19 */
|
||||
#define PIN_PA20 20 /**< \brief Pin Number for PA20 */
|
||||
#define PORT_PA20 (1u << 20) /**< \brief PORT Mask for PA20 */
|
||||
#define PIN_PA21 21 /**< \brief Pin Number for PA21 */
|
||||
#define PORT_PA21 (1u << 21) /**< \brief PORT Mask for PA21 */
|
||||
#define PIN_PA22 22 /**< \brief Pin Number for PA22 */
|
||||
#define PORT_PA22 (1u << 22) /**< \brief PORT Mask for PA22 */
|
||||
#define PIN_PA23 23 /**< \brief Pin Number for PA23 */
|
||||
#define PORT_PA23 (1u << 23) /**< \brief PORT Mask for PA23 */
|
||||
#define PIN_PA24 24 /**< \brief Pin Number for PA24 */
|
||||
#define PORT_PA24 (1u << 24) /**< \brief PORT Mask for PA24 */
|
||||
#define PIN_PA25 25 /**< \brief Pin Number for PA25 */
|
||||
#define PORT_PA25 (1u << 25) /**< \brief PORT Mask for PA25 */
|
||||
#define PIN_PA27 27 /**< \brief Pin Number for PA27 */
|
||||
#define PORT_PA27 (1u << 27) /**< \brief PORT Mask for PA27 */
|
||||
#define PIN_PA28 28 /**< \brief Pin Number for PA28 */
|
||||
#define PORT_PA28 (1u << 28) /**< \brief PORT Mask for PA28 */
|
||||
#define PIN_PA30 30 /**< \brief Pin Number for PA30 */
|
||||
#define PORT_PA30 (1u << 30) /**< \brief PORT Mask for PA30 */
|
||||
#define PIN_PA31 31 /**< \brief Pin Number for PA31 */
|
||||
#define PORT_PA31 (1u << 31) /**< \brief PORT Mask for PA31 */
|
||||
#define PIN_PB02 34 /**< \brief Pin Number for PB02 */
|
||||
#define PORT_PB02 (1u << 2) /**< \brief PORT Mask for PB02 */
|
||||
#define PIN_PB03 35 /**< \brief Pin Number for PB03 */
|
||||
#define PORT_PB03 (1u << 3) /**< \brief PORT Mask for PB03 */
|
||||
#define PIN_PB08 40 /**< \brief Pin Number for PB08 */
|
||||
#define PORT_PB08 (1u << 8) /**< \brief PORT Mask for PB08 */
|
||||
#define PIN_PB09 41 /**< \brief Pin Number for PB09 */
|
||||
#define PORT_PB09 (1u << 9) /**< \brief PORT Mask for PB09 */
|
||||
#define PIN_PB10 42 /**< \brief Pin Number for PB10 */
|
||||
#define PORT_PB10 (1u << 10) /**< \brief PORT Mask for PB10 */
|
||||
#define PIN_PB11 43 /**< \brief Pin Number for PB11 */
|
||||
#define PORT_PB11 (1u << 11) /**< \brief PORT Mask for PB11 */
|
||||
#define PIN_PB22 54 /**< \brief Pin Number for PB22 */
|
||||
#define PORT_PB22 (1u << 22) /**< \brief PORT Mask for PB22 */
|
||||
#define PIN_PB23 55 /**< \brief Pin Number for PB23 */
|
||||
#define PORT_PB23 (1u << 23) /**< \brief PORT Mask for PB23 */
|
||||
/* ========== PORT definition for CORE peripheral ========== */
|
||||
#define PIN_PA30G_CORE_SWCLK 30 /**< \brief CORE signal: SWCLK on PA30 mux G */
|
||||
#define MUX_PA30G_CORE_SWCLK 6
|
||||
#define PINMUX_PA30G_CORE_SWCLK ((PIN_PA30G_CORE_SWCLK << 16) | MUX_PA30G_CORE_SWCLK)
|
||||
#define PORT_PA30G_CORE_SWCLK (1u << 30)
|
||||
/* ========== PORT definition for GCLK peripheral ========== */
|
||||
#define PIN_PB22H_GCLK_IO0 54 /**< \brief GCLK signal: IO0 on PB22 mux H */
|
||||
#define MUX_PB22H_GCLK_IO0 7
|
||||
#define PINMUX_PB22H_GCLK_IO0 ((PIN_PB22H_GCLK_IO0 << 16) | MUX_PB22H_GCLK_IO0)
|
||||
#define PORT_PB22H_GCLK_IO0 (1u << 22)
|
||||
#define PIN_PA14H_GCLK_IO0 14 /**< \brief GCLK signal: IO0 on PA14 mux H */
|
||||
#define MUX_PA14H_GCLK_IO0 7
|
||||
#define PINMUX_PA14H_GCLK_IO0 ((PIN_PA14H_GCLK_IO0 << 16) | MUX_PA14H_GCLK_IO0)
|
||||
#define PORT_PA14H_GCLK_IO0 (1u << 14)
|
||||
#define PIN_PA27H_GCLK_IO0 27 /**< \brief GCLK signal: IO0 on PA27 mux H */
|
||||
#define MUX_PA27H_GCLK_IO0 7
|
||||
#define PINMUX_PA27H_GCLK_IO0 ((PIN_PA27H_GCLK_IO0 << 16) | MUX_PA27H_GCLK_IO0)
|
||||
#define PORT_PA27H_GCLK_IO0 (1u << 27)
|
||||
#define PIN_PA28H_GCLK_IO0 28 /**< \brief GCLK signal: IO0 on PA28 mux H */
|
||||
#define MUX_PA28H_GCLK_IO0 7
|
||||
#define PINMUX_PA28H_GCLK_IO0 ((PIN_PA28H_GCLK_IO0 << 16) | MUX_PA28H_GCLK_IO0)
|
||||
#define PORT_PA28H_GCLK_IO0 (1u << 28)
|
||||
#define PIN_PA30H_GCLK_IO0 30 /**< \brief GCLK signal: IO0 on PA30 mux H */
|
||||
#define MUX_PA30H_GCLK_IO0 7
|
||||
#define PINMUX_PA30H_GCLK_IO0 ((PIN_PA30H_GCLK_IO0 << 16) | MUX_PA30H_GCLK_IO0)
|
||||
#define PORT_PA30H_GCLK_IO0 (1u << 30)
|
||||
#define PIN_PB23H_GCLK_IO1 55 /**< \brief GCLK signal: IO1 on PB23 mux H */
|
||||
#define MUX_PB23H_GCLK_IO1 7
|
||||
#define PINMUX_PB23H_GCLK_IO1 ((PIN_PB23H_GCLK_IO1 << 16) | MUX_PB23H_GCLK_IO1)
|
||||
#define PORT_PB23H_GCLK_IO1 (1u << 23)
|
||||
#define PIN_PA15H_GCLK_IO1 15 /**< \brief GCLK signal: IO1 on PA15 mux H */
|
||||
#define MUX_PA15H_GCLK_IO1 7
|
||||
#define PINMUX_PA15H_GCLK_IO1 ((PIN_PA15H_GCLK_IO1 << 16) | MUX_PA15H_GCLK_IO1)
|
||||
#define PORT_PA15H_GCLK_IO1 (1u << 15)
|
||||
#define PIN_PA16H_GCLK_IO2 16 /**< \brief GCLK signal: IO2 on PA16 mux H */
|
||||
#define MUX_PA16H_GCLK_IO2 7
|
||||
#define PINMUX_PA16H_GCLK_IO2 ((PIN_PA16H_GCLK_IO2 << 16) | MUX_PA16H_GCLK_IO2)
|
||||
#define PORT_PA16H_GCLK_IO2 (1u << 16)
|
||||
#define PIN_PA17H_GCLK_IO3 17 /**< \brief GCLK signal: IO3 on PA17 mux H */
|
||||
#define MUX_PA17H_GCLK_IO3 7
|
||||
#define PINMUX_PA17H_GCLK_IO3 ((PIN_PA17H_GCLK_IO3 << 16) | MUX_PA17H_GCLK_IO3)
|
||||
#define PORT_PA17H_GCLK_IO3 (1u << 17)
|
||||
#define PIN_PA10H_GCLK_IO4 10 /**< \brief GCLK signal: IO4 on PA10 mux H */
|
||||
#define MUX_PA10H_GCLK_IO4 7
|
||||
#define PINMUX_PA10H_GCLK_IO4 ((PIN_PA10H_GCLK_IO4 << 16) | MUX_PA10H_GCLK_IO4)
|
||||
#define PORT_PA10H_GCLK_IO4 (1u << 10)
|
||||
#define PIN_PA20H_GCLK_IO4 20 /**< \brief GCLK signal: IO4 on PA20 mux H */
|
||||
#define MUX_PA20H_GCLK_IO4 7
|
||||
#define PINMUX_PA20H_GCLK_IO4 ((PIN_PA20H_GCLK_IO4 << 16) | MUX_PA20H_GCLK_IO4)
|
||||
#define PORT_PA20H_GCLK_IO4 (1u << 20)
|
||||
#define PIN_PB10H_GCLK_IO4 42 /**< \brief GCLK signal: IO4 on PB10 mux H */
|
||||
#define MUX_PB10H_GCLK_IO4 7
|
||||
#define PINMUX_PB10H_GCLK_IO4 ((PIN_PB10H_GCLK_IO4 << 16) | MUX_PB10H_GCLK_IO4)
|
||||
#define PORT_PB10H_GCLK_IO4 (1u << 10)
|
||||
#define PIN_PA11H_GCLK_IO5 11 /**< \brief GCLK signal: IO5 on PA11 mux H */
|
||||
#define MUX_PA11H_GCLK_IO5 7
|
||||
#define PINMUX_PA11H_GCLK_IO5 ((PIN_PA11H_GCLK_IO5 << 16) | MUX_PA11H_GCLK_IO5)
|
||||
#define PORT_PA11H_GCLK_IO5 (1u << 11)
|
||||
#define PIN_PA21H_GCLK_IO5 21 /**< \brief GCLK signal: IO5 on PA21 mux H */
|
||||
#define MUX_PA21H_GCLK_IO5 7
|
||||
#define PINMUX_PA21H_GCLK_IO5 ((PIN_PA21H_GCLK_IO5 << 16) | MUX_PA21H_GCLK_IO5)
|
||||
#define PORT_PA21H_GCLK_IO5 (1u << 21)
|
||||
#define PIN_PB11H_GCLK_IO5 43 /**< \brief GCLK signal: IO5 on PB11 mux H */
|
||||
#define MUX_PB11H_GCLK_IO5 7
|
||||
#define PINMUX_PB11H_GCLK_IO5 ((PIN_PB11H_GCLK_IO5 << 16) | MUX_PB11H_GCLK_IO5)
|
||||
#define PORT_PB11H_GCLK_IO5 (1u << 11)
|
||||
#define PIN_PA22H_GCLK_IO6 22 /**< \brief GCLK signal: IO6 on PA22 mux H */
|
||||
#define MUX_PA22H_GCLK_IO6 7
|
||||
#define PINMUX_PA22H_GCLK_IO6 ((PIN_PA22H_GCLK_IO6 << 16) | MUX_PA22H_GCLK_IO6)
|
||||
#define PORT_PA22H_GCLK_IO6 (1u << 22)
|
||||
#define PIN_PA23H_GCLK_IO7 23 /**< \brief GCLK signal: IO7 on PA23 mux H */
|
||||
#define MUX_PA23H_GCLK_IO7 7
|
||||
#define PINMUX_PA23H_GCLK_IO7 ((PIN_PA23H_GCLK_IO7 << 16) | MUX_PA23H_GCLK_IO7)
|
||||
#define PORT_PA23H_GCLK_IO7 (1u << 23)
|
||||
/* ========== PORT definition for EIC peripheral ========== */
|
||||
#define PIN_PA16A_EIC_EXTINT0 16 /**< \brief EIC signal: EXTINT0 on PA16 mux A */
|
||||
#define MUX_PA16A_EIC_EXTINT0 0
|
||||
#define PINMUX_PA16A_EIC_EXTINT0 ((PIN_PA16A_EIC_EXTINT0 << 16) | MUX_PA16A_EIC_EXTINT0)
|
||||
#define PORT_PA16A_EIC_EXTINT0 (1u << 16)
|
||||
#define PIN_PA00A_EIC_EXTINT0 0 /**< \brief EIC signal: EXTINT0 on PA00 mux A */
|
||||
#define MUX_PA00A_EIC_EXTINT0 0
|
||||
#define PINMUX_PA00A_EIC_EXTINT0 ((PIN_PA00A_EIC_EXTINT0 << 16) | MUX_PA00A_EIC_EXTINT0)
|
||||
#define PORT_PA00A_EIC_EXTINT0 (1u << 0)
|
||||
#define PIN_PA17A_EIC_EXTINT1 17 /**< \brief EIC signal: EXTINT1 on PA17 mux A */
|
||||
#define MUX_PA17A_EIC_EXTINT1 0
|
||||
#define PINMUX_PA17A_EIC_EXTINT1 ((PIN_PA17A_EIC_EXTINT1 << 16) | MUX_PA17A_EIC_EXTINT1)
|
||||
#define PORT_PA17A_EIC_EXTINT1 (1u << 17)
|
||||
#define PIN_PA01A_EIC_EXTINT1 1 /**< \brief EIC signal: EXTINT1 on PA01 mux A */
|
||||
#define MUX_PA01A_EIC_EXTINT1 0
|
||||
#define PINMUX_PA01A_EIC_EXTINT1 ((PIN_PA01A_EIC_EXTINT1 << 16) | MUX_PA01A_EIC_EXTINT1)
|
||||
#define PORT_PA01A_EIC_EXTINT1 (1u << 1)
|
||||
#define PIN_PA02A_EIC_EXTINT2 2 /**< \brief EIC signal: EXTINT2 on PA02 mux A */
|
||||
#define MUX_PA02A_EIC_EXTINT2 0
|
||||
#define PINMUX_PA02A_EIC_EXTINT2 ((PIN_PA02A_EIC_EXTINT2 << 16) | MUX_PA02A_EIC_EXTINT2)
|
||||
#define PORT_PA02A_EIC_EXTINT2 (1u << 2)
|
||||
#define PIN_PA18A_EIC_EXTINT2 18 /**< \brief EIC signal: EXTINT2 on PA18 mux A */
|
||||
#define MUX_PA18A_EIC_EXTINT2 0
|
||||
#define PINMUX_PA18A_EIC_EXTINT2 ((PIN_PA18A_EIC_EXTINT2 << 16) | MUX_PA18A_EIC_EXTINT2)
|
||||
#define PORT_PA18A_EIC_EXTINT2 (1u << 18)
|
||||
#define PIN_PB02A_EIC_EXTINT2 34 /**< \brief EIC signal: EXTINT2 on PB02 mux A */
|
||||
#define MUX_PB02A_EIC_EXTINT2 0
|
||||
#define PINMUX_PB02A_EIC_EXTINT2 ((PIN_PB02A_EIC_EXTINT2 << 16) | MUX_PB02A_EIC_EXTINT2)
|
||||
#define PORT_PB02A_EIC_EXTINT2 (1u << 2)
|
||||
#define PIN_PA03A_EIC_EXTINT3 3 /**< \brief EIC signal: EXTINT3 on PA03 mux A */
|
||||
#define MUX_PA03A_EIC_EXTINT3 0
|
||||
#define PINMUX_PA03A_EIC_EXTINT3 ((PIN_PA03A_EIC_EXTINT3 << 16) | MUX_PA03A_EIC_EXTINT3)
|
||||
#define PORT_PA03A_EIC_EXTINT3 (1u << 3)
|
||||
#define PIN_PA19A_EIC_EXTINT3 19 /**< \brief EIC signal: EXTINT3 on PA19 mux A */
|
||||
#define MUX_PA19A_EIC_EXTINT3 0
|
||||
#define PINMUX_PA19A_EIC_EXTINT3 ((PIN_PA19A_EIC_EXTINT3 << 16) | MUX_PA19A_EIC_EXTINT3)
|
||||
#define PORT_PA19A_EIC_EXTINT3 (1u << 19)
|
||||
#define PIN_PB03A_EIC_EXTINT3 35 /**< \brief EIC signal: EXTINT3 on PB03 mux A */
|
||||
#define MUX_PB03A_EIC_EXTINT3 0
|
||||
#define PINMUX_PB03A_EIC_EXTINT3 ((PIN_PB03A_EIC_EXTINT3 << 16) | MUX_PB03A_EIC_EXTINT3)
|
||||
#define PORT_PB03A_EIC_EXTINT3 (1u << 3)
|
||||
#define PIN_PA04A_EIC_EXTINT4 4 /**< \brief EIC signal: EXTINT4 on PA04 mux A */
|
||||
#define MUX_PA04A_EIC_EXTINT4 0
|
||||
#define PINMUX_PA04A_EIC_EXTINT4 ((PIN_PA04A_EIC_EXTINT4 << 16) | MUX_PA04A_EIC_EXTINT4)
|
||||
#define PORT_PA04A_EIC_EXTINT4 (1u << 4)
|
||||
#define PIN_PA20A_EIC_EXTINT4 20 /**< \brief EIC signal: EXTINT4 on PA20 mux A */
|
||||
#define MUX_PA20A_EIC_EXTINT4 0
|
||||
#define PINMUX_PA20A_EIC_EXTINT4 ((PIN_PA20A_EIC_EXTINT4 << 16) | MUX_PA20A_EIC_EXTINT4)
|
||||
#define PORT_PA20A_EIC_EXTINT4 (1u << 20)
|
||||
#define PIN_PA05A_EIC_EXTINT5 5 /**< \brief EIC signal: EXTINT5 on PA05 mux A */
|
||||
#define MUX_PA05A_EIC_EXTINT5 0
|
||||
#define PINMUX_PA05A_EIC_EXTINT5 ((PIN_PA05A_EIC_EXTINT5 << 16) | MUX_PA05A_EIC_EXTINT5)
|
||||
#define PORT_PA05A_EIC_EXTINT5 (1u << 5)
|
||||
#define PIN_PA21A_EIC_EXTINT5 21 /**< \brief EIC signal: EXTINT5 on PA21 mux A */
|
||||
#define MUX_PA21A_EIC_EXTINT5 0
|
||||
#define PINMUX_PA21A_EIC_EXTINT5 ((PIN_PA21A_EIC_EXTINT5 << 16) | MUX_PA21A_EIC_EXTINT5)
|
||||
#define PORT_PA21A_EIC_EXTINT5 (1u << 21)
|
||||
#define PIN_PA06A_EIC_EXTINT6 6 /**< \brief EIC signal: EXTINT6 on PA06 mux A */
|
||||
#define MUX_PA06A_EIC_EXTINT6 0
|
||||
#define PINMUX_PA06A_EIC_EXTINT6 ((PIN_PA06A_EIC_EXTINT6 << 16) | MUX_PA06A_EIC_EXTINT6)
|
||||
#define PORT_PA06A_EIC_EXTINT6 (1u << 6)
|
||||
#define PIN_PA22A_EIC_EXTINT6 22 /**< \brief EIC signal: EXTINT6 on PA22 mux A */
|
||||
#define MUX_PA22A_EIC_EXTINT6 0
|
||||
#define PINMUX_PA22A_EIC_EXTINT6 ((PIN_PA22A_EIC_EXTINT6 << 16) | MUX_PA22A_EIC_EXTINT6)
|
||||
#define PORT_PA22A_EIC_EXTINT6 (1u << 22)
|
||||
#define PIN_PB22A_EIC_EXTINT6 54 /**< \brief EIC signal: EXTINT6 on PB22 mux A */
|
||||
#define MUX_PB22A_EIC_EXTINT6 0
|
||||
#define PINMUX_PB22A_EIC_EXTINT6 ((PIN_PB22A_EIC_EXTINT6 << 16) | MUX_PB22A_EIC_EXTINT6)
|
||||
#define PORT_PB22A_EIC_EXTINT6 (1u << 22)
|
||||
#define PIN_PA07A_EIC_EXTINT7 7 /**< \brief EIC signal: EXTINT7 on PA07 mux A */
|
||||
#define MUX_PA07A_EIC_EXTINT7 0
|
||||
#define PINMUX_PA07A_EIC_EXTINT7 ((PIN_PA07A_EIC_EXTINT7 << 16) | MUX_PA07A_EIC_EXTINT7)
|
||||
#define PORT_PA07A_EIC_EXTINT7 (1u << 7)
|
||||
#define PIN_PA23A_EIC_EXTINT7 23 /**< \brief EIC signal: EXTINT7 on PA23 mux A */
|
||||
#define MUX_PA23A_EIC_EXTINT7 0
|
||||
#define PINMUX_PA23A_EIC_EXTINT7 ((PIN_PA23A_EIC_EXTINT7 << 16) | MUX_PA23A_EIC_EXTINT7)
|
||||
#define PORT_PA23A_EIC_EXTINT7 (1u << 23)
|
||||
#define PIN_PB23A_EIC_EXTINT7 55 /**< \brief EIC signal: EXTINT7 on PB23 mux A */
|
||||
#define MUX_PB23A_EIC_EXTINT7 0
|
||||
#define PINMUX_PB23A_EIC_EXTINT7 ((PIN_PB23A_EIC_EXTINT7 << 16) | MUX_PB23A_EIC_EXTINT7)
|
||||
#define PORT_PB23A_EIC_EXTINT7 (1u << 23)
|
||||
#define PIN_PA28A_EIC_EXTINT8 28 /**< \brief EIC signal: EXTINT8 on PA28 mux A */
|
||||
#define MUX_PA28A_EIC_EXTINT8 0
|
||||
#define PINMUX_PA28A_EIC_EXTINT8 ((PIN_PA28A_EIC_EXTINT8 << 16) | MUX_PA28A_EIC_EXTINT8)
|
||||
#define PORT_PA28A_EIC_EXTINT8 (1u << 28)
|
||||
#define PIN_PB08A_EIC_EXTINT8 40 /**< \brief EIC signal: EXTINT8 on PB08 mux A */
|
||||
#define MUX_PB08A_EIC_EXTINT8 0
|
||||
#define PINMUX_PB08A_EIC_EXTINT8 ((PIN_PB08A_EIC_EXTINT8 << 16) | MUX_PB08A_EIC_EXTINT8)
|
||||
#define PORT_PB08A_EIC_EXTINT8 (1u << 8)
|
||||
#define PIN_PA09A_EIC_EXTINT9 9 /**< \brief EIC signal: EXTINT9 on PA09 mux A */
|
||||
#define MUX_PA09A_EIC_EXTINT9 0
|
||||
#define PINMUX_PA09A_EIC_EXTINT9 ((PIN_PA09A_EIC_EXTINT9 << 16) | MUX_PA09A_EIC_EXTINT9)
|
||||
#define PORT_PA09A_EIC_EXTINT9 (1u << 9)
|
||||
#define PIN_PB09A_EIC_EXTINT9 41 /**< \brief EIC signal: EXTINT9 on PB09 mux A */
|
||||
#define MUX_PB09A_EIC_EXTINT9 0
|
||||
#define PINMUX_PB09A_EIC_EXTINT9 ((PIN_PB09A_EIC_EXTINT9 << 16) | MUX_PB09A_EIC_EXTINT9)
|
||||
#define PORT_PB09A_EIC_EXTINT9 (1u << 9)
|
||||
#define PIN_PA10A_EIC_EXTINT10 10 /**< \brief EIC signal: EXTINT10 on PA10 mux A */
|
||||
#define MUX_PA10A_EIC_EXTINT10 0
|
||||
#define PINMUX_PA10A_EIC_EXTINT10 ((PIN_PA10A_EIC_EXTINT10 << 16) | MUX_PA10A_EIC_EXTINT10)
|
||||
#define PORT_PA10A_EIC_EXTINT10 (1u << 10)
|
||||
#define PIN_PA30A_EIC_EXTINT10 30 /**< \brief EIC signal: EXTINT10 on PA30 mux A */
|
||||
#define MUX_PA30A_EIC_EXTINT10 0
|
||||
#define PINMUX_PA30A_EIC_EXTINT10 ((PIN_PA30A_EIC_EXTINT10 << 16) | MUX_PA30A_EIC_EXTINT10)
|
||||
#define PORT_PA30A_EIC_EXTINT10 (1u << 30)
|
||||
#define PIN_PB10A_EIC_EXTINT10 42 /**< \brief EIC signal: EXTINT10 on PB10 mux A */
|
||||
#define MUX_PB10A_EIC_EXTINT10 0
|
||||
#define PINMUX_PB10A_EIC_EXTINT10 ((PIN_PB10A_EIC_EXTINT10 << 16) | MUX_PB10A_EIC_EXTINT10)
|
||||
#define PORT_PB10A_EIC_EXTINT10 (1u << 10)
|
||||
#define PIN_PA11A_EIC_EXTINT11 11 /**< \brief EIC signal: EXTINT11 on PA11 mux A */
|
||||
#define MUX_PA11A_EIC_EXTINT11 0
|
||||
#define PINMUX_PA11A_EIC_EXTINT11 ((PIN_PA11A_EIC_EXTINT11 << 16) | MUX_PA11A_EIC_EXTINT11)
|
||||
#define PORT_PA11A_EIC_EXTINT11 (1u << 11)
|
||||
#define PIN_PA31A_EIC_EXTINT11 31 /**< \brief EIC signal: EXTINT11 on PA31 mux A */
|
||||
#define MUX_PA31A_EIC_EXTINT11 0
|
||||
#define PINMUX_PA31A_EIC_EXTINT11 ((PIN_PA31A_EIC_EXTINT11 << 16) | MUX_PA31A_EIC_EXTINT11)
|
||||
#define PORT_PA31A_EIC_EXTINT11 (1u << 31)
|
||||
#define PIN_PB11A_EIC_EXTINT11 43 /**< \brief EIC signal: EXTINT11 on PB11 mux A */
|
||||
#define MUX_PB11A_EIC_EXTINT11 0
|
||||
#define PINMUX_PB11A_EIC_EXTINT11 ((PIN_PB11A_EIC_EXTINT11 << 16) | MUX_PB11A_EIC_EXTINT11)
|
||||
#define PORT_PB11A_EIC_EXTINT11 (1u << 11)
|
||||
#define PIN_PA12A_EIC_EXTINT12 12 /**< \brief EIC signal: EXTINT12 on PA12 mux A */
|
||||
#define MUX_PA12A_EIC_EXTINT12 0
|
||||
#define PINMUX_PA12A_EIC_EXTINT12 ((PIN_PA12A_EIC_EXTINT12 << 16) | MUX_PA12A_EIC_EXTINT12)
|
||||
#define PORT_PA12A_EIC_EXTINT12 (1u << 12)
|
||||
#define PIN_PA24A_EIC_EXTINT12 24 /**< \brief EIC signal: EXTINT12 on PA24 mux A */
|
||||
#define MUX_PA24A_EIC_EXTINT12 0
|
||||
#define PINMUX_PA24A_EIC_EXTINT12 ((PIN_PA24A_EIC_EXTINT12 << 16) | MUX_PA24A_EIC_EXTINT12)
|
||||
#define PORT_PA24A_EIC_EXTINT12 (1u << 24)
|
||||
#define PIN_PA13A_EIC_EXTINT13 13 /**< \brief EIC signal: EXTINT13 on PA13 mux A */
|
||||
#define MUX_PA13A_EIC_EXTINT13 0
|
||||
#define PINMUX_PA13A_EIC_EXTINT13 ((PIN_PA13A_EIC_EXTINT13 << 16) | MUX_PA13A_EIC_EXTINT13)
|
||||
#define PORT_PA13A_EIC_EXTINT13 (1u << 13)
|
||||
#define PIN_PA25A_EIC_EXTINT13 25 /**< \brief EIC signal: EXTINT13 on PA25 mux A */
|
||||
#define MUX_PA25A_EIC_EXTINT13 0
|
||||
#define PINMUX_PA25A_EIC_EXTINT13 ((PIN_PA25A_EIC_EXTINT13 << 16) | MUX_PA25A_EIC_EXTINT13)
|
||||
#define PORT_PA25A_EIC_EXTINT13 (1u << 25)
|
||||
#define PIN_PA14A_EIC_EXTINT14 14 /**< \brief EIC signal: EXTINT14 on PA14 mux A */
|
||||
#define MUX_PA14A_EIC_EXTINT14 0
|
||||
#define PINMUX_PA14A_EIC_EXTINT14 ((PIN_PA14A_EIC_EXTINT14 << 16) | MUX_PA14A_EIC_EXTINT14)
|
||||
#define PORT_PA14A_EIC_EXTINT14 (1u << 14)
|
||||
#define PIN_PA27A_EIC_EXTINT15 27 /**< \brief EIC signal: EXTINT15 on PA27 mux A */
|
||||
#define MUX_PA27A_EIC_EXTINT15 0
|
||||
#define PINMUX_PA27A_EIC_EXTINT15 ((PIN_PA27A_EIC_EXTINT15 << 16) | MUX_PA27A_EIC_EXTINT15)
|
||||
#define PORT_PA27A_EIC_EXTINT15 (1u << 27)
|
||||
#define PIN_PA15A_EIC_EXTINT15 15 /**< \brief EIC signal: EXTINT15 on PA15 mux A */
|
||||
#define MUX_PA15A_EIC_EXTINT15 0
|
||||
#define PINMUX_PA15A_EIC_EXTINT15 ((PIN_PA15A_EIC_EXTINT15 << 16) | MUX_PA15A_EIC_EXTINT15)
|
||||
#define PORT_PA15A_EIC_EXTINT15 (1u << 15)
|
||||
#define PIN_PA08A_EIC_NMI 8 /**< \brief EIC signal: NMI on PA08 mux A */
|
||||
#define MUX_PA08A_EIC_NMI 0
|
||||
#define PINMUX_PA08A_EIC_NMI ((PIN_PA08A_EIC_NMI << 16) | MUX_PA08A_EIC_NMI)
|
||||
#define PORT_PA08A_EIC_NMI (1u << 8)
|
||||
/* ========== PORT definition for SERCOM0 peripheral ========== */
|
||||
#define PIN_PA04D_SERCOM0_PAD0 4 /**< \brief SERCOM0 signal: PAD0 on PA04 mux D */
|
||||
#define MUX_PA04D_SERCOM0_PAD0 3
|
||||
#define PINMUX_PA04D_SERCOM0_PAD0 ((PIN_PA04D_SERCOM0_PAD0 << 16) | MUX_PA04D_SERCOM0_PAD0)
|
||||
#define PORT_PA04D_SERCOM0_PAD0 (1u << 4)
|
||||
#define PIN_PA08C_SERCOM0_PAD0 8 /**< \brief SERCOM0 signal: PAD0 on PA08 mux C */
|
||||
#define MUX_PA08C_SERCOM0_PAD0 2
|
||||
#define PINMUX_PA08C_SERCOM0_PAD0 ((PIN_PA08C_SERCOM0_PAD0 << 16) | MUX_PA08C_SERCOM0_PAD0)
|
||||
#define PORT_PA08C_SERCOM0_PAD0 (1u << 8)
|
||||
#define PIN_PA05D_SERCOM0_PAD1 5 /**< \brief SERCOM0 signal: PAD1 on PA05 mux D */
|
||||
#define MUX_PA05D_SERCOM0_PAD1 3
|
||||
#define PINMUX_PA05D_SERCOM0_PAD1 ((PIN_PA05D_SERCOM0_PAD1 << 16) | MUX_PA05D_SERCOM0_PAD1)
|
||||
#define PORT_PA05D_SERCOM0_PAD1 (1u << 5)
|
||||
#define PIN_PA09C_SERCOM0_PAD1 9 /**< \brief SERCOM0 signal: PAD1 on PA09 mux C */
|
||||
#define MUX_PA09C_SERCOM0_PAD1 2
|
||||
#define PINMUX_PA09C_SERCOM0_PAD1 ((PIN_PA09C_SERCOM0_PAD1 << 16) | MUX_PA09C_SERCOM0_PAD1)
|
||||
#define PORT_PA09C_SERCOM0_PAD1 (1u << 9)
|
||||
#define PIN_PA06D_SERCOM0_PAD2 6 /**< \brief SERCOM0 signal: PAD2 on PA06 mux D */
|
||||
#define MUX_PA06D_SERCOM0_PAD2 3
|
||||
#define PINMUX_PA06D_SERCOM0_PAD2 ((PIN_PA06D_SERCOM0_PAD2 << 16) | MUX_PA06D_SERCOM0_PAD2)
|
||||
#define PORT_PA06D_SERCOM0_PAD2 (1u << 6)
|
||||
#define PIN_PA10C_SERCOM0_PAD2 10 /**< \brief SERCOM0 signal: PAD2 on PA10 mux C */
|
||||
#define MUX_PA10C_SERCOM0_PAD2 2
|
||||
#define PINMUX_PA10C_SERCOM0_PAD2 ((PIN_PA10C_SERCOM0_PAD2 << 16) | MUX_PA10C_SERCOM0_PAD2)
|
||||
#define PORT_PA10C_SERCOM0_PAD2 (1u << 10)
|
||||
#define PIN_PA07D_SERCOM0_PAD3 7 /**< \brief SERCOM0 signal: PAD3 on PA07 mux D */
|
||||
#define MUX_PA07D_SERCOM0_PAD3 3
|
||||
#define PINMUX_PA07D_SERCOM0_PAD3 ((PIN_PA07D_SERCOM0_PAD3 << 16) | MUX_PA07D_SERCOM0_PAD3)
|
||||
#define PORT_PA07D_SERCOM0_PAD3 (1u << 7)
|
||||
#define PIN_PA11C_SERCOM0_PAD3 11 /**< \brief SERCOM0 signal: PAD3 on PA11 mux C */
|
||||
#define MUX_PA11C_SERCOM0_PAD3 2
|
||||
#define PINMUX_PA11C_SERCOM0_PAD3 ((PIN_PA11C_SERCOM0_PAD3 << 16) | MUX_PA11C_SERCOM0_PAD3)
|
||||
#define PORT_PA11C_SERCOM0_PAD3 (1u << 11)
|
||||
/* ========== PORT definition for SERCOM1 peripheral ========== */
|
||||
#define PIN_PA16C_SERCOM1_PAD0 16 /**< \brief SERCOM1 signal: PAD0 on PA16 mux C */
|
||||
#define MUX_PA16C_SERCOM1_PAD0 2
|
||||
#define PINMUX_PA16C_SERCOM1_PAD0 ((PIN_PA16C_SERCOM1_PAD0 << 16) | MUX_PA16C_SERCOM1_PAD0)
|
||||
#define PORT_PA16C_SERCOM1_PAD0 (1u << 16)
|
||||
#define PIN_PA00D_SERCOM1_PAD0 0 /**< \brief SERCOM1 signal: PAD0 on PA00 mux D */
|
||||
#define MUX_PA00D_SERCOM1_PAD0 3
|
||||
#define PINMUX_PA00D_SERCOM1_PAD0 ((PIN_PA00D_SERCOM1_PAD0 << 16) | MUX_PA00D_SERCOM1_PAD0)
|
||||
#define PORT_PA00D_SERCOM1_PAD0 (1u << 0)
|
||||
#define PIN_PA17C_SERCOM1_PAD1 17 /**< \brief SERCOM1 signal: PAD1 on PA17 mux C */
|
||||
#define MUX_PA17C_SERCOM1_PAD1 2
|
||||
#define PINMUX_PA17C_SERCOM1_PAD1 ((PIN_PA17C_SERCOM1_PAD1 << 16) | MUX_PA17C_SERCOM1_PAD1)
|
||||
#define PORT_PA17C_SERCOM1_PAD1 (1u << 17)
|
||||
#define PIN_PA01D_SERCOM1_PAD1 1 /**< \brief SERCOM1 signal: PAD1 on PA01 mux D */
|
||||
#define MUX_PA01D_SERCOM1_PAD1 3
|
||||
#define PINMUX_PA01D_SERCOM1_PAD1 ((PIN_PA01D_SERCOM1_PAD1 << 16) | MUX_PA01D_SERCOM1_PAD1)
|
||||
#define PORT_PA01D_SERCOM1_PAD1 (1u << 1)
|
||||
#define PIN_PA30D_SERCOM1_PAD2 30 /**< \brief SERCOM1 signal: PAD2 on PA30 mux D */
|
||||
#define MUX_PA30D_SERCOM1_PAD2 3
|
||||
#define PINMUX_PA30D_SERCOM1_PAD2 ((PIN_PA30D_SERCOM1_PAD2 << 16) | MUX_PA30D_SERCOM1_PAD2)
|
||||
#define PORT_PA30D_SERCOM1_PAD2 (1u << 30)
|
||||
#define PIN_PA18C_SERCOM1_PAD2 18 /**< \brief SERCOM1 signal: PAD2 on PA18 mux C */
|
||||
#define MUX_PA18C_SERCOM1_PAD2 2
|
||||
#define PINMUX_PA18C_SERCOM1_PAD2 ((PIN_PA18C_SERCOM1_PAD2 << 16) | MUX_PA18C_SERCOM1_PAD2)
|
||||
#define PORT_PA18C_SERCOM1_PAD2 (1u << 18)
|
||||
#define PIN_PA31D_SERCOM1_PAD3 31 /**< \brief SERCOM1 signal: PAD3 on PA31 mux D */
|
||||
#define MUX_PA31D_SERCOM1_PAD3 3
|
||||
#define PINMUX_PA31D_SERCOM1_PAD3 ((PIN_PA31D_SERCOM1_PAD3 << 16) | MUX_PA31D_SERCOM1_PAD3)
|
||||
#define PORT_PA31D_SERCOM1_PAD3 (1u << 31)
|
||||
#define PIN_PA19C_SERCOM1_PAD3 19 /**< \brief SERCOM1 signal: PAD3 on PA19 mux C */
|
||||
#define MUX_PA19C_SERCOM1_PAD3 2
|
||||
#define PINMUX_PA19C_SERCOM1_PAD3 ((PIN_PA19C_SERCOM1_PAD3 << 16) | MUX_PA19C_SERCOM1_PAD3)
|
||||
#define PORT_PA19C_SERCOM1_PAD3 (1u << 19)
|
||||
/* ========== PORT definition for SERCOM2 peripheral ========== */
|
||||
#define PIN_PA08D_SERCOM2_PAD0 8 /**< \brief SERCOM2 signal: PAD0 on PA08 mux D */
|
||||
#define MUX_PA08D_SERCOM2_PAD0 3
|
||||
#define PINMUX_PA08D_SERCOM2_PAD0 ((PIN_PA08D_SERCOM2_PAD0 << 16) | MUX_PA08D_SERCOM2_PAD0)
|
||||
#define PORT_PA08D_SERCOM2_PAD0 (1u << 8)
|
||||
#define PIN_PA12C_SERCOM2_PAD0 12 /**< \brief SERCOM2 signal: PAD0 on PA12 mux C */
|
||||
#define MUX_PA12C_SERCOM2_PAD0 2
|
||||
#define PINMUX_PA12C_SERCOM2_PAD0 ((PIN_PA12C_SERCOM2_PAD0 << 16) | MUX_PA12C_SERCOM2_PAD0)
|
||||
#define PORT_PA12C_SERCOM2_PAD0 (1u << 12)
|
||||
#define PIN_PA09D_SERCOM2_PAD1 9 /**< \brief SERCOM2 signal: PAD1 on PA09 mux D */
|
||||
#define MUX_PA09D_SERCOM2_PAD1 3
|
||||
#define PINMUX_PA09D_SERCOM2_PAD1 ((PIN_PA09D_SERCOM2_PAD1 << 16) | MUX_PA09D_SERCOM2_PAD1)
|
||||
#define PORT_PA09D_SERCOM2_PAD1 (1u << 9)
|
||||
#define PIN_PA13C_SERCOM2_PAD1 13 /**< \brief SERCOM2 signal: PAD1 on PA13 mux C */
|
||||
#define MUX_PA13C_SERCOM2_PAD1 2
|
||||
#define PINMUX_PA13C_SERCOM2_PAD1 ((PIN_PA13C_SERCOM2_PAD1 << 16) | MUX_PA13C_SERCOM2_PAD1)
|
||||
#define PORT_PA13C_SERCOM2_PAD1 (1u << 13)
|
||||
#define PIN_PA10D_SERCOM2_PAD2 10 /**< \brief SERCOM2 signal: PAD2 on PA10 mux D */
|
||||
#define MUX_PA10D_SERCOM2_PAD2 3
|
||||
#define PINMUX_PA10D_SERCOM2_PAD2 ((PIN_PA10D_SERCOM2_PAD2 << 16) | MUX_PA10D_SERCOM2_PAD2)
|
||||
#define PORT_PA10D_SERCOM2_PAD2 (1u << 10)
|
||||
#define PIN_PA14C_SERCOM2_PAD2 14 /**< \brief SERCOM2 signal: PAD2 on PA14 mux C */
|
||||
#define MUX_PA14C_SERCOM2_PAD2 2
|
||||
#define PINMUX_PA14C_SERCOM2_PAD2 ((PIN_PA14C_SERCOM2_PAD2 << 16) | MUX_PA14C_SERCOM2_PAD2)
|
||||
#define PORT_PA14C_SERCOM2_PAD2 (1u << 14)
|
||||
#define PIN_PA11D_SERCOM2_PAD3 11 /**< \brief SERCOM2 signal: PAD3 on PA11 mux D */
|
||||
#define MUX_PA11D_SERCOM2_PAD3 3
|
||||
#define PINMUX_PA11D_SERCOM2_PAD3 ((PIN_PA11D_SERCOM2_PAD3 << 16) | MUX_PA11D_SERCOM2_PAD3)
|
||||
#define PORT_PA11D_SERCOM2_PAD3 (1u << 11)
|
||||
#define PIN_PA15C_SERCOM2_PAD3 15 /**< \brief SERCOM2 signal: PAD3 on PA15 mux C */
|
||||
#define MUX_PA15C_SERCOM2_PAD3 2
|
||||
#define PINMUX_PA15C_SERCOM2_PAD3 ((PIN_PA15C_SERCOM2_PAD3 << 16) | MUX_PA15C_SERCOM2_PAD3)
|
||||
#define PORT_PA15C_SERCOM2_PAD3 (1u << 15)
|
||||
/* ========== PORT definition for SERCOM3 peripheral ========== */
|
||||
#define PIN_PA16D_SERCOM3_PAD0 16 /**< \brief SERCOM3 signal: PAD0 on PA16 mux D */
|
||||
#define MUX_PA16D_SERCOM3_PAD0 3
|
||||
#define PINMUX_PA16D_SERCOM3_PAD0 ((PIN_PA16D_SERCOM3_PAD0 << 16) | MUX_PA16D_SERCOM3_PAD0)
|
||||
#define PORT_PA16D_SERCOM3_PAD0 (1u << 16)
|
||||
#define PIN_PA22C_SERCOM3_PAD0 22 /**< \brief SERCOM3 signal: PAD0 on PA22 mux C */
|
||||
#define MUX_PA22C_SERCOM3_PAD0 2
|
||||
#define PINMUX_PA22C_SERCOM3_PAD0 ((PIN_PA22C_SERCOM3_PAD0 << 16) | MUX_PA22C_SERCOM3_PAD0)
|
||||
#define PORT_PA22C_SERCOM3_PAD0 (1u << 22)
|
||||
#define PIN_PA17D_SERCOM3_PAD1 17 /**< \brief SERCOM3 signal: PAD1 on PA17 mux D */
|
||||
#define MUX_PA17D_SERCOM3_PAD1 3
|
||||
#define PINMUX_PA17D_SERCOM3_PAD1 ((PIN_PA17D_SERCOM3_PAD1 << 16) | MUX_PA17D_SERCOM3_PAD1)
|
||||
#define PORT_PA17D_SERCOM3_PAD1 (1u << 17)
|
||||
#define PIN_PA23C_SERCOM3_PAD1 23 /**< \brief SERCOM3 signal: PAD1 on PA23 mux C */
|
||||
#define MUX_PA23C_SERCOM3_PAD1 2
|
||||
#define PINMUX_PA23C_SERCOM3_PAD1 ((PIN_PA23C_SERCOM3_PAD1 << 16) | MUX_PA23C_SERCOM3_PAD1)
|
||||
#define PORT_PA23C_SERCOM3_PAD1 (1u << 23)
|
||||
#define PIN_PA18D_SERCOM3_PAD2 18 /**< \brief SERCOM3 signal: PAD2 on PA18 mux D */
|
||||
#define MUX_PA18D_SERCOM3_PAD2 3
|
||||
#define PINMUX_PA18D_SERCOM3_PAD2 ((PIN_PA18D_SERCOM3_PAD2 << 16) | MUX_PA18D_SERCOM3_PAD2)
|
||||
#define PORT_PA18D_SERCOM3_PAD2 (1u << 18)
|
||||
#define PIN_PA20D_SERCOM3_PAD2 20 /**< \brief SERCOM3 signal: PAD2 on PA20 mux D */
|
||||
#define MUX_PA20D_SERCOM3_PAD2 3
|
||||
#define PINMUX_PA20D_SERCOM3_PAD2 ((PIN_PA20D_SERCOM3_PAD2 << 16) | MUX_PA20D_SERCOM3_PAD2)
|
||||
#define PORT_PA20D_SERCOM3_PAD2 (1u << 20)
|
||||
#define PIN_PA24C_SERCOM3_PAD2 24 /**< \brief SERCOM3 signal: PAD2 on PA24 mux C */
|
||||
#define MUX_PA24C_SERCOM3_PAD2 2
|
||||
#define PINMUX_PA24C_SERCOM3_PAD2 ((PIN_PA24C_SERCOM3_PAD2 << 16) | MUX_PA24C_SERCOM3_PAD2)
|
||||
#define PORT_PA24C_SERCOM3_PAD2 (1u << 24)
|
||||
#define PIN_PA19D_SERCOM3_PAD3 19 /**< \brief SERCOM3 signal: PAD3 on PA19 mux D */
|
||||
#define MUX_PA19D_SERCOM3_PAD3 3
|
||||
#define PINMUX_PA19D_SERCOM3_PAD3 ((PIN_PA19D_SERCOM3_PAD3 << 16) | MUX_PA19D_SERCOM3_PAD3)
|
||||
#define PORT_PA19D_SERCOM3_PAD3 (1u << 19)
|
||||
#define PIN_PA21D_SERCOM3_PAD3 21 /**< \brief SERCOM3 signal: PAD3 on PA21 mux D */
|
||||
#define MUX_PA21D_SERCOM3_PAD3 3
|
||||
#define PINMUX_PA21D_SERCOM3_PAD3 ((PIN_PA21D_SERCOM3_PAD3 << 16) | MUX_PA21D_SERCOM3_PAD3)
|
||||
#define PORT_PA21D_SERCOM3_PAD3 (1u << 21)
|
||||
#define PIN_PA25C_SERCOM3_PAD3 25 /**< \brief SERCOM3 signal: PAD3 on PA25 mux C */
|
||||
#define MUX_PA25C_SERCOM3_PAD3 2
|
||||
#define PINMUX_PA25C_SERCOM3_PAD3 ((PIN_PA25C_SERCOM3_PAD3 << 16) | MUX_PA25C_SERCOM3_PAD3)
|
||||
#define PORT_PA25C_SERCOM3_PAD3 (1u << 25)
|
||||
/* ========== PORT definition for SERCOM4 peripheral ========== */
|
||||
#define PIN_PA12D_SERCOM4_PAD0 12 /**< \brief SERCOM4 signal: PAD0 on PA12 mux D */
|
||||
#define MUX_PA12D_SERCOM4_PAD0 3
|
||||
#define PINMUX_PA12D_SERCOM4_PAD0 ((PIN_PA12D_SERCOM4_PAD0 << 16) | MUX_PA12D_SERCOM4_PAD0)
|
||||
#define PORT_PA12D_SERCOM4_PAD0 (1u << 12)
|
||||
#define PIN_PB08D_SERCOM4_PAD0 40 /**< \brief SERCOM4 signal: PAD0 on PB08 mux D */
|
||||
#define MUX_PB08D_SERCOM4_PAD0 3
|
||||
#define PINMUX_PB08D_SERCOM4_PAD0 ((PIN_PB08D_SERCOM4_PAD0 << 16) | MUX_PB08D_SERCOM4_PAD0)
|
||||
#define PORT_PB08D_SERCOM4_PAD0 (1u << 8)
|
||||
#define PIN_PA13D_SERCOM4_PAD1 13 /**< \brief SERCOM4 signal: PAD1 on PA13 mux D */
|
||||
#define MUX_PA13D_SERCOM4_PAD1 3
|
||||
#define PINMUX_PA13D_SERCOM4_PAD1 ((PIN_PA13D_SERCOM4_PAD1 << 16) | MUX_PA13D_SERCOM4_PAD1)
|
||||
#define PORT_PA13D_SERCOM4_PAD1 (1u << 13)
|
||||
#define PIN_PB09D_SERCOM4_PAD1 41 /**< \brief SERCOM4 signal: PAD1 on PB09 mux D */
|
||||
#define MUX_PB09D_SERCOM4_PAD1 3
|
||||
#define PINMUX_PB09D_SERCOM4_PAD1 ((PIN_PB09D_SERCOM4_PAD1 << 16) | MUX_PB09D_SERCOM4_PAD1)
|
||||
#define PORT_PB09D_SERCOM4_PAD1 (1u << 9)
|
||||
#define PIN_PA14D_SERCOM4_PAD2 14 /**< \brief SERCOM4 signal: PAD2 on PA14 mux D */
|
||||
#define MUX_PA14D_SERCOM4_PAD2 3
|
||||
#define PINMUX_PA14D_SERCOM4_PAD2 ((PIN_PA14D_SERCOM4_PAD2 << 16) | MUX_PA14D_SERCOM4_PAD2)
|
||||
#define PORT_PA14D_SERCOM4_PAD2 (1u << 14)
|
||||
#define PIN_PB10D_SERCOM4_PAD2 42 /**< \brief SERCOM4 signal: PAD2 on PB10 mux D */
|
||||
#define MUX_PB10D_SERCOM4_PAD2 3
|
||||
#define PINMUX_PB10D_SERCOM4_PAD2 ((PIN_PB10D_SERCOM4_PAD2 << 16) | MUX_PB10D_SERCOM4_PAD2)
|
||||
#define PORT_PB10D_SERCOM4_PAD2 (1u << 10)
|
||||
#define PIN_PA15D_SERCOM4_PAD3 15 /**< \brief SERCOM4 signal: PAD3 on PA15 mux D */
|
||||
#define MUX_PA15D_SERCOM4_PAD3 3
|
||||
#define PINMUX_PA15D_SERCOM4_PAD3 ((PIN_PA15D_SERCOM4_PAD3 << 16) | MUX_PA15D_SERCOM4_PAD3)
|
||||
#define PORT_PA15D_SERCOM4_PAD3 (1u << 15)
|
||||
#define PIN_PB11D_SERCOM4_PAD3 43 /**< \brief SERCOM4 signal: PAD3 on PB11 mux D */
|
||||
#define MUX_PB11D_SERCOM4_PAD3 3
|
||||
#define PINMUX_PB11D_SERCOM4_PAD3 ((PIN_PB11D_SERCOM4_PAD3 << 16) | MUX_PB11D_SERCOM4_PAD3)
|
||||
#define PORT_PB11D_SERCOM4_PAD3 (1u << 11)
|
||||
/* ========== PORT definition for SERCOM5 peripheral ========== */
|
||||
#define PIN_PA22D_SERCOM5_PAD0 22 /**< \brief SERCOM5 signal: PAD0 on PA22 mux D */
|
||||
#define MUX_PA22D_SERCOM5_PAD0 3
|
||||
#define PINMUX_PA22D_SERCOM5_PAD0 ((PIN_PA22D_SERCOM5_PAD0 << 16) | MUX_PA22D_SERCOM5_PAD0)
|
||||
#define PORT_PA22D_SERCOM5_PAD0 (1u << 22)
|
||||
#define PIN_PB02D_SERCOM5_PAD0 34 /**< \brief SERCOM5 signal: PAD0 on PB02 mux D */
|
||||
#define MUX_PB02D_SERCOM5_PAD0 3
|
||||
#define PINMUX_PB02D_SERCOM5_PAD0 ((PIN_PB02D_SERCOM5_PAD0 << 16) | MUX_PB02D_SERCOM5_PAD0)
|
||||
#define PORT_PB02D_SERCOM5_PAD0 (1u << 2)
|
||||
#define PIN_PA23D_SERCOM5_PAD1 23 /**< \brief SERCOM5 signal: PAD1 on PA23 mux D */
|
||||
#define MUX_PA23D_SERCOM5_PAD1 3
|
||||
#define PINMUX_PA23D_SERCOM5_PAD1 ((PIN_PA23D_SERCOM5_PAD1 << 16) | MUX_PA23D_SERCOM5_PAD1)
|
||||
#define PORT_PA23D_SERCOM5_PAD1 (1u << 23)
|
||||
#define PIN_PB03D_SERCOM5_PAD1 35 /**< \brief SERCOM5 signal: PAD1 on PB03 mux D */
|
||||
#define MUX_PB03D_SERCOM5_PAD1 3
|
||||
#define PINMUX_PB03D_SERCOM5_PAD1 ((PIN_PB03D_SERCOM5_PAD1 << 16) | MUX_PB03D_SERCOM5_PAD1)
|
||||
#define PORT_PB03D_SERCOM5_PAD1 (1u << 3)
|
||||
#define PIN_PA24D_SERCOM5_PAD2 24 /**< \brief SERCOM5 signal: PAD2 on PA24 mux D */
|
||||
#define MUX_PA24D_SERCOM5_PAD2 3
|
||||
#define PINMUX_PA24D_SERCOM5_PAD2 ((PIN_PA24D_SERCOM5_PAD2 << 16) | MUX_PA24D_SERCOM5_PAD2)
|
||||
#define PORT_PA24D_SERCOM5_PAD2 (1u << 24)
|
||||
#define PIN_PB22D_SERCOM5_PAD2 54 /**< \brief SERCOM5 signal: PAD2 on PB22 mux D */
|
||||
#define MUX_PB22D_SERCOM5_PAD2 3
|
||||
#define PINMUX_PB22D_SERCOM5_PAD2 ((PIN_PB22D_SERCOM5_PAD2 << 16) | MUX_PB22D_SERCOM5_PAD2)
|
||||
#define PORT_PB22D_SERCOM5_PAD2 (1u << 22)
|
||||
#define PIN_PA20C_SERCOM5_PAD2 20 /**< \brief SERCOM5 signal: PAD2 on PA20 mux C */
|
||||
#define MUX_PA20C_SERCOM5_PAD2 2
|
||||
#define PINMUX_PA20C_SERCOM5_PAD2 ((PIN_PA20C_SERCOM5_PAD2 << 16) | MUX_PA20C_SERCOM5_PAD2)
|
||||
#define PORT_PA20C_SERCOM5_PAD2 (1u << 20)
|
||||
#define PIN_PA25D_SERCOM5_PAD3 25 /**< \brief SERCOM5 signal: PAD3 on PA25 mux D */
|
||||
#define MUX_PA25D_SERCOM5_PAD3 3
|
||||
#define PINMUX_PA25D_SERCOM5_PAD3 ((PIN_PA25D_SERCOM5_PAD3 << 16) | MUX_PA25D_SERCOM5_PAD3)
|
||||
#define PORT_PA25D_SERCOM5_PAD3 (1u << 25)
|
||||
#define PIN_PB23D_SERCOM5_PAD3 55 /**< \brief SERCOM5 signal: PAD3 on PB23 mux D */
|
||||
#define MUX_PB23D_SERCOM5_PAD3 3
|
||||
#define PINMUX_PB23D_SERCOM5_PAD3 ((PIN_PB23D_SERCOM5_PAD3 << 16) | MUX_PB23D_SERCOM5_PAD3)
|
||||
#define PORT_PB23D_SERCOM5_PAD3 (1u << 23)
|
||||
#define PIN_PA21C_SERCOM5_PAD3 21 /**< \brief SERCOM5 signal: PAD3 on PA21 mux C */
|
||||
#define MUX_PA21C_SERCOM5_PAD3 2
|
||||
#define PINMUX_PA21C_SERCOM5_PAD3 ((PIN_PA21C_SERCOM5_PAD3 << 16) | MUX_PA21C_SERCOM5_PAD3)
|
||||
#define PORT_PA21C_SERCOM5_PAD3 (1u << 21)
|
||||
/* ========== PORT definition for TC0 peripheral ========== */
|
||||
#define PIN_PA04F_TC0_WO0 4 /**< \brief TC0 signal: WO0 on PA04 mux F */
|
||||
#define MUX_PA04F_TC0_WO0 5
|
||||
#define PINMUX_PA04F_TC0_WO0 ((PIN_PA04F_TC0_WO0 << 16) | MUX_PA04F_TC0_WO0)
|
||||
#define PORT_PA04F_TC0_WO0 (1u << 4)
|
||||
#define PIN_PA08E_TC0_WO0 8 /**< \brief TC0 signal: WO0 on PA08 mux E */
|
||||
#define MUX_PA08E_TC0_WO0 4
|
||||
#define PINMUX_PA08E_TC0_WO0 ((PIN_PA08E_TC0_WO0 << 16) | MUX_PA08E_TC0_WO0)
|
||||
#define PORT_PA08E_TC0_WO0 (1u << 8)
|
||||
#define PIN_PA05F_TC0_WO1 5 /**< \brief TC0 signal: WO1 on PA05 mux F */
|
||||
#define MUX_PA05F_TC0_WO1 5
|
||||
#define PINMUX_PA05F_TC0_WO1 ((PIN_PA05F_TC0_WO1 << 16) | MUX_PA05F_TC0_WO1)
|
||||
#define PORT_PA05F_TC0_WO1 (1u << 5)
|
||||
#define PIN_PA09E_TC0_WO1 9 /**< \brief TC0 signal: WO1 on PA09 mux E */
|
||||
#define MUX_PA09E_TC0_WO1 4
|
||||
#define PINMUX_PA09E_TC0_WO1 ((PIN_PA09E_TC0_WO1 << 16) | MUX_PA09E_TC0_WO1)
|
||||
#define PORT_PA09E_TC0_WO1 (1u << 9)
|
||||
/* ========== PORT definition for TC1 peripheral ========== */
|
||||
#define PIN_PA06F_TC1_WO0 6 /**< \brief TC1 signal: WO0 on PA06 mux F */
|
||||
#define MUX_PA06F_TC1_WO0 5
|
||||
#define PINMUX_PA06F_TC1_WO0 ((PIN_PA06F_TC1_WO0 << 16) | MUX_PA06F_TC1_WO0)
|
||||
#define PORT_PA06F_TC1_WO0 (1u << 6)
|
||||
#define PIN_PA30F_TC1_WO0 30 /**< \brief TC1 signal: WO0 on PA30 mux F */
|
||||
#define MUX_PA30F_TC1_WO0 5
|
||||
#define PINMUX_PA30F_TC1_WO0 ((PIN_PA30F_TC1_WO0 << 16) | MUX_PA30F_TC1_WO0)
|
||||
#define PORT_PA30F_TC1_WO0 (1u << 30)
|
||||
#define PIN_PA10E_TC1_WO0 10 /**< \brief TC1 signal: WO0 on PA10 mux E */
|
||||
#define MUX_PA10E_TC1_WO0 4
|
||||
#define PINMUX_PA10E_TC1_WO0 ((PIN_PA10E_TC1_WO0 << 16) | MUX_PA10E_TC1_WO0)
|
||||
#define PORT_PA10E_TC1_WO0 (1u << 10)
|
||||
#define PIN_PA07F_TC1_WO1 7 /**< \brief TC1 signal: WO1 on PA07 mux F */
|
||||
#define MUX_PA07F_TC1_WO1 5
|
||||
#define PINMUX_PA07F_TC1_WO1 ((PIN_PA07F_TC1_WO1 << 16) | MUX_PA07F_TC1_WO1)
|
||||
#define PORT_PA07F_TC1_WO1 (1u << 7)
|
||||
#define PIN_PA31F_TC1_WO1 31 /**< \brief TC1 signal: WO1 on PA31 mux F */
|
||||
#define MUX_PA31F_TC1_WO1 5
|
||||
#define PINMUX_PA31F_TC1_WO1 ((PIN_PA31F_TC1_WO1 << 16) | MUX_PA31F_TC1_WO1)
|
||||
#define PORT_PA31F_TC1_WO1 (1u << 31)
|
||||
#define PIN_PA11E_TC1_WO1 11 /**< \brief TC1 signal: WO1 on PA11 mux E */
|
||||
#define MUX_PA11E_TC1_WO1 4
|
||||
#define PINMUX_PA11E_TC1_WO1 ((PIN_PA11E_TC1_WO1 << 16) | MUX_PA11E_TC1_WO1)
|
||||
#define PORT_PA11E_TC1_WO1 (1u << 11)
|
||||
/* ========== PORT definition for TC2 peripheral ========== */
|
||||
#define PIN_PA16F_TC2_WO0 16 /**< \brief TC2 signal: WO0 on PA16 mux F */
|
||||
#define MUX_PA16F_TC2_WO0 5
|
||||
#define PINMUX_PA16F_TC2_WO0 ((PIN_PA16F_TC2_WO0 << 16) | MUX_PA16F_TC2_WO0)
|
||||
#define PORT_PA16F_TC2_WO0 (1u << 16)
|
||||
#define PIN_PA12E_TC2_WO0 12 /**< \brief TC2 signal: WO0 on PA12 mux E */
|
||||
#define MUX_PA12E_TC2_WO0 4
|
||||
#define PINMUX_PA12E_TC2_WO0 ((PIN_PA12E_TC2_WO0 << 16) | MUX_PA12E_TC2_WO0)
|
||||
#define PORT_PA12E_TC2_WO0 (1u << 12)
|
||||
#define PIN_PA00F_TC2_WO0 0 /**< \brief TC2 signal: WO0 on PA00 mux F */
|
||||
#define MUX_PA00F_TC2_WO0 5
|
||||
#define PINMUX_PA00F_TC2_WO0 ((PIN_PA00F_TC2_WO0 << 16) | MUX_PA00F_TC2_WO0)
|
||||
#define PORT_PA00F_TC2_WO0 (1u << 0)
|
||||
#define PIN_PA17F_TC2_WO1 17 /**< \brief TC2 signal: WO1 on PA17 mux F */
|
||||
#define MUX_PA17F_TC2_WO1 5
|
||||
#define PINMUX_PA17F_TC2_WO1 ((PIN_PA17F_TC2_WO1 << 16) | MUX_PA17F_TC2_WO1)
|
||||
#define PORT_PA17F_TC2_WO1 (1u << 17)
|
||||
#define PIN_PA13E_TC2_WO1 13 /**< \brief TC2 signal: WO1 on PA13 mux E */
|
||||
#define MUX_PA13E_TC2_WO1 4
|
||||
#define PINMUX_PA13E_TC2_WO1 ((PIN_PA13E_TC2_WO1 << 16) | MUX_PA13E_TC2_WO1)
|
||||
#define PORT_PA13E_TC2_WO1 (1u << 13)
|
||||
#define PIN_PA01F_TC2_WO1 1 /**< \brief TC2 signal: WO1 on PA01 mux F */
|
||||
#define MUX_PA01F_TC2_WO1 5
|
||||
#define PINMUX_PA01F_TC2_WO1 ((PIN_PA01F_TC2_WO1 << 16) | MUX_PA01F_TC2_WO1)
|
||||
#define PORT_PA01F_TC2_WO1 (1u << 1)
|
||||
/* ========== PORT definition for TC3 peripheral ========== */
|
||||
#define PIN_PA18F_TC3_WO0 18 /**< \brief TC3 signal: WO0 on PA18 mux F */
|
||||
#define MUX_PA18F_TC3_WO0 5
|
||||
#define PINMUX_PA18F_TC3_WO0 ((PIN_PA18F_TC3_WO0 << 16) | MUX_PA18F_TC3_WO0)
|
||||
#define PORT_PA18F_TC3_WO0 (1u << 18)
|
||||
#define PIN_PA14E_TC3_WO0 14 /**< \brief TC3 signal: WO0 on PA14 mux E */
|
||||
#define MUX_PA14E_TC3_WO0 4
|
||||
#define PINMUX_PA14E_TC3_WO0 ((PIN_PA14E_TC3_WO0 << 16) | MUX_PA14E_TC3_WO0)
|
||||
#define PORT_PA14E_TC3_WO0 (1u << 14)
|
||||
#define PIN_PA19F_TC3_WO1 19 /**< \brief TC3 signal: WO1 on PA19 mux F */
|
||||
#define MUX_PA19F_TC3_WO1 5
|
||||
#define PINMUX_PA19F_TC3_WO1 ((PIN_PA19F_TC3_WO1 << 16) | MUX_PA19F_TC3_WO1)
|
||||
#define PORT_PA19F_TC3_WO1 (1u << 19)
|
||||
#define PIN_PA15E_TC3_WO1 15 /**< \brief TC3 signal: WO1 on PA15 mux E */
|
||||
#define MUX_PA15E_TC3_WO1 4
|
||||
#define PINMUX_PA15E_TC3_WO1 ((PIN_PA15E_TC3_WO1 << 16) | MUX_PA15E_TC3_WO1)
|
||||
#define PORT_PA15E_TC3_WO1 (1u << 15)
|
||||
/* ========== PORT definition for TC4 peripheral ========== */
|
||||
#define PIN_PA22F_TC4_WO0 22 /**< \brief TC4 signal: WO0 on PA22 mux F */
|
||||
#define MUX_PA22F_TC4_WO0 5
|
||||
#define PINMUX_PA22F_TC4_WO0 ((PIN_PA22F_TC4_WO0 << 16) | MUX_PA22F_TC4_WO0)
|
||||
#define PORT_PA22F_TC4_WO0 (1u << 22)
|
||||
#define PIN_PB08F_TC4_WO0 40 /**< \brief TC4 signal: WO0 on PB08 mux F */
|
||||
#define MUX_PB08F_TC4_WO0 5
|
||||
#define PINMUX_PB08F_TC4_WO0 ((PIN_PB08F_TC4_WO0 << 16) | MUX_PB08F_TC4_WO0)
|
||||
#define PORT_PB08F_TC4_WO0 (1u << 8)
|
||||
#define PIN_PA23F_TC4_WO1 23 /**< \brief TC4 signal: WO1 on PA23 mux F */
|
||||
#define MUX_PA23F_TC4_WO1 5
|
||||
#define PINMUX_PA23F_TC4_WO1 ((PIN_PA23F_TC4_WO1 << 16) | MUX_PA23F_TC4_WO1)
|
||||
#define PORT_PA23F_TC4_WO1 (1u << 23)
|
||||
#define PIN_PB09F_TC4_WO1 41 /**< \brief TC4 signal: WO1 on PB09 mux F */
|
||||
#define MUX_PB09F_TC4_WO1 5
|
||||
#define PINMUX_PB09F_TC4_WO1 ((PIN_PB09F_TC4_WO1 << 16) | MUX_PB09F_TC4_WO1)
|
||||
#define PORT_PB09F_TC4_WO1 (1u << 9)
|
||||
/* ========== PORT definition for TC5 peripheral ========== */
|
||||
#define PIN_PA24F_TC5_WO0 24 /**< \brief TC5 signal: WO0 on PA24 mux F */
|
||||
#define MUX_PA24F_TC5_WO0 5
|
||||
#define PINMUX_PA24F_TC5_WO0 ((PIN_PA24F_TC5_WO0 << 16) | MUX_PA24F_TC5_WO0)
|
||||
#define PORT_PA24F_TC5_WO0 (1u << 24)
|
||||
#define PIN_PB10F_TC5_WO0 42 /**< \brief TC5 signal: WO0 on PB10 mux F */
|
||||
#define MUX_PB10F_TC5_WO0 5
|
||||
#define PINMUX_PB10F_TC5_WO0 ((PIN_PB10F_TC5_WO0 << 16) | MUX_PB10F_TC5_WO0)
|
||||
#define PORT_PB10F_TC5_WO0 (1u << 10)
|
||||
#define PIN_PA25F_TC5_WO1 25 /**< \brief TC5 signal: WO1 on PA25 mux F */
|
||||
#define MUX_PA25F_TC5_WO1 5
|
||||
#define PINMUX_PA25F_TC5_WO1 ((PIN_PA25F_TC5_WO1 << 16) | MUX_PA25F_TC5_WO1)
|
||||
#define PORT_PA25F_TC5_WO1 (1u << 25)
|
||||
#define PIN_PB11F_TC5_WO1 43 /**< \brief TC5 signal: WO1 on PB11 mux F */
|
||||
#define MUX_PB11F_TC5_WO1 5
|
||||
#define PINMUX_PB11F_TC5_WO1 ((PIN_PB11F_TC5_WO1 << 16) | MUX_PB11F_TC5_WO1)
|
||||
#define PORT_PB11F_TC5_WO1 (1u << 11)
|
||||
/* ========== PORT definition for TC6 peripheral ========== */
|
||||
#define PIN_PB02F_TC6_WO0 34 /**< \brief TC6 signal: WO0 on PB02 mux F */
|
||||
#define MUX_PB02F_TC6_WO0 5
|
||||
#define PINMUX_PB02F_TC6_WO0 ((PIN_PB02F_TC6_WO0 << 16) | MUX_PB02F_TC6_WO0)
|
||||
#define PORT_PB02F_TC6_WO0 (1u << 2)
|
||||
#define PIN_PB03F_TC6_WO1 35 /**< \brief TC6 signal: WO1 on PB03 mux F */
|
||||
#define MUX_PB03F_TC6_WO1 5
|
||||
#define PINMUX_PB03F_TC6_WO1 ((PIN_PB03F_TC6_WO1 << 16) | MUX_PB03F_TC6_WO1)
|
||||
#define PORT_PB03F_TC6_WO1 (1u << 3)
|
||||
/* ========== PORT definition for TC7 peripheral ========== */
|
||||
#define PIN_PB22F_TC7_WO0 54 /**< \brief TC7 signal: WO0 on PB22 mux F */
|
||||
#define MUX_PB22F_TC7_WO0 5
|
||||
#define PINMUX_PB22F_TC7_WO0 ((PIN_PB22F_TC7_WO0 << 16) | MUX_PB22F_TC7_WO0)
|
||||
#define PORT_PB22F_TC7_WO0 (1u << 22)
|
||||
#define PIN_PA20E_TC7_WO0 20 /**< \brief TC7 signal: WO0 on PA20 mux E */
|
||||
#define MUX_PA20E_TC7_WO0 4
|
||||
#define PINMUX_PA20E_TC7_WO0 ((PIN_PA20E_TC7_WO0 << 16) | MUX_PA20E_TC7_WO0)
|
||||
#define PORT_PA20E_TC7_WO0 (1u << 20)
|
||||
#define PIN_PB23F_TC7_WO1 55 /**< \brief TC7 signal: WO1 on PB23 mux F */
|
||||
#define MUX_PB23F_TC7_WO1 5
|
||||
#define PINMUX_PB23F_TC7_WO1 ((PIN_PB23F_TC7_WO1 << 16) | MUX_PB23F_TC7_WO1)
|
||||
#define PORT_PB23F_TC7_WO1 (1u << 23)
|
||||
#define PIN_PA21E_TC7_WO1 21 /**< \brief TC7 signal: WO1 on PA21 mux E */
|
||||
#define MUX_PA21E_TC7_WO1 4
|
||||
#define PINMUX_PA21E_TC7_WO1 ((PIN_PA21E_TC7_WO1 << 16) | MUX_PA21E_TC7_WO1)
|
||||
#define PORT_PA21E_TC7_WO1 (1u << 21)
|
||||
/* ========== PORT definition for ADC peripheral ========== */
|
||||
#define PIN_PA02B_ADC_AIN0 2 /**< \brief ADC signal: AIN0 on PA02 mux B */
|
||||
#define MUX_PA02B_ADC_AIN0 1
|
||||
#define PINMUX_PA02B_ADC_AIN0 ((PIN_PA02B_ADC_AIN0 << 16) | MUX_PA02B_ADC_AIN0)
|
||||
#define PORT_PA02B_ADC_AIN0 (1u << 2)
|
||||
#define PIN_PA03B_ADC_AIN1 3 /**< \brief ADC signal: AIN1 on PA03 mux B */
|
||||
#define MUX_PA03B_ADC_AIN1 1
|
||||
#define PINMUX_PA03B_ADC_AIN1 ((PIN_PA03B_ADC_AIN1 << 16) | MUX_PA03B_ADC_AIN1)
|
||||
#define PORT_PA03B_ADC_AIN1 (1u << 3)
|
||||
#define PIN_PB08B_ADC_AIN2 40 /**< \brief ADC signal: AIN2 on PB08 mux B */
|
||||
#define MUX_PB08B_ADC_AIN2 1
|
||||
#define PINMUX_PB08B_ADC_AIN2 ((PIN_PB08B_ADC_AIN2 << 16) | MUX_PB08B_ADC_AIN2)
|
||||
#define PORT_PB08B_ADC_AIN2 (1u << 8)
|
||||
#define PIN_PB09B_ADC_AIN3 41 /**< \brief ADC signal: AIN3 on PB09 mux B */
|
||||
#define MUX_PB09B_ADC_AIN3 1
|
||||
#define PINMUX_PB09B_ADC_AIN3 ((PIN_PB09B_ADC_AIN3 << 16) | MUX_PB09B_ADC_AIN3)
|
||||
#define PORT_PB09B_ADC_AIN3 (1u << 9)
|
||||
#define PIN_PA04B_ADC_AIN4 4 /**< \brief ADC signal: AIN4 on PA04 mux B */
|
||||
#define MUX_PA04B_ADC_AIN4 1
|
||||
#define PINMUX_PA04B_ADC_AIN4 ((PIN_PA04B_ADC_AIN4 << 16) | MUX_PA04B_ADC_AIN4)
|
||||
#define PORT_PA04B_ADC_AIN4 (1u << 4)
|
||||
#define PIN_PA05B_ADC_AIN5 5 /**< \brief ADC signal: AIN5 on PA05 mux B */
|
||||
#define MUX_PA05B_ADC_AIN5 1
|
||||
#define PINMUX_PA05B_ADC_AIN5 ((PIN_PA05B_ADC_AIN5 << 16) | MUX_PA05B_ADC_AIN5)
|
||||
#define PORT_PA05B_ADC_AIN5 (1u << 5)
|
||||
#define PIN_PA06B_ADC_AIN6 6 /**< \brief ADC signal: AIN6 on PA06 mux B */
|
||||
#define MUX_PA06B_ADC_AIN6 1
|
||||
#define PINMUX_PA06B_ADC_AIN6 ((PIN_PA06B_ADC_AIN6 << 16) | MUX_PA06B_ADC_AIN6)
|
||||
#define PORT_PA06B_ADC_AIN6 (1u << 6)
|
||||
#define PIN_PA07B_ADC_AIN7 7 /**< \brief ADC signal: AIN7 on PA07 mux B */
|
||||
#define MUX_PA07B_ADC_AIN7 1
|
||||
#define PINMUX_PA07B_ADC_AIN7 ((PIN_PA07B_ADC_AIN7 << 16) | MUX_PA07B_ADC_AIN7)
|
||||
#define PORT_PA07B_ADC_AIN7 (1u << 7)
|
||||
#define PIN_PB02B_ADC_AIN10 34 /**< \brief ADC signal: AIN10 on PB02 mux B */
|
||||
#define MUX_PB02B_ADC_AIN10 1
|
||||
#define PINMUX_PB02B_ADC_AIN10 ((PIN_PB02B_ADC_AIN10 << 16) | MUX_PB02B_ADC_AIN10)
|
||||
#define PORT_PB02B_ADC_AIN10 (1u << 2)
|
||||
#define PIN_PB03B_ADC_AIN11 35 /**< \brief ADC signal: AIN11 on PB03 mux B */
|
||||
#define MUX_PB03B_ADC_AIN11 1
|
||||
#define PINMUX_PB03B_ADC_AIN11 ((PIN_PB03B_ADC_AIN11 << 16) | MUX_PB03B_ADC_AIN11)
|
||||
#define PORT_PB03B_ADC_AIN11 (1u << 3)
|
||||
#define PIN_PA08B_ADC_AIN16 8 /**< \brief ADC signal: AIN16 on PA08 mux B */
|
||||
#define MUX_PA08B_ADC_AIN16 1
|
||||
#define PINMUX_PA08B_ADC_AIN16 ((PIN_PA08B_ADC_AIN16 << 16) | MUX_PA08B_ADC_AIN16)
|
||||
#define PORT_PA08B_ADC_AIN16 (1u << 8)
|
||||
#define PIN_PA09B_ADC_AIN17 9 /**< \brief ADC signal: AIN17 on PA09 mux B */
|
||||
#define MUX_PA09B_ADC_AIN17 1
|
||||
#define PINMUX_PA09B_ADC_AIN17 ((PIN_PA09B_ADC_AIN17 << 16) | MUX_PA09B_ADC_AIN17)
|
||||
#define PORT_PA09B_ADC_AIN17 (1u << 9)
|
||||
#define PIN_PA10B_ADC_AIN18 10 /**< \brief ADC signal: AIN18 on PA10 mux B */
|
||||
#define MUX_PA10B_ADC_AIN18 1
|
||||
#define PINMUX_PA10B_ADC_AIN18 ((PIN_PA10B_ADC_AIN18 << 16) | MUX_PA10B_ADC_AIN18)
|
||||
#define PORT_PA10B_ADC_AIN18 (1u << 10)
|
||||
#define PIN_PA11B_ADC_AIN19 11 /**< \brief ADC signal: AIN19 on PA11 mux B */
|
||||
#define MUX_PA11B_ADC_AIN19 1
|
||||
#define PINMUX_PA11B_ADC_AIN19 ((PIN_PA11B_ADC_AIN19 << 16) | MUX_PA11B_ADC_AIN19)
|
||||
#define PORT_PA11B_ADC_AIN19 (1u << 11)
|
||||
#define PIN_PA04B_ADC_VREFP 4 /**< \brief ADC signal: VREFP on PA04 mux B */
|
||||
#define MUX_PA04B_ADC_VREFP 1
|
||||
#define PINMUX_PA04B_ADC_VREFP ((PIN_PA04B_ADC_VREFP << 16) | MUX_PA04B_ADC_VREFP)
|
||||
#define PORT_PA04B_ADC_VREFP (1u << 4)
|
||||
/* ========== PORT definition for AC peripheral ========== */
|
||||
#define PIN_PA04B_AC_AIN0 4 /**< \brief AC signal: AIN0 on PA04 mux B */
|
||||
#define MUX_PA04B_AC_AIN0 1
|
||||
#define PINMUX_PA04B_AC_AIN0 ((PIN_PA04B_AC_AIN0 << 16) | MUX_PA04B_AC_AIN0)
|
||||
#define PORT_PA04B_AC_AIN0 (1u << 4)
|
||||
#define PIN_PA05B_AC_AIN1 5 /**< \brief AC signal: AIN1 on PA05 mux B */
|
||||
#define MUX_PA05B_AC_AIN1 1
|
||||
#define PINMUX_PA05B_AC_AIN1 ((PIN_PA05B_AC_AIN1 << 16) | MUX_PA05B_AC_AIN1)
|
||||
#define PORT_PA05B_AC_AIN1 (1u << 5)
|
||||
#define PIN_PA06B_AC_AIN2 6 /**< \brief AC signal: AIN2 on PA06 mux B */
|
||||
#define MUX_PA06B_AC_AIN2 1
|
||||
#define PINMUX_PA06B_AC_AIN2 ((PIN_PA06B_AC_AIN2 << 16) | MUX_PA06B_AC_AIN2)
|
||||
#define PORT_PA06B_AC_AIN2 (1u << 6)
|
||||
#define PIN_PA07B_AC_AIN3 7 /**< \brief AC signal: AIN3 on PA07 mux B */
|
||||
#define MUX_PA07B_AC_AIN3 1
|
||||
#define PINMUX_PA07B_AC_AIN3 ((PIN_PA07B_AC_AIN3 << 16) | MUX_PA07B_AC_AIN3)
|
||||
#define PORT_PA07B_AC_AIN3 (1u << 7)
|
||||
#define PIN_PA12H_AC_CMP0 12 /**< \brief AC signal: CMP0 on PA12 mux H */
|
||||
#define MUX_PA12H_AC_CMP0 7
|
||||
#define PINMUX_PA12H_AC_CMP0 ((PIN_PA12H_AC_CMP0 << 16) | MUX_PA12H_AC_CMP0)
|
||||
#define PORT_PA12H_AC_CMP0 (1u << 12)
|
||||
#define PIN_PA18H_AC_CMP0 18 /**< \brief AC signal: CMP0 on PA18 mux H */
|
||||
#define MUX_PA18H_AC_CMP0 7
|
||||
#define PINMUX_PA18H_AC_CMP0 ((PIN_PA18H_AC_CMP0 << 16) | MUX_PA18H_AC_CMP0)
|
||||
#define PORT_PA18H_AC_CMP0 (1u << 18)
|
||||
#define PIN_PA13H_AC_CMP1 13 /**< \brief AC signal: CMP1 on PA13 mux H */
|
||||
#define MUX_PA13H_AC_CMP1 7
|
||||
#define PINMUX_PA13H_AC_CMP1 ((PIN_PA13H_AC_CMP1 << 16) | MUX_PA13H_AC_CMP1)
|
||||
#define PORT_PA13H_AC_CMP1 (1u << 13)
|
||||
#define PIN_PA19H_AC_CMP1 19 /**< \brief AC signal: CMP1 on PA19 mux H */
|
||||
#define MUX_PA19H_AC_CMP1 7
|
||||
#define PINMUX_PA19H_AC_CMP1 ((PIN_PA19H_AC_CMP1 << 16) | MUX_PA19H_AC_CMP1)
|
||||
#define PORT_PA19H_AC_CMP1 (1u << 19)
|
||||
/* ========== PORT definition for DAC peripheral ========== */
|
||||
#define PIN_PA02B_DAC_VOUT 2 /**< \brief DAC signal: VOUT on PA02 mux B */
|
||||
#define MUX_PA02B_DAC_VOUT 1
|
||||
#define PINMUX_PA02B_DAC_VOUT ((PIN_PA02B_DAC_VOUT << 16) | MUX_PA02B_DAC_VOUT)
|
||||
#define PORT_PA02B_DAC_VOUT (1u << 2)
|
||||
#define PIN_PA03B_DAC_VREFP 3 /**< \brief DAC signal: VREFP on PA03 mux B */
|
||||
#define MUX_PA03B_DAC_VREFP 1
|
||||
#define PINMUX_PA03B_DAC_VREFP ((PIN_PA03B_DAC_VREFP << 16) | MUX_PA03B_DAC_VREFP)
|
||||
#define PORT_PA03B_DAC_VREFP (1u << 3)
|
||||
|
||||
#endif /* _SAMD20G15_PIO_ */
|
|
@ -0,0 +1,812 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Peripheral I/O description for SAMD20G16
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20G16_PIO_
|
||||
#define _SAMD20G16_PIO_
|
||||
|
||||
#define PIN_PA00 0 /**< \brief Pin Number for PA00 */
|
||||
#define PORT_PA00 (1u << 0) /**< \brief PORT Mask for PA00 */
|
||||
#define PIN_PA01 1 /**< \brief Pin Number for PA01 */
|
||||
#define PORT_PA01 (1u << 1) /**< \brief PORT Mask for PA01 */
|
||||
#define PIN_PA02 2 /**< \brief Pin Number for PA02 */
|
||||
#define PORT_PA02 (1u << 2) /**< \brief PORT Mask for PA02 */
|
||||
#define PIN_PA03 3 /**< \brief Pin Number for PA03 */
|
||||
#define PORT_PA03 (1u << 3) /**< \brief PORT Mask for PA03 */
|
||||
#define PIN_PA04 4 /**< \brief Pin Number for PA04 */
|
||||
#define PORT_PA04 (1u << 4) /**< \brief PORT Mask for PA04 */
|
||||
#define PIN_PA05 5 /**< \brief Pin Number for PA05 */
|
||||
#define PORT_PA05 (1u << 5) /**< \brief PORT Mask for PA05 */
|
||||
#define PIN_PA06 6 /**< \brief Pin Number for PA06 */
|
||||
#define PORT_PA06 (1u << 6) /**< \brief PORT Mask for PA06 */
|
||||
#define PIN_PA07 7 /**< \brief Pin Number for PA07 */
|
||||
#define PORT_PA07 (1u << 7) /**< \brief PORT Mask for PA07 */
|
||||
#define PIN_PA08 8 /**< \brief Pin Number for PA08 */
|
||||
#define PORT_PA08 (1u << 8) /**< \brief PORT Mask for PA08 */
|
||||
#define PIN_PA09 9 /**< \brief Pin Number for PA09 */
|
||||
#define PORT_PA09 (1u << 9) /**< \brief PORT Mask for PA09 */
|
||||
#define PIN_PA10 10 /**< \brief Pin Number for PA10 */
|
||||
#define PORT_PA10 (1u << 10) /**< \brief PORT Mask for PA10 */
|
||||
#define PIN_PA11 11 /**< \brief Pin Number for PA11 */
|
||||
#define PORT_PA11 (1u << 11) /**< \brief PORT Mask for PA11 */
|
||||
#define PIN_PA12 12 /**< \brief Pin Number for PA12 */
|
||||
#define PORT_PA12 (1u << 12) /**< \brief PORT Mask for PA12 */
|
||||
#define PIN_PA13 13 /**< \brief Pin Number for PA13 */
|
||||
#define PORT_PA13 (1u << 13) /**< \brief PORT Mask for PA13 */
|
||||
#define PIN_PA14 14 /**< \brief Pin Number for PA14 */
|
||||
#define PORT_PA14 (1u << 14) /**< \brief PORT Mask for PA14 */
|
||||
#define PIN_PA15 15 /**< \brief Pin Number for PA15 */
|
||||
#define PORT_PA15 (1u << 15) /**< \brief PORT Mask for PA15 */
|
||||
#define PIN_PA16 16 /**< \brief Pin Number for PA16 */
|
||||
#define PORT_PA16 (1u << 16) /**< \brief PORT Mask for PA16 */
|
||||
#define PIN_PA17 17 /**< \brief Pin Number for PA17 */
|
||||
#define PORT_PA17 (1u << 17) /**< \brief PORT Mask for PA17 */
|
||||
#define PIN_PA18 18 /**< \brief Pin Number for PA18 */
|
||||
#define PORT_PA18 (1u << 18) /**< \brief PORT Mask for PA18 */
|
||||
#define PIN_PA19 19 /**< \brief Pin Number for PA19 */
|
||||
#define PORT_PA19 (1u << 19) /**< \brief PORT Mask for PA19 */
|
||||
#define PIN_PA20 20 /**< \brief Pin Number for PA20 */
|
||||
#define PORT_PA20 (1u << 20) /**< \brief PORT Mask for PA20 */
|
||||
#define PIN_PA21 21 /**< \brief Pin Number for PA21 */
|
||||
#define PORT_PA21 (1u << 21) /**< \brief PORT Mask for PA21 */
|
||||
#define PIN_PA22 22 /**< \brief Pin Number for PA22 */
|
||||
#define PORT_PA22 (1u << 22) /**< \brief PORT Mask for PA22 */
|
||||
#define PIN_PA23 23 /**< \brief Pin Number for PA23 */
|
||||
#define PORT_PA23 (1u << 23) /**< \brief PORT Mask for PA23 */
|
||||
#define PIN_PA24 24 /**< \brief Pin Number for PA24 */
|
||||
#define PORT_PA24 (1u << 24) /**< \brief PORT Mask for PA24 */
|
||||
#define PIN_PA25 25 /**< \brief Pin Number for PA25 */
|
||||
#define PORT_PA25 (1u << 25) /**< \brief PORT Mask for PA25 */
|
||||
#define PIN_PA27 27 /**< \brief Pin Number for PA27 */
|
||||
#define PORT_PA27 (1u << 27) /**< \brief PORT Mask for PA27 */
|
||||
#define PIN_PA28 28 /**< \brief Pin Number for PA28 */
|
||||
#define PORT_PA28 (1u << 28) /**< \brief PORT Mask for PA28 */
|
||||
#define PIN_PA30 30 /**< \brief Pin Number for PA30 */
|
||||
#define PORT_PA30 (1u << 30) /**< \brief PORT Mask for PA30 */
|
||||
#define PIN_PA31 31 /**< \brief Pin Number for PA31 */
|
||||
#define PORT_PA31 (1u << 31) /**< \brief PORT Mask for PA31 */
|
||||
#define PIN_PB02 34 /**< \brief Pin Number for PB02 */
|
||||
#define PORT_PB02 (1u << 2) /**< \brief PORT Mask for PB02 */
|
||||
#define PIN_PB03 35 /**< \brief Pin Number for PB03 */
|
||||
#define PORT_PB03 (1u << 3) /**< \brief PORT Mask for PB03 */
|
||||
#define PIN_PB08 40 /**< \brief Pin Number for PB08 */
|
||||
#define PORT_PB08 (1u << 8) /**< \brief PORT Mask for PB08 */
|
||||
#define PIN_PB09 41 /**< \brief Pin Number for PB09 */
|
||||
#define PORT_PB09 (1u << 9) /**< \brief PORT Mask for PB09 */
|
||||
#define PIN_PB10 42 /**< \brief Pin Number for PB10 */
|
||||
#define PORT_PB10 (1u << 10) /**< \brief PORT Mask for PB10 */
|
||||
#define PIN_PB11 43 /**< \brief Pin Number for PB11 */
|
||||
#define PORT_PB11 (1u << 11) /**< \brief PORT Mask for PB11 */
|
||||
#define PIN_PB22 54 /**< \brief Pin Number for PB22 */
|
||||
#define PORT_PB22 (1u << 22) /**< \brief PORT Mask for PB22 */
|
||||
#define PIN_PB23 55 /**< \brief Pin Number for PB23 */
|
||||
#define PORT_PB23 (1u << 23) /**< \brief PORT Mask for PB23 */
|
||||
/* ========== PORT definition for CORE peripheral ========== */
|
||||
#define PIN_PA30G_CORE_SWCLK 30 /**< \brief CORE signal: SWCLK on PA30 mux G */
|
||||
#define MUX_PA30G_CORE_SWCLK 6
|
||||
#define PINMUX_PA30G_CORE_SWCLK ((PIN_PA30G_CORE_SWCLK << 16) | MUX_PA30G_CORE_SWCLK)
|
||||
#define PORT_PA30G_CORE_SWCLK (1u << 30)
|
||||
/* ========== PORT definition for GCLK peripheral ========== */
|
||||
#define PIN_PB22H_GCLK_IO0 54 /**< \brief GCLK signal: IO0 on PB22 mux H */
|
||||
#define MUX_PB22H_GCLK_IO0 7
|
||||
#define PINMUX_PB22H_GCLK_IO0 ((PIN_PB22H_GCLK_IO0 << 16) | MUX_PB22H_GCLK_IO0)
|
||||
#define PORT_PB22H_GCLK_IO0 (1u << 22)
|
||||
#define PIN_PA14H_GCLK_IO0 14 /**< \brief GCLK signal: IO0 on PA14 mux H */
|
||||
#define MUX_PA14H_GCLK_IO0 7
|
||||
#define PINMUX_PA14H_GCLK_IO0 ((PIN_PA14H_GCLK_IO0 << 16) | MUX_PA14H_GCLK_IO0)
|
||||
#define PORT_PA14H_GCLK_IO0 (1u << 14)
|
||||
#define PIN_PA27H_GCLK_IO0 27 /**< \brief GCLK signal: IO0 on PA27 mux H */
|
||||
#define MUX_PA27H_GCLK_IO0 7
|
||||
#define PINMUX_PA27H_GCLK_IO0 ((PIN_PA27H_GCLK_IO0 << 16) | MUX_PA27H_GCLK_IO0)
|
||||
#define PORT_PA27H_GCLK_IO0 (1u << 27)
|
||||
#define PIN_PA28H_GCLK_IO0 28 /**< \brief GCLK signal: IO0 on PA28 mux H */
|
||||
#define MUX_PA28H_GCLK_IO0 7
|
||||
#define PINMUX_PA28H_GCLK_IO0 ((PIN_PA28H_GCLK_IO0 << 16) | MUX_PA28H_GCLK_IO0)
|
||||
#define PORT_PA28H_GCLK_IO0 (1u << 28)
|
||||
#define PIN_PA30H_GCLK_IO0 30 /**< \brief GCLK signal: IO0 on PA30 mux H */
|
||||
#define MUX_PA30H_GCLK_IO0 7
|
||||
#define PINMUX_PA30H_GCLK_IO0 ((PIN_PA30H_GCLK_IO0 << 16) | MUX_PA30H_GCLK_IO0)
|
||||
#define PORT_PA30H_GCLK_IO0 (1u << 30)
|
||||
#define PIN_PB23H_GCLK_IO1 55 /**< \brief GCLK signal: IO1 on PB23 mux H */
|
||||
#define MUX_PB23H_GCLK_IO1 7
|
||||
#define PINMUX_PB23H_GCLK_IO1 ((PIN_PB23H_GCLK_IO1 << 16) | MUX_PB23H_GCLK_IO1)
|
||||
#define PORT_PB23H_GCLK_IO1 (1u << 23)
|
||||
#define PIN_PA15H_GCLK_IO1 15 /**< \brief GCLK signal: IO1 on PA15 mux H */
|
||||
#define MUX_PA15H_GCLK_IO1 7
|
||||
#define PINMUX_PA15H_GCLK_IO1 ((PIN_PA15H_GCLK_IO1 << 16) | MUX_PA15H_GCLK_IO1)
|
||||
#define PORT_PA15H_GCLK_IO1 (1u << 15)
|
||||
#define PIN_PA16H_GCLK_IO2 16 /**< \brief GCLK signal: IO2 on PA16 mux H */
|
||||
#define MUX_PA16H_GCLK_IO2 7
|
||||
#define PINMUX_PA16H_GCLK_IO2 ((PIN_PA16H_GCLK_IO2 << 16) | MUX_PA16H_GCLK_IO2)
|
||||
#define PORT_PA16H_GCLK_IO2 (1u << 16)
|
||||
#define PIN_PA17H_GCLK_IO3 17 /**< \brief GCLK signal: IO3 on PA17 mux H */
|
||||
#define MUX_PA17H_GCLK_IO3 7
|
||||
#define PINMUX_PA17H_GCLK_IO3 ((PIN_PA17H_GCLK_IO3 << 16) | MUX_PA17H_GCLK_IO3)
|
||||
#define PORT_PA17H_GCLK_IO3 (1u << 17)
|
||||
#define PIN_PA10H_GCLK_IO4 10 /**< \brief GCLK signal: IO4 on PA10 mux H */
|
||||
#define MUX_PA10H_GCLK_IO4 7
|
||||
#define PINMUX_PA10H_GCLK_IO4 ((PIN_PA10H_GCLK_IO4 << 16) | MUX_PA10H_GCLK_IO4)
|
||||
#define PORT_PA10H_GCLK_IO4 (1u << 10)
|
||||
#define PIN_PA20H_GCLK_IO4 20 /**< \brief GCLK signal: IO4 on PA20 mux H */
|
||||
#define MUX_PA20H_GCLK_IO4 7
|
||||
#define PINMUX_PA20H_GCLK_IO4 ((PIN_PA20H_GCLK_IO4 << 16) | MUX_PA20H_GCLK_IO4)
|
||||
#define PORT_PA20H_GCLK_IO4 (1u << 20)
|
||||
#define PIN_PB10H_GCLK_IO4 42 /**< \brief GCLK signal: IO4 on PB10 mux H */
|
||||
#define MUX_PB10H_GCLK_IO4 7
|
||||
#define PINMUX_PB10H_GCLK_IO4 ((PIN_PB10H_GCLK_IO4 << 16) | MUX_PB10H_GCLK_IO4)
|
||||
#define PORT_PB10H_GCLK_IO4 (1u << 10)
|
||||
#define PIN_PA11H_GCLK_IO5 11 /**< \brief GCLK signal: IO5 on PA11 mux H */
|
||||
#define MUX_PA11H_GCLK_IO5 7
|
||||
#define PINMUX_PA11H_GCLK_IO5 ((PIN_PA11H_GCLK_IO5 << 16) | MUX_PA11H_GCLK_IO5)
|
||||
#define PORT_PA11H_GCLK_IO5 (1u << 11)
|
||||
#define PIN_PA21H_GCLK_IO5 21 /**< \brief GCLK signal: IO5 on PA21 mux H */
|
||||
#define MUX_PA21H_GCLK_IO5 7
|
||||
#define PINMUX_PA21H_GCLK_IO5 ((PIN_PA21H_GCLK_IO5 << 16) | MUX_PA21H_GCLK_IO5)
|
||||
#define PORT_PA21H_GCLK_IO5 (1u << 21)
|
||||
#define PIN_PB11H_GCLK_IO5 43 /**< \brief GCLK signal: IO5 on PB11 mux H */
|
||||
#define MUX_PB11H_GCLK_IO5 7
|
||||
#define PINMUX_PB11H_GCLK_IO5 ((PIN_PB11H_GCLK_IO5 << 16) | MUX_PB11H_GCLK_IO5)
|
||||
#define PORT_PB11H_GCLK_IO5 (1u << 11)
|
||||
#define PIN_PA22H_GCLK_IO6 22 /**< \brief GCLK signal: IO6 on PA22 mux H */
|
||||
#define MUX_PA22H_GCLK_IO6 7
|
||||
#define PINMUX_PA22H_GCLK_IO6 ((PIN_PA22H_GCLK_IO6 << 16) | MUX_PA22H_GCLK_IO6)
|
||||
#define PORT_PA22H_GCLK_IO6 (1u << 22)
|
||||
#define PIN_PA23H_GCLK_IO7 23 /**< \brief GCLK signal: IO7 on PA23 mux H */
|
||||
#define MUX_PA23H_GCLK_IO7 7
|
||||
#define PINMUX_PA23H_GCLK_IO7 ((PIN_PA23H_GCLK_IO7 << 16) | MUX_PA23H_GCLK_IO7)
|
||||
#define PORT_PA23H_GCLK_IO7 (1u << 23)
|
||||
/* ========== PORT definition for EIC peripheral ========== */
|
||||
#define PIN_PA16A_EIC_EXTINT0 16 /**< \brief EIC signal: EXTINT0 on PA16 mux A */
|
||||
#define MUX_PA16A_EIC_EXTINT0 0
|
||||
#define PINMUX_PA16A_EIC_EXTINT0 ((PIN_PA16A_EIC_EXTINT0 << 16) | MUX_PA16A_EIC_EXTINT0)
|
||||
#define PORT_PA16A_EIC_EXTINT0 (1u << 16)
|
||||
#define PIN_PA00A_EIC_EXTINT0 0 /**< \brief EIC signal: EXTINT0 on PA00 mux A */
|
||||
#define MUX_PA00A_EIC_EXTINT0 0
|
||||
#define PINMUX_PA00A_EIC_EXTINT0 ((PIN_PA00A_EIC_EXTINT0 << 16) | MUX_PA00A_EIC_EXTINT0)
|
||||
#define PORT_PA00A_EIC_EXTINT0 (1u << 0)
|
||||
#define PIN_PA17A_EIC_EXTINT1 17 /**< \brief EIC signal: EXTINT1 on PA17 mux A */
|
||||
#define MUX_PA17A_EIC_EXTINT1 0
|
||||
#define PINMUX_PA17A_EIC_EXTINT1 ((PIN_PA17A_EIC_EXTINT1 << 16) | MUX_PA17A_EIC_EXTINT1)
|
||||
#define PORT_PA17A_EIC_EXTINT1 (1u << 17)
|
||||
#define PIN_PA01A_EIC_EXTINT1 1 /**< \brief EIC signal: EXTINT1 on PA01 mux A */
|
||||
#define MUX_PA01A_EIC_EXTINT1 0
|
||||
#define PINMUX_PA01A_EIC_EXTINT1 ((PIN_PA01A_EIC_EXTINT1 << 16) | MUX_PA01A_EIC_EXTINT1)
|
||||
#define PORT_PA01A_EIC_EXTINT1 (1u << 1)
|
||||
#define PIN_PA02A_EIC_EXTINT2 2 /**< \brief EIC signal: EXTINT2 on PA02 mux A */
|
||||
#define MUX_PA02A_EIC_EXTINT2 0
|
||||
#define PINMUX_PA02A_EIC_EXTINT2 ((PIN_PA02A_EIC_EXTINT2 << 16) | MUX_PA02A_EIC_EXTINT2)
|
||||
#define PORT_PA02A_EIC_EXTINT2 (1u << 2)
|
||||
#define PIN_PA18A_EIC_EXTINT2 18 /**< \brief EIC signal: EXTINT2 on PA18 mux A */
|
||||
#define MUX_PA18A_EIC_EXTINT2 0
|
||||
#define PINMUX_PA18A_EIC_EXTINT2 ((PIN_PA18A_EIC_EXTINT2 << 16) | MUX_PA18A_EIC_EXTINT2)
|
||||
#define PORT_PA18A_EIC_EXTINT2 (1u << 18)
|
||||
#define PIN_PB02A_EIC_EXTINT2 34 /**< \brief EIC signal: EXTINT2 on PB02 mux A */
|
||||
#define MUX_PB02A_EIC_EXTINT2 0
|
||||
#define PINMUX_PB02A_EIC_EXTINT2 ((PIN_PB02A_EIC_EXTINT2 << 16) | MUX_PB02A_EIC_EXTINT2)
|
||||
#define PORT_PB02A_EIC_EXTINT2 (1u << 2)
|
||||
#define PIN_PA03A_EIC_EXTINT3 3 /**< \brief EIC signal: EXTINT3 on PA03 mux A */
|
||||
#define MUX_PA03A_EIC_EXTINT3 0
|
||||
#define PINMUX_PA03A_EIC_EXTINT3 ((PIN_PA03A_EIC_EXTINT3 << 16) | MUX_PA03A_EIC_EXTINT3)
|
||||
#define PORT_PA03A_EIC_EXTINT3 (1u << 3)
|
||||
#define PIN_PA19A_EIC_EXTINT3 19 /**< \brief EIC signal: EXTINT3 on PA19 mux A */
|
||||
#define MUX_PA19A_EIC_EXTINT3 0
|
||||
#define PINMUX_PA19A_EIC_EXTINT3 ((PIN_PA19A_EIC_EXTINT3 << 16) | MUX_PA19A_EIC_EXTINT3)
|
||||
#define PORT_PA19A_EIC_EXTINT3 (1u << 19)
|
||||
#define PIN_PB03A_EIC_EXTINT3 35 /**< \brief EIC signal: EXTINT3 on PB03 mux A */
|
||||
#define MUX_PB03A_EIC_EXTINT3 0
|
||||
#define PINMUX_PB03A_EIC_EXTINT3 ((PIN_PB03A_EIC_EXTINT3 << 16) | MUX_PB03A_EIC_EXTINT3)
|
||||
#define PORT_PB03A_EIC_EXTINT3 (1u << 3)
|
||||
#define PIN_PA04A_EIC_EXTINT4 4 /**< \brief EIC signal: EXTINT4 on PA04 mux A */
|
||||
#define MUX_PA04A_EIC_EXTINT4 0
|
||||
#define PINMUX_PA04A_EIC_EXTINT4 ((PIN_PA04A_EIC_EXTINT4 << 16) | MUX_PA04A_EIC_EXTINT4)
|
||||
#define PORT_PA04A_EIC_EXTINT4 (1u << 4)
|
||||
#define PIN_PA20A_EIC_EXTINT4 20 /**< \brief EIC signal: EXTINT4 on PA20 mux A */
|
||||
#define MUX_PA20A_EIC_EXTINT4 0
|
||||
#define PINMUX_PA20A_EIC_EXTINT4 ((PIN_PA20A_EIC_EXTINT4 << 16) | MUX_PA20A_EIC_EXTINT4)
|
||||
#define PORT_PA20A_EIC_EXTINT4 (1u << 20)
|
||||
#define PIN_PA05A_EIC_EXTINT5 5 /**< \brief EIC signal: EXTINT5 on PA05 mux A */
|
||||
#define MUX_PA05A_EIC_EXTINT5 0
|
||||
#define PINMUX_PA05A_EIC_EXTINT5 ((PIN_PA05A_EIC_EXTINT5 << 16) | MUX_PA05A_EIC_EXTINT5)
|
||||
#define PORT_PA05A_EIC_EXTINT5 (1u << 5)
|
||||
#define PIN_PA21A_EIC_EXTINT5 21 /**< \brief EIC signal: EXTINT5 on PA21 mux A */
|
||||
#define MUX_PA21A_EIC_EXTINT5 0
|
||||
#define PINMUX_PA21A_EIC_EXTINT5 ((PIN_PA21A_EIC_EXTINT5 << 16) | MUX_PA21A_EIC_EXTINT5)
|
||||
#define PORT_PA21A_EIC_EXTINT5 (1u << 21)
|
||||
#define PIN_PA06A_EIC_EXTINT6 6 /**< \brief EIC signal: EXTINT6 on PA06 mux A */
|
||||
#define MUX_PA06A_EIC_EXTINT6 0
|
||||
#define PINMUX_PA06A_EIC_EXTINT6 ((PIN_PA06A_EIC_EXTINT6 << 16) | MUX_PA06A_EIC_EXTINT6)
|
||||
#define PORT_PA06A_EIC_EXTINT6 (1u << 6)
|
||||
#define PIN_PA22A_EIC_EXTINT6 22 /**< \brief EIC signal: EXTINT6 on PA22 mux A */
|
||||
#define MUX_PA22A_EIC_EXTINT6 0
|
||||
#define PINMUX_PA22A_EIC_EXTINT6 ((PIN_PA22A_EIC_EXTINT6 << 16) | MUX_PA22A_EIC_EXTINT6)
|
||||
#define PORT_PA22A_EIC_EXTINT6 (1u << 22)
|
||||
#define PIN_PB22A_EIC_EXTINT6 54 /**< \brief EIC signal: EXTINT6 on PB22 mux A */
|
||||
#define MUX_PB22A_EIC_EXTINT6 0
|
||||
#define PINMUX_PB22A_EIC_EXTINT6 ((PIN_PB22A_EIC_EXTINT6 << 16) | MUX_PB22A_EIC_EXTINT6)
|
||||
#define PORT_PB22A_EIC_EXTINT6 (1u << 22)
|
||||
#define PIN_PA07A_EIC_EXTINT7 7 /**< \brief EIC signal: EXTINT7 on PA07 mux A */
|
||||
#define MUX_PA07A_EIC_EXTINT7 0
|
||||
#define PINMUX_PA07A_EIC_EXTINT7 ((PIN_PA07A_EIC_EXTINT7 << 16) | MUX_PA07A_EIC_EXTINT7)
|
||||
#define PORT_PA07A_EIC_EXTINT7 (1u << 7)
|
||||
#define PIN_PA23A_EIC_EXTINT7 23 /**< \brief EIC signal: EXTINT7 on PA23 mux A */
|
||||
#define MUX_PA23A_EIC_EXTINT7 0
|
||||
#define PINMUX_PA23A_EIC_EXTINT7 ((PIN_PA23A_EIC_EXTINT7 << 16) | MUX_PA23A_EIC_EXTINT7)
|
||||
#define PORT_PA23A_EIC_EXTINT7 (1u << 23)
|
||||
#define PIN_PB23A_EIC_EXTINT7 55 /**< \brief EIC signal: EXTINT7 on PB23 mux A */
|
||||
#define MUX_PB23A_EIC_EXTINT7 0
|
||||
#define PINMUX_PB23A_EIC_EXTINT7 ((PIN_PB23A_EIC_EXTINT7 << 16) | MUX_PB23A_EIC_EXTINT7)
|
||||
#define PORT_PB23A_EIC_EXTINT7 (1u << 23)
|
||||
#define PIN_PA28A_EIC_EXTINT8 28 /**< \brief EIC signal: EXTINT8 on PA28 mux A */
|
||||
#define MUX_PA28A_EIC_EXTINT8 0
|
||||
#define PINMUX_PA28A_EIC_EXTINT8 ((PIN_PA28A_EIC_EXTINT8 << 16) | MUX_PA28A_EIC_EXTINT8)
|
||||
#define PORT_PA28A_EIC_EXTINT8 (1u << 28)
|
||||
#define PIN_PB08A_EIC_EXTINT8 40 /**< \brief EIC signal: EXTINT8 on PB08 mux A */
|
||||
#define MUX_PB08A_EIC_EXTINT8 0
|
||||
#define PINMUX_PB08A_EIC_EXTINT8 ((PIN_PB08A_EIC_EXTINT8 << 16) | MUX_PB08A_EIC_EXTINT8)
|
||||
#define PORT_PB08A_EIC_EXTINT8 (1u << 8)
|
||||
#define PIN_PA09A_EIC_EXTINT9 9 /**< \brief EIC signal: EXTINT9 on PA09 mux A */
|
||||
#define MUX_PA09A_EIC_EXTINT9 0
|
||||
#define PINMUX_PA09A_EIC_EXTINT9 ((PIN_PA09A_EIC_EXTINT9 << 16) | MUX_PA09A_EIC_EXTINT9)
|
||||
#define PORT_PA09A_EIC_EXTINT9 (1u << 9)
|
||||
#define PIN_PB09A_EIC_EXTINT9 41 /**< \brief EIC signal: EXTINT9 on PB09 mux A */
|
||||
#define MUX_PB09A_EIC_EXTINT9 0
|
||||
#define PINMUX_PB09A_EIC_EXTINT9 ((PIN_PB09A_EIC_EXTINT9 << 16) | MUX_PB09A_EIC_EXTINT9)
|
||||
#define PORT_PB09A_EIC_EXTINT9 (1u << 9)
|
||||
#define PIN_PA10A_EIC_EXTINT10 10 /**< \brief EIC signal: EXTINT10 on PA10 mux A */
|
||||
#define MUX_PA10A_EIC_EXTINT10 0
|
||||
#define PINMUX_PA10A_EIC_EXTINT10 ((PIN_PA10A_EIC_EXTINT10 << 16) | MUX_PA10A_EIC_EXTINT10)
|
||||
#define PORT_PA10A_EIC_EXTINT10 (1u << 10)
|
||||
#define PIN_PA30A_EIC_EXTINT10 30 /**< \brief EIC signal: EXTINT10 on PA30 mux A */
|
||||
#define MUX_PA30A_EIC_EXTINT10 0
|
||||
#define PINMUX_PA30A_EIC_EXTINT10 ((PIN_PA30A_EIC_EXTINT10 << 16) | MUX_PA30A_EIC_EXTINT10)
|
||||
#define PORT_PA30A_EIC_EXTINT10 (1u << 30)
|
||||
#define PIN_PB10A_EIC_EXTINT10 42 /**< \brief EIC signal: EXTINT10 on PB10 mux A */
|
||||
#define MUX_PB10A_EIC_EXTINT10 0
|
||||
#define PINMUX_PB10A_EIC_EXTINT10 ((PIN_PB10A_EIC_EXTINT10 << 16) | MUX_PB10A_EIC_EXTINT10)
|
||||
#define PORT_PB10A_EIC_EXTINT10 (1u << 10)
|
||||
#define PIN_PA11A_EIC_EXTINT11 11 /**< \brief EIC signal: EXTINT11 on PA11 mux A */
|
||||
#define MUX_PA11A_EIC_EXTINT11 0
|
||||
#define PINMUX_PA11A_EIC_EXTINT11 ((PIN_PA11A_EIC_EXTINT11 << 16) | MUX_PA11A_EIC_EXTINT11)
|
||||
#define PORT_PA11A_EIC_EXTINT11 (1u << 11)
|
||||
#define PIN_PA31A_EIC_EXTINT11 31 /**< \brief EIC signal: EXTINT11 on PA31 mux A */
|
||||
#define MUX_PA31A_EIC_EXTINT11 0
|
||||
#define PINMUX_PA31A_EIC_EXTINT11 ((PIN_PA31A_EIC_EXTINT11 << 16) | MUX_PA31A_EIC_EXTINT11)
|
||||
#define PORT_PA31A_EIC_EXTINT11 (1u << 31)
|
||||
#define PIN_PB11A_EIC_EXTINT11 43 /**< \brief EIC signal: EXTINT11 on PB11 mux A */
|
||||
#define MUX_PB11A_EIC_EXTINT11 0
|
||||
#define PINMUX_PB11A_EIC_EXTINT11 ((PIN_PB11A_EIC_EXTINT11 << 16) | MUX_PB11A_EIC_EXTINT11)
|
||||
#define PORT_PB11A_EIC_EXTINT11 (1u << 11)
|
||||
#define PIN_PA12A_EIC_EXTINT12 12 /**< \brief EIC signal: EXTINT12 on PA12 mux A */
|
||||
#define MUX_PA12A_EIC_EXTINT12 0
|
||||
#define PINMUX_PA12A_EIC_EXTINT12 ((PIN_PA12A_EIC_EXTINT12 << 16) | MUX_PA12A_EIC_EXTINT12)
|
||||
#define PORT_PA12A_EIC_EXTINT12 (1u << 12)
|
||||
#define PIN_PA24A_EIC_EXTINT12 24 /**< \brief EIC signal: EXTINT12 on PA24 mux A */
|
||||
#define MUX_PA24A_EIC_EXTINT12 0
|
||||
#define PINMUX_PA24A_EIC_EXTINT12 ((PIN_PA24A_EIC_EXTINT12 << 16) | MUX_PA24A_EIC_EXTINT12)
|
||||
#define PORT_PA24A_EIC_EXTINT12 (1u << 24)
|
||||
#define PIN_PA13A_EIC_EXTINT13 13 /**< \brief EIC signal: EXTINT13 on PA13 mux A */
|
||||
#define MUX_PA13A_EIC_EXTINT13 0
|
||||
#define PINMUX_PA13A_EIC_EXTINT13 ((PIN_PA13A_EIC_EXTINT13 << 16) | MUX_PA13A_EIC_EXTINT13)
|
||||
#define PORT_PA13A_EIC_EXTINT13 (1u << 13)
|
||||
#define PIN_PA25A_EIC_EXTINT13 25 /**< \brief EIC signal: EXTINT13 on PA25 mux A */
|
||||
#define MUX_PA25A_EIC_EXTINT13 0
|
||||
#define PINMUX_PA25A_EIC_EXTINT13 ((PIN_PA25A_EIC_EXTINT13 << 16) | MUX_PA25A_EIC_EXTINT13)
|
||||
#define PORT_PA25A_EIC_EXTINT13 (1u << 25)
|
||||
#define PIN_PA14A_EIC_EXTINT14 14 /**< \brief EIC signal: EXTINT14 on PA14 mux A */
|
||||
#define MUX_PA14A_EIC_EXTINT14 0
|
||||
#define PINMUX_PA14A_EIC_EXTINT14 ((PIN_PA14A_EIC_EXTINT14 << 16) | MUX_PA14A_EIC_EXTINT14)
|
||||
#define PORT_PA14A_EIC_EXTINT14 (1u << 14)
|
||||
#define PIN_PA27A_EIC_EXTINT15 27 /**< \brief EIC signal: EXTINT15 on PA27 mux A */
|
||||
#define MUX_PA27A_EIC_EXTINT15 0
|
||||
#define PINMUX_PA27A_EIC_EXTINT15 ((PIN_PA27A_EIC_EXTINT15 << 16) | MUX_PA27A_EIC_EXTINT15)
|
||||
#define PORT_PA27A_EIC_EXTINT15 (1u << 27)
|
||||
#define PIN_PA15A_EIC_EXTINT15 15 /**< \brief EIC signal: EXTINT15 on PA15 mux A */
|
||||
#define MUX_PA15A_EIC_EXTINT15 0
|
||||
#define PINMUX_PA15A_EIC_EXTINT15 ((PIN_PA15A_EIC_EXTINT15 << 16) | MUX_PA15A_EIC_EXTINT15)
|
||||
#define PORT_PA15A_EIC_EXTINT15 (1u << 15)
|
||||
#define PIN_PA08A_EIC_NMI 8 /**< \brief EIC signal: NMI on PA08 mux A */
|
||||
#define MUX_PA08A_EIC_NMI 0
|
||||
#define PINMUX_PA08A_EIC_NMI ((PIN_PA08A_EIC_NMI << 16) | MUX_PA08A_EIC_NMI)
|
||||
#define PORT_PA08A_EIC_NMI (1u << 8)
|
||||
/* ========== PORT definition for SERCOM0 peripheral ========== */
|
||||
#define PIN_PA04D_SERCOM0_PAD0 4 /**< \brief SERCOM0 signal: PAD0 on PA04 mux D */
|
||||
#define MUX_PA04D_SERCOM0_PAD0 3
|
||||
#define PINMUX_PA04D_SERCOM0_PAD0 ((PIN_PA04D_SERCOM0_PAD0 << 16) | MUX_PA04D_SERCOM0_PAD0)
|
||||
#define PORT_PA04D_SERCOM0_PAD0 (1u << 4)
|
||||
#define PIN_PA08C_SERCOM0_PAD0 8 /**< \brief SERCOM0 signal: PAD0 on PA08 mux C */
|
||||
#define MUX_PA08C_SERCOM0_PAD0 2
|
||||
#define PINMUX_PA08C_SERCOM0_PAD0 ((PIN_PA08C_SERCOM0_PAD0 << 16) | MUX_PA08C_SERCOM0_PAD0)
|
||||
#define PORT_PA08C_SERCOM0_PAD0 (1u << 8)
|
||||
#define PIN_PA05D_SERCOM0_PAD1 5 /**< \brief SERCOM0 signal: PAD1 on PA05 mux D */
|
||||
#define MUX_PA05D_SERCOM0_PAD1 3
|
||||
#define PINMUX_PA05D_SERCOM0_PAD1 ((PIN_PA05D_SERCOM0_PAD1 << 16) | MUX_PA05D_SERCOM0_PAD1)
|
||||
#define PORT_PA05D_SERCOM0_PAD1 (1u << 5)
|
||||
#define PIN_PA09C_SERCOM0_PAD1 9 /**< \brief SERCOM0 signal: PAD1 on PA09 mux C */
|
||||
#define MUX_PA09C_SERCOM0_PAD1 2
|
||||
#define PINMUX_PA09C_SERCOM0_PAD1 ((PIN_PA09C_SERCOM0_PAD1 << 16) | MUX_PA09C_SERCOM0_PAD1)
|
||||
#define PORT_PA09C_SERCOM0_PAD1 (1u << 9)
|
||||
#define PIN_PA06D_SERCOM0_PAD2 6 /**< \brief SERCOM0 signal: PAD2 on PA06 mux D */
|
||||
#define MUX_PA06D_SERCOM0_PAD2 3
|
||||
#define PINMUX_PA06D_SERCOM0_PAD2 ((PIN_PA06D_SERCOM0_PAD2 << 16) | MUX_PA06D_SERCOM0_PAD2)
|
||||
#define PORT_PA06D_SERCOM0_PAD2 (1u << 6)
|
||||
#define PIN_PA10C_SERCOM0_PAD2 10 /**< \brief SERCOM0 signal: PAD2 on PA10 mux C */
|
||||
#define MUX_PA10C_SERCOM0_PAD2 2
|
||||
#define PINMUX_PA10C_SERCOM0_PAD2 ((PIN_PA10C_SERCOM0_PAD2 << 16) | MUX_PA10C_SERCOM0_PAD2)
|
||||
#define PORT_PA10C_SERCOM0_PAD2 (1u << 10)
|
||||
#define PIN_PA07D_SERCOM0_PAD3 7 /**< \brief SERCOM0 signal: PAD3 on PA07 mux D */
|
||||
#define MUX_PA07D_SERCOM0_PAD3 3
|
||||
#define PINMUX_PA07D_SERCOM0_PAD3 ((PIN_PA07D_SERCOM0_PAD3 << 16) | MUX_PA07D_SERCOM0_PAD3)
|
||||
#define PORT_PA07D_SERCOM0_PAD3 (1u << 7)
|
||||
#define PIN_PA11C_SERCOM0_PAD3 11 /**< \brief SERCOM0 signal: PAD3 on PA11 mux C */
|
||||
#define MUX_PA11C_SERCOM0_PAD3 2
|
||||
#define PINMUX_PA11C_SERCOM0_PAD3 ((PIN_PA11C_SERCOM0_PAD3 << 16) | MUX_PA11C_SERCOM0_PAD3)
|
||||
#define PORT_PA11C_SERCOM0_PAD3 (1u << 11)
|
||||
/* ========== PORT definition for SERCOM1 peripheral ========== */
|
||||
#define PIN_PA16C_SERCOM1_PAD0 16 /**< \brief SERCOM1 signal: PAD0 on PA16 mux C */
|
||||
#define MUX_PA16C_SERCOM1_PAD0 2
|
||||
#define PINMUX_PA16C_SERCOM1_PAD0 ((PIN_PA16C_SERCOM1_PAD0 << 16) | MUX_PA16C_SERCOM1_PAD0)
|
||||
#define PORT_PA16C_SERCOM1_PAD0 (1u << 16)
|
||||
#define PIN_PA00D_SERCOM1_PAD0 0 /**< \brief SERCOM1 signal: PAD0 on PA00 mux D */
|
||||
#define MUX_PA00D_SERCOM1_PAD0 3
|
||||
#define PINMUX_PA00D_SERCOM1_PAD0 ((PIN_PA00D_SERCOM1_PAD0 << 16) | MUX_PA00D_SERCOM1_PAD0)
|
||||
#define PORT_PA00D_SERCOM1_PAD0 (1u << 0)
|
||||
#define PIN_PA17C_SERCOM1_PAD1 17 /**< \brief SERCOM1 signal: PAD1 on PA17 mux C */
|
||||
#define MUX_PA17C_SERCOM1_PAD1 2
|
||||
#define PINMUX_PA17C_SERCOM1_PAD1 ((PIN_PA17C_SERCOM1_PAD1 << 16) | MUX_PA17C_SERCOM1_PAD1)
|
||||
#define PORT_PA17C_SERCOM1_PAD1 (1u << 17)
|
||||
#define PIN_PA01D_SERCOM1_PAD1 1 /**< \brief SERCOM1 signal: PAD1 on PA01 mux D */
|
||||
#define MUX_PA01D_SERCOM1_PAD1 3
|
||||
#define PINMUX_PA01D_SERCOM1_PAD1 ((PIN_PA01D_SERCOM1_PAD1 << 16) | MUX_PA01D_SERCOM1_PAD1)
|
||||
#define PORT_PA01D_SERCOM1_PAD1 (1u << 1)
|
||||
#define PIN_PA30D_SERCOM1_PAD2 30 /**< \brief SERCOM1 signal: PAD2 on PA30 mux D */
|
||||
#define MUX_PA30D_SERCOM1_PAD2 3
|
||||
#define PINMUX_PA30D_SERCOM1_PAD2 ((PIN_PA30D_SERCOM1_PAD2 << 16) | MUX_PA30D_SERCOM1_PAD2)
|
||||
#define PORT_PA30D_SERCOM1_PAD2 (1u << 30)
|
||||
#define PIN_PA18C_SERCOM1_PAD2 18 /**< \brief SERCOM1 signal: PAD2 on PA18 mux C */
|
||||
#define MUX_PA18C_SERCOM1_PAD2 2
|
||||
#define PINMUX_PA18C_SERCOM1_PAD2 ((PIN_PA18C_SERCOM1_PAD2 << 16) | MUX_PA18C_SERCOM1_PAD2)
|
||||
#define PORT_PA18C_SERCOM1_PAD2 (1u << 18)
|
||||
#define PIN_PA31D_SERCOM1_PAD3 31 /**< \brief SERCOM1 signal: PAD3 on PA31 mux D */
|
||||
#define MUX_PA31D_SERCOM1_PAD3 3
|
||||
#define PINMUX_PA31D_SERCOM1_PAD3 ((PIN_PA31D_SERCOM1_PAD3 << 16) | MUX_PA31D_SERCOM1_PAD3)
|
||||
#define PORT_PA31D_SERCOM1_PAD3 (1u << 31)
|
||||
#define PIN_PA19C_SERCOM1_PAD3 19 /**< \brief SERCOM1 signal: PAD3 on PA19 mux C */
|
||||
#define MUX_PA19C_SERCOM1_PAD3 2
|
||||
#define PINMUX_PA19C_SERCOM1_PAD3 ((PIN_PA19C_SERCOM1_PAD3 << 16) | MUX_PA19C_SERCOM1_PAD3)
|
||||
#define PORT_PA19C_SERCOM1_PAD3 (1u << 19)
|
||||
/* ========== PORT definition for SERCOM2 peripheral ========== */
|
||||
#define PIN_PA08D_SERCOM2_PAD0 8 /**< \brief SERCOM2 signal: PAD0 on PA08 mux D */
|
||||
#define MUX_PA08D_SERCOM2_PAD0 3
|
||||
#define PINMUX_PA08D_SERCOM2_PAD0 ((PIN_PA08D_SERCOM2_PAD0 << 16) | MUX_PA08D_SERCOM2_PAD0)
|
||||
#define PORT_PA08D_SERCOM2_PAD0 (1u << 8)
|
||||
#define PIN_PA12C_SERCOM2_PAD0 12 /**< \brief SERCOM2 signal: PAD0 on PA12 mux C */
|
||||
#define MUX_PA12C_SERCOM2_PAD0 2
|
||||
#define PINMUX_PA12C_SERCOM2_PAD0 ((PIN_PA12C_SERCOM2_PAD0 << 16) | MUX_PA12C_SERCOM2_PAD0)
|
||||
#define PORT_PA12C_SERCOM2_PAD0 (1u << 12)
|
||||
#define PIN_PA09D_SERCOM2_PAD1 9 /**< \brief SERCOM2 signal: PAD1 on PA09 mux D */
|
||||
#define MUX_PA09D_SERCOM2_PAD1 3
|
||||
#define PINMUX_PA09D_SERCOM2_PAD1 ((PIN_PA09D_SERCOM2_PAD1 << 16) | MUX_PA09D_SERCOM2_PAD1)
|
||||
#define PORT_PA09D_SERCOM2_PAD1 (1u << 9)
|
||||
#define PIN_PA13C_SERCOM2_PAD1 13 /**< \brief SERCOM2 signal: PAD1 on PA13 mux C */
|
||||
#define MUX_PA13C_SERCOM2_PAD1 2
|
||||
#define PINMUX_PA13C_SERCOM2_PAD1 ((PIN_PA13C_SERCOM2_PAD1 << 16) | MUX_PA13C_SERCOM2_PAD1)
|
||||
#define PORT_PA13C_SERCOM2_PAD1 (1u << 13)
|
||||
#define PIN_PA10D_SERCOM2_PAD2 10 /**< \brief SERCOM2 signal: PAD2 on PA10 mux D */
|
||||
#define MUX_PA10D_SERCOM2_PAD2 3
|
||||
#define PINMUX_PA10D_SERCOM2_PAD2 ((PIN_PA10D_SERCOM2_PAD2 << 16) | MUX_PA10D_SERCOM2_PAD2)
|
||||
#define PORT_PA10D_SERCOM2_PAD2 (1u << 10)
|
||||
#define PIN_PA14C_SERCOM2_PAD2 14 /**< \brief SERCOM2 signal: PAD2 on PA14 mux C */
|
||||
#define MUX_PA14C_SERCOM2_PAD2 2
|
||||
#define PINMUX_PA14C_SERCOM2_PAD2 ((PIN_PA14C_SERCOM2_PAD2 << 16) | MUX_PA14C_SERCOM2_PAD2)
|
||||
#define PORT_PA14C_SERCOM2_PAD2 (1u << 14)
|
||||
#define PIN_PA11D_SERCOM2_PAD3 11 /**< \brief SERCOM2 signal: PAD3 on PA11 mux D */
|
||||
#define MUX_PA11D_SERCOM2_PAD3 3
|
||||
#define PINMUX_PA11D_SERCOM2_PAD3 ((PIN_PA11D_SERCOM2_PAD3 << 16) | MUX_PA11D_SERCOM2_PAD3)
|
||||
#define PORT_PA11D_SERCOM2_PAD3 (1u << 11)
|
||||
#define PIN_PA15C_SERCOM2_PAD3 15 /**< \brief SERCOM2 signal: PAD3 on PA15 mux C */
|
||||
#define MUX_PA15C_SERCOM2_PAD3 2
|
||||
#define PINMUX_PA15C_SERCOM2_PAD3 ((PIN_PA15C_SERCOM2_PAD3 << 16) | MUX_PA15C_SERCOM2_PAD3)
|
||||
#define PORT_PA15C_SERCOM2_PAD3 (1u << 15)
|
||||
/* ========== PORT definition for SERCOM3 peripheral ========== */
|
||||
#define PIN_PA16D_SERCOM3_PAD0 16 /**< \brief SERCOM3 signal: PAD0 on PA16 mux D */
|
||||
#define MUX_PA16D_SERCOM3_PAD0 3
|
||||
#define PINMUX_PA16D_SERCOM3_PAD0 ((PIN_PA16D_SERCOM3_PAD0 << 16) | MUX_PA16D_SERCOM3_PAD0)
|
||||
#define PORT_PA16D_SERCOM3_PAD0 (1u << 16)
|
||||
#define PIN_PA22C_SERCOM3_PAD0 22 /**< \brief SERCOM3 signal: PAD0 on PA22 mux C */
|
||||
#define MUX_PA22C_SERCOM3_PAD0 2
|
||||
#define PINMUX_PA22C_SERCOM3_PAD0 ((PIN_PA22C_SERCOM3_PAD0 << 16) | MUX_PA22C_SERCOM3_PAD0)
|
||||
#define PORT_PA22C_SERCOM3_PAD0 (1u << 22)
|
||||
#define PIN_PA17D_SERCOM3_PAD1 17 /**< \brief SERCOM3 signal: PAD1 on PA17 mux D */
|
||||
#define MUX_PA17D_SERCOM3_PAD1 3
|
||||
#define PINMUX_PA17D_SERCOM3_PAD1 ((PIN_PA17D_SERCOM3_PAD1 << 16) | MUX_PA17D_SERCOM3_PAD1)
|
||||
#define PORT_PA17D_SERCOM3_PAD1 (1u << 17)
|
||||
#define PIN_PA23C_SERCOM3_PAD1 23 /**< \brief SERCOM3 signal: PAD1 on PA23 mux C */
|
||||
#define MUX_PA23C_SERCOM3_PAD1 2
|
||||
#define PINMUX_PA23C_SERCOM3_PAD1 ((PIN_PA23C_SERCOM3_PAD1 << 16) | MUX_PA23C_SERCOM3_PAD1)
|
||||
#define PORT_PA23C_SERCOM3_PAD1 (1u << 23)
|
||||
#define PIN_PA18D_SERCOM3_PAD2 18 /**< \brief SERCOM3 signal: PAD2 on PA18 mux D */
|
||||
#define MUX_PA18D_SERCOM3_PAD2 3
|
||||
#define PINMUX_PA18D_SERCOM3_PAD2 ((PIN_PA18D_SERCOM3_PAD2 << 16) | MUX_PA18D_SERCOM3_PAD2)
|
||||
#define PORT_PA18D_SERCOM3_PAD2 (1u << 18)
|
||||
#define PIN_PA20D_SERCOM3_PAD2 20 /**< \brief SERCOM3 signal: PAD2 on PA20 mux D */
|
||||
#define MUX_PA20D_SERCOM3_PAD2 3
|
||||
#define PINMUX_PA20D_SERCOM3_PAD2 ((PIN_PA20D_SERCOM3_PAD2 << 16) | MUX_PA20D_SERCOM3_PAD2)
|
||||
#define PORT_PA20D_SERCOM3_PAD2 (1u << 20)
|
||||
#define PIN_PA24C_SERCOM3_PAD2 24 /**< \brief SERCOM3 signal: PAD2 on PA24 mux C */
|
||||
#define MUX_PA24C_SERCOM3_PAD2 2
|
||||
#define PINMUX_PA24C_SERCOM3_PAD2 ((PIN_PA24C_SERCOM3_PAD2 << 16) | MUX_PA24C_SERCOM3_PAD2)
|
||||
#define PORT_PA24C_SERCOM3_PAD2 (1u << 24)
|
||||
#define PIN_PA19D_SERCOM3_PAD3 19 /**< \brief SERCOM3 signal: PAD3 on PA19 mux D */
|
||||
#define MUX_PA19D_SERCOM3_PAD3 3
|
||||
#define PINMUX_PA19D_SERCOM3_PAD3 ((PIN_PA19D_SERCOM3_PAD3 << 16) | MUX_PA19D_SERCOM3_PAD3)
|
||||
#define PORT_PA19D_SERCOM3_PAD3 (1u << 19)
|
||||
#define PIN_PA21D_SERCOM3_PAD3 21 /**< \brief SERCOM3 signal: PAD3 on PA21 mux D */
|
||||
#define MUX_PA21D_SERCOM3_PAD3 3
|
||||
#define PINMUX_PA21D_SERCOM3_PAD3 ((PIN_PA21D_SERCOM3_PAD3 << 16) | MUX_PA21D_SERCOM3_PAD3)
|
||||
#define PORT_PA21D_SERCOM3_PAD3 (1u << 21)
|
||||
#define PIN_PA25C_SERCOM3_PAD3 25 /**< \brief SERCOM3 signal: PAD3 on PA25 mux C */
|
||||
#define MUX_PA25C_SERCOM3_PAD3 2
|
||||
#define PINMUX_PA25C_SERCOM3_PAD3 ((PIN_PA25C_SERCOM3_PAD3 << 16) | MUX_PA25C_SERCOM3_PAD3)
|
||||
#define PORT_PA25C_SERCOM3_PAD3 (1u << 25)
|
||||
/* ========== PORT definition for SERCOM4 peripheral ========== */
|
||||
#define PIN_PA12D_SERCOM4_PAD0 12 /**< \brief SERCOM4 signal: PAD0 on PA12 mux D */
|
||||
#define MUX_PA12D_SERCOM4_PAD0 3
|
||||
#define PINMUX_PA12D_SERCOM4_PAD0 ((PIN_PA12D_SERCOM4_PAD0 << 16) | MUX_PA12D_SERCOM4_PAD0)
|
||||
#define PORT_PA12D_SERCOM4_PAD0 (1u << 12)
|
||||
#define PIN_PB08D_SERCOM4_PAD0 40 /**< \brief SERCOM4 signal: PAD0 on PB08 mux D */
|
||||
#define MUX_PB08D_SERCOM4_PAD0 3
|
||||
#define PINMUX_PB08D_SERCOM4_PAD0 ((PIN_PB08D_SERCOM4_PAD0 << 16) | MUX_PB08D_SERCOM4_PAD0)
|
||||
#define PORT_PB08D_SERCOM4_PAD0 (1u << 8)
|
||||
#define PIN_PA13D_SERCOM4_PAD1 13 /**< \brief SERCOM4 signal: PAD1 on PA13 mux D */
|
||||
#define MUX_PA13D_SERCOM4_PAD1 3
|
||||
#define PINMUX_PA13D_SERCOM4_PAD1 ((PIN_PA13D_SERCOM4_PAD1 << 16) | MUX_PA13D_SERCOM4_PAD1)
|
||||
#define PORT_PA13D_SERCOM4_PAD1 (1u << 13)
|
||||
#define PIN_PB09D_SERCOM4_PAD1 41 /**< \brief SERCOM4 signal: PAD1 on PB09 mux D */
|
||||
#define MUX_PB09D_SERCOM4_PAD1 3
|
||||
#define PINMUX_PB09D_SERCOM4_PAD1 ((PIN_PB09D_SERCOM4_PAD1 << 16) | MUX_PB09D_SERCOM4_PAD1)
|
||||
#define PORT_PB09D_SERCOM4_PAD1 (1u << 9)
|
||||
#define PIN_PA14D_SERCOM4_PAD2 14 /**< \brief SERCOM4 signal: PAD2 on PA14 mux D */
|
||||
#define MUX_PA14D_SERCOM4_PAD2 3
|
||||
#define PINMUX_PA14D_SERCOM4_PAD2 ((PIN_PA14D_SERCOM4_PAD2 << 16) | MUX_PA14D_SERCOM4_PAD2)
|
||||
#define PORT_PA14D_SERCOM4_PAD2 (1u << 14)
|
||||
#define PIN_PB10D_SERCOM4_PAD2 42 /**< \brief SERCOM4 signal: PAD2 on PB10 mux D */
|
||||
#define MUX_PB10D_SERCOM4_PAD2 3
|
||||
#define PINMUX_PB10D_SERCOM4_PAD2 ((PIN_PB10D_SERCOM4_PAD2 << 16) | MUX_PB10D_SERCOM4_PAD2)
|
||||
#define PORT_PB10D_SERCOM4_PAD2 (1u << 10)
|
||||
#define PIN_PA15D_SERCOM4_PAD3 15 /**< \brief SERCOM4 signal: PAD3 on PA15 mux D */
|
||||
#define MUX_PA15D_SERCOM4_PAD3 3
|
||||
#define PINMUX_PA15D_SERCOM4_PAD3 ((PIN_PA15D_SERCOM4_PAD3 << 16) | MUX_PA15D_SERCOM4_PAD3)
|
||||
#define PORT_PA15D_SERCOM4_PAD3 (1u << 15)
|
||||
#define PIN_PB11D_SERCOM4_PAD3 43 /**< \brief SERCOM4 signal: PAD3 on PB11 mux D */
|
||||
#define MUX_PB11D_SERCOM4_PAD3 3
|
||||
#define PINMUX_PB11D_SERCOM4_PAD3 ((PIN_PB11D_SERCOM4_PAD3 << 16) | MUX_PB11D_SERCOM4_PAD3)
|
||||
#define PORT_PB11D_SERCOM4_PAD3 (1u << 11)
|
||||
/* ========== PORT definition for SERCOM5 peripheral ========== */
|
||||
#define PIN_PA22D_SERCOM5_PAD0 22 /**< \brief SERCOM5 signal: PAD0 on PA22 mux D */
|
||||
#define MUX_PA22D_SERCOM5_PAD0 3
|
||||
#define PINMUX_PA22D_SERCOM5_PAD0 ((PIN_PA22D_SERCOM5_PAD0 << 16) | MUX_PA22D_SERCOM5_PAD0)
|
||||
#define PORT_PA22D_SERCOM5_PAD0 (1u << 22)
|
||||
#define PIN_PB02D_SERCOM5_PAD0 34 /**< \brief SERCOM5 signal: PAD0 on PB02 mux D */
|
||||
#define MUX_PB02D_SERCOM5_PAD0 3
|
||||
#define PINMUX_PB02D_SERCOM5_PAD0 ((PIN_PB02D_SERCOM5_PAD0 << 16) | MUX_PB02D_SERCOM5_PAD0)
|
||||
#define PORT_PB02D_SERCOM5_PAD0 (1u << 2)
|
||||
#define PIN_PA23D_SERCOM5_PAD1 23 /**< \brief SERCOM5 signal: PAD1 on PA23 mux D */
|
||||
#define MUX_PA23D_SERCOM5_PAD1 3
|
||||
#define PINMUX_PA23D_SERCOM5_PAD1 ((PIN_PA23D_SERCOM5_PAD1 << 16) | MUX_PA23D_SERCOM5_PAD1)
|
||||
#define PORT_PA23D_SERCOM5_PAD1 (1u << 23)
|
||||
#define PIN_PB03D_SERCOM5_PAD1 35 /**< \brief SERCOM5 signal: PAD1 on PB03 mux D */
|
||||
#define MUX_PB03D_SERCOM5_PAD1 3
|
||||
#define PINMUX_PB03D_SERCOM5_PAD1 ((PIN_PB03D_SERCOM5_PAD1 << 16) | MUX_PB03D_SERCOM5_PAD1)
|
||||
#define PORT_PB03D_SERCOM5_PAD1 (1u << 3)
|
||||
#define PIN_PA24D_SERCOM5_PAD2 24 /**< \brief SERCOM5 signal: PAD2 on PA24 mux D */
|
||||
#define MUX_PA24D_SERCOM5_PAD2 3
|
||||
#define PINMUX_PA24D_SERCOM5_PAD2 ((PIN_PA24D_SERCOM5_PAD2 << 16) | MUX_PA24D_SERCOM5_PAD2)
|
||||
#define PORT_PA24D_SERCOM5_PAD2 (1u << 24)
|
||||
#define PIN_PB22D_SERCOM5_PAD2 54 /**< \brief SERCOM5 signal: PAD2 on PB22 mux D */
|
||||
#define MUX_PB22D_SERCOM5_PAD2 3
|
||||
#define PINMUX_PB22D_SERCOM5_PAD2 ((PIN_PB22D_SERCOM5_PAD2 << 16) | MUX_PB22D_SERCOM5_PAD2)
|
||||
#define PORT_PB22D_SERCOM5_PAD2 (1u << 22)
|
||||
#define PIN_PA20C_SERCOM5_PAD2 20 /**< \brief SERCOM5 signal: PAD2 on PA20 mux C */
|
||||
#define MUX_PA20C_SERCOM5_PAD2 2
|
||||
#define PINMUX_PA20C_SERCOM5_PAD2 ((PIN_PA20C_SERCOM5_PAD2 << 16) | MUX_PA20C_SERCOM5_PAD2)
|
||||
#define PORT_PA20C_SERCOM5_PAD2 (1u << 20)
|
||||
#define PIN_PA25D_SERCOM5_PAD3 25 /**< \brief SERCOM5 signal: PAD3 on PA25 mux D */
|
||||
#define MUX_PA25D_SERCOM5_PAD3 3
|
||||
#define PINMUX_PA25D_SERCOM5_PAD3 ((PIN_PA25D_SERCOM5_PAD3 << 16) | MUX_PA25D_SERCOM5_PAD3)
|
||||
#define PORT_PA25D_SERCOM5_PAD3 (1u << 25)
|
||||
#define PIN_PB23D_SERCOM5_PAD3 55 /**< \brief SERCOM5 signal: PAD3 on PB23 mux D */
|
||||
#define MUX_PB23D_SERCOM5_PAD3 3
|
||||
#define PINMUX_PB23D_SERCOM5_PAD3 ((PIN_PB23D_SERCOM5_PAD3 << 16) | MUX_PB23D_SERCOM5_PAD3)
|
||||
#define PORT_PB23D_SERCOM5_PAD3 (1u << 23)
|
||||
#define PIN_PA21C_SERCOM5_PAD3 21 /**< \brief SERCOM5 signal: PAD3 on PA21 mux C */
|
||||
#define MUX_PA21C_SERCOM5_PAD3 2
|
||||
#define PINMUX_PA21C_SERCOM5_PAD3 ((PIN_PA21C_SERCOM5_PAD3 << 16) | MUX_PA21C_SERCOM5_PAD3)
|
||||
#define PORT_PA21C_SERCOM5_PAD3 (1u << 21)
|
||||
/* ========== PORT definition for TC0 peripheral ========== */
|
||||
#define PIN_PA04F_TC0_WO0 4 /**< \brief TC0 signal: WO0 on PA04 mux F */
|
||||
#define MUX_PA04F_TC0_WO0 5
|
||||
#define PINMUX_PA04F_TC0_WO0 ((PIN_PA04F_TC0_WO0 << 16) | MUX_PA04F_TC0_WO0)
|
||||
#define PORT_PA04F_TC0_WO0 (1u << 4)
|
||||
#define PIN_PA08E_TC0_WO0 8 /**< \brief TC0 signal: WO0 on PA08 mux E */
|
||||
#define MUX_PA08E_TC0_WO0 4
|
||||
#define PINMUX_PA08E_TC0_WO0 ((PIN_PA08E_TC0_WO0 << 16) | MUX_PA08E_TC0_WO0)
|
||||
#define PORT_PA08E_TC0_WO0 (1u << 8)
|
||||
#define PIN_PA05F_TC0_WO1 5 /**< \brief TC0 signal: WO1 on PA05 mux F */
|
||||
#define MUX_PA05F_TC0_WO1 5
|
||||
#define PINMUX_PA05F_TC0_WO1 ((PIN_PA05F_TC0_WO1 << 16) | MUX_PA05F_TC0_WO1)
|
||||
#define PORT_PA05F_TC0_WO1 (1u << 5)
|
||||
#define PIN_PA09E_TC0_WO1 9 /**< \brief TC0 signal: WO1 on PA09 mux E */
|
||||
#define MUX_PA09E_TC0_WO1 4
|
||||
#define PINMUX_PA09E_TC0_WO1 ((PIN_PA09E_TC0_WO1 << 16) | MUX_PA09E_TC0_WO1)
|
||||
#define PORT_PA09E_TC0_WO1 (1u << 9)
|
||||
/* ========== PORT definition for TC1 peripheral ========== */
|
||||
#define PIN_PA06F_TC1_WO0 6 /**< \brief TC1 signal: WO0 on PA06 mux F */
|
||||
#define MUX_PA06F_TC1_WO0 5
|
||||
#define PINMUX_PA06F_TC1_WO0 ((PIN_PA06F_TC1_WO0 << 16) | MUX_PA06F_TC1_WO0)
|
||||
#define PORT_PA06F_TC1_WO0 (1u << 6)
|
||||
#define PIN_PA30F_TC1_WO0 30 /**< \brief TC1 signal: WO0 on PA30 mux F */
|
||||
#define MUX_PA30F_TC1_WO0 5
|
||||
#define PINMUX_PA30F_TC1_WO0 ((PIN_PA30F_TC1_WO0 << 16) | MUX_PA30F_TC1_WO0)
|
||||
#define PORT_PA30F_TC1_WO0 (1u << 30)
|
||||
#define PIN_PA10E_TC1_WO0 10 /**< \brief TC1 signal: WO0 on PA10 mux E */
|
||||
#define MUX_PA10E_TC1_WO0 4
|
||||
#define PINMUX_PA10E_TC1_WO0 ((PIN_PA10E_TC1_WO0 << 16) | MUX_PA10E_TC1_WO0)
|
||||
#define PORT_PA10E_TC1_WO0 (1u << 10)
|
||||
#define PIN_PA07F_TC1_WO1 7 /**< \brief TC1 signal: WO1 on PA07 mux F */
|
||||
#define MUX_PA07F_TC1_WO1 5
|
||||
#define PINMUX_PA07F_TC1_WO1 ((PIN_PA07F_TC1_WO1 << 16) | MUX_PA07F_TC1_WO1)
|
||||
#define PORT_PA07F_TC1_WO1 (1u << 7)
|
||||
#define PIN_PA31F_TC1_WO1 31 /**< \brief TC1 signal: WO1 on PA31 mux F */
|
||||
#define MUX_PA31F_TC1_WO1 5
|
||||
#define PINMUX_PA31F_TC1_WO1 ((PIN_PA31F_TC1_WO1 << 16) | MUX_PA31F_TC1_WO1)
|
||||
#define PORT_PA31F_TC1_WO1 (1u << 31)
|
||||
#define PIN_PA11E_TC1_WO1 11 /**< \brief TC1 signal: WO1 on PA11 mux E */
|
||||
#define MUX_PA11E_TC1_WO1 4
|
||||
#define PINMUX_PA11E_TC1_WO1 ((PIN_PA11E_TC1_WO1 << 16) | MUX_PA11E_TC1_WO1)
|
||||
#define PORT_PA11E_TC1_WO1 (1u << 11)
|
||||
/* ========== PORT definition for TC2 peripheral ========== */
|
||||
#define PIN_PA16F_TC2_WO0 16 /**< \brief TC2 signal: WO0 on PA16 mux F */
|
||||
#define MUX_PA16F_TC2_WO0 5
|
||||
#define PINMUX_PA16F_TC2_WO0 ((PIN_PA16F_TC2_WO0 << 16) | MUX_PA16F_TC2_WO0)
|
||||
#define PORT_PA16F_TC2_WO0 (1u << 16)
|
||||
#define PIN_PA12E_TC2_WO0 12 /**< \brief TC2 signal: WO0 on PA12 mux E */
|
||||
#define MUX_PA12E_TC2_WO0 4
|
||||
#define PINMUX_PA12E_TC2_WO0 ((PIN_PA12E_TC2_WO0 << 16) | MUX_PA12E_TC2_WO0)
|
||||
#define PORT_PA12E_TC2_WO0 (1u << 12)
|
||||
#define PIN_PA00F_TC2_WO0 0 /**< \brief TC2 signal: WO0 on PA00 mux F */
|
||||
#define MUX_PA00F_TC2_WO0 5
|
||||
#define PINMUX_PA00F_TC2_WO0 ((PIN_PA00F_TC2_WO0 << 16) | MUX_PA00F_TC2_WO0)
|
||||
#define PORT_PA00F_TC2_WO0 (1u << 0)
|
||||
#define PIN_PA17F_TC2_WO1 17 /**< \brief TC2 signal: WO1 on PA17 mux F */
|
||||
#define MUX_PA17F_TC2_WO1 5
|
||||
#define PINMUX_PA17F_TC2_WO1 ((PIN_PA17F_TC2_WO1 << 16) | MUX_PA17F_TC2_WO1)
|
||||
#define PORT_PA17F_TC2_WO1 (1u << 17)
|
||||
#define PIN_PA13E_TC2_WO1 13 /**< \brief TC2 signal: WO1 on PA13 mux E */
|
||||
#define MUX_PA13E_TC2_WO1 4
|
||||
#define PINMUX_PA13E_TC2_WO1 ((PIN_PA13E_TC2_WO1 << 16) | MUX_PA13E_TC2_WO1)
|
||||
#define PORT_PA13E_TC2_WO1 (1u << 13)
|
||||
#define PIN_PA01F_TC2_WO1 1 /**< \brief TC2 signal: WO1 on PA01 mux F */
|
||||
#define MUX_PA01F_TC2_WO1 5
|
||||
#define PINMUX_PA01F_TC2_WO1 ((PIN_PA01F_TC2_WO1 << 16) | MUX_PA01F_TC2_WO1)
|
||||
#define PORT_PA01F_TC2_WO1 (1u << 1)
|
||||
/* ========== PORT definition for TC3 peripheral ========== */
|
||||
#define PIN_PA18F_TC3_WO0 18 /**< \brief TC3 signal: WO0 on PA18 mux F */
|
||||
#define MUX_PA18F_TC3_WO0 5
|
||||
#define PINMUX_PA18F_TC3_WO0 ((PIN_PA18F_TC3_WO0 << 16) | MUX_PA18F_TC3_WO0)
|
||||
#define PORT_PA18F_TC3_WO0 (1u << 18)
|
||||
#define PIN_PA14E_TC3_WO0 14 /**< \brief TC3 signal: WO0 on PA14 mux E */
|
||||
#define MUX_PA14E_TC3_WO0 4
|
||||
#define PINMUX_PA14E_TC3_WO0 ((PIN_PA14E_TC3_WO0 << 16) | MUX_PA14E_TC3_WO0)
|
||||
#define PORT_PA14E_TC3_WO0 (1u << 14)
|
||||
#define PIN_PA19F_TC3_WO1 19 /**< \brief TC3 signal: WO1 on PA19 mux F */
|
||||
#define MUX_PA19F_TC3_WO1 5
|
||||
#define PINMUX_PA19F_TC3_WO1 ((PIN_PA19F_TC3_WO1 << 16) | MUX_PA19F_TC3_WO1)
|
||||
#define PORT_PA19F_TC3_WO1 (1u << 19)
|
||||
#define PIN_PA15E_TC3_WO1 15 /**< \brief TC3 signal: WO1 on PA15 mux E */
|
||||
#define MUX_PA15E_TC3_WO1 4
|
||||
#define PINMUX_PA15E_TC3_WO1 ((PIN_PA15E_TC3_WO1 << 16) | MUX_PA15E_TC3_WO1)
|
||||
#define PORT_PA15E_TC3_WO1 (1u << 15)
|
||||
/* ========== PORT definition for TC4 peripheral ========== */
|
||||
#define PIN_PA22F_TC4_WO0 22 /**< \brief TC4 signal: WO0 on PA22 mux F */
|
||||
#define MUX_PA22F_TC4_WO0 5
|
||||
#define PINMUX_PA22F_TC4_WO0 ((PIN_PA22F_TC4_WO0 << 16) | MUX_PA22F_TC4_WO0)
|
||||
#define PORT_PA22F_TC4_WO0 (1u << 22)
|
||||
#define PIN_PB08F_TC4_WO0 40 /**< \brief TC4 signal: WO0 on PB08 mux F */
|
||||
#define MUX_PB08F_TC4_WO0 5
|
||||
#define PINMUX_PB08F_TC4_WO0 ((PIN_PB08F_TC4_WO0 << 16) | MUX_PB08F_TC4_WO0)
|
||||
#define PORT_PB08F_TC4_WO0 (1u << 8)
|
||||
#define PIN_PA23F_TC4_WO1 23 /**< \brief TC4 signal: WO1 on PA23 mux F */
|
||||
#define MUX_PA23F_TC4_WO1 5
|
||||
#define PINMUX_PA23F_TC4_WO1 ((PIN_PA23F_TC4_WO1 << 16) | MUX_PA23F_TC4_WO1)
|
||||
#define PORT_PA23F_TC4_WO1 (1u << 23)
|
||||
#define PIN_PB09F_TC4_WO1 41 /**< \brief TC4 signal: WO1 on PB09 mux F */
|
||||
#define MUX_PB09F_TC4_WO1 5
|
||||
#define PINMUX_PB09F_TC4_WO1 ((PIN_PB09F_TC4_WO1 << 16) | MUX_PB09F_TC4_WO1)
|
||||
#define PORT_PB09F_TC4_WO1 (1u << 9)
|
||||
/* ========== PORT definition for TC5 peripheral ========== */
|
||||
#define PIN_PA24F_TC5_WO0 24 /**< \brief TC5 signal: WO0 on PA24 mux F */
|
||||
#define MUX_PA24F_TC5_WO0 5
|
||||
#define PINMUX_PA24F_TC5_WO0 ((PIN_PA24F_TC5_WO0 << 16) | MUX_PA24F_TC5_WO0)
|
||||
#define PORT_PA24F_TC5_WO0 (1u << 24)
|
||||
#define PIN_PB10F_TC5_WO0 42 /**< \brief TC5 signal: WO0 on PB10 mux F */
|
||||
#define MUX_PB10F_TC5_WO0 5
|
||||
#define PINMUX_PB10F_TC5_WO0 ((PIN_PB10F_TC5_WO0 << 16) | MUX_PB10F_TC5_WO0)
|
||||
#define PORT_PB10F_TC5_WO0 (1u << 10)
|
||||
#define PIN_PA25F_TC5_WO1 25 /**< \brief TC5 signal: WO1 on PA25 mux F */
|
||||
#define MUX_PA25F_TC5_WO1 5
|
||||
#define PINMUX_PA25F_TC5_WO1 ((PIN_PA25F_TC5_WO1 << 16) | MUX_PA25F_TC5_WO1)
|
||||
#define PORT_PA25F_TC5_WO1 (1u << 25)
|
||||
#define PIN_PB11F_TC5_WO1 43 /**< \brief TC5 signal: WO1 on PB11 mux F */
|
||||
#define MUX_PB11F_TC5_WO1 5
|
||||
#define PINMUX_PB11F_TC5_WO1 ((PIN_PB11F_TC5_WO1 << 16) | MUX_PB11F_TC5_WO1)
|
||||
#define PORT_PB11F_TC5_WO1 (1u << 11)
|
||||
/* ========== PORT definition for TC6 peripheral ========== */
|
||||
#define PIN_PB02F_TC6_WO0 34 /**< \brief TC6 signal: WO0 on PB02 mux F */
|
||||
#define MUX_PB02F_TC6_WO0 5
|
||||
#define PINMUX_PB02F_TC6_WO0 ((PIN_PB02F_TC6_WO0 << 16) | MUX_PB02F_TC6_WO0)
|
||||
#define PORT_PB02F_TC6_WO0 (1u << 2)
|
||||
#define PIN_PB03F_TC6_WO1 35 /**< \brief TC6 signal: WO1 on PB03 mux F */
|
||||
#define MUX_PB03F_TC6_WO1 5
|
||||
#define PINMUX_PB03F_TC6_WO1 ((PIN_PB03F_TC6_WO1 << 16) | MUX_PB03F_TC6_WO1)
|
||||
#define PORT_PB03F_TC6_WO1 (1u << 3)
|
||||
/* ========== PORT definition for TC7 peripheral ========== */
|
||||
#define PIN_PB22F_TC7_WO0 54 /**< \brief TC7 signal: WO0 on PB22 mux F */
|
||||
#define MUX_PB22F_TC7_WO0 5
|
||||
#define PINMUX_PB22F_TC7_WO0 ((PIN_PB22F_TC7_WO0 << 16) | MUX_PB22F_TC7_WO0)
|
||||
#define PORT_PB22F_TC7_WO0 (1u << 22)
|
||||
#define PIN_PA20E_TC7_WO0 20 /**< \brief TC7 signal: WO0 on PA20 mux E */
|
||||
#define MUX_PA20E_TC7_WO0 4
|
||||
#define PINMUX_PA20E_TC7_WO0 ((PIN_PA20E_TC7_WO0 << 16) | MUX_PA20E_TC7_WO0)
|
||||
#define PORT_PA20E_TC7_WO0 (1u << 20)
|
||||
#define PIN_PB23F_TC7_WO1 55 /**< \brief TC7 signal: WO1 on PB23 mux F */
|
||||
#define MUX_PB23F_TC7_WO1 5
|
||||
#define PINMUX_PB23F_TC7_WO1 ((PIN_PB23F_TC7_WO1 << 16) | MUX_PB23F_TC7_WO1)
|
||||
#define PORT_PB23F_TC7_WO1 (1u << 23)
|
||||
#define PIN_PA21E_TC7_WO1 21 /**< \brief TC7 signal: WO1 on PA21 mux E */
|
||||
#define MUX_PA21E_TC7_WO1 4
|
||||
#define PINMUX_PA21E_TC7_WO1 ((PIN_PA21E_TC7_WO1 << 16) | MUX_PA21E_TC7_WO1)
|
||||
#define PORT_PA21E_TC7_WO1 (1u << 21)
|
||||
/* ========== PORT definition for ADC peripheral ========== */
|
||||
#define PIN_PA02B_ADC_AIN0 2 /**< \brief ADC signal: AIN0 on PA02 mux B */
|
||||
#define MUX_PA02B_ADC_AIN0 1
|
||||
#define PINMUX_PA02B_ADC_AIN0 ((PIN_PA02B_ADC_AIN0 << 16) | MUX_PA02B_ADC_AIN0)
|
||||
#define PORT_PA02B_ADC_AIN0 (1u << 2)
|
||||
#define PIN_PA03B_ADC_AIN1 3 /**< \brief ADC signal: AIN1 on PA03 mux B */
|
||||
#define MUX_PA03B_ADC_AIN1 1
|
||||
#define PINMUX_PA03B_ADC_AIN1 ((PIN_PA03B_ADC_AIN1 << 16) | MUX_PA03B_ADC_AIN1)
|
||||
#define PORT_PA03B_ADC_AIN1 (1u << 3)
|
||||
#define PIN_PB08B_ADC_AIN2 40 /**< \brief ADC signal: AIN2 on PB08 mux B */
|
||||
#define MUX_PB08B_ADC_AIN2 1
|
||||
#define PINMUX_PB08B_ADC_AIN2 ((PIN_PB08B_ADC_AIN2 << 16) | MUX_PB08B_ADC_AIN2)
|
||||
#define PORT_PB08B_ADC_AIN2 (1u << 8)
|
||||
#define PIN_PB09B_ADC_AIN3 41 /**< \brief ADC signal: AIN3 on PB09 mux B */
|
||||
#define MUX_PB09B_ADC_AIN3 1
|
||||
#define PINMUX_PB09B_ADC_AIN3 ((PIN_PB09B_ADC_AIN3 << 16) | MUX_PB09B_ADC_AIN3)
|
||||
#define PORT_PB09B_ADC_AIN3 (1u << 9)
|
||||
#define PIN_PA04B_ADC_AIN4 4 /**< \brief ADC signal: AIN4 on PA04 mux B */
|
||||
#define MUX_PA04B_ADC_AIN4 1
|
||||
#define PINMUX_PA04B_ADC_AIN4 ((PIN_PA04B_ADC_AIN4 << 16) | MUX_PA04B_ADC_AIN4)
|
||||
#define PORT_PA04B_ADC_AIN4 (1u << 4)
|
||||
#define PIN_PA05B_ADC_AIN5 5 /**< \brief ADC signal: AIN5 on PA05 mux B */
|
||||
#define MUX_PA05B_ADC_AIN5 1
|
||||
#define PINMUX_PA05B_ADC_AIN5 ((PIN_PA05B_ADC_AIN5 << 16) | MUX_PA05B_ADC_AIN5)
|
||||
#define PORT_PA05B_ADC_AIN5 (1u << 5)
|
||||
#define PIN_PA06B_ADC_AIN6 6 /**< \brief ADC signal: AIN6 on PA06 mux B */
|
||||
#define MUX_PA06B_ADC_AIN6 1
|
||||
#define PINMUX_PA06B_ADC_AIN6 ((PIN_PA06B_ADC_AIN6 << 16) | MUX_PA06B_ADC_AIN6)
|
||||
#define PORT_PA06B_ADC_AIN6 (1u << 6)
|
||||
#define PIN_PA07B_ADC_AIN7 7 /**< \brief ADC signal: AIN7 on PA07 mux B */
|
||||
#define MUX_PA07B_ADC_AIN7 1
|
||||
#define PINMUX_PA07B_ADC_AIN7 ((PIN_PA07B_ADC_AIN7 << 16) | MUX_PA07B_ADC_AIN7)
|
||||
#define PORT_PA07B_ADC_AIN7 (1u << 7)
|
||||
#define PIN_PB02B_ADC_AIN10 34 /**< \brief ADC signal: AIN10 on PB02 mux B */
|
||||
#define MUX_PB02B_ADC_AIN10 1
|
||||
#define PINMUX_PB02B_ADC_AIN10 ((PIN_PB02B_ADC_AIN10 << 16) | MUX_PB02B_ADC_AIN10)
|
||||
#define PORT_PB02B_ADC_AIN10 (1u << 2)
|
||||
#define PIN_PB03B_ADC_AIN11 35 /**< \brief ADC signal: AIN11 on PB03 mux B */
|
||||
#define MUX_PB03B_ADC_AIN11 1
|
||||
#define PINMUX_PB03B_ADC_AIN11 ((PIN_PB03B_ADC_AIN11 << 16) | MUX_PB03B_ADC_AIN11)
|
||||
#define PORT_PB03B_ADC_AIN11 (1u << 3)
|
||||
#define PIN_PA08B_ADC_AIN16 8 /**< \brief ADC signal: AIN16 on PA08 mux B */
|
||||
#define MUX_PA08B_ADC_AIN16 1
|
||||
#define PINMUX_PA08B_ADC_AIN16 ((PIN_PA08B_ADC_AIN16 << 16) | MUX_PA08B_ADC_AIN16)
|
||||
#define PORT_PA08B_ADC_AIN16 (1u << 8)
|
||||
#define PIN_PA09B_ADC_AIN17 9 /**< \brief ADC signal: AIN17 on PA09 mux B */
|
||||
#define MUX_PA09B_ADC_AIN17 1
|
||||
#define PINMUX_PA09B_ADC_AIN17 ((PIN_PA09B_ADC_AIN17 << 16) | MUX_PA09B_ADC_AIN17)
|
||||
#define PORT_PA09B_ADC_AIN17 (1u << 9)
|
||||
#define PIN_PA10B_ADC_AIN18 10 /**< \brief ADC signal: AIN18 on PA10 mux B */
|
||||
#define MUX_PA10B_ADC_AIN18 1
|
||||
#define PINMUX_PA10B_ADC_AIN18 ((PIN_PA10B_ADC_AIN18 << 16) | MUX_PA10B_ADC_AIN18)
|
||||
#define PORT_PA10B_ADC_AIN18 (1u << 10)
|
||||
#define PIN_PA11B_ADC_AIN19 11 /**< \brief ADC signal: AIN19 on PA11 mux B */
|
||||
#define MUX_PA11B_ADC_AIN19 1
|
||||
#define PINMUX_PA11B_ADC_AIN19 ((PIN_PA11B_ADC_AIN19 << 16) | MUX_PA11B_ADC_AIN19)
|
||||
#define PORT_PA11B_ADC_AIN19 (1u << 11)
|
||||
#define PIN_PA04B_ADC_VREFP 4 /**< \brief ADC signal: VREFP on PA04 mux B */
|
||||
#define MUX_PA04B_ADC_VREFP 1
|
||||
#define PINMUX_PA04B_ADC_VREFP ((PIN_PA04B_ADC_VREFP << 16) | MUX_PA04B_ADC_VREFP)
|
||||
#define PORT_PA04B_ADC_VREFP (1u << 4)
|
||||
/* ========== PORT definition for AC peripheral ========== */
|
||||
#define PIN_PA04B_AC_AIN0 4 /**< \brief AC signal: AIN0 on PA04 mux B */
|
||||
#define MUX_PA04B_AC_AIN0 1
|
||||
#define PINMUX_PA04B_AC_AIN0 ((PIN_PA04B_AC_AIN0 << 16) | MUX_PA04B_AC_AIN0)
|
||||
#define PORT_PA04B_AC_AIN0 (1u << 4)
|
||||
#define PIN_PA05B_AC_AIN1 5 /**< \brief AC signal: AIN1 on PA05 mux B */
|
||||
#define MUX_PA05B_AC_AIN1 1
|
||||
#define PINMUX_PA05B_AC_AIN1 ((PIN_PA05B_AC_AIN1 << 16) | MUX_PA05B_AC_AIN1)
|
||||
#define PORT_PA05B_AC_AIN1 (1u << 5)
|
||||
#define PIN_PA06B_AC_AIN2 6 /**< \brief AC signal: AIN2 on PA06 mux B */
|
||||
#define MUX_PA06B_AC_AIN2 1
|
||||
#define PINMUX_PA06B_AC_AIN2 ((PIN_PA06B_AC_AIN2 << 16) | MUX_PA06B_AC_AIN2)
|
||||
#define PORT_PA06B_AC_AIN2 (1u << 6)
|
||||
#define PIN_PA07B_AC_AIN3 7 /**< \brief AC signal: AIN3 on PA07 mux B */
|
||||
#define MUX_PA07B_AC_AIN3 1
|
||||
#define PINMUX_PA07B_AC_AIN3 ((PIN_PA07B_AC_AIN3 << 16) | MUX_PA07B_AC_AIN3)
|
||||
#define PORT_PA07B_AC_AIN3 (1u << 7)
|
||||
#define PIN_PA12H_AC_CMP0 12 /**< \brief AC signal: CMP0 on PA12 mux H */
|
||||
#define MUX_PA12H_AC_CMP0 7
|
||||
#define PINMUX_PA12H_AC_CMP0 ((PIN_PA12H_AC_CMP0 << 16) | MUX_PA12H_AC_CMP0)
|
||||
#define PORT_PA12H_AC_CMP0 (1u << 12)
|
||||
#define PIN_PA18H_AC_CMP0 18 /**< \brief AC signal: CMP0 on PA18 mux H */
|
||||
#define MUX_PA18H_AC_CMP0 7
|
||||
#define PINMUX_PA18H_AC_CMP0 ((PIN_PA18H_AC_CMP0 << 16) | MUX_PA18H_AC_CMP0)
|
||||
#define PORT_PA18H_AC_CMP0 (1u << 18)
|
||||
#define PIN_PA13H_AC_CMP1 13 /**< \brief AC signal: CMP1 on PA13 mux H */
|
||||
#define MUX_PA13H_AC_CMP1 7
|
||||
#define PINMUX_PA13H_AC_CMP1 ((PIN_PA13H_AC_CMP1 << 16) | MUX_PA13H_AC_CMP1)
|
||||
#define PORT_PA13H_AC_CMP1 (1u << 13)
|
||||
#define PIN_PA19H_AC_CMP1 19 /**< \brief AC signal: CMP1 on PA19 mux H */
|
||||
#define MUX_PA19H_AC_CMP1 7
|
||||
#define PINMUX_PA19H_AC_CMP1 ((PIN_PA19H_AC_CMP1 << 16) | MUX_PA19H_AC_CMP1)
|
||||
#define PORT_PA19H_AC_CMP1 (1u << 19)
|
||||
/* ========== PORT definition for DAC peripheral ========== */
|
||||
#define PIN_PA02B_DAC_VOUT 2 /**< \brief DAC signal: VOUT on PA02 mux B */
|
||||
#define MUX_PA02B_DAC_VOUT 1
|
||||
#define PINMUX_PA02B_DAC_VOUT ((PIN_PA02B_DAC_VOUT << 16) | MUX_PA02B_DAC_VOUT)
|
||||
#define PORT_PA02B_DAC_VOUT (1u << 2)
|
||||
#define PIN_PA03B_DAC_VREFP 3 /**< \brief DAC signal: VREFP on PA03 mux B */
|
||||
#define MUX_PA03B_DAC_VREFP 1
|
||||
#define PINMUX_PA03B_DAC_VREFP ((PIN_PA03B_DAC_VREFP << 16) | MUX_PA03B_DAC_VREFP)
|
||||
#define PORT_PA03B_DAC_VREFP (1u << 3)
|
||||
|
||||
#endif /* _SAMD20G16_PIO_ */
|
|
@ -0,0 +1,812 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Peripheral I/O description for SAMD20G17
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20G17_PIO_
|
||||
#define _SAMD20G17_PIO_
|
||||
|
||||
#define PIN_PA00 0 /**< \brief Pin Number for PA00 */
|
||||
#define PORT_PA00 (1u << 0) /**< \brief PORT Mask for PA00 */
|
||||
#define PIN_PA01 1 /**< \brief Pin Number for PA01 */
|
||||
#define PORT_PA01 (1u << 1) /**< \brief PORT Mask for PA01 */
|
||||
#define PIN_PA02 2 /**< \brief Pin Number for PA02 */
|
||||
#define PORT_PA02 (1u << 2) /**< \brief PORT Mask for PA02 */
|
||||
#define PIN_PA03 3 /**< \brief Pin Number for PA03 */
|
||||
#define PORT_PA03 (1u << 3) /**< \brief PORT Mask for PA03 */
|
||||
#define PIN_PA04 4 /**< \brief Pin Number for PA04 */
|
||||
#define PORT_PA04 (1u << 4) /**< \brief PORT Mask for PA04 */
|
||||
#define PIN_PA05 5 /**< \brief Pin Number for PA05 */
|
||||
#define PORT_PA05 (1u << 5) /**< \brief PORT Mask for PA05 */
|
||||
#define PIN_PA06 6 /**< \brief Pin Number for PA06 */
|
||||
#define PORT_PA06 (1u << 6) /**< \brief PORT Mask for PA06 */
|
||||
#define PIN_PA07 7 /**< \brief Pin Number for PA07 */
|
||||
#define PORT_PA07 (1u << 7) /**< \brief PORT Mask for PA07 */
|
||||
#define PIN_PA08 8 /**< \brief Pin Number for PA08 */
|
||||
#define PORT_PA08 (1u << 8) /**< \brief PORT Mask for PA08 */
|
||||
#define PIN_PA09 9 /**< \brief Pin Number for PA09 */
|
||||
#define PORT_PA09 (1u << 9) /**< \brief PORT Mask for PA09 */
|
||||
#define PIN_PA10 10 /**< \brief Pin Number for PA10 */
|
||||
#define PORT_PA10 (1u << 10) /**< \brief PORT Mask for PA10 */
|
||||
#define PIN_PA11 11 /**< \brief Pin Number for PA11 */
|
||||
#define PORT_PA11 (1u << 11) /**< \brief PORT Mask for PA11 */
|
||||
#define PIN_PA12 12 /**< \brief Pin Number for PA12 */
|
||||
#define PORT_PA12 (1u << 12) /**< \brief PORT Mask for PA12 */
|
||||
#define PIN_PA13 13 /**< \brief Pin Number for PA13 */
|
||||
#define PORT_PA13 (1u << 13) /**< \brief PORT Mask for PA13 */
|
||||
#define PIN_PA14 14 /**< \brief Pin Number for PA14 */
|
||||
#define PORT_PA14 (1u << 14) /**< \brief PORT Mask for PA14 */
|
||||
#define PIN_PA15 15 /**< \brief Pin Number for PA15 */
|
||||
#define PORT_PA15 (1u << 15) /**< \brief PORT Mask for PA15 */
|
||||
#define PIN_PA16 16 /**< \brief Pin Number for PA16 */
|
||||
#define PORT_PA16 (1u << 16) /**< \brief PORT Mask for PA16 */
|
||||
#define PIN_PA17 17 /**< \brief Pin Number for PA17 */
|
||||
#define PORT_PA17 (1u << 17) /**< \brief PORT Mask for PA17 */
|
||||
#define PIN_PA18 18 /**< \brief Pin Number for PA18 */
|
||||
#define PORT_PA18 (1u << 18) /**< \brief PORT Mask for PA18 */
|
||||
#define PIN_PA19 19 /**< \brief Pin Number for PA19 */
|
||||
#define PORT_PA19 (1u << 19) /**< \brief PORT Mask for PA19 */
|
||||
#define PIN_PA20 20 /**< \brief Pin Number for PA20 */
|
||||
#define PORT_PA20 (1u << 20) /**< \brief PORT Mask for PA20 */
|
||||
#define PIN_PA21 21 /**< \brief Pin Number for PA21 */
|
||||
#define PORT_PA21 (1u << 21) /**< \brief PORT Mask for PA21 */
|
||||
#define PIN_PA22 22 /**< \brief Pin Number for PA22 */
|
||||
#define PORT_PA22 (1u << 22) /**< \brief PORT Mask for PA22 */
|
||||
#define PIN_PA23 23 /**< \brief Pin Number for PA23 */
|
||||
#define PORT_PA23 (1u << 23) /**< \brief PORT Mask for PA23 */
|
||||
#define PIN_PA24 24 /**< \brief Pin Number for PA24 */
|
||||
#define PORT_PA24 (1u << 24) /**< \brief PORT Mask for PA24 */
|
||||
#define PIN_PA25 25 /**< \brief Pin Number for PA25 */
|
||||
#define PORT_PA25 (1u << 25) /**< \brief PORT Mask for PA25 */
|
||||
#define PIN_PA27 27 /**< \brief Pin Number for PA27 */
|
||||
#define PORT_PA27 (1u << 27) /**< \brief PORT Mask for PA27 */
|
||||
#define PIN_PA28 28 /**< \brief Pin Number for PA28 */
|
||||
#define PORT_PA28 (1u << 28) /**< \brief PORT Mask for PA28 */
|
||||
#define PIN_PA30 30 /**< \brief Pin Number for PA30 */
|
||||
#define PORT_PA30 (1u << 30) /**< \brief PORT Mask for PA30 */
|
||||
#define PIN_PA31 31 /**< \brief Pin Number for PA31 */
|
||||
#define PORT_PA31 (1u << 31) /**< \brief PORT Mask for PA31 */
|
||||
#define PIN_PB02 34 /**< \brief Pin Number for PB02 */
|
||||
#define PORT_PB02 (1u << 2) /**< \brief PORT Mask for PB02 */
|
||||
#define PIN_PB03 35 /**< \brief Pin Number for PB03 */
|
||||
#define PORT_PB03 (1u << 3) /**< \brief PORT Mask for PB03 */
|
||||
#define PIN_PB08 40 /**< \brief Pin Number for PB08 */
|
||||
#define PORT_PB08 (1u << 8) /**< \brief PORT Mask for PB08 */
|
||||
#define PIN_PB09 41 /**< \brief Pin Number for PB09 */
|
||||
#define PORT_PB09 (1u << 9) /**< \brief PORT Mask for PB09 */
|
||||
#define PIN_PB10 42 /**< \brief Pin Number for PB10 */
|
||||
#define PORT_PB10 (1u << 10) /**< \brief PORT Mask for PB10 */
|
||||
#define PIN_PB11 43 /**< \brief Pin Number for PB11 */
|
||||
#define PORT_PB11 (1u << 11) /**< \brief PORT Mask for PB11 */
|
||||
#define PIN_PB22 54 /**< \brief Pin Number for PB22 */
|
||||
#define PORT_PB22 (1u << 22) /**< \brief PORT Mask for PB22 */
|
||||
#define PIN_PB23 55 /**< \brief Pin Number for PB23 */
|
||||
#define PORT_PB23 (1u << 23) /**< \brief PORT Mask for PB23 */
|
||||
/* ========== PORT definition for CORE peripheral ========== */
|
||||
#define PIN_PA30G_CORE_SWCLK 30 /**< \brief CORE signal: SWCLK on PA30 mux G */
|
||||
#define MUX_PA30G_CORE_SWCLK 6
|
||||
#define PINMUX_PA30G_CORE_SWCLK ((PIN_PA30G_CORE_SWCLK << 16) | MUX_PA30G_CORE_SWCLK)
|
||||
#define PORT_PA30G_CORE_SWCLK (1u << 30)
|
||||
/* ========== PORT definition for GCLK peripheral ========== */
|
||||
#define PIN_PB22H_GCLK_IO0 54 /**< \brief GCLK signal: IO0 on PB22 mux H */
|
||||
#define MUX_PB22H_GCLK_IO0 7
|
||||
#define PINMUX_PB22H_GCLK_IO0 ((PIN_PB22H_GCLK_IO0 << 16) | MUX_PB22H_GCLK_IO0)
|
||||
#define PORT_PB22H_GCLK_IO0 (1u << 22)
|
||||
#define PIN_PA14H_GCLK_IO0 14 /**< \brief GCLK signal: IO0 on PA14 mux H */
|
||||
#define MUX_PA14H_GCLK_IO0 7
|
||||
#define PINMUX_PA14H_GCLK_IO0 ((PIN_PA14H_GCLK_IO0 << 16) | MUX_PA14H_GCLK_IO0)
|
||||
#define PORT_PA14H_GCLK_IO0 (1u << 14)
|
||||
#define PIN_PA27H_GCLK_IO0 27 /**< \brief GCLK signal: IO0 on PA27 mux H */
|
||||
#define MUX_PA27H_GCLK_IO0 7
|
||||
#define PINMUX_PA27H_GCLK_IO0 ((PIN_PA27H_GCLK_IO0 << 16) | MUX_PA27H_GCLK_IO0)
|
||||
#define PORT_PA27H_GCLK_IO0 (1u << 27)
|
||||
#define PIN_PA28H_GCLK_IO0 28 /**< \brief GCLK signal: IO0 on PA28 mux H */
|
||||
#define MUX_PA28H_GCLK_IO0 7
|
||||
#define PINMUX_PA28H_GCLK_IO0 ((PIN_PA28H_GCLK_IO0 << 16) | MUX_PA28H_GCLK_IO0)
|
||||
#define PORT_PA28H_GCLK_IO0 (1u << 28)
|
||||
#define PIN_PA30H_GCLK_IO0 30 /**< \brief GCLK signal: IO0 on PA30 mux H */
|
||||
#define MUX_PA30H_GCLK_IO0 7
|
||||
#define PINMUX_PA30H_GCLK_IO0 ((PIN_PA30H_GCLK_IO0 << 16) | MUX_PA30H_GCLK_IO0)
|
||||
#define PORT_PA30H_GCLK_IO0 (1u << 30)
|
||||
#define PIN_PB23H_GCLK_IO1 55 /**< \brief GCLK signal: IO1 on PB23 mux H */
|
||||
#define MUX_PB23H_GCLK_IO1 7
|
||||
#define PINMUX_PB23H_GCLK_IO1 ((PIN_PB23H_GCLK_IO1 << 16) | MUX_PB23H_GCLK_IO1)
|
||||
#define PORT_PB23H_GCLK_IO1 (1u << 23)
|
||||
#define PIN_PA15H_GCLK_IO1 15 /**< \brief GCLK signal: IO1 on PA15 mux H */
|
||||
#define MUX_PA15H_GCLK_IO1 7
|
||||
#define PINMUX_PA15H_GCLK_IO1 ((PIN_PA15H_GCLK_IO1 << 16) | MUX_PA15H_GCLK_IO1)
|
||||
#define PORT_PA15H_GCLK_IO1 (1u << 15)
|
||||
#define PIN_PA16H_GCLK_IO2 16 /**< \brief GCLK signal: IO2 on PA16 mux H */
|
||||
#define MUX_PA16H_GCLK_IO2 7
|
||||
#define PINMUX_PA16H_GCLK_IO2 ((PIN_PA16H_GCLK_IO2 << 16) | MUX_PA16H_GCLK_IO2)
|
||||
#define PORT_PA16H_GCLK_IO2 (1u << 16)
|
||||
#define PIN_PA17H_GCLK_IO3 17 /**< \brief GCLK signal: IO3 on PA17 mux H */
|
||||
#define MUX_PA17H_GCLK_IO3 7
|
||||
#define PINMUX_PA17H_GCLK_IO3 ((PIN_PA17H_GCLK_IO3 << 16) | MUX_PA17H_GCLK_IO3)
|
||||
#define PORT_PA17H_GCLK_IO3 (1u << 17)
|
||||
#define PIN_PA10H_GCLK_IO4 10 /**< \brief GCLK signal: IO4 on PA10 mux H */
|
||||
#define MUX_PA10H_GCLK_IO4 7
|
||||
#define PINMUX_PA10H_GCLK_IO4 ((PIN_PA10H_GCLK_IO4 << 16) | MUX_PA10H_GCLK_IO4)
|
||||
#define PORT_PA10H_GCLK_IO4 (1u << 10)
|
||||
#define PIN_PA20H_GCLK_IO4 20 /**< \brief GCLK signal: IO4 on PA20 mux H */
|
||||
#define MUX_PA20H_GCLK_IO4 7
|
||||
#define PINMUX_PA20H_GCLK_IO4 ((PIN_PA20H_GCLK_IO4 << 16) | MUX_PA20H_GCLK_IO4)
|
||||
#define PORT_PA20H_GCLK_IO4 (1u << 20)
|
||||
#define PIN_PB10H_GCLK_IO4 42 /**< \brief GCLK signal: IO4 on PB10 mux H */
|
||||
#define MUX_PB10H_GCLK_IO4 7
|
||||
#define PINMUX_PB10H_GCLK_IO4 ((PIN_PB10H_GCLK_IO4 << 16) | MUX_PB10H_GCLK_IO4)
|
||||
#define PORT_PB10H_GCLK_IO4 (1u << 10)
|
||||
#define PIN_PA11H_GCLK_IO5 11 /**< \brief GCLK signal: IO5 on PA11 mux H */
|
||||
#define MUX_PA11H_GCLK_IO5 7
|
||||
#define PINMUX_PA11H_GCLK_IO5 ((PIN_PA11H_GCLK_IO5 << 16) | MUX_PA11H_GCLK_IO5)
|
||||
#define PORT_PA11H_GCLK_IO5 (1u << 11)
|
||||
#define PIN_PA21H_GCLK_IO5 21 /**< \brief GCLK signal: IO5 on PA21 mux H */
|
||||
#define MUX_PA21H_GCLK_IO5 7
|
||||
#define PINMUX_PA21H_GCLK_IO5 ((PIN_PA21H_GCLK_IO5 << 16) | MUX_PA21H_GCLK_IO5)
|
||||
#define PORT_PA21H_GCLK_IO5 (1u << 21)
|
||||
#define PIN_PB11H_GCLK_IO5 43 /**< \brief GCLK signal: IO5 on PB11 mux H */
|
||||
#define MUX_PB11H_GCLK_IO5 7
|
||||
#define PINMUX_PB11H_GCLK_IO5 ((PIN_PB11H_GCLK_IO5 << 16) | MUX_PB11H_GCLK_IO5)
|
||||
#define PORT_PB11H_GCLK_IO5 (1u << 11)
|
||||
#define PIN_PA22H_GCLK_IO6 22 /**< \brief GCLK signal: IO6 on PA22 mux H */
|
||||
#define MUX_PA22H_GCLK_IO6 7
|
||||
#define PINMUX_PA22H_GCLK_IO6 ((PIN_PA22H_GCLK_IO6 << 16) | MUX_PA22H_GCLK_IO6)
|
||||
#define PORT_PA22H_GCLK_IO6 (1u << 22)
|
||||
#define PIN_PA23H_GCLK_IO7 23 /**< \brief GCLK signal: IO7 on PA23 mux H */
|
||||
#define MUX_PA23H_GCLK_IO7 7
|
||||
#define PINMUX_PA23H_GCLK_IO7 ((PIN_PA23H_GCLK_IO7 << 16) | MUX_PA23H_GCLK_IO7)
|
||||
#define PORT_PA23H_GCLK_IO7 (1u << 23)
|
||||
/* ========== PORT definition for EIC peripheral ========== */
|
||||
#define PIN_PA16A_EIC_EXTINT0 16 /**< \brief EIC signal: EXTINT0 on PA16 mux A */
|
||||
#define MUX_PA16A_EIC_EXTINT0 0
|
||||
#define PINMUX_PA16A_EIC_EXTINT0 ((PIN_PA16A_EIC_EXTINT0 << 16) | MUX_PA16A_EIC_EXTINT0)
|
||||
#define PORT_PA16A_EIC_EXTINT0 (1u << 16)
|
||||
#define PIN_PA00A_EIC_EXTINT0 0 /**< \brief EIC signal: EXTINT0 on PA00 mux A */
|
||||
#define MUX_PA00A_EIC_EXTINT0 0
|
||||
#define PINMUX_PA00A_EIC_EXTINT0 ((PIN_PA00A_EIC_EXTINT0 << 16) | MUX_PA00A_EIC_EXTINT0)
|
||||
#define PORT_PA00A_EIC_EXTINT0 (1u << 0)
|
||||
#define PIN_PA17A_EIC_EXTINT1 17 /**< \brief EIC signal: EXTINT1 on PA17 mux A */
|
||||
#define MUX_PA17A_EIC_EXTINT1 0
|
||||
#define PINMUX_PA17A_EIC_EXTINT1 ((PIN_PA17A_EIC_EXTINT1 << 16) | MUX_PA17A_EIC_EXTINT1)
|
||||
#define PORT_PA17A_EIC_EXTINT1 (1u << 17)
|
||||
#define PIN_PA01A_EIC_EXTINT1 1 /**< \brief EIC signal: EXTINT1 on PA01 mux A */
|
||||
#define MUX_PA01A_EIC_EXTINT1 0
|
||||
#define PINMUX_PA01A_EIC_EXTINT1 ((PIN_PA01A_EIC_EXTINT1 << 16) | MUX_PA01A_EIC_EXTINT1)
|
||||
#define PORT_PA01A_EIC_EXTINT1 (1u << 1)
|
||||
#define PIN_PA02A_EIC_EXTINT2 2 /**< \brief EIC signal: EXTINT2 on PA02 mux A */
|
||||
#define MUX_PA02A_EIC_EXTINT2 0
|
||||
#define PINMUX_PA02A_EIC_EXTINT2 ((PIN_PA02A_EIC_EXTINT2 << 16) | MUX_PA02A_EIC_EXTINT2)
|
||||
#define PORT_PA02A_EIC_EXTINT2 (1u << 2)
|
||||
#define PIN_PA18A_EIC_EXTINT2 18 /**< \brief EIC signal: EXTINT2 on PA18 mux A */
|
||||
#define MUX_PA18A_EIC_EXTINT2 0
|
||||
#define PINMUX_PA18A_EIC_EXTINT2 ((PIN_PA18A_EIC_EXTINT2 << 16) | MUX_PA18A_EIC_EXTINT2)
|
||||
#define PORT_PA18A_EIC_EXTINT2 (1u << 18)
|
||||
#define PIN_PB02A_EIC_EXTINT2 34 /**< \brief EIC signal: EXTINT2 on PB02 mux A */
|
||||
#define MUX_PB02A_EIC_EXTINT2 0
|
||||
#define PINMUX_PB02A_EIC_EXTINT2 ((PIN_PB02A_EIC_EXTINT2 << 16) | MUX_PB02A_EIC_EXTINT2)
|
||||
#define PORT_PB02A_EIC_EXTINT2 (1u << 2)
|
||||
#define PIN_PA03A_EIC_EXTINT3 3 /**< \brief EIC signal: EXTINT3 on PA03 mux A */
|
||||
#define MUX_PA03A_EIC_EXTINT3 0
|
||||
#define PINMUX_PA03A_EIC_EXTINT3 ((PIN_PA03A_EIC_EXTINT3 << 16) | MUX_PA03A_EIC_EXTINT3)
|
||||
#define PORT_PA03A_EIC_EXTINT3 (1u << 3)
|
||||
#define PIN_PA19A_EIC_EXTINT3 19 /**< \brief EIC signal: EXTINT3 on PA19 mux A */
|
||||
#define MUX_PA19A_EIC_EXTINT3 0
|
||||
#define PINMUX_PA19A_EIC_EXTINT3 ((PIN_PA19A_EIC_EXTINT3 << 16) | MUX_PA19A_EIC_EXTINT3)
|
||||
#define PORT_PA19A_EIC_EXTINT3 (1u << 19)
|
||||
#define PIN_PB03A_EIC_EXTINT3 35 /**< \brief EIC signal: EXTINT3 on PB03 mux A */
|
||||
#define MUX_PB03A_EIC_EXTINT3 0
|
||||
#define PINMUX_PB03A_EIC_EXTINT3 ((PIN_PB03A_EIC_EXTINT3 << 16) | MUX_PB03A_EIC_EXTINT3)
|
||||
#define PORT_PB03A_EIC_EXTINT3 (1u << 3)
|
||||
#define PIN_PA04A_EIC_EXTINT4 4 /**< \brief EIC signal: EXTINT4 on PA04 mux A */
|
||||
#define MUX_PA04A_EIC_EXTINT4 0
|
||||
#define PINMUX_PA04A_EIC_EXTINT4 ((PIN_PA04A_EIC_EXTINT4 << 16) | MUX_PA04A_EIC_EXTINT4)
|
||||
#define PORT_PA04A_EIC_EXTINT4 (1u << 4)
|
||||
#define PIN_PA20A_EIC_EXTINT4 20 /**< \brief EIC signal: EXTINT4 on PA20 mux A */
|
||||
#define MUX_PA20A_EIC_EXTINT4 0
|
||||
#define PINMUX_PA20A_EIC_EXTINT4 ((PIN_PA20A_EIC_EXTINT4 << 16) | MUX_PA20A_EIC_EXTINT4)
|
||||
#define PORT_PA20A_EIC_EXTINT4 (1u << 20)
|
||||
#define PIN_PA05A_EIC_EXTINT5 5 /**< \brief EIC signal: EXTINT5 on PA05 mux A */
|
||||
#define MUX_PA05A_EIC_EXTINT5 0
|
||||
#define PINMUX_PA05A_EIC_EXTINT5 ((PIN_PA05A_EIC_EXTINT5 << 16) | MUX_PA05A_EIC_EXTINT5)
|
||||
#define PORT_PA05A_EIC_EXTINT5 (1u << 5)
|
||||
#define PIN_PA21A_EIC_EXTINT5 21 /**< \brief EIC signal: EXTINT5 on PA21 mux A */
|
||||
#define MUX_PA21A_EIC_EXTINT5 0
|
||||
#define PINMUX_PA21A_EIC_EXTINT5 ((PIN_PA21A_EIC_EXTINT5 << 16) | MUX_PA21A_EIC_EXTINT5)
|
||||
#define PORT_PA21A_EIC_EXTINT5 (1u << 21)
|
||||
#define PIN_PA06A_EIC_EXTINT6 6 /**< \brief EIC signal: EXTINT6 on PA06 mux A */
|
||||
#define MUX_PA06A_EIC_EXTINT6 0
|
||||
#define PINMUX_PA06A_EIC_EXTINT6 ((PIN_PA06A_EIC_EXTINT6 << 16) | MUX_PA06A_EIC_EXTINT6)
|
||||
#define PORT_PA06A_EIC_EXTINT6 (1u << 6)
|
||||
#define PIN_PA22A_EIC_EXTINT6 22 /**< \brief EIC signal: EXTINT6 on PA22 mux A */
|
||||
#define MUX_PA22A_EIC_EXTINT6 0
|
||||
#define PINMUX_PA22A_EIC_EXTINT6 ((PIN_PA22A_EIC_EXTINT6 << 16) | MUX_PA22A_EIC_EXTINT6)
|
||||
#define PORT_PA22A_EIC_EXTINT6 (1u << 22)
|
||||
#define PIN_PB22A_EIC_EXTINT6 54 /**< \brief EIC signal: EXTINT6 on PB22 mux A */
|
||||
#define MUX_PB22A_EIC_EXTINT6 0
|
||||
#define PINMUX_PB22A_EIC_EXTINT6 ((PIN_PB22A_EIC_EXTINT6 << 16) | MUX_PB22A_EIC_EXTINT6)
|
||||
#define PORT_PB22A_EIC_EXTINT6 (1u << 22)
|
||||
#define PIN_PA07A_EIC_EXTINT7 7 /**< \brief EIC signal: EXTINT7 on PA07 mux A */
|
||||
#define MUX_PA07A_EIC_EXTINT7 0
|
||||
#define PINMUX_PA07A_EIC_EXTINT7 ((PIN_PA07A_EIC_EXTINT7 << 16) | MUX_PA07A_EIC_EXTINT7)
|
||||
#define PORT_PA07A_EIC_EXTINT7 (1u << 7)
|
||||
#define PIN_PA23A_EIC_EXTINT7 23 /**< \brief EIC signal: EXTINT7 on PA23 mux A */
|
||||
#define MUX_PA23A_EIC_EXTINT7 0
|
||||
#define PINMUX_PA23A_EIC_EXTINT7 ((PIN_PA23A_EIC_EXTINT7 << 16) | MUX_PA23A_EIC_EXTINT7)
|
||||
#define PORT_PA23A_EIC_EXTINT7 (1u << 23)
|
||||
#define PIN_PB23A_EIC_EXTINT7 55 /**< \brief EIC signal: EXTINT7 on PB23 mux A */
|
||||
#define MUX_PB23A_EIC_EXTINT7 0
|
||||
#define PINMUX_PB23A_EIC_EXTINT7 ((PIN_PB23A_EIC_EXTINT7 << 16) | MUX_PB23A_EIC_EXTINT7)
|
||||
#define PORT_PB23A_EIC_EXTINT7 (1u << 23)
|
||||
#define PIN_PA28A_EIC_EXTINT8 28 /**< \brief EIC signal: EXTINT8 on PA28 mux A */
|
||||
#define MUX_PA28A_EIC_EXTINT8 0
|
||||
#define PINMUX_PA28A_EIC_EXTINT8 ((PIN_PA28A_EIC_EXTINT8 << 16) | MUX_PA28A_EIC_EXTINT8)
|
||||
#define PORT_PA28A_EIC_EXTINT8 (1u << 28)
|
||||
#define PIN_PB08A_EIC_EXTINT8 40 /**< \brief EIC signal: EXTINT8 on PB08 mux A */
|
||||
#define MUX_PB08A_EIC_EXTINT8 0
|
||||
#define PINMUX_PB08A_EIC_EXTINT8 ((PIN_PB08A_EIC_EXTINT8 << 16) | MUX_PB08A_EIC_EXTINT8)
|
||||
#define PORT_PB08A_EIC_EXTINT8 (1u << 8)
|
||||
#define PIN_PA09A_EIC_EXTINT9 9 /**< \brief EIC signal: EXTINT9 on PA09 mux A */
|
||||
#define MUX_PA09A_EIC_EXTINT9 0
|
||||
#define PINMUX_PA09A_EIC_EXTINT9 ((PIN_PA09A_EIC_EXTINT9 << 16) | MUX_PA09A_EIC_EXTINT9)
|
||||
#define PORT_PA09A_EIC_EXTINT9 (1u << 9)
|
||||
#define PIN_PB09A_EIC_EXTINT9 41 /**< \brief EIC signal: EXTINT9 on PB09 mux A */
|
||||
#define MUX_PB09A_EIC_EXTINT9 0
|
||||
#define PINMUX_PB09A_EIC_EXTINT9 ((PIN_PB09A_EIC_EXTINT9 << 16) | MUX_PB09A_EIC_EXTINT9)
|
||||
#define PORT_PB09A_EIC_EXTINT9 (1u << 9)
|
||||
#define PIN_PA10A_EIC_EXTINT10 10 /**< \brief EIC signal: EXTINT10 on PA10 mux A */
|
||||
#define MUX_PA10A_EIC_EXTINT10 0
|
||||
#define PINMUX_PA10A_EIC_EXTINT10 ((PIN_PA10A_EIC_EXTINT10 << 16) | MUX_PA10A_EIC_EXTINT10)
|
||||
#define PORT_PA10A_EIC_EXTINT10 (1u << 10)
|
||||
#define PIN_PA30A_EIC_EXTINT10 30 /**< \brief EIC signal: EXTINT10 on PA30 mux A */
|
||||
#define MUX_PA30A_EIC_EXTINT10 0
|
||||
#define PINMUX_PA30A_EIC_EXTINT10 ((PIN_PA30A_EIC_EXTINT10 << 16) | MUX_PA30A_EIC_EXTINT10)
|
||||
#define PORT_PA30A_EIC_EXTINT10 (1u << 30)
|
||||
#define PIN_PB10A_EIC_EXTINT10 42 /**< \brief EIC signal: EXTINT10 on PB10 mux A */
|
||||
#define MUX_PB10A_EIC_EXTINT10 0
|
||||
#define PINMUX_PB10A_EIC_EXTINT10 ((PIN_PB10A_EIC_EXTINT10 << 16) | MUX_PB10A_EIC_EXTINT10)
|
||||
#define PORT_PB10A_EIC_EXTINT10 (1u << 10)
|
||||
#define PIN_PA11A_EIC_EXTINT11 11 /**< \brief EIC signal: EXTINT11 on PA11 mux A */
|
||||
#define MUX_PA11A_EIC_EXTINT11 0
|
||||
#define PINMUX_PA11A_EIC_EXTINT11 ((PIN_PA11A_EIC_EXTINT11 << 16) | MUX_PA11A_EIC_EXTINT11)
|
||||
#define PORT_PA11A_EIC_EXTINT11 (1u << 11)
|
||||
#define PIN_PA31A_EIC_EXTINT11 31 /**< \brief EIC signal: EXTINT11 on PA31 mux A */
|
||||
#define MUX_PA31A_EIC_EXTINT11 0
|
||||
#define PINMUX_PA31A_EIC_EXTINT11 ((PIN_PA31A_EIC_EXTINT11 << 16) | MUX_PA31A_EIC_EXTINT11)
|
||||
#define PORT_PA31A_EIC_EXTINT11 (1u << 31)
|
||||
#define PIN_PB11A_EIC_EXTINT11 43 /**< \brief EIC signal: EXTINT11 on PB11 mux A */
|
||||
#define MUX_PB11A_EIC_EXTINT11 0
|
||||
#define PINMUX_PB11A_EIC_EXTINT11 ((PIN_PB11A_EIC_EXTINT11 << 16) | MUX_PB11A_EIC_EXTINT11)
|
||||
#define PORT_PB11A_EIC_EXTINT11 (1u << 11)
|
||||
#define PIN_PA12A_EIC_EXTINT12 12 /**< \brief EIC signal: EXTINT12 on PA12 mux A */
|
||||
#define MUX_PA12A_EIC_EXTINT12 0
|
||||
#define PINMUX_PA12A_EIC_EXTINT12 ((PIN_PA12A_EIC_EXTINT12 << 16) | MUX_PA12A_EIC_EXTINT12)
|
||||
#define PORT_PA12A_EIC_EXTINT12 (1u << 12)
|
||||
#define PIN_PA24A_EIC_EXTINT12 24 /**< \brief EIC signal: EXTINT12 on PA24 mux A */
|
||||
#define MUX_PA24A_EIC_EXTINT12 0
|
||||
#define PINMUX_PA24A_EIC_EXTINT12 ((PIN_PA24A_EIC_EXTINT12 << 16) | MUX_PA24A_EIC_EXTINT12)
|
||||
#define PORT_PA24A_EIC_EXTINT12 (1u << 24)
|
||||
#define PIN_PA13A_EIC_EXTINT13 13 /**< \brief EIC signal: EXTINT13 on PA13 mux A */
|
||||
#define MUX_PA13A_EIC_EXTINT13 0
|
||||
#define PINMUX_PA13A_EIC_EXTINT13 ((PIN_PA13A_EIC_EXTINT13 << 16) | MUX_PA13A_EIC_EXTINT13)
|
||||
#define PORT_PA13A_EIC_EXTINT13 (1u << 13)
|
||||
#define PIN_PA25A_EIC_EXTINT13 25 /**< \brief EIC signal: EXTINT13 on PA25 mux A */
|
||||
#define MUX_PA25A_EIC_EXTINT13 0
|
||||
#define PINMUX_PA25A_EIC_EXTINT13 ((PIN_PA25A_EIC_EXTINT13 << 16) | MUX_PA25A_EIC_EXTINT13)
|
||||
#define PORT_PA25A_EIC_EXTINT13 (1u << 25)
|
||||
#define PIN_PA14A_EIC_EXTINT14 14 /**< \brief EIC signal: EXTINT14 on PA14 mux A */
|
||||
#define MUX_PA14A_EIC_EXTINT14 0
|
||||
#define PINMUX_PA14A_EIC_EXTINT14 ((PIN_PA14A_EIC_EXTINT14 << 16) | MUX_PA14A_EIC_EXTINT14)
|
||||
#define PORT_PA14A_EIC_EXTINT14 (1u << 14)
|
||||
#define PIN_PA27A_EIC_EXTINT15 27 /**< \brief EIC signal: EXTINT15 on PA27 mux A */
|
||||
#define MUX_PA27A_EIC_EXTINT15 0
|
||||
#define PINMUX_PA27A_EIC_EXTINT15 ((PIN_PA27A_EIC_EXTINT15 << 16) | MUX_PA27A_EIC_EXTINT15)
|
||||
#define PORT_PA27A_EIC_EXTINT15 (1u << 27)
|
||||
#define PIN_PA15A_EIC_EXTINT15 15 /**< \brief EIC signal: EXTINT15 on PA15 mux A */
|
||||
#define MUX_PA15A_EIC_EXTINT15 0
|
||||
#define PINMUX_PA15A_EIC_EXTINT15 ((PIN_PA15A_EIC_EXTINT15 << 16) | MUX_PA15A_EIC_EXTINT15)
|
||||
#define PORT_PA15A_EIC_EXTINT15 (1u << 15)
|
||||
#define PIN_PA08A_EIC_NMI 8 /**< \brief EIC signal: NMI on PA08 mux A */
|
||||
#define MUX_PA08A_EIC_NMI 0
|
||||
#define PINMUX_PA08A_EIC_NMI ((PIN_PA08A_EIC_NMI << 16) | MUX_PA08A_EIC_NMI)
|
||||
#define PORT_PA08A_EIC_NMI (1u << 8)
|
||||
/* ========== PORT definition for SERCOM0 peripheral ========== */
|
||||
#define PIN_PA04D_SERCOM0_PAD0 4 /**< \brief SERCOM0 signal: PAD0 on PA04 mux D */
|
||||
#define MUX_PA04D_SERCOM0_PAD0 3
|
||||
#define PINMUX_PA04D_SERCOM0_PAD0 ((PIN_PA04D_SERCOM0_PAD0 << 16) | MUX_PA04D_SERCOM0_PAD0)
|
||||
#define PORT_PA04D_SERCOM0_PAD0 (1u << 4)
|
||||
#define PIN_PA08C_SERCOM0_PAD0 8 /**< \brief SERCOM0 signal: PAD0 on PA08 mux C */
|
||||
#define MUX_PA08C_SERCOM0_PAD0 2
|
||||
#define PINMUX_PA08C_SERCOM0_PAD0 ((PIN_PA08C_SERCOM0_PAD0 << 16) | MUX_PA08C_SERCOM0_PAD0)
|
||||
#define PORT_PA08C_SERCOM0_PAD0 (1u << 8)
|
||||
#define PIN_PA05D_SERCOM0_PAD1 5 /**< \brief SERCOM0 signal: PAD1 on PA05 mux D */
|
||||
#define MUX_PA05D_SERCOM0_PAD1 3
|
||||
#define PINMUX_PA05D_SERCOM0_PAD1 ((PIN_PA05D_SERCOM0_PAD1 << 16) | MUX_PA05D_SERCOM0_PAD1)
|
||||
#define PORT_PA05D_SERCOM0_PAD1 (1u << 5)
|
||||
#define PIN_PA09C_SERCOM0_PAD1 9 /**< \brief SERCOM0 signal: PAD1 on PA09 mux C */
|
||||
#define MUX_PA09C_SERCOM0_PAD1 2
|
||||
#define PINMUX_PA09C_SERCOM0_PAD1 ((PIN_PA09C_SERCOM0_PAD1 << 16) | MUX_PA09C_SERCOM0_PAD1)
|
||||
#define PORT_PA09C_SERCOM0_PAD1 (1u << 9)
|
||||
#define PIN_PA06D_SERCOM0_PAD2 6 /**< \brief SERCOM0 signal: PAD2 on PA06 mux D */
|
||||
#define MUX_PA06D_SERCOM0_PAD2 3
|
||||
#define PINMUX_PA06D_SERCOM0_PAD2 ((PIN_PA06D_SERCOM0_PAD2 << 16) | MUX_PA06D_SERCOM0_PAD2)
|
||||
#define PORT_PA06D_SERCOM0_PAD2 (1u << 6)
|
||||
#define PIN_PA10C_SERCOM0_PAD2 10 /**< \brief SERCOM0 signal: PAD2 on PA10 mux C */
|
||||
#define MUX_PA10C_SERCOM0_PAD2 2
|
||||
#define PINMUX_PA10C_SERCOM0_PAD2 ((PIN_PA10C_SERCOM0_PAD2 << 16) | MUX_PA10C_SERCOM0_PAD2)
|
||||
#define PORT_PA10C_SERCOM0_PAD2 (1u << 10)
|
||||
#define PIN_PA07D_SERCOM0_PAD3 7 /**< \brief SERCOM0 signal: PAD3 on PA07 mux D */
|
||||
#define MUX_PA07D_SERCOM0_PAD3 3
|
||||
#define PINMUX_PA07D_SERCOM0_PAD3 ((PIN_PA07D_SERCOM0_PAD3 << 16) | MUX_PA07D_SERCOM0_PAD3)
|
||||
#define PORT_PA07D_SERCOM0_PAD3 (1u << 7)
|
||||
#define PIN_PA11C_SERCOM0_PAD3 11 /**< \brief SERCOM0 signal: PAD3 on PA11 mux C */
|
||||
#define MUX_PA11C_SERCOM0_PAD3 2
|
||||
#define PINMUX_PA11C_SERCOM0_PAD3 ((PIN_PA11C_SERCOM0_PAD3 << 16) | MUX_PA11C_SERCOM0_PAD3)
|
||||
#define PORT_PA11C_SERCOM0_PAD3 (1u << 11)
|
||||
/* ========== PORT definition for SERCOM1 peripheral ========== */
|
||||
#define PIN_PA16C_SERCOM1_PAD0 16 /**< \brief SERCOM1 signal: PAD0 on PA16 mux C */
|
||||
#define MUX_PA16C_SERCOM1_PAD0 2
|
||||
#define PINMUX_PA16C_SERCOM1_PAD0 ((PIN_PA16C_SERCOM1_PAD0 << 16) | MUX_PA16C_SERCOM1_PAD0)
|
||||
#define PORT_PA16C_SERCOM1_PAD0 (1u << 16)
|
||||
#define PIN_PA00D_SERCOM1_PAD0 0 /**< \brief SERCOM1 signal: PAD0 on PA00 mux D */
|
||||
#define MUX_PA00D_SERCOM1_PAD0 3
|
||||
#define PINMUX_PA00D_SERCOM1_PAD0 ((PIN_PA00D_SERCOM1_PAD0 << 16) | MUX_PA00D_SERCOM1_PAD0)
|
||||
#define PORT_PA00D_SERCOM1_PAD0 (1u << 0)
|
||||
#define PIN_PA17C_SERCOM1_PAD1 17 /**< \brief SERCOM1 signal: PAD1 on PA17 mux C */
|
||||
#define MUX_PA17C_SERCOM1_PAD1 2
|
||||
#define PINMUX_PA17C_SERCOM1_PAD1 ((PIN_PA17C_SERCOM1_PAD1 << 16) | MUX_PA17C_SERCOM1_PAD1)
|
||||
#define PORT_PA17C_SERCOM1_PAD1 (1u << 17)
|
||||
#define PIN_PA01D_SERCOM1_PAD1 1 /**< \brief SERCOM1 signal: PAD1 on PA01 mux D */
|
||||
#define MUX_PA01D_SERCOM1_PAD1 3
|
||||
#define PINMUX_PA01D_SERCOM1_PAD1 ((PIN_PA01D_SERCOM1_PAD1 << 16) | MUX_PA01D_SERCOM1_PAD1)
|
||||
#define PORT_PA01D_SERCOM1_PAD1 (1u << 1)
|
||||
#define PIN_PA30D_SERCOM1_PAD2 30 /**< \brief SERCOM1 signal: PAD2 on PA30 mux D */
|
||||
#define MUX_PA30D_SERCOM1_PAD2 3
|
||||
#define PINMUX_PA30D_SERCOM1_PAD2 ((PIN_PA30D_SERCOM1_PAD2 << 16) | MUX_PA30D_SERCOM1_PAD2)
|
||||
#define PORT_PA30D_SERCOM1_PAD2 (1u << 30)
|
||||
#define PIN_PA18C_SERCOM1_PAD2 18 /**< \brief SERCOM1 signal: PAD2 on PA18 mux C */
|
||||
#define MUX_PA18C_SERCOM1_PAD2 2
|
||||
#define PINMUX_PA18C_SERCOM1_PAD2 ((PIN_PA18C_SERCOM1_PAD2 << 16) | MUX_PA18C_SERCOM1_PAD2)
|
||||
#define PORT_PA18C_SERCOM1_PAD2 (1u << 18)
|
||||
#define PIN_PA31D_SERCOM1_PAD3 31 /**< \brief SERCOM1 signal: PAD3 on PA31 mux D */
|
||||
#define MUX_PA31D_SERCOM1_PAD3 3
|
||||
#define PINMUX_PA31D_SERCOM1_PAD3 ((PIN_PA31D_SERCOM1_PAD3 << 16) | MUX_PA31D_SERCOM1_PAD3)
|
||||
#define PORT_PA31D_SERCOM1_PAD3 (1u << 31)
|
||||
#define PIN_PA19C_SERCOM1_PAD3 19 /**< \brief SERCOM1 signal: PAD3 on PA19 mux C */
|
||||
#define MUX_PA19C_SERCOM1_PAD3 2
|
||||
#define PINMUX_PA19C_SERCOM1_PAD3 ((PIN_PA19C_SERCOM1_PAD3 << 16) | MUX_PA19C_SERCOM1_PAD3)
|
||||
#define PORT_PA19C_SERCOM1_PAD3 (1u << 19)
|
||||
/* ========== PORT definition for SERCOM2 peripheral ========== */
|
||||
#define PIN_PA08D_SERCOM2_PAD0 8 /**< \brief SERCOM2 signal: PAD0 on PA08 mux D */
|
||||
#define MUX_PA08D_SERCOM2_PAD0 3
|
||||
#define PINMUX_PA08D_SERCOM2_PAD0 ((PIN_PA08D_SERCOM2_PAD0 << 16) | MUX_PA08D_SERCOM2_PAD0)
|
||||
#define PORT_PA08D_SERCOM2_PAD0 (1u << 8)
|
||||
#define PIN_PA12C_SERCOM2_PAD0 12 /**< \brief SERCOM2 signal: PAD0 on PA12 mux C */
|
||||
#define MUX_PA12C_SERCOM2_PAD0 2
|
||||
#define PINMUX_PA12C_SERCOM2_PAD0 ((PIN_PA12C_SERCOM2_PAD0 << 16) | MUX_PA12C_SERCOM2_PAD0)
|
||||
#define PORT_PA12C_SERCOM2_PAD0 (1u << 12)
|
||||
#define PIN_PA09D_SERCOM2_PAD1 9 /**< \brief SERCOM2 signal: PAD1 on PA09 mux D */
|
||||
#define MUX_PA09D_SERCOM2_PAD1 3
|
||||
#define PINMUX_PA09D_SERCOM2_PAD1 ((PIN_PA09D_SERCOM2_PAD1 << 16) | MUX_PA09D_SERCOM2_PAD1)
|
||||
#define PORT_PA09D_SERCOM2_PAD1 (1u << 9)
|
||||
#define PIN_PA13C_SERCOM2_PAD1 13 /**< \brief SERCOM2 signal: PAD1 on PA13 mux C */
|
||||
#define MUX_PA13C_SERCOM2_PAD1 2
|
||||
#define PINMUX_PA13C_SERCOM2_PAD1 ((PIN_PA13C_SERCOM2_PAD1 << 16) | MUX_PA13C_SERCOM2_PAD1)
|
||||
#define PORT_PA13C_SERCOM2_PAD1 (1u << 13)
|
||||
#define PIN_PA10D_SERCOM2_PAD2 10 /**< \brief SERCOM2 signal: PAD2 on PA10 mux D */
|
||||
#define MUX_PA10D_SERCOM2_PAD2 3
|
||||
#define PINMUX_PA10D_SERCOM2_PAD2 ((PIN_PA10D_SERCOM2_PAD2 << 16) | MUX_PA10D_SERCOM2_PAD2)
|
||||
#define PORT_PA10D_SERCOM2_PAD2 (1u << 10)
|
||||
#define PIN_PA14C_SERCOM2_PAD2 14 /**< \brief SERCOM2 signal: PAD2 on PA14 mux C */
|
||||
#define MUX_PA14C_SERCOM2_PAD2 2
|
||||
#define PINMUX_PA14C_SERCOM2_PAD2 ((PIN_PA14C_SERCOM2_PAD2 << 16) | MUX_PA14C_SERCOM2_PAD2)
|
||||
#define PORT_PA14C_SERCOM2_PAD2 (1u << 14)
|
||||
#define PIN_PA11D_SERCOM2_PAD3 11 /**< \brief SERCOM2 signal: PAD3 on PA11 mux D */
|
||||
#define MUX_PA11D_SERCOM2_PAD3 3
|
||||
#define PINMUX_PA11D_SERCOM2_PAD3 ((PIN_PA11D_SERCOM2_PAD3 << 16) | MUX_PA11D_SERCOM2_PAD3)
|
||||
#define PORT_PA11D_SERCOM2_PAD3 (1u << 11)
|
||||
#define PIN_PA15C_SERCOM2_PAD3 15 /**< \brief SERCOM2 signal: PAD3 on PA15 mux C */
|
||||
#define MUX_PA15C_SERCOM2_PAD3 2
|
||||
#define PINMUX_PA15C_SERCOM2_PAD3 ((PIN_PA15C_SERCOM2_PAD3 << 16) | MUX_PA15C_SERCOM2_PAD3)
|
||||
#define PORT_PA15C_SERCOM2_PAD3 (1u << 15)
|
||||
/* ========== PORT definition for SERCOM3 peripheral ========== */
|
||||
#define PIN_PA16D_SERCOM3_PAD0 16 /**< \brief SERCOM3 signal: PAD0 on PA16 mux D */
|
||||
#define MUX_PA16D_SERCOM3_PAD0 3
|
||||
#define PINMUX_PA16D_SERCOM3_PAD0 ((PIN_PA16D_SERCOM3_PAD0 << 16) | MUX_PA16D_SERCOM3_PAD0)
|
||||
#define PORT_PA16D_SERCOM3_PAD0 (1u << 16)
|
||||
#define PIN_PA22C_SERCOM3_PAD0 22 /**< \brief SERCOM3 signal: PAD0 on PA22 mux C */
|
||||
#define MUX_PA22C_SERCOM3_PAD0 2
|
||||
#define PINMUX_PA22C_SERCOM3_PAD0 ((PIN_PA22C_SERCOM3_PAD0 << 16) | MUX_PA22C_SERCOM3_PAD0)
|
||||
#define PORT_PA22C_SERCOM3_PAD0 (1u << 22)
|
||||
#define PIN_PA17D_SERCOM3_PAD1 17 /**< \brief SERCOM3 signal: PAD1 on PA17 mux D */
|
||||
#define MUX_PA17D_SERCOM3_PAD1 3
|
||||
#define PINMUX_PA17D_SERCOM3_PAD1 ((PIN_PA17D_SERCOM3_PAD1 << 16) | MUX_PA17D_SERCOM3_PAD1)
|
||||
#define PORT_PA17D_SERCOM3_PAD1 (1u << 17)
|
||||
#define PIN_PA23C_SERCOM3_PAD1 23 /**< \brief SERCOM3 signal: PAD1 on PA23 mux C */
|
||||
#define MUX_PA23C_SERCOM3_PAD1 2
|
||||
#define PINMUX_PA23C_SERCOM3_PAD1 ((PIN_PA23C_SERCOM3_PAD1 << 16) | MUX_PA23C_SERCOM3_PAD1)
|
||||
#define PORT_PA23C_SERCOM3_PAD1 (1u << 23)
|
||||
#define PIN_PA18D_SERCOM3_PAD2 18 /**< \brief SERCOM3 signal: PAD2 on PA18 mux D */
|
||||
#define MUX_PA18D_SERCOM3_PAD2 3
|
||||
#define PINMUX_PA18D_SERCOM3_PAD2 ((PIN_PA18D_SERCOM3_PAD2 << 16) | MUX_PA18D_SERCOM3_PAD2)
|
||||
#define PORT_PA18D_SERCOM3_PAD2 (1u << 18)
|
||||
#define PIN_PA20D_SERCOM3_PAD2 20 /**< \brief SERCOM3 signal: PAD2 on PA20 mux D */
|
||||
#define MUX_PA20D_SERCOM3_PAD2 3
|
||||
#define PINMUX_PA20D_SERCOM3_PAD2 ((PIN_PA20D_SERCOM3_PAD2 << 16) | MUX_PA20D_SERCOM3_PAD2)
|
||||
#define PORT_PA20D_SERCOM3_PAD2 (1u << 20)
|
||||
#define PIN_PA24C_SERCOM3_PAD2 24 /**< \brief SERCOM3 signal: PAD2 on PA24 mux C */
|
||||
#define MUX_PA24C_SERCOM3_PAD2 2
|
||||
#define PINMUX_PA24C_SERCOM3_PAD2 ((PIN_PA24C_SERCOM3_PAD2 << 16) | MUX_PA24C_SERCOM3_PAD2)
|
||||
#define PORT_PA24C_SERCOM3_PAD2 (1u << 24)
|
||||
#define PIN_PA19D_SERCOM3_PAD3 19 /**< \brief SERCOM3 signal: PAD3 on PA19 mux D */
|
||||
#define MUX_PA19D_SERCOM3_PAD3 3
|
||||
#define PINMUX_PA19D_SERCOM3_PAD3 ((PIN_PA19D_SERCOM3_PAD3 << 16) | MUX_PA19D_SERCOM3_PAD3)
|
||||
#define PORT_PA19D_SERCOM3_PAD3 (1u << 19)
|
||||
#define PIN_PA21D_SERCOM3_PAD3 21 /**< \brief SERCOM3 signal: PAD3 on PA21 mux D */
|
||||
#define MUX_PA21D_SERCOM3_PAD3 3
|
||||
#define PINMUX_PA21D_SERCOM3_PAD3 ((PIN_PA21D_SERCOM3_PAD3 << 16) | MUX_PA21D_SERCOM3_PAD3)
|
||||
#define PORT_PA21D_SERCOM3_PAD3 (1u << 21)
|
||||
#define PIN_PA25C_SERCOM3_PAD3 25 /**< \brief SERCOM3 signal: PAD3 on PA25 mux C */
|
||||
#define MUX_PA25C_SERCOM3_PAD3 2
|
||||
#define PINMUX_PA25C_SERCOM3_PAD3 ((PIN_PA25C_SERCOM3_PAD3 << 16) | MUX_PA25C_SERCOM3_PAD3)
|
||||
#define PORT_PA25C_SERCOM3_PAD3 (1u << 25)
|
||||
/* ========== PORT definition for SERCOM4 peripheral ========== */
|
||||
#define PIN_PA12D_SERCOM4_PAD0 12 /**< \brief SERCOM4 signal: PAD0 on PA12 mux D */
|
||||
#define MUX_PA12D_SERCOM4_PAD0 3
|
||||
#define PINMUX_PA12D_SERCOM4_PAD0 ((PIN_PA12D_SERCOM4_PAD0 << 16) | MUX_PA12D_SERCOM4_PAD0)
|
||||
#define PORT_PA12D_SERCOM4_PAD0 (1u << 12)
|
||||
#define PIN_PB08D_SERCOM4_PAD0 40 /**< \brief SERCOM4 signal: PAD0 on PB08 mux D */
|
||||
#define MUX_PB08D_SERCOM4_PAD0 3
|
||||
#define PINMUX_PB08D_SERCOM4_PAD0 ((PIN_PB08D_SERCOM4_PAD0 << 16) | MUX_PB08D_SERCOM4_PAD0)
|
||||
#define PORT_PB08D_SERCOM4_PAD0 (1u << 8)
|
||||
#define PIN_PA13D_SERCOM4_PAD1 13 /**< \brief SERCOM4 signal: PAD1 on PA13 mux D */
|
||||
#define MUX_PA13D_SERCOM4_PAD1 3
|
||||
#define PINMUX_PA13D_SERCOM4_PAD1 ((PIN_PA13D_SERCOM4_PAD1 << 16) | MUX_PA13D_SERCOM4_PAD1)
|
||||
#define PORT_PA13D_SERCOM4_PAD1 (1u << 13)
|
||||
#define PIN_PB09D_SERCOM4_PAD1 41 /**< \brief SERCOM4 signal: PAD1 on PB09 mux D */
|
||||
#define MUX_PB09D_SERCOM4_PAD1 3
|
||||
#define PINMUX_PB09D_SERCOM4_PAD1 ((PIN_PB09D_SERCOM4_PAD1 << 16) | MUX_PB09D_SERCOM4_PAD1)
|
||||
#define PORT_PB09D_SERCOM4_PAD1 (1u << 9)
|
||||
#define PIN_PA14D_SERCOM4_PAD2 14 /**< \brief SERCOM4 signal: PAD2 on PA14 mux D */
|
||||
#define MUX_PA14D_SERCOM4_PAD2 3
|
||||
#define PINMUX_PA14D_SERCOM4_PAD2 ((PIN_PA14D_SERCOM4_PAD2 << 16) | MUX_PA14D_SERCOM4_PAD2)
|
||||
#define PORT_PA14D_SERCOM4_PAD2 (1u << 14)
|
||||
#define PIN_PB10D_SERCOM4_PAD2 42 /**< \brief SERCOM4 signal: PAD2 on PB10 mux D */
|
||||
#define MUX_PB10D_SERCOM4_PAD2 3
|
||||
#define PINMUX_PB10D_SERCOM4_PAD2 ((PIN_PB10D_SERCOM4_PAD2 << 16) | MUX_PB10D_SERCOM4_PAD2)
|
||||
#define PORT_PB10D_SERCOM4_PAD2 (1u << 10)
|
||||
#define PIN_PA15D_SERCOM4_PAD3 15 /**< \brief SERCOM4 signal: PAD3 on PA15 mux D */
|
||||
#define MUX_PA15D_SERCOM4_PAD3 3
|
||||
#define PINMUX_PA15D_SERCOM4_PAD3 ((PIN_PA15D_SERCOM4_PAD3 << 16) | MUX_PA15D_SERCOM4_PAD3)
|
||||
#define PORT_PA15D_SERCOM4_PAD3 (1u << 15)
|
||||
#define PIN_PB11D_SERCOM4_PAD3 43 /**< \brief SERCOM4 signal: PAD3 on PB11 mux D */
|
||||
#define MUX_PB11D_SERCOM4_PAD3 3
|
||||
#define PINMUX_PB11D_SERCOM4_PAD3 ((PIN_PB11D_SERCOM4_PAD3 << 16) | MUX_PB11D_SERCOM4_PAD3)
|
||||
#define PORT_PB11D_SERCOM4_PAD3 (1u << 11)
|
||||
/* ========== PORT definition for SERCOM5 peripheral ========== */
|
||||
#define PIN_PA22D_SERCOM5_PAD0 22 /**< \brief SERCOM5 signal: PAD0 on PA22 mux D */
|
||||
#define MUX_PA22D_SERCOM5_PAD0 3
|
||||
#define PINMUX_PA22D_SERCOM5_PAD0 ((PIN_PA22D_SERCOM5_PAD0 << 16) | MUX_PA22D_SERCOM5_PAD0)
|
||||
#define PORT_PA22D_SERCOM5_PAD0 (1u << 22)
|
||||
#define PIN_PB02D_SERCOM5_PAD0 34 /**< \brief SERCOM5 signal: PAD0 on PB02 mux D */
|
||||
#define MUX_PB02D_SERCOM5_PAD0 3
|
||||
#define PINMUX_PB02D_SERCOM5_PAD0 ((PIN_PB02D_SERCOM5_PAD0 << 16) | MUX_PB02D_SERCOM5_PAD0)
|
||||
#define PORT_PB02D_SERCOM5_PAD0 (1u << 2)
|
||||
#define PIN_PA23D_SERCOM5_PAD1 23 /**< \brief SERCOM5 signal: PAD1 on PA23 mux D */
|
||||
#define MUX_PA23D_SERCOM5_PAD1 3
|
||||
#define PINMUX_PA23D_SERCOM5_PAD1 ((PIN_PA23D_SERCOM5_PAD1 << 16) | MUX_PA23D_SERCOM5_PAD1)
|
||||
#define PORT_PA23D_SERCOM5_PAD1 (1u << 23)
|
||||
#define PIN_PB03D_SERCOM5_PAD1 35 /**< \brief SERCOM5 signal: PAD1 on PB03 mux D */
|
||||
#define MUX_PB03D_SERCOM5_PAD1 3
|
||||
#define PINMUX_PB03D_SERCOM5_PAD1 ((PIN_PB03D_SERCOM5_PAD1 << 16) | MUX_PB03D_SERCOM5_PAD1)
|
||||
#define PORT_PB03D_SERCOM5_PAD1 (1u << 3)
|
||||
#define PIN_PA24D_SERCOM5_PAD2 24 /**< \brief SERCOM5 signal: PAD2 on PA24 mux D */
|
||||
#define MUX_PA24D_SERCOM5_PAD2 3
|
||||
#define PINMUX_PA24D_SERCOM5_PAD2 ((PIN_PA24D_SERCOM5_PAD2 << 16) | MUX_PA24D_SERCOM5_PAD2)
|
||||
#define PORT_PA24D_SERCOM5_PAD2 (1u << 24)
|
||||
#define PIN_PB22D_SERCOM5_PAD2 54 /**< \brief SERCOM5 signal: PAD2 on PB22 mux D */
|
||||
#define MUX_PB22D_SERCOM5_PAD2 3
|
||||
#define PINMUX_PB22D_SERCOM5_PAD2 ((PIN_PB22D_SERCOM5_PAD2 << 16) | MUX_PB22D_SERCOM5_PAD2)
|
||||
#define PORT_PB22D_SERCOM5_PAD2 (1u << 22)
|
||||
#define PIN_PA20C_SERCOM5_PAD2 20 /**< \brief SERCOM5 signal: PAD2 on PA20 mux C */
|
||||
#define MUX_PA20C_SERCOM5_PAD2 2
|
||||
#define PINMUX_PA20C_SERCOM5_PAD2 ((PIN_PA20C_SERCOM5_PAD2 << 16) | MUX_PA20C_SERCOM5_PAD2)
|
||||
#define PORT_PA20C_SERCOM5_PAD2 (1u << 20)
|
||||
#define PIN_PA25D_SERCOM5_PAD3 25 /**< \brief SERCOM5 signal: PAD3 on PA25 mux D */
|
||||
#define MUX_PA25D_SERCOM5_PAD3 3
|
||||
#define PINMUX_PA25D_SERCOM5_PAD3 ((PIN_PA25D_SERCOM5_PAD3 << 16) | MUX_PA25D_SERCOM5_PAD3)
|
||||
#define PORT_PA25D_SERCOM5_PAD3 (1u << 25)
|
||||
#define PIN_PB23D_SERCOM5_PAD3 55 /**< \brief SERCOM5 signal: PAD3 on PB23 mux D */
|
||||
#define MUX_PB23D_SERCOM5_PAD3 3
|
||||
#define PINMUX_PB23D_SERCOM5_PAD3 ((PIN_PB23D_SERCOM5_PAD3 << 16) | MUX_PB23D_SERCOM5_PAD3)
|
||||
#define PORT_PB23D_SERCOM5_PAD3 (1u << 23)
|
||||
#define PIN_PA21C_SERCOM5_PAD3 21 /**< \brief SERCOM5 signal: PAD3 on PA21 mux C */
|
||||
#define MUX_PA21C_SERCOM5_PAD3 2
|
||||
#define PINMUX_PA21C_SERCOM5_PAD3 ((PIN_PA21C_SERCOM5_PAD3 << 16) | MUX_PA21C_SERCOM5_PAD3)
|
||||
#define PORT_PA21C_SERCOM5_PAD3 (1u << 21)
|
||||
/* ========== PORT definition for TC0 peripheral ========== */
|
||||
#define PIN_PA04F_TC0_WO0 4 /**< \brief TC0 signal: WO0 on PA04 mux F */
|
||||
#define MUX_PA04F_TC0_WO0 5
|
||||
#define PINMUX_PA04F_TC0_WO0 ((PIN_PA04F_TC0_WO0 << 16) | MUX_PA04F_TC0_WO0)
|
||||
#define PORT_PA04F_TC0_WO0 (1u << 4)
|
||||
#define PIN_PA08E_TC0_WO0 8 /**< \brief TC0 signal: WO0 on PA08 mux E */
|
||||
#define MUX_PA08E_TC0_WO0 4
|
||||
#define PINMUX_PA08E_TC0_WO0 ((PIN_PA08E_TC0_WO0 << 16) | MUX_PA08E_TC0_WO0)
|
||||
#define PORT_PA08E_TC0_WO0 (1u << 8)
|
||||
#define PIN_PA05F_TC0_WO1 5 /**< \brief TC0 signal: WO1 on PA05 mux F */
|
||||
#define MUX_PA05F_TC0_WO1 5
|
||||
#define PINMUX_PA05F_TC0_WO1 ((PIN_PA05F_TC0_WO1 << 16) | MUX_PA05F_TC0_WO1)
|
||||
#define PORT_PA05F_TC0_WO1 (1u << 5)
|
||||
#define PIN_PA09E_TC0_WO1 9 /**< \brief TC0 signal: WO1 on PA09 mux E */
|
||||
#define MUX_PA09E_TC0_WO1 4
|
||||
#define PINMUX_PA09E_TC0_WO1 ((PIN_PA09E_TC0_WO1 << 16) | MUX_PA09E_TC0_WO1)
|
||||
#define PORT_PA09E_TC0_WO1 (1u << 9)
|
||||
/* ========== PORT definition for TC1 peripheral ========== */
|
||||
#define PIN_PA06F_TC1_WO0 6 /**< \brief TC1 signal: WO0 on PA06 mux F */
|
||||
#define MUX_PA06F_TC1_WO0 5
|
||||
#define PINMUX_PA06F_TC1_WO0 ((PIN_PA06F_TC1_WO0 << 16) | MUX_PA06F_TC1_WO0)
|
||||
#define PORT_PA06F_TC1_WO0 (1u << 6)
|
||||
#define PIN_PA30F_TC1_WO0 30 /**< \brief TC1 signal: WO0 on PA30 mux F */
|
||||
#define MUX_PA30F_TC1_WO0 5
|
||||
#define PINMUX_PA30F_TC1_WO0 ((PIN_PA30F_TC1_WO0 << 16) | MUX_PA30F_TC1_WO0)
|
||||
#define PORT_PA30F_TC1_WO0 (1u << 30)
|
||||
#define PIN_PA10E_TC1_WO0 10 /**< \brief TC1 signal: WO0 on PA10 mux E */
|
||||
#define MUX_PA10E_TC1_WO0 4
|
||||
#define PINMUX_PA10E_TC1_WO0 ((PIN_PA10E_TC1_WO0 << 16) | MUX_PA10E_TC1_WO0)
|
||||
#define PORT_PA10E_TC1_WO0 (1u << 10)
|
||||
#define PIN_PA07F_TC1_WO1 7 /**< \brief TC1 signal: WO1 on PA07 mux F */
|
||||
#define MUX_PA07F_TC1_WO1 5
|
||||
#define PINMUX_PA07F_TC1_WO1 ((PIN_PA07F_TC1_WO1 << 16) | MUX_PA07F_TC1_WO1)
|
||||
#define PORT_PA07F_TC1_WO1 (1u << 7)
|
||||
#define PIN_PA31F_TC1_WO1 31 /**< \brief TC1 signal: WO1 on PA31 mux F */
|
||||
#define MUX_PA31F_TC1_WO1 5
|
||||
#define PINMUX_PA31F_TC1_WO1 ((PIN_PA31F_TC1_WO1 << 16) | MUX_PA31F_TC1_WO1)
|
||||
#define PORT_PA31F_TC1_WO1 (1u << 31)
|
||||
#define PIN_PA11E_TC1_WO1 11 /**< \brief TC1 signal: WO1 on PA11 mux E */
|
||||
#define MUX_PA11E_TC1_WO1 4
|
||||
#define PINMUX_PA11E_TC1_WO1 ((PIN_PA11E_TC1_WO1 << 16) | MUX_PA11E_TC1_WO1)
|
||||
#define PORT_PA11E_TC1_WO1 (1u << 11)
|
||||
/* ========== PORT definition for TC2 peripheral ========== */
|
||||
#define PIN_PA16F_TC2_WO0 16 /**< \brief TC2 signal: WO0 on PA16 mux F */
|
||||
#define MUX_PA16F_TC2_WO0 5
|
||||
#define PINMUX_PA16F_TC2_WO0 ((PIN_PA16F_TC2_WO0 << 16) | MUX_PA16F_TC2_WO0)
|
||||
#define PORT_PA16F_TC2_WO0 (1u << 16)
|
||||
#define PIN_PA12E_TC2_WO0 12 /**< \brief TC2 signal: WO0 on PA12 mux E */
|
||||
#define MUX_PA12E_TC2_WO0 4
|
||||
#define PINMUX_PA12E_TC2_WO0 ((PIN_PA12E_TC2_WO0 << 16) | MUX_PA12E_TC2_WO0)
|
||||
#define PORT_PA12E_TC2_WO0 (1u << 12)
|
||||
#define PIN_PA00F_TC2_WO0 0 /**< \brief TC2 signal: WO0 on PA00 mux F */
|
||||
#define MUX_PA00F_TC2_WO0 5
|
||||
#define PINMUX_PA00F_TC2_WO0 ((PIN_PA00F_TC2_WO0 << 16) | MUX_PA00F_TC2_WO0)
|
||||
#define PORT_PA00F_TC2_WO0 (1u << 0)
|
||||
#define PIN_PA17F_TC2_WO1 17 /**< \brief TC2 signal: WO1 on PA17 mux F */
|
||||
#define MUX_PA17F_TC2_WO1 5
|
||||
#define PINMUX_PA17F_TC2_WO1 ((PIN_PA17F_TC2_WO1 << 16) | MUX_PA17F_TC2_WO1)
|
||||
#define PORT_PA17F_TC2_WO1 (1u << 17)
|
||||
#define PIN_PA13E_TC2_WO1 13 /**< \brief TC2 signal: WO1 on PA13 mux E */
|
||||
#define MUX_PA13E_TC2_WO1 4
|
||||
#define PINMUX_PA13E_TC2_WO1 ((PIN_PA13E_TC2_WO1 << 16) | MUX_PA13E_TC2_WO1)
|
||||
#define PORT_PA13E_TC2_WO1 (1u << 13)
|
||||
#define PIN_PA01F_TC2_WO1 1 /**< \brief TC2 signal: WO1 on PA01 mux F */
|
||||
#define MUX_PA01F_TC2_WO1 5
|
||||
#define PINMUX_PA01F_TC2_WO1 ((PIN_PA01F_TC2_WO1 << 16) | MUX_PA01F_TC2_WO1)
|
||||
#define PORT_PA01F_TC2_WO1 (1u << 1)
|
||||
/* ========== PORT definition for TC3 peripheral ========== */
|
||||
#define PIN_PA18F_TC3_WO0 18 /**< \brief TC3 signal: WO0 on PA18 mux F */
|
||||
#define MUX_PA18F_TC3_WO0 5
|
||||
#define PINMUX_PA18F_TC3_WO0 ((PIN_PA18F_TC3_WO0 << 16) | MUX_PA18F_TC3_WO0)
|
||||
#define PORT_PA18F_TC3_WO0 (1u << 18)
|
||||
#define PIN_PA14E_TC3_WO0 14 /**< \brief TC3 signal: WO0 on PA14 mux E */
|
||||
#define MUX_PA14E_TC3_WO0 4
|
||||
#define PINMUX_PA14E_TC3_WO0 ((PIN_PA14E_TC3_WO0 << 16) | MUX_PA14E_TC3_WO0)
|
||||
#define PORT_PA14E_TC3_WO0 (1u << 14)
|
||||
#define PIN_PA19F_TC3_WO1 19 /**< \brief TC3 signal: WO1 on PA19 mux F */
|
||||
#define MUX_PA19F_TC3_WO1 5
|
||||
#define PINMUX_PA19F_TC3_WO1 ((PIN_PA19F_TC3_WO1 << 16) | MUX_PA19F_TC3_WO1)
|
||||
#define PORT_PA19F_TC3_WO1 (1u << 19)
|
||||
#define PIN_PA15E_TC3_WO1 15 /**< \brief TC3 signal: WO1 on PA15 mux E */
|
||||
#define MUX_PA15E_TC3_WO1 4
|
||||
#define PINMUX_PA15E_TC3_WO1 ((PIN_PA15E_TC3_WO1 << 16) | MUX_PA15E_TC3_WO1)
|
||||
#define PORT_PA15E_TC3_WO1 (1u << 15)
|
||||
/* ========== PORT definition for TC4 peripheral ========== */
|
||||
#define PIN_PA22F_TC4_WO0 22 /**< \brief TC4 signal: WO0 on PA22 mux F */
|
||||
#define MUX_PA22F_TC4_WO0 5
|
||||
#define PINMUX_PA22F_TC4_WO0 ((PIN_PA22F_TC4_WO0 << 16) | MUX_PA22F_TC4_WO0)
|
||||
#define PORT_PA22F_TC4_WO0 (1u << 22)
|
||||
#define PIN_PB08F_TC4_WO0 40 /**< \brief TC4 signal: WO0 on PB08 mux F */
|
||||
#define MUX_PB08F_TC4_WO0 5
|
||||
#define PINMUX_PB08F_TC4_WO0 ((PIN_PB08F_TC4_WO0 << 16) | MUX_PB08F_TC4_WO0)
|
||||
#define PORT_PB08F_TC4_WO0 (1u << 8)
|
||||
#define PIN_PA23F_TC4_WO1 23 /**< \brief TC4 signal: WO1 on PA23 mux F */
|
||||
#define MUX_PA23F_TC4_WO1 5
|
||||
#define PINMUX_PA23F_TC4_WO1 ((PIN_PA23F_TC4_WO1 << 16) | MUX_PA23F_TC4_WO1)
|
||||
#define PORT_PA23F_TC4_WO1 (1u << 23)
|
||||
#define PIN_PB09F_TC4_WO1 41 /**< \brief TC4 signal: WO1 on PB09 mux F */
|
||||
#define MUX_PB09F_TC4_WO1 5
|
||||
#define PINMUX_PB09F_TC4_WO1 ((PIN_PB09F_TC4_WO1 << 16) | MUX_PB09F_TC4_WO1)
|
||||
#define PORT_PB09F_TC4_WO1 (1u << 9)
|
||||
/* ========== PORT definition for TC5 peripheral ========== */
|
||||
#define PIN_PA24F_TC5_WO0 24 /**< \brief TC5 signal: WO0 on PA24 mux F */
|
||||
#define MUX_PA24F_TC5_WO0 5
|
||||
#define PINMUX_PA24F_TC5_WO0 ((PIN_PA24F_TC5_WO0 << 16) | MUX_PA24F_TC5_WO0)
|
||||
#define PORT_PA24F_TC5_WO0 (1u << 24)
|
||||
#define PIN_PB10F_TC5_WO0 42 /**< \brief TC5 signal: WO0 on PB10 mux F */
|
||||
#define MUX_PB10F_TC5_WO0 5
|
||||
#define PINMUX_PB10F_TC5_WO0 ((PIN_PB10F_TC5_WO0 << 16) | MUX_PB10F_TC5_WO0)
|
||||
#define PORT_PB10F_TC5_WO0 (1u << 10)
|
||||
#define PIN_PA25F_TC5_WO1 25 /**< \brief TC5 signal: WO1 on PA25 mux F */
|
||||
#define MUX_PA25F_TC5_WO1 5
|
||||
#define PINMUX_PA25F_TC5_WO1 ((PIN_PA25F_TC5_WO1 << 16) | MUX_PA25F_TC5_WO1)
|
||||
#define PORT_PA25F_TC5_WO1 (1u << 25)
|
||||
#define PIN_PB11F_TC5_WO1 43 /**< \brief TC5 signal: WO1 on PB11 mux F */
|
||||
#define MUX_PB11F_TC5_WO1 5
|
||||
#define PINMUX_PB11F_TC5_WO1 ((PIN_PB11F_TC5_WO1 << 16) | MUX_PB11F_TC5_WO1)
|
||||
#define PORT_PB11F_TC5_WO1 (1u << 11)
|
||||
/* ========== PORT definition for TC6 peripheral ========== */
|
||||
#define PIN_PB02F_TC6_WO0 34 /**< \brief TC6 signal: WO0 on PB02 mux F */
|
||||
#define MUX_PB02F_TC6_WO0 5
|
||||
#define PINMUX_PB02F_TC6_WO0 ((PIN_PB02F_TC6_WO0 << 16) | MUX_PB02F_TC6_WO0)
|
||||
#define PORT_PB02F_TC6_WO0 (1u << 2)
|
||||
#define PIN_PB03F_TC6_WO1 35 /**< \brief TC6 signal: WO1 on PB03 mux F */
|
||||
#define MUX_PB03F_TC6_WO1 5
|
||||
#define PINMUX_PB03F_TC6_WO1 ((PIN_PB03F_TC6_WO1 << 16) | MUX_PB03F_TC6_WO1)
|
||||
#define PORT_PB03F_TC6_WO1 (1u << 3)
|
||||
/* ========== PORT definition for TC7 peripheral ========== */
|
||||
#define PIN_PB22F_TC7_WO0 54 /**< \brief TC7 signal: WO0 on PB22 mux F */
|
||||
#define MUX_PB22F_TC7_WO0 5
|
||||
#define PINMUX_PB22F_TC7_WO0 ((PIN_PB22F_TC7_WO0 << 16) | MUX_PB22F_TC7_WO0)
|
||||
#define PORT_PB22F_TC7_WO0 (1u << 22)
|
||||
#define PIN_PA20E_TC7_WO0 20 /**< \brief TC7 signal: WO0 on PA20 mux E */
|
||||
#define MUX_PA20E_TC7_WO0 4
|
||||
#define PINMUX_PA20E_TC7_WO0 ((PIN_PA20E_TC7_WO0 << 16) | MUX_PA20E_TC7_WO0)
|
||||
#define PORT_PA20E_TC7_WO0 (1u << 20)
|
||||
#define PIN_PB23F_TC7_WO1 55 /**< \brief TC7 signal: WO1 on PB23 mux F */
|
||||
#define MUX_PB23F_TC7_WO1 5
|
||||
#define PINMUX_PB23F_TC7_WO1 ((PIN_PB23F_TC7_WO1 << 16) | MUX_PB23F_TC7_WO1)
|
||||
#define PORT_PB23F_TC7_WO1 (1u << 23)
|
||||
#define PIN_PA21E_TC7_WO1 21 /**< \brief TC7 signal: WO1 on PA21 mux E */
|
||||
#define MUX_PA21E_TC7_WO1 4
|
||||
#define PINMUX_PA21E_TC7_WO1 ((PIN_PA21E_TC7_WO1 << 16) | MUX_PA21E_TC7_WO1)
|
||||
#define PORT_PA21E_TC7_WO1 (1u << 21)
|
||||
/* ========== PORT definition for ADC peripheral ========== */
|
||||
#define PIN_PA02B_ADC_AIN0 2 /**< \brief ADC signal: AIN0 on PA02 mux B */
|
||||
#define MUX_PA02B_ADC_AIN0 1
|
||||
#define PINMUX_PA02B_ADC_AIN0 ((PIN_PA02B_ADC_AIN0 << 16) | MUX_PA02B_ADC_AIN0)
|
||||
#define PORT_PA02B_ADC_AIN0 (1u << 2)
|
||||
#define PIN_PA03B_ADC_AIN1 3 /**< \brief ADC signal: AIN1 on PA03 mux B */
|
||||
#define MUX_PA03B_ADC_AIN1 1
|
||||
#define PINMUX_PA03B_ADC_AIN1 ((PIN_PA03B_ADC_AIN1 << 16) | MUX_PA03B_ADC_AIN1)
|
||||
#define PORT_PA03B_ADC_AIN1 (1u << 3)
|
||||
#define PIN_PB08B_ADC_AIN2 40 /**< \brief ADC signal: AIN2 on PB08 mux B */
|
||||
#define MUX_PB08B_ADC_AIN2 1
|
||||
#define PINMUX_PB08B_ADC_AIN2 ((PIN_PB08B_ADC_AIN2 << 16) | MUX_PB08B_ADC_AIN2)
|
||||
#define PORT_PB08B_ADC_AIN2 (1u << 8)
|
||||
#define PIN_PB09B_ADC_AIN3 41 /**< \brief ADC signal: AIN3 on PB09 mux B */
|
||||
#define MUX_PB09B_ADC_AIN3 1
|
||||
#define PINMUX_PB09B_ADC_AIN3 ((PIN_PB09B_ADC_AIN3 << 16) | MUX_PB09B_ADC_AIN3)
|
||||
#define PORT_PB09B_ADC_AIN3 (1u << 9)
|
||||
#define PIN_PA04B_ADC_AIN4 4 /**< \brief ADC signal: AIN4 on PA04 mux B */
|
||||
#define MUX_PA04B_ADC_AIN4 1
|
||||
#define PINMUX_PA04B_ADC_AIN4 ((PIN_PA04B_ADC_AIN4 << 16) | MUX_PA04B_ADC_AIN4)
|
||||
#define PORT_PA04B_ADC_AIN4 (1u << 4)
|
||||
#define PIN_PA05B_ADC_AIN5 5 /**< \brief ADC signal: AIN5 on PA05 mux B */
|
||||
#define MUX_PA05B_ADC_AIN5 1
|
||||
#define PINMUX_PA05B_ADC_AIN5 ((PIN_PA05B_ADC_AIN5 << 16) | MUX_PA05B_ADC_AIN5)
|
||||
#define PORT_PA05B_ADC_AIN5 (1u << 5)
|
||||
#define PIN_PA06B_ADC_AIN6 6 /**< \brief ADC signal: AIN6 on PA06 mux B */
|
||||
#define MUX_PA06B_ADC_AIN6 1
|
||||
#define PINMUX_PA06B_ADC_AIN6 ((PIN_PA06B_ADC_AIN6 << 16) | MUX_PA06B_ADC_AIN6)
|
||||
#define PORT_PA06B_ADC_AIN6 (1u << 6)
|
||||
#define PIN_PA07B_ADC_AIN7 7 /**< \brief ADC signal: AIN7 on PA07 mux B */
|
||||
#define MUX_PA07B_ADC_AIN7 1
|
||||
#define PINMUX_PA07B_ADC_AIN7 ((PIN_PA07B_ADC_AIN7 << 16) | MUX_PA07B_ADC_AIN7)
|
||||
#define PORT_PA07B_ADC_AIN7 (1u << 7)
|
||||
#define PIN_PB02B_ADC_AIN10 34 /**< \brief ADC signal: AIN10 on PB02 mux B */
|
||||
#define MUX_PB02B_ADC_AIN10 1
|
||||
#define PINMUX_PB02B_ADC_AIN10 ((PIN_PB02B_ADC_AIN10 << 16) | MUX_PB02B_ADC_AIN10)
|
||||
#define PORT_PB02B_ADC_AIN10 (1u << 2)
|
||||
#define PIN_PB03B_ADC_AIN11 35 /**< \brief ADC signal: AIN11 on PB03 mux B */
|
||||
#define MUX_PB03B_ADC_AIN11 1
|
||||
#define PINMUX_PB03B_ADC_AIN11 ((PIN_PB03B_ADC_AIN11 << 16) | MUX_PB03B_ADC_AIN11)
|
||||
#define PORT_PB03B_ADC_AIN11 (1u << 3)
|
||||
#define PIN_PA08B_ADC_AIN16 8 /**< \brief ADC signal: AIN16 on PA08 mux B */
|
||||
#define MUX_PA08B_ADC_AIN16 1
|
||||
#define PINMUX_PA08B_ADC_AIN16 ((PIN_PA08B_ADC_AIN16 << 16) | MUX_PA08B_ADC_AIN16)
|
||||
#define PORT_PA08B_ADC_AIN16 (1u << 8)
|
||||
#define PIN_PA09B_ADC_AIN17 9 /**< \brief ADC signal: AIN17 on PA09 mux B */
|
||||
#define MUX_PA09B_ADC_AIN17 1
|
||||
#define PINMUX_PA09B_ADC_AIN17 ((PIN_PA09B_ADC_AIN17 << 16) | MUX_PA09B_ADC_AIN17)
|
||||
#define PORT_PA09B_ADC_AIN17 (1u << 9)
|
||||
#define PIN_PA10B_ADC_AIN18 10 /**< \brief ADC signal: AIN18 on PA10 mux B */
|
||||
#define MUX_PA10B_ADC_AIN18 1
|
||||
#define PINMUX_PA10B_ADC_AIN18 ((PIN_PA10B_ADC_AIN18 << 16) | MUX_PA10B_ADC_AIN18)
|
||||
#define PORT_PA10B_ADC_AIN18 (1u << 10)
|
||||
#define PIN_PA11B_ADC_AIN19 11 /**< \brief ADC signal: AIN19 on PA11 mux B */
|
||||
#define MUX_PA11B_ADC_AIN19 1
|
||||
#define PINMUX_PA11B_ADC_AIN19 ((PIN_PA11B_ADC_AIN19 << 16) | MUX_PA11B_ADC_AIN19)
|
||||
#define PORT_PA11B_ADC_AIN19 (1u << 11)
|
||||
#define PIN_PA04B_ADC_VREFP 4 /**< \brief ADC signal: VREFP on PA04 mux B */
|
||||
#define MUX_PA04B_ADC_VREFP 1
|
||||
#define PINMUX_PA04B_ADC_VREFP ((PIN_PA04B_ADC_VREFP << 16) | MUX_PA04B_ADC_VREFP)
|
||||
#define PORT_PA04B_ADC_VREFP (1u << 4)
|
||||
/* ========== PORT definition for AC peripheral ========== */
|
||||
#define PIN_PA04B_AC_AIN0 4 /**< \brief AC signal: AIN0 on PA04 mux B */
|
||||
#define MUX_PA04B_AC_AIN0 1
|
||||
#define PINMUX_PA04B_AC_AIN0 ((PIN_PA04B_AC_AIN0 << 16) | MUX_PA04B_AC_AIN0)
|
||||
#define PORT_PA04B_AC_AIN0 (1u << 4)
|
||||
#define PIN_PA05B_AC_AIN1 5 /**< \brief AC signal: AIN1 on PA05 mux B */
|
||||
#define MUX_PA05B_AC_AIN1 1
|
||||
#define PINMUX_PA05B_AC_AIN1 ((PIN_PA05B_AC_AIN1 << 16) | MUX_PA05B_AC_AIN1)
|
||||
#define PORT_PA05B_AC_AIN1 (1u << 5)
|
||||
#define PIN_PA06B_AC_AIN2 6 /**< \brief AC signal: AIN2 on PA06 mux B */
|
||||
#define MUX_PA06B_AC_AIN2 1
|
||||
#define PINMUX_PA06B_AC_AIN2 ((PIN_PA06B_AC_AIN2 << 16) | MUX_PA06B_AC_AIN2)
|
||||
#define PORT_PA06B_AC_AIN2 (1u << 6)
|
||||
#define PIN_PA07B_AC_AIN3 7 /**< \brief AC signal: AIN3 on PA07 mux B */
|
||||
#define MUX_PA07B_AC_AIN3 1
|
||||
#define PINMUX_PA07B_AC_AIN3 ((PIN_PA07B_AC_AIN3 << 16) | MUX_PA07B_AC_AIN3)
|
||||
#define PORT_PA07B_AC_AIN3 (1u << 7)
|
||||
#define PIN_PA12H_AC_CMP0 12 /**< \brief AC signal: CMP0 on PA12 mux H */
|
||||
#define MUX_PA12H_AC_CMP0 7
|
||||
#define PINMUX_PA12H_AC_CMP0 ((PIN_PA12H_AC_CMP0 << 16) | MUX_PA12H_AC_CMP0)
|
||||
#define PORT_PA12H_AC_CMP0 (1u << 12)
|
||||
#define PIN_PA18H_AC_CMP0 18 /**< \brief AC signal: CMP0 on PA18 mux H */
|
||||
#define MUX_PA18H_AC_CMP0 7
|
||||
#define PINMUX_PA18H_AC_CMP0 ((PIN_PA18H_AC_CMP0 << 16) | MUX_PA18H_AC_CMP0)
|
||||
#define PORT_PA18H_AC_CMP0 (1u << 18)
|
||||
#define PIN_PA13H_AC_CMP1 13 /**< \brief AC signal: CMP1 on PA13 mux H */
|
||||
#define MUX_PA13H_AC_CMP1 7
|
||||
#define PINMUX_PA13H_AC_CMP1 ((PIN_PA13H_AC_CMP1 << 16) | MUX_PA13H_AC_CMP1)
|
||||
#define PORT_PA13H_AC_CMP1 (1u << 13)
|
||||
#define PIN_PA19H_AC_CMP1 19 /**< \brief AC signal: CMP1 on PA19 mux H */
|
||||
#define MUX_PA19H_AC_CMP1 7
|
||||
#define PINMUX_PA19H_AC_CMP1 ((PIN_PA19H_AC_CMP1 << 16) | MUX_PA19H_AC_CMP1)
|
||||
#define PORT_PA19H_AC_CMP1 (1u << 19)
|
||||
/* ========== PORT definition for DAC peripheral ========== */
|
||||
#define PIN_PA02B_DAC_VOUT 2 /**< \brief DAC signal: VOUT on PA02 mux B */
|
||||
#define MUX_PA02B_DAC_VOUT 1
|
||||
#define PINMUX_PA02B_DAC_VOUT ((PIN_PA02B_DAC_VOUT << 16) | MUX_PA02B_DAC_VOUT)
|
||||
#define PORT_PA02B_DAC_VOUT (1u << 2)
|
||||
#define PIN_PA03B_DAC_VREFP 3 /**< \brief DAC signal: VREFP on PA03 mux B */
|
||||
#define MUX_PA03B_DAC_VREFP 1
|
||||
#define PINMUX_PA03B_DAC_VREFP ((PIN_PA03B_DAC_VREFP << 16) | MUX_PA03B_DAC_VREFP)
|
||||
#define PORT_PA03B_DAC_VREFP (1u << 3)
|
||||
|
||||
#endif /* _SAMD20G17_PIO_ */
|
|
@ -0,0 +1,812 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Peripheral I/O description for SAMD20G18
|
||||
*
|
||||
* Copyright (c) 2013 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SAMD20G18_PIO_
|
||||
#define _SAMD20G18_PIO_
|
||||
|
||||
#define PIN_PA00 0 /**< \brief Pin Number for PA00 */
|
||||
#define PORT_PA00 (1u << 0) /**< \brief PORT Mask for PA00 */
|
||||
#define PIN_PA01 1 /**< \brief Pin Number for PA01 */
|
||||
#define PORT_PA01 (1u << 1) /**< \brief PORT Mask for PA01 */
|
||||
#define PIN_PA02 2 /**< \brief Pin Number for PA02 */
|
||||
#define PORT_PA02 (1u << 2) /**< \brief PORT Mask for PA02 */
|
||||
#define PIN_PA03 3 /**< \brief Pin Number for PA03 */
|
||||
#define PORT_PA03 (1u << 3) /**< \brief PORT Mask for PA03 */
|
||||
#define PIN_PA04 4 /**< \brief Pin Number for PA04 */
|
||||
#define PORT_PA04 (1u << 4) /**< \brief PORT Mask for PA04 */
|
||||
#define PIN_PA05 5 /**< \brief Pin Number for PA05 */
|
||||
#define PORT_PA05 (1u << 5) /**< \brief PORT Mask for PA05 */
|
||||
#define PIN_PA06 6 /**< \brief Pin Number for PA06 */
|
||||
#define PORT_PA06 (1u << 6) /**< \brief PORT Mask for PA06 */
|
||||
#define PIN_PA07 7 /**< \brief Pin Number for PA07 */
|
||||
#define PORT_PA07 (1u << 7) /**< \brief PORT Mask for PA07 */
|
||||
#define PIN_PA08 8 /**< \brief Pin Number for PA08 */
|
||||
#define PORT_PA08 (1u << 8) /**< \brief PORT Mask for PA08 */
|
||||
#define PIN_PA09 9 /**< \brief Pin Number for PA09 */
|
||||
#define PORT_PA09 (1u << 9) /**< \brief PORT Mask for PA09 */
|
||||
#define PIN_PA10 10 /**< \brief Pin Number for PA10 */
|
||||
#define PORT_PA10 (1u << 10) /**< \brief PORT Mask for PA10 */
|
||||
#define PIN_PA11 11 /**< \brief Pin Number for PA11 */
|
||||
#define PORT_PA11 (1u << 11) /**< \brief PORT Mask for PA11 */
|
||||
#define PIN_PA12 12 /**< \brief Pin Number for PA12 */
|
||||
#define PORT_PA12 (1u << 12) /**< \brief PORT Mask for PA12 */
|
||||
#define PIN_PA13 13 /**< \brief Pin Number for PA13 */
|
||||
#define PORT_PA13 (1u << 13) /**< \brief PORT Mask for PA13 */
|
||||
#define PIN_PA14 14 /**< \brief Pin Number for PA14 */
|
||||
#define PORT_PA14 (1u << 14) /**< \brief PORT Mask for PA14 */
|
||||
#define PIN_PA15 15 /**< \brief Pin Number for PA15 */
|
||||
#define PORT_PA15 (1u << 15) /**< \brief PORT Mask for PA15 */
|
||||
#define PIN_PA16 16 /**< \brief Pin Number for PA16 */
|
||||
#define PORT_PA16 (1u << 16) /**< \brief PORT Mask for PA16 */
|
||||
#define PIN_PA17 17 /**< \brief Pin Number for PA17 */
|
||||
#define PORT_PA17 (1u << 17) /**< \brief PORT Mask for PA17 */
|
||||
#define PIN_PA18 18 /**< \brief Pin Number for PA18 */
|
||||
#define PORT_PA18 (1u << 18) /**< \brief PORT Mask for PA18 */
|
||||
#define PIN_PA19 19 /**< \brief Pin Number for PA19 */
|
||||
#define PORT_PA19 (1u << 19) /**< \brief PORT Mask for PA19 */
|
||||
#define PIN_PA20 20 /**< \brief Pin Number for PA20 */
|
||||
#define PORT_PA20 (1u << 20) /**< \brief PORT Mask for PA20 */
|
||||
#define PIN_PA21 21 /**< \brief Pin Number for PA21 */
|
||||
#define PORT_PA21 (1u << 21) /**< \brief PORT Mask for PA21 */
|
||||
#define PIN_PA22 22 /**< \brief Pin Number for PA22 */
|
||||
#define PORT_PA22 (1u << 22) /**< \brief PORT Mask for PA22 */
|
||||
#define PIN_PA23 23 /**< \brief Pin Number for PA23 */
|
||||
#define PORT_PA23 (1u << 23) /**< \brief PORT Mask for PA23 */
|
||||
#define PIN_PA24 24 /**< \brief Pin Number for PA24 */
|
||||
#define PORT_PA24 (1u << 24) /**< \brief PORT Mask for PA24 */
|
||||
#define PIN_PA25 25 /**< \brief Pin Number for PA25 */
|
||||
#define PORT_PA25 (1u << 25) /**< \brief PORT Mask for PA25 */
|
||||
#define PIN_PA27 27 /**< \brief Pin Number for PA27 */
|
||||
#define PORT_PA27 (1u << 27) /**< \brief PORT Mask for PA27 */
|
||||
#define PIN_PA28 28 /**< \brief Pin Number for PA28 */
|
||||
#define PORT_PA28 (1u << 28) /**< \brief PORT Mask for PA28 */
|
||||
#define PIN_PA30 30 /**< \brief Pin Number for PA30 */
|
||||
#define PORT_PA30 (1u << 30) /**< \brief PORT Mask for PA30 */
|
||||
#define PIN_PA31 31 /**< \brief Pin Number for PA31 */
|
||||
#define PORT_PA31 (1u << 31) /**< \brief PORT Mask for PA31 */
|
||||
#define PIN_PB02 34 /**< \brief Pin Number for PB02 */
|
||||
#define PORT_PB02 (1u << 2) /**< \brief PORT Mask for PB02 */
|
||||
#define PIN_PB03 35 /**< \brief Pin Number for PB03 */
|
||||
#define PORT_PB03 (1u << 3) /**< \brief PORT Mask for PB03 */
|
||||
#define PIN_PB08 40 /**< \brief Pin Number for PB08 */
|
||||
#define PORT_PB08 (1u << 8) /**< \brief PORT Mask for PB08 */
|
||||
#define PIN_PB09 41 /**< \brief Pin Number for PB09 */
|
||||
#define PORT_PB09 (1u << 9) /**< \brief PORT Mask for PB09 */
|
||||
#define PIN_PB10 42 /**< \brief Pin Number for PB10 */
|
||||
#define PORT_PB10 (1u << 10) /**< \brief PORT Mask for PB10 */
|
||||
#define PIN_PB11 43 /**< \brief Pin Number for PB11 */
|
||||
#define PORT_PB11 (1u << 11) /**< \brief PORT Mask for PB11 */
|
||||
#define PIN_PB22 54 /**< \brief Pin Number for PB22 */
|
||||
#define PORT_PB22 (1u << 22) /**< \brief PORT Mask for PB22 */
|
||||
#define PIN_PB23 55 /**< \brief Pin Number for PB23 */
|
||||
#define PORT_PB23 (1u << 23) /**< \brief PORT Mask for PB23 */
|
||||
/* ========== PORT definition for CORE peripheral ========== */
|
||||
#define PIN_PA30G_CORE_SWCLK 30 /**< \brief CORE signal: SWCLK on PA30 mux G */
|
||||
#define MUX_PA30G_CORE_SWCLK 6
|
||||
#define PINMUX_PA30G_CORE_SWCLK ((PIN_PA30G_CORE_SWCLK << 16) | MUX_PA30G_CORE_SWCLK)
|
||||
#define PORT_PA30G_CORE_SWCLK (1u << 30)
|
||||
/* ========== PORT definition for GCLK peripheral ========== */
|
||||
#define PIN_PB22H_GCLK_IO0 54 /**< \brief GCLK signal: IO0 on PB22 mux H */
|
||||
#define MUX_PB22H_GCLK_IO0 7
|
||||
#define PINMUX_PB22H_GCLK_IO0 ((PIN_PB22H_GCLK_IO0 << 16) | MUX_PB22H_GCLK_IO0)
|
||||
#define PORT_PB22H_GCLK_IO0 (1u << 22)
|
||||
#define PIN_PA14H_GCLK_IO0 14 /**< \brief GCLK signal: IO0 on PA14 mux H */
|
||||
#define MUX_PA14H_GCLK_IO0 7
|
||||
#define PINMUX_PA14H_GCLK_IO0 ((PIN_PA14H_GCLK_IO0 << 16) | MUX_PA14H_GCLK_IO0)
|
||||
#define PORT_PA14H_GCLK_IO0 (1u << 14)
|
||||
#define PIN_PA27H_GCLK_IO0 27 /**< \brief GCLK signal: IO0 on PA27 mux H */
|
||||
#define MUX_PA27H_GCLK_IO0 7
|
||||
#define PINMUX_PA27H_GCLK_IO0 ((PIN_PA27H_GCLK_IO0 << 16) | MUX_PA27H_GCLK_IO0)
|
||||
#define PORT_PA27H_GCLK_IO0 (1u << 27)
|
||||
#define PIN_PA28H_GCLK_IO0 28 /**< \brief GCLK signal: IO0 on PA28 mux H */
|
||||
#define MUX_PA28H_GCLK_IO0 7
|
||||
#define PINMUX_PA28H_GCLK_IO0 ((PIN_PA28H_GCLK_IO0 << 16) | MUX_PA28H_GCLK_IO0)
|
||||
#define PORT_PA28H_GCLK_IO0 (1u << 28)
|
||||
#define PIN_PA30H_GCLK_IO0 30 /**< \brief GCLK signal: IO0 on PA30 mux H */
|
||||
#define MUX_PA30H_GCLK_IO0 7
|
||||
#define PINMUX_PA30H_GCLK_IO0 ((PIN_PA30H_GCLK_IO0 << 16) | MUX_PA30H_GCLK_IO0)
|
||||
#define PORT_PA30H_GCLK_IO0 (1u << 30)
|
||||
#define PIN_PB23H_GCLK_IO1 55 /**< \brief GCLK signal: IO1 on PB23 mux H */
|
||||
#define MUX_PB23H_GCLK_IO1 7
|
||||
#define PINMUX_PB23H_GCLK_IO1 ((PIN_PB23H_GCLK_IO1 << 16) | MUX_PB23H_GCLK_IO1)
|
||||
#define PORT_PB23H_GCLK_IO1 (1u << 23)
|
||||
#define PIN_PA15H_GCLK_IO1 15 /**< \brief GCLK signal: IO1 on PA15 mux H */
|
||||
#define MUX_PA15H_GCLK_IO1 7
|
||||
#define PINMUX_PA15H_GCLK_IO1 ((PIN_PA15H_GCLK_IO1 << 16) | MUX_PA15H_GCLK_IO1)
|
||||
#define PORT_PA15H_GCLK_IO1 (1u << 15)
|
||||
#define PIN_PA16H_GCLK_IO2 16 /**< \brief GCLK signal: IO2 on PA16 mux H */
|
||||
#define MUX_PA16H_GCLK_IO2 7
|
||||
#define PINMUX_PA16H_GCLK_IO2 ((PIN_PA16H_GCLK_IO2 << 16) | MUX_PA16H_GCLK_IO2)
|
||||
#define PORT_PA16H_GCLK_IO2 (1u << 16)
|
||||
#define PIN_PA17H_GCLK_IO3 17 /**< \brief GCLK signal: IO3 on PA17 mux H */
|
||||
#define MUX_PA17H_GCLK_IO3 7
|
||||
#define PINMUX_PA17H_GCLK_IO3 ((PIN_PA17H_GCLK_IO3 << 16) | MUX_PA17H_GCLK_IO3)
|
||||
#define PORT_PA17H_GCLK_IO3 (1u << 17)
|
||||
#define PIN_PA10H_GCLK_IO4 10 /**< \brief GCLK signal: IO4 on PA10 mux H */
|
||||
#define MUX_PA10H_GCLK_IO4 7
|
||||
#define PINMUX_PA10H_GCLK_IO4 ((PIN_PA10H_GCLK_IO4 << 16) | MUX_PA10H_GCLK_IO4)
|
||||
#define PORT_PA10H_GCLK_IO4 (1u << 10)
|
||||
#define PIN_PA20H_GCLK_IO4 20 /**< \brief GCLK signal: IO4 on PA20 mux H */
|
||||
#define MUX_PA20H_GCLK_IO4 7
|
||||
#define PINMUX_PA20H_GCLK_IO4 ((PIN_PA20H_GCLK_IO4 << 16) | MUX_PA20H_GCLK_IO4)
|
||||
#define PORT_PA20H_GCLK_IO4 (1u << 20)
|
||||
#define PIN_PB10H_GCLK_IO4 42 /**< \brief GCLK signal: IO4 on PB10 mux H */
|
||||
#define MUX_PB10H_GCLK_IO4 7
|
||||
#define PINMUX_PB10H_GCLK_IO4 ((PIN_PB10H_GCLK_IO4 << 16) | MUX_PB10H_GCLK_IO4)
|
||||
#define PORT_PB10H_GCLK_IO4 (1u << 10)
|
||||
#define PIN_PA11H_GCLK_IO5 11 /**< \brief GCLK signal: IO5 on PA11 mux H */
|
||||
#define MUX_PA11H_GCLK_IO5 7
|
||||
#define PINMUX_PA11H_GCLK_IO5 ((PIN_PA11H_GCLK_IO5 << 16) | MUX_PA11H_GCLK_IO5)
|
||||
#define PORT_PA11H_GCLK_IO5 (1u << 11)
|
||||
#define PIN_PA21H_GCLK_IO5 21 /**< \brief GCLK signal: IO5 on PA21 mux H */
|
||||
#define MUX_PA21H_GCLK_IO5 7
|
||||
#define PINMUX_PA21H_GCLK_IO5 ((PIN_PA21H_GCLK_IO5 << 16) | MUX_PA21H_GCLK_IO5)
|
||||
#define PORT_PA21H_GCLK_IO5 (1u << 21)
|
||||
#define PIN_PB11H_GCLK_IO5 43 /**< \brief GCLK signal: IO5 on PB11 mux H */
|
||||
#define MUX_PB11H_GCLK_IO5 7
|
||||
#define PINMUX_PB11H_GCLK_IO5 ((PIN_PB11H_GCLK_IO5 << 16) | MUX_PB11H_GCLK_IO5)
|
||||
#define PORT_PB11H_GCLK_IO5 (1u << 11)
|
||||
#define PIN_PA22H_GCLK_IO6 22 /**< \brief GCLK signal: IO6 on PA22 mux H */
|
||||
#define MUX_PA22H_GCLK_IO6 7
|
||||
#define PINMUX_PA22H_GCLK_IO6 ((PIN_PA22H_GCLK_IO6 << 16) | MUX_PA22H_GCLK_IO6)
|
||||
#define PORT_PA22H_GCLK_IO6 (1u << 22)
|
||||
#define PIN_PA23H_GCLK_IO7 23 /**< \brief GCLK signal: IO7 on PA23 mux H */
|
||||
#define MUX_PA23H_GCLK_IO7 7
|
||||
#define PINMUX_PA23H_GCLK_IO7 ((PIN_PA23H_GCLK_IO7 << 16) | MUX_PA23H_GCLK_IO7)
|
||||
#define PORT_PA23H_GCLK_IO7 (1u << 23)
|
||||
/* ========== PORT definition for EIC peripheral ========== */
|
||||
#define PIN_PA16A_EIC_EXTINT0 16 /**< \brief EIC signal: EXTINT0 on PA16 mux A */
|
||||
#define MUX_PA16A_EIC_EXTINT0 0
|
||||
#define PINMUX_PA16A_EIC_EXTINT0 ((PIN_PA16A_EIC_EXTINT0 << 16) | MUX_PA16A_EIC_EXTINT0)
|
||||
#define PORT_PA16A_EIC_EXTINT0 (1u << 16)
|
||||
#define PIN_PA00A_EIC_EXTINT0 0 /**< \brief EIC signal: EXTINT0 on PA00 mux A */
|
||||
#define MUX_PA00A_EIC_EXTINT0 0
|
||||
#define PINMUX_PA00A_EIC_EXTINT0 ((PIN_PA00A_EIC_EXTINT0 << 16) | MUX_PA00A_EIC_EXTINT0)
|
||||
#define PORT_PA00A_EIC_EXTINT0 (1u << 0)
|
||||
#define PIN_PA17A_EIC_EXTINT1 17 /**< \brief EIC signal: EXTINT1 on PA17 mux A */
|
||||
#define MUX_PA17A_EIC_EXTINT1 0
|
||||
#define PINMUX_PA17A_EIC_EXTINT1 ((PIN_PA17A_EIC_EXTINT1 << 16) | MUX_PA17A_EIC_EXTINT1)
|
||||
#define PORT_PA17A_EIC_EXTINT1 (1u << 17)
|
||||
#define PIN_PA01A_EIC_EXTINT1 1 /**< \brief EIC signal: EXTINT1 on PA01 mux A */
|
||||
#define MUX_PA01A_EIC_EXTINT1 0
|
||||
#define PINMUX_PA01A_EIC_EXTINT1 ((PIN_PA01A_EIC_EXTINT1 << 16) | MUX_PA01A_EIC_EXTINT1)
|
||||
#define PORT_PA01A_EIC_EXTINT1 (1u << 1)
|
||||
#define PIN_PA02A_EIC_EXTINT2 2 /**< \brief EIC signal: EXTINT2 on PA02 mux A */
|
||||
#define MUX_PA02A_EIC_EXTINT2 0
|
||||
#define PINMUX_PA02A_EIC_EXTINT2 ((PIN_PA02A_EIC_EXTINT2 << 16) | MUX_PA02A_EIC_EXTINT2)
|
||||
#define PORT_PA02A_EIC_EXTINT2 (1u << 2)
|
||||
#define PIN_PA18A_EIC_EXTINT2 18 /**< \brief EIC signal: EXTINT2 on PA18 mux A */
|
||||
#define MUX_PA18A_EIC_EXTINT2 0
|
||||
#define PINMUX_PA18A_EIC_EXTINT2 ((PIN_PA18A_EIC_EXTINT2 << 16) | MUX_PA18A_EIC_EXTINT2)
|
||||
#define PORT_PA18A_EIC_EXTINT2 (1u << 18)
|
||||
#define PIN_PB02A_EIC_EXTINT2 34 /**< \brief EIC signal: EXTINT2 on PB02 mux A */
|
||||
#define MUX_PB02A_EIC_EXTINT2 0
|
||||
#define PINMUX_PB02A_EIC_EXTINT2 ((PIN_PB02A_EIC_EXTINT2 << 16) | MUX_PB02A_EIC_EXTINT2)
|
||||
#define PORT_PB02A_EIC_EXTINT2 (1u << 2)
|
||||
#define PIN_PA03A_EIC_EXTINT3 3 /**< \brief EIC signal: EXTINT3 on PA03 mux A */
|
||||
#define MUX_PA03A_EIC_EXTINT3 0
|
||||
#define PINMUX_PA03A_EIC_EXTINT3 ((PIN_PA03A_EIC_EXTINT3 << 16) | MUX_PA03A_EIC_EXTINT3)
|
||||
#define PORT_PA03A_EIC_EXTINT3 (1u << 3)
|
||||
#define PIN_PA19A_EIC_EXTINT3 19 /**< \brief EIC signal: EXTINT3 on PA19 mux A */
|
||||
#define MUX_PA19A_EIC_EXTINT3 0
|
||||
#define PINMUX_PA19A_EIC_EXTINT3 ((PIN_PA19A_EIC_EXTINT3 << 16) | MUX_PA19A_EIC_EXTINT3)
|
||||
#define PORT_PA19A_EIC_EXTINT3 (1u << 19)
|
||||
#define PIN_PB03A_EIC_EXTINT3 35 /**< \brief EIC signal: EXTINT3 on PB03 mux A */
|
||||
#define MUX_PB03A_EIC_EXTINT3 0
|
||||
#define PINMUX_PB03A_EIC_EXTINT3 ((PIN_PB03A_EIC_EXTINT3 << 16) | MUX_PB03A_EIC_EXTINT3)
|
||||
#define PORT_PB03A_EIC_EXTINT3 (1u << 3)
|
||||
#define PIN_PA04A_EIC_EXTINT4 4 /**< \brief EIC signal: EXTINT4 on PA04 mux A */
|
||||
#define MUX_PA04A_EIC_EXTINT4 0
|
||||
#define PINMUX_PA04A_EIC_EXTINT4 ((PIN_PA04A_EIC_EXTINT4 << 16) | MUX_PA04A_EIC_EXTINT4)
|
||||
#define PORT_PA04A_EIC_EXTINT4 (1u << 4)
|
||||
#define PIN_PA20A_EIC_EXTINT4 20 /**< \brief EIC signal: EXTINT4 on PA20 mux A */
|
||||
#define MUX_PA20A_EIC_EXTINT4 0
|
||||
#define PINMUX_PA20A_EIC_EXTINT4 ((PIN_PA20A_EIC_EXTINT4 << 16) | MUX_PA20A_EIC_EXTINT4)
|
||||
#define PORT_PA20A_EIC_EXTINT4 (1u << 20)
|
||||
#define PIN_PA05A_EIC_EXTINT5 5 /**< \brief EIC signal: EXTINT5 on PA05 mux A */
|
||||
#define MUX_PA05A_EIC_EXTINT5 0
|
||||
#define PINMUX_PA05A_EIC_EXTINT5 ((PIN_PA05A_EIC_EXTINT5 << 16) | MUX_PA05A_EIC_EXTINT5)
|
||||
#define PORT_PA05A_EIC_EXTINT5 (1u << 5)
|
||||
#define PIN_PA21A_EIC_EXTINT5 21 /**< \brief EIC signal: EXTINT5 on PA21 mux A */
|
||||
#define MUX_PA21A_EIC_EXTINT5 0
|
||||
#define PINMUX_PA21A_EIC_EXTINT5 ((PIN_PA21A_EIC_EXTINT5 << 16) | MUX_PA21A_EIC_EXTINT5)
|
||||
#define PORT_PA21A_EIC_EXTINT5 (1u << 21)
|
||||
#define PIN_PA06A_EIC_EXTINT6 6 /**< \brief EIC signal: EXTINT6 on PA06 mux A */
|
||||
#define MUX_PA06A_EIC_EXTINT6 0
|
||||
#define PINMUX_PA06A_EIC_EXTINT6 ((PIN_PA06A_EIC_EXTINT6 << 16) | MUX_PA06A_EIC_EXTINT6)
|
||||
#define PORT_PA06A_EIC_EXTINT6 (1u << 6)
|
||||
#define PIN_PA22A_EIC_EXTINT6 22 /**< \brief EIC signal: EXTINT6 on PA22 mux A */
|
||||
#define MUX_PA22A_EIC_EXTINT6 0
|
||||
#define PINMUX_PA22A_EIC_EXTINT6 ((PIN_PA22A_EIC_EXTINT6 << 16) | MUX_PA22A_EIC_EXTINT6)
|
||||
#define PORT_PA22A_EIC_EXTINT6 (1u << 22)
|
||||
#define PIN_PB22A_EIC_EXTINT6 54 /**< \brief EIC signal: EXTINT6 on PB22 mux A */
|
||||
#define MUX_PB22A_EIC_EXTINT6 0
|
||||
#define PINMUX_PB22A_EIC_EXTINT6 ((PIN_PB22A_EIC_EXTINT6 << 16) | MUX_PB22A_EIC_EXTINT6)
|
||||
#define PORT_PB22A_EIC_EXTINT6 (1u << 22)
|
||||
#define PIN_PA07A_EIC_EXTINT7 7 /**< \brief EIC signal: EXTINT7 on PA07 mux A */
|
||||
#define MUX_PA07A_EIC_EXTINT7 0
|
||||
#define PINMUX_PA07A_EIC_EXTINT7 ((PIN_PA07A_EIC_EXTINT7 << 16) | MUX_PA07A_EIC_EXTINT7)
|
||||
#define PORT_PA07A_EIC_EXTINT7 (1u << 7)
|
||||
#define PIN_PA23A_EIC_EXTINT7 23 /**< \brief EIC signal: EXTINT7 on PA23 mux A */
|
||||
#define MUX_PA23A_EIC_EXTINT7 0
|
||||
#define PINMUX_PA23A_EIC_EXTINT7 ((PIN_PA23A_EIC_EXTINT7 << 16) | MUX_PA23A_EIC_EXTINT7)
|
||||
#define PORT_PA23A_EIC_EXTINT7 (1u << 23)
|
||||
#define PIN_PB23A_EIC_EXTINT7 55 /**< \brief EIC signal: EXTINT7 on PB23 mux A */
|
||||
#define MUX_PB23A_EIC_EXTINT7 0
|
||||
#define PINMUX_PB23A_EIC_EXTINT7 ((PIN_PB23A_EIC_EXTINT7 << 16) | MUX_PB23A_EIC_EXTINT7)
|
||||
#define PORT_PB23A_EIC_EXTINT7 (1u << 23)
|
||||
#define PIN_PA28A_EIC_EXTINT8 28 /**< \brief EIC signal: EXTINT8 on PA28 mux A */
|
||||
#define MUX_PA28A_EIC_EXTINT8 0
|
||||
#define PINMUX_PA28A_EIC_EXTINT8 ((PIN_PA28A_EIC_EXTINT8 << 16) | MUX_PA28A_EIC_EXTINT8)
|
||||
#define PORT_PA28A_EIC_EXTINT8 (1u << 28)
|
||||
#define PIN_PB08A_EIC_EXTINT8 40 /**< \brief EIC signal: EXTINT8 on PB08 mux A */
|
||||
#define MUX_PB08A_EIC_EXTINT8 0
|
||||
#define PINMUX_PB08A_EIC_EXTINT8 ((PIN_PB08A_EIC_EXTINT8 << 16) | MUX_PB08A_EIC_EXTINT8)
|
||||
#define PORT_PB08A_EIC_EXTINT8 (1u << 8)
|
||||
#define PIN_PA09A_EIC_EXTINT9 9 /**< \brief EIC signal: EXTINT9 on PA09 mux A */
|
||||
#define MUX_PA09A_EIC_EXTINT9 0
|
||||
#define PINMUX_PA09A_EIC_EXTINT9 ((PIN_PA09A_EIC_EXTINT9 << 16) | MUX_PA09A_EIC_EXTINT9)
|
||||
#define PORT_PA09A_EIC_EXTINT9 (1u << 9)
|
||||
#define PIN_PB09A_EIC_EXTINT9 41 /**< \brief EIC signal: EXTINT9 on PB09 mux A */
|
||||
#define MUX_PB09A_EIC_EXTINT9 0
|
||||
#define PINMUX_PB09A_EIC_EXTINT9 ((PIN_PB09A_EIC_EXTINT9 << 16) | MUX_PB09A_EIC_EXTINT9)
|
||||
#define PORT_PB09A_EIC_EXTINT9 (1u << 9)
|
||||
#define PIN_PA10A_EIC_EXTINT10 10 /**< \brief EIC signal: EXTINT10 on PA10 mux A */
|
||||
#define MUX_PA10A_EIC_EXTINT10 0
|
||||
#define PINMUX_PA10A_EIC_EXTINT10 ((PIN_PA10A_EIC_EXTINT10 << 16) | MUX_PA10A_EIC_EXTINT10)
|
||||
#define PORT_PA10A_EIC_EXTINT10 (1u << 10)
|
||||
#define PIN_PA30A_EIC_EXTINT10 30 /**< \brief EIC signal: EXTINT10 on PA30 mux A */
|
||||
#define MUX_PA30A_EIC_EXTINT10 0
|
||||
#define PINMUX_PA30A_EIC_EXTINT10 ((PIN_PA30A_EIC_EXTINT10 << 16) | MUX_PA30A_EIC_EXTINT10)
|
||||
#define PORT_PA30A_EIC_EXTINT10 (1u << 30)
|
||||
#define PIN_PB10A_EIC_EXTINT10 42 /**< \brief EIC signal: EXTINT10 on PB10 mux A */
|
||||
#define MUX_PB10A_EIC_EXTINT10 0
|
||||
#define PINMUX_PB10A_EIC_EXTINT10 ((PIN_PB10A_EIC_EXTINT10 << 16) | MUX_PB10A_EIC_EXTINT10)
|
||||
#define PORT_PB10A_EIC_EXTINT10 (1u << 10)
|
||||
#define PIN_PA11A_EIC_EXTINT11 11 /**< \brief EIC signal: EXTINT11 on PA11 mux A */
|
||||
#define MUX_PA11A_EIC_EXTINT11 0
|
||||
#define PINMUX_PA11A_EIC_EXTINT11 ((PIN_PA11A_EIC_EXTINT11 << 16) | MUX_PA11A_EIC_EXTINT11)
|
||||
#define PORT_PA11A_EIC_EXTINT11 (1u << 11)
|
||||
#define PIN_PA31A_EIC_EXTINT11 31 /**< \brief EIC signal: EXTINT11 on PA31 mux A */
|
||||
#define MUX_PA31A_EIC_EXTINT11 0
|
||||
#define PINMUX_PA31A_EIC_EXTINT11 ((PIN_PA31A_EIC_EXTINT11 << 16) | MUX_PA31A_EIC_EXTINT11)
|
||||
#define PORT_PA31A_EIC_EXTINT11 (1u << 31)
|
||||
#define PIN_PB11A_EIC_EXTINT11 43 /**< \brief EIC signal: EXTINT11 on PB11 mux A */
|
||||
#define MUX_PB11A_EIC_EXTINT11 0
|
||||
#define PINMUX_PB11A_EIC_EXTINT11 ((PIN_PB11A_EIC_EXTINT11 << 16) | MUX_PB11A_EIC_EXTINT11)
|
||||
#define PORT_PB11A_EIC_EXTINT11 (1u << 11)
|
||||
#define PIN_PA12A_EIC_EXTINT12 12 /**< \brief EIC signal: EXTINT12 on PA12 mux A */
|
||||
#define MUX_PA12A_EIC_EXTINT12 0
|
||||
#define PINMUX_PA12A_EIC_EXTINT12 ((PIN_PA12A_EIC_EXTINT12 << 16) | MUX_PA12A_EIC_EXTINT12)
|
||||
#define PORT_PA12A_EIC_EXTINT12 (1u << 12)
|
||||
#define PIN_PA24A_EIC_EXTINT12 24 /**< \brief EIC signal: EXTINT12 on PA24 mux A */
|
||||
#define MUX_PA24A_EIC_EXTINT12 0
|
||||
#define PINMUX_PA24A_EIC_EXTINT12 ((PIN_PA24A_EIC_EXTINT12 << 16) | MUX_PA24A_EIC_EXTINT12)
|
||||
#define PORT_PA24A_EIC_EXTINT12 (1u << 24)
|
||||
#define PIN_PA13A_EIC_EXTINT13 13 /**< \brief EIC signal: EXTINT13 on PA13 mux A */
|
||||
#define MUX_PA13A_EIC_EXTINT13 0
|
||||
#define PINMUX_PA13A_EIC_EXTINT13 ((PIN_PA13A_EIC_EXTINT13 << 16) | MUX_PA13A_EIC_EXTINT13)
|
||||
#define PORT_PA13A_EIC_EXTINT13 (1u << 13)
|
||||
#define PIN_PA25A_EIC_EXTINT13 25 /**< \brief EIC signal: EXTINT13 on PA25 mux A */
|
||||
#define MUX_PA25A_EIC_EXTINT13 0
|
||||
#define PINMUX_PA25A_EIC_EXTINT13 ((PIN_PA25A_EIC_EXTINT13 << 16) | MUX_PA25A_EIC_EXTINT13)
|
||||
#define PORT_PA25A_EIC_EXTINT13 (1u << 25)
|
||||
#define PIN_PA14A_EIC_EXTINT14 14 /**< \brief EIC signal: EXTINT14 on PA14 mux A */
|
||||
#define MUX_PA14A_EIC_EXTINT14 0
|
||||
#define PINMUX_PA14A_EIC_EXTINT14 ((PIN_PA14A_EIC_EXTINT14 << 16) | MUX_PA14A_EIC_EXTINT14)
|
||||
#define PORT_PA14A_EIC_EXTINT14 (1u << 14)
|
||||
#define PIN_PA27A_EIC_EXTINT15 27 /**< \brief EIC signal: EXTINT15 on PA27 mux A */
|
||||
#define MUX_PA27A_EIC_EXTINT15 0
|
||||
#define PINMUX_PA27A_EIC_EXTINT15 ((PIN_PA27A_EIC_EXTINT15 << 16) | MUX_PA27A_EIC_EXTINT15)
|
||||
#define PORT_PA27A_EIC_EXTINT15 (1u << 27)
|
||||
#define PIN_PA15A_EIC_EXTINT15 15 /**< \brief EIC signal: EXTINT15 on PA15 mux A */
|
||||
#define MUX_PA15A_EIC_EXTINT15 0
|
||||
#define PINMUX_PA15A_EIC_EXTINT15 ((PIN_PA15A_EIC_EXTINT15 << 16) | MUX_PA15A_EIC_EXTINT15)
|
||||
#define PORT_PA15A_EIC_EXTINT15 (1u << 15)
|
||||
#define PIN_PA08A_EIC_NMI 8 /**< \brief EIC signal: NMI on PA08 mux A */
|
||||
#define MUX_PA08A_EIC_NMI 0
|
||||
#define PINMUX_PA08A_EIC_NMI ((PIN_PA08A_EIC_NMI << 16) | MUX_PA08A_EIC_NMI)
|
||||
#define PORT_PA08A_EIC_NMI (1u << 8)
|
||||
/* ========== PORT definition for SERCOM0 peripheral ========== */
|
||||
#define PIN_PA04D_SERCOM0_PAD0 4 /**< \brief SERCOM0 signal: PAD0 on PA04 mux D */
|
||||
#define MUX_PA04D_SERCOM0_PAD0 3
|
||||
#define PINMUX_PA04D_SERCOM0_PAD0 ((PIN_PA04D_SERCOM0_PAD0 << 16) | MUX_PA04D_SERCOM0_PAD0)
|
||||
#define PORT_PA04D_SERCOM0_PAD0 (1u << 4)
|
||||
#define PIN_PA08C_SERCOM0_PAD0 8 /**< \brief SERCOM0 signal: PAD0 on PA08 mux C */
|
||||
#define MUX_PA08C_SERCOM0_PAD0 2
|
||||
#define PINMUX_PA08C_SERCOM0_PAD0 ((PIN_PA08C_SERCOM0_PAD0 << 16) | MUX_PA08C_SERCOM0_PAD0)
|
||||
#define PORT_PA08C_SERCOM0_PAD0 (1u << 8)
|
||||
#define PIN_PA05D_SERCOM0_PAD1 5 /**< \brief SERCOM0 signal: PAD1 on PA05 mux D */
|
||||
#define MUX_PA05D_SERCOM0_PAD1 3
|
||||
#define PINMUX_PA05D_SERCOM0_PAD1 ((PIN_PA05D_SERCOM0_PAD1 << 16) | MUX_PA05D_SERCOM0_PAD1)
|
||||
#define PORT_PA05D_SERCOM0_PAD1 (1u << 5)
|
||||
#define PIN_PA09C_SERCOM0_PAD1 9 /**< \brief SERCOM0 signal: PAD1 on PA09 mux C */
|
||||
#define MUX_PA09C_SERCOM0_PAD1 2
|
||||
#define PINMUX_PA09C_SERCOM0_PAD1 ((PIN_PA09C_SERCOM0_PAD1 << 16) | MUX_PA09C_SERCOM0_PAD1)
|
||||
#define PORT_PA09C_SERCOM0_PAD1 (1u << 9)
|
||||
#define PIN_PA06D_SERCOM0_PAD2 6 /**< \brief SERCOM0 signal: PAD2 on PA06 mux D */
|
||||
#define MUX_PA06D_SERCOM0_PAD2 3
|
||||
#define PINMUX_PA06D_SERCOM0_PAD2 ((PIN_PA06D_SERCOM0_PAD2 << 16) | MUX_PA06D_SERCOM0_PAD2)
|
||||
#define PORT_PA06D_SERCOM0_PAD2 (1u << 6)
|
||||
#define PIN_PA10C_SERCOM0_PAD2 10 /**< \brief SERCOM0 signal: PAD2 on PA10 mux C */
|
||||
#define MUX_PA10C_SERCOM0_PAD2 2
|
||||
#define PINMUX_PA10C_SERCOM0_PAD2 ((PIN_PA10C_SERCOM0_PAD2 << 16) | MUX_PA10C_SERCOM0_PAD2)
|
||||
#define PORT_PA10C_SERCOM0_PAD2 (1u << 10)
|
||||
#define PIN_PA07D_SERCOM0_PAD3 7 /**< \brief SERCOM0 signal: PAD3 on PA07 mux D */
|
||||
#define MUX_PA07D_SERCOM0_PAD3 3
|
||||
#define PINMUX_PA07D_SERCOM0_PAD3 ((PIN_PA07D_SERCOM0_PAD3 << 16) | MUX_PA07D_SERCOM0_PAD3)
|
||||
#define PORT_PA07D_SERCOM0_PAD3 (1u << 7)
|
||||
#define PIN_PA11C_SERCOM0_PAD3 11 /**< \brief SERCOM0 signal: PAD3 on PA11 mux C */
|
||||
#define MUX_PA11C_SERCOM0_PAD3 2
|
||||
#define PINMUX_PA11C_SERCOM0_PAD3 ((PIN_PA11C_SERCOM0_PAD3 << 16) | MUX_PA11C_SERCOM0_PAD3)
|
||||
#define PORT_PA11C_SERCOM0_PAD3 (1u << 11)
|
||||
/* ========== PORT definition for SERCOM1 peripheral ========== */
|
||||
#define PIN_PA16C_SERCOM1_PAD0 16 /**< \brief SERCOM1 signal: PAD0 on PA16 mux C */
|
||||
#define MUX_PA16C_SERCOM1_PAD0 2
|
||||
#define PINMUX_PA16C_SERCOM1_PAD0 ((PIN_PA16C_SERCOM1_PAD0 << 16) | MUX_PA16C_SERCOM1_PAD0)
|
||||
#define PORT_PA16C_SERCOM1_PAD0 (1u << 16)
|
||||
#define PIN_PA00D_SERCOM1_PAD0 0 /**< \brief SERCOM1 signal: PAD0 on PA00 mux D */
|
||||
#define MUX_PA00D_SERCOM1_PAD0 3
|
||||
#define PINMUX_PA00D_SERCOM1_PAD0 ((PIN_PA00D_SERCOM1_PAD0 << 16) | MUX_PA00D_SERCOM1_PAD0)
|
||||
#define PORT_PA00D_SERCOM1_PAD0 (1u << 0)
|
||||
#define PIN_PA17C_SERCOM1_PAD1 17 /**< \brief SERCOM1 signal: PAD1 on PA17 mux C */
|
||||
#define MUX_PA17C_SERCOM1_PAD1 2
|
||||
#define PINMUX_PA17C_SERCOM1_PAD1 ((PIN_PA17C_SERCOM1_PAD1 << 16) | MUX_PA17C_SERCOM1_PAD1)
|
||||
#define PORT_PA17C_SERCOM1_PAD1 (1u << 17)
|
||||
#define PIN_PA01D_SERCOM1_PAD1 1 /**< \brief SERCOM1 signal: PAD1 on PA01 mux D */
|
||||
#define MUX_PA01D_SERCOM1_PAD1 3
|
||||
#define PINMUX_PA01D_SERCOM1_PAD1 ((PIN_PA01D_SERCOM1_PAD1 << 16) | MUX_PA01D_SERCOM1_PAD1)
|
||||
#define PORT_PA01D_SERCOM1_PAD1 (1u << 1)
|
||||
#define PIN_PA30D_SERCOM1_PAD2 30 /**< \brief SERCOM1 signal: PAD2 on PA30 mux D */
|
||||
#define MUX_PA30D_SERCOM1_PAD2 3
|
||||
#define PINMUX_PA30D_SERCOM1_PAD2 ((PIN_PA30D_SERCOM1_PAD2 << 16) | MUX_PA30D_SERCOM1_PAD2)
|
||||
#define PORT_PA30D_SERCOM1_PAD2 (1u << 30)
|
||||
#define PIN_PA18C_SERCOM1_PAD2 18 /**< \brief SERCOM1 signal: PAD2 on PA18 mux C */
|
||||
#define MUX_PA18C_SERCOM1_PAD2 2
|
||||
#define PINMUX_PA18C_SERCOM1_PAD2 ((PIN_PA18C_SERCOM1_PAD2 << 16) | MUX_PA18C_SERCOM1_PAD2)
|
||||
#define PORT_PA18C_SERCOM1_PAD2 (1u << 18)
|
||||
#define PIN_PA31D_SERCOM1_PAD3 31 /**< \brief SERCOM1 signal: PAD3 on PA31 mux D */
|
||||
#define MUX_PA31D_SERCOM1_PAD3 3
|
||||
#define PINMUX_PA31D_SERCOM1_PAD3 ((PIN_PA31D_SERCOM1_PAD3 << 16) | MUX_PA31D_SERCOM1_PAD3)
|
||||
#define PORT_PA31D_SERCOM1_PAD3 (1u << 31)
|
||||
#define PIN_PA19C_SERCOM1_PAD3 19 /**< \brief SERCOM1 signal: PAD3 on PA19 mux C */
|
||||
#define MUX_PA19C_SERCOM1_PAD3 2
|
||||
#define PINMUX_PA19C_SERCOM1_PAD3 ((PIN_PA19C_SERCOM1_PAD3 << 16) | MUX_PA19C_SERCOM1_PAD3)
|
||||
#define PORT_PA19C_SERCOM1_PAD3 (1u << 19)
|
||||
/* ========== PORT definition for SERCOM2 peripheral ========== */
|
||||
#define PIN_PA08D_SERCOM2_PAD0 8 /**< \brief SERCOM2 signal: PAD0 on PA08 mux D */
|
||||
#define MUX_PA08D_SERCOM2_PAD0 3
|
||||
#define PINMUX_PA08D_SERCOM2_PAD0 ((PIN_PA08D_SERCOM2_PAD0 << 16) | MUX_PA08D_SERCOM2_PAD0)
|
||||
#define PORT_PA08D_SERCOM2_PAD0 (1u << 8)
|
||||
#define PIN_PA12C_SERCOM2_PAD0 12 /**< \brief SERCOM2 signal: PAD0 on PA12 mux C */
|
||||
#define MUX_PA12C_SERCOM2_PAD0 2
|
||||
#define PINMUX_PA12C_SERCOM2_PAD0 ((PIN_PA12C_SERCOM2_PAD0 << 16) | MUX_PA12C_SERCOM2_PAD0)
|
||||
#define PORT_PA12C_SERCOM2_PAD0 (1u << 12)
|
||||
#define PIN_PA09D_SERCOM2_PAD1 9 /**< \brief SERCOM2 signal: PAD1 on PA09 mux D */
|
||||
#define MUX_PA09D_SERCOM2_PAD1 3
|
||||
#define PINMUX_PA09D_SERCOM2_PAD1 ((PIN_PA09D_SERCOM2_PAD1 << 16) | MUX_PA09D_SERCOM2_PAD1)
|
||||
#define PORT_PA09D_SERCOM2_PAD1 (1u << 9)
|
||||
#define PIN_PA13C_SERCOM2_PAD1 13 /**< \brief SERCOM2 signal: PAD1 on PA13 mux C */
|
||||
#define MUX_PA13C_SERCOM2_PAD1 2
|
||||
#define PINMUX_PA13C_SERCOM2_PAD1 ((PIN_PA13C_SERCOM2_PAD1 << 16) | MUX_PA13C_SERCOM2_PAD1)
|
||||
#define PORT_PA13C_SERCOM2_PAD1 (1u << 13)
|
||||
#define PIN_PA10D_SERCOM2_PAD2 10 /**< \brief SERCOM2 signal: PAD2 on PA10 mux D */
|
||||
#define MUX_PA10D_SERCOM2_PAD2 3
|
||||
#define PINMUX_PA10D_SERCOM2_PAD2 ((PIN_PA10D_SERCOM2_PAD2 << 16) | MUX_PA10D_SERCOM2_PAD2)
|
||||
#define PORT_PA10D_SERCOM2_PAD2 (1u << 10)
|
||||
#define PIN_PA14C_SERCOM2_PAD2 14 /**< \brief SERCOM2 signal: PAD2 on PA14 mux C */
|
||||
#define MUX_PA14C_SERCOM2_PAD2 2
|
||||
#define PINMUX_PA14C_SERCOM2_PAD2 ((PIN_PA14C_SERCOM2_PAD2 << 16) | MUX_PA14C_SERCOM2_PAD2)
|
||||
#define PORT_PA14C_SERCOM2_PAD2 (1u << 14)
|
||||
#define PIN_PA11D_SERCOM2_PAD3 11 /**< \brief SERCOM2 signal: PAD3 on PA11 mux D */
|
||||
#define MUX_PA11D_SERCOM2_PAD3 3
|
||||
#define PINMUX_PA11D_SERCOM2_PAD3 ((PIN_PA11D_SERCOM2_PAD3 << 16) | MUX_PA11D_SERCOM2_PAD3)
|
||||
#define PORT_PA11D_SERCOM2_PAD3 (1u << 11)
|
||||
#define PIN_PA15C_SERCOM2_PAD3 15 /**< \brief SERCOM2 signal: PAD3 on PA15 mux C */
|
||||
#define MUX_PA15C_SERCOM2_PAD3 2
|
||||
#define PINMUX_PA15C_SERCOM2_PAD3 ((PIN_PA15C_SERCOM2_PAD3 << 16) | MUX_PA15C_SERCOM2_PAD3)
|
||||
#define PORT_PA15C_SERCOM2_PAD3 (1u << 15)
|
||||
/* ========== PORT definition for SERCOM3 peripheral ========== */
|
||||
#define PIN_PA16D_SERCOM3_PAD0 16 /**< \brief SERCOM3 signal: PAD0 on PA16 mux D */
|
||||
#define MUX_PA16D_SERCOM3_PAD0 3
|
||||
#define PINMUX_PA16D_SERCOM3_PAD0 ((PIN_PA16D_SERCOM3_PAD0 << 16) | MUX_PA16D_SERCOM3_PAD0)
|
||||
#define PORT_PA16D_SERCOM3_PAD0 (1u << 16)
|
||||
#define PIN_PA22C_SERCOM3_PAD0 22 /**< \brief SERCOM3 signal: PAD0 on PA22 mux C */
|
||||
#define MUX_PA22C_SERCOM3_PAD0 2
|
||||
#define PINMUX_PA22C_SERCOM3_PAD0 ((PIN_PA22C_SERCOM3_PAD0 << 16) | MUX_PA22C_SERCOM3_PAD0)
|
||||
#define PORT_PA22C_SERCOM3_PAD0 (1u << 22)
|
||||
#define PIN_PA17D_SERCOM3_PAD1 17 /**< \brief SERCOM3 signal: PAD1 on PA17 mux D */
|
||||
#define MUX_PA17D_SERCOM3_PAD1 3
|
||||
#define PINMUX_PA17D_SERCOM3_PAD1 ((PIN_PA17D_SERCOM3_PAD1 << 16) | MUX_PA17D_SERCOM3_PAD1)
|
||||
#define PORT_PA17D_SERCOM3_PAD1 (1u << 17)
|
||||
#define PIN_PA23C_SERCOM3_PAD1 23 /**< \brief SERCOM3 signal: PAD1 on PA23 mux C */
|
||||
#define MUX_PA23C_SERCOM3_PAD1 2
|
||||
#define PINMUX_PA23C_SERCOM3_PAD1 ((PIN_PA23C_SERCOM3_PAD1 << 16) | MUX_PA23C_SERCOM3_PAD1)
|
||||
#define PORT_PA23C_SERCOM3_PAD1 (1u << 23)
|
||||
#define PIN_PA18D_SERCOM3_PAD2 18 /**< \brief SERCOM3 signal: PAD2 on PA18 mux D */
|
||||
#define MUX_PA18D_SERCOM3_PAD2 3
|
||||
#define PINMUX_PA18D_SERCOM3_PAD2 ((PIN_PA18D_SERCOM3_PAD2 << 16) | MUX_PA18D_SERCOM3_PAD2)
|
||||
#define PORT_PA18D_SERCOM3_PAD2 (1u << 18)
|
||||
#define PIN_PA20D_SERCOM3_PAD2 20 /**< \brief SERCOM3 signal: PAD2 on PA20 mux D */
|
||||
#define MUX_PA20D_SERCOM3_PAD2 3
|
||||
#define PINMUX_PA20D_SERCOM3_PAD2 ((PIN_PA20D_SERCOM3_PAD2 << 16) | MUX_PA20D_SERCOM3_PAD2)
|
||||
#define PORT_PA20D_SERCOM3_PAD2 (1u << 20)
|
||||
#define PIN_PA24C_SERCOM3_PAD2 24 /**< \brief SERCOM3 signal: PAD2 on PA24 mux C */
|
||||
#define MUX_PA24C_SERCOM3_PAD2 2
|
||||
#define PINMUX_PA24C_SERCOM3_PAD2 ((PIN_PA24C_SERCOM3_PAD2 << 16) | MUX_PA24C_SERCOM3_PAD2)
|
||||
#define PORT_PA24C_SERCOM3_PAD2 (1u << 24)
|
||||
#define PIN_PA19D_SERCOM3_PAD3 19 /**< \brief SERCOM3 signal: PAD3 on PA19 mux D */
|
||||
#define MUX_PA19D_SERCOM3_PAD3 3
|
||||
#define PINMUX_PA19D_SERCOM3_PAD3 ((PIN_PA19D_SERCOM3_PAD3 << 16) | MUX_PA19D_SERCOM3_PAD3)
|
||||
#define PORT_PA19D_SERCOM3_PAD3 (1u << 19)
|
||||
#define PIN_PA21D_SERCOM3_PAD3 21 /**< \brief SERCOM3 signal: PAD3 on PA21 mux D */
|
||||
#define MUX_PA21D_SERCOM3_PAD3 3
|
||||
#define PINMUX_PA21D_SERCOM3_PAD3 ((PIN_PA21D_SERCOM3_PAD3 << 16) | MUX_PA21D_SERCOM3_PAD3)
|
||||
#define PORT_PA21D_SERCOM3_PAD3 (1u << 21)
|
||||
#define PIN_PA25C_SERCOM3_PAD3 25 /**< \brief SERCOM3 signal: PAD3 on PA25 mux C */
|
||||
#define MUX_PA25C_SERCOM3_PAD3 2
|
||||
#define PINMUX_PA25C_SERCOM3_PAD3 ((PIN_PA25C_SERCOM3_PAD3 << 16) | MUX_PA25C_SERCOM3_PAD3)
|
||||
#define PORT_PA25C_SERCOM3_PAD3 (1u << 25)
|
||||
/* ========== PORT definition for SERCOM4 peripheral ========== */
|
||||
#define PIN_PA12D_SERCOM4_PAD0 12 /**< \brief SERCOM4 signal: PAD0 on PA12 mux D */
|
||||
#define MUX_PA12D_SERCOM4_PAD0 3
|
||||
#define PINMUX_PA12D_SERCOM4_PAD0 ((PIN_PA12D_SERCOM4_PAD0 << 16) | MUX_PA12D_SERCOM4_PAD0)
|
||||
#define PORT_PA12D_SERCOM4_PAD0 (1u << 12)
|
||||
#define PIN_PB08D_SERCOM4_PAD0 40 /**< \brief SERCOM4 signal: PAD0 on PB08 mux D */
|
||||
#define MUX_PB08D_SERCOM4_PAD0 3
|
||||
#define PINMUX_PB08D_SERCOM4_PAD0 ((PIN_PB08D_SERCOM4_PAD0 << 16) | MUX_PB08D_SERCOM4_PAD0)
|
||||
#define PORT_PB08D_SERCOM4_PAD0 (1u << 8)
|
||||
#define PIN_PA13D_SERCOM4_PAD1 13 /**< \brief SERCOM4 signal: PAD1 on PA13 mux D */
|
||||
#define MUX_PA13D_SERCOM4_PAD1 3
|
||||
#define PINMUX_PA13D_SERCOM4_PAD1 ((PIN_PA13D_SERCOM4_PAD1 << 16) | MUX_PA13D_SERCOM4_PAD1)
|
||||
#define PORT_PA13D_SERCOM4_PAD1 (1u << 13)
|
||||
#define PIN_PB09D_SERCOM4_PAD1 41 /**< \brief SERCOM4 signal: PAD1 on PB09 mux D */
|
||||
#define MUX_PB09D_SERCOM4_PAD1 3
|
||||
#define PINMUX_PB09D_SERCOM4_PAD1 ((PIN_PB09D_SERCOM4_PAD1 << 16) | MUX_PB09D_SERCOM4_PAD1)
|
||||
#define PORT_PB09D_SERCOM4_PAD1 (1u << 9)
|
||||
#define PIN_PA14D_SERCOM4_PAD2 14 /**< \brief SERCOM4 signal: PAD2 on PA14 mux D */
|
||||
#define MUX_PA14D_SERCOM4_PAD2 3
|
||||
#define PINMUX_PA14D_SERCOM4_PAD2 ((PIN_PA14D_SERCOM4_PAD2 << 16) | MUX_PA14D_SERCOM4_PAD2)
|
||||
#define PORT_PA14D_SERCOM4_PAD2 (1u << 14)
|
||||
#define PIN_PB10D_SERCOM4_PAD2 42 /**< \brief SERCOM4 signal: PAD2 on PB10 mux D */
|
||||
#define MUX_PB10D_SERCOM4_PAD2 3
|
||||
#define PINMUX_PB10D_SERCOM4_PAD2 ((PIN_PB10D_SERCOM4_PAD2 << 16) | MUX_PB10D_SERCOM4_PAD2)
|
||||
#define PORT_PB10D_SERCOM4_PAD2 (1u << 10)
|
||||
#define PIN_PA15D_SERCOM4_PAD3 15 /**< \brief SERCOM4 signal: PAD3 on PA15 mux D */
|
||||
#define MUX_PA15D_SERCOM4_PAD3 3
|
||||
#define PINMUX_PA15D_SERCOM4_PAD3 ((PIN_PA15D_SERCOM4_PAD3 << 16) | MUX_PA15D_SERCOM4_PAD3)
|
||||
#define PORT_PA15D_SERCOM4_PAD3 (1u << 15)
|
||||
#define PIN_PB11D_SERCOM4_PAD3 43 /**< \brief SERCOM4 signal: PAD3 on PB11 mux D */
|
||||
#define MUX_PB11D_SERCOM4_PAD3 3
|
||||
#define PINMUX_PB11D_SERCOM4_PAD3 ((PIN_PB11D_SERCOM4_PAD3 << 16) | MUX_PB11D_SERCOM4_PAD3)
|
||||
#define PORT_PB11D_SERCOM4_PAD3 (1u << 11)
|
||||
/* ========== PORT definition for SERCOM5 peripheral ========== */
|
||||
#define PIN_PA22D_SERCOM5_PAD0 22 /**< \brief SERCOM5 signal: PAD0 on PA22 mux D */
|
||||
#define MUX_PA22D_SERCOM5_PAD0 3
|
||||
#define PINMUX_PA22D_SERCOM5_PAD0 ((PIN_PA22D_SERCOM5_PAD0 << 16) | MUX_PA22D_SERCOM5_PAD0)
|
||||
#define PORT_PA22D_SERCOM5_PAD0 (1u << 22)
|
||||
#define PIN_PB02D_SERCOM5_PAD0 34 /**< \brief SERCOM5 signal: PAD0 on PB02 mux D */
|
||||
#define MUX_PB02D_SERCOM5_PAD0 3
|
||||
#define PINMUX_PB02D_SERCOM5_PAD0 ((PIN_PB02D_SERCOM5_PAD0 << 16) | MUX_PB02D_SERCOM5_PAD0)
|
||||
#define PORT_PB02D_SERCOM5_PAD0 (1u << 2)
|
||||
#define PIN_PA23D_SERCOM5_PAD1 23 /**< \brief SERCOM5 signal: PAD1 on PA23 mux D */
|
||||
#define MUX_PA23D_SERCOM5_PAD1 3
|
||||
#define PINMUX_PA23D_SERCOM5_PAD1 ((PIN_PA23D_SERCOM5_PAD1 << 16) | MUX_PA23D_SERCOM5_PAD1)
|
||||
#define PORT_PA23D_SERCOM5_PAD1 (1u << 23)
|
||||
#define PIN_PB03D_SERCOM5_PAD1 35 /**< \brief SERCOM5 signal: PAD1 on PB03 mux D */
|
||||
#define MUX_PB03D_SERCOM5_PAD1 3
|
||||
#define PINMUX_PB03D_SERCOM5_PAD1 ((PIN_PB03D_SERCOM5_PAD1 << 16) | MUX_PB03D_SERCOM5_PAD1)
|
||||
#define PORT_PB03D_SERCOM5_PAD1 (1u << 3)
|
||||
#define PIN_PA24D_SERCOM5_PAD2 24 /**< \brief SERCOM5 signal: PAD2 on PA24 mux D */
|
||||
#define MUX_PA24D_SERCOM5_PAD2 3
|
||||
#define PINMUX_PA24D_SERCOM5_PAD2 ((PIN_PA24D_SERCOM5_PAD2 << 16) | MUX_PA24D_SERCOM5_PAD2)
|
||||
#define PORT_PA24D_SERCOM5_PAD2 (1u << 24)
|
||||
#define PIN_PB22D_SERCOM5_PAD2 54 /**< \brief SERCOM5 signal: PAD2 on PB22 mux D */
|
||||
#define MUX_PB22D_SERCOM5_PAD2 3
|
||||
#define PINMUX_PB22D_SERCOM5_PAD2 ((PIN_PB22D_SERCOM5_PAD2 << 16) | MUX_PB22D_SERCOM5_PAD2)
|
||||
#define PORT_PB22D_SERCOM5_PAD2 (1u << 22)
|
||||
#define PIN_PA20C_SERCOM5_PAD2 20 /**< \brief SERCOM5 signal: PAD2 on PA20 mux C */
|
||||
#define MUX_PA20C_SERCOM5_PAD2 2
|
||||
#define PINMUX_PA20C_SERCOM5_PAD2 ((PIN_PA20C_SERCOM5_PAD2 << 16) | MUX_PA20C_SERCOM5_PAD2)
|
||||
#define PORT_PA20C_SERCOM5_PAD2 (1u << 20)
|
||||
#define PIN_PA25D_SERCOM5_PAD3 25 /**< \brief SERCOM5 signal: PAD3 on PA25 mux D */
|
||||
#define MUX_PA25D_SERCOM5_PAD3 3
|
||||
#define PINMUX_PA25D_SERCOM5_PAD3 ((PIN_PA25D_SERCOM5_PAD3 << 16) | MUX_PA25D_SERCOM5_PAD3)
|
||||
#define PORT_PA25D_SERCOM5_PAD3 (1u << 25)
|
||||
#define PIN_PB23D_SERCOM5_PAD3 55 /**< \brief SERCOM5 signal: PAD3 on PB23 mux D */
|
||||
#define MUX_PB23D_SERCOM5_PAD3 3
|
||||
#define PINMUX_PB23D_SERCOM5_PAD3 ((PIN_PB23D_SERCOM5_PAD3 << 16) | MUX_PB23D_SERCOM5_PAD3)
|
||||
#define PORT_PB23D_SERCOM5_PAD3 (1u << 23)
|
||||
#define PIN_PA21C_SERCOM5_PAD3 21 /**< \brief SERCOM5 signal: PAD3 on PA21 mux C */
|
||||
#define MUX_PA21C_SERCOM5_PAD3 2
|
||||
#define PINMUX_PA21C_SERCOM5_PAD3 ((PIN_PA21C_SERCOM5_PAD3 << 16) | MUX_PA21C_SERCOM5_PAD3)
|
||||
#define PORT_PA21C_SERCOM5_PAD3 (1u << 21)
|
||||
/* ========== PORT definition for TC0 peripheral ========== */
|
||||
#define PIN_PA04F_TC0_WO0 4 /**< \brief TC0 signal: WO0 on PA04 mux F */
|
||||
#define MUX_PA04F_TC0_WO0 5
|
||||
#define PINMUX_PA04F_TC0_WO0 ((PIN_PA04F_TC0_WO0 << 16) | MUX_PA04F_TC0_WO0)
|
||||
#define PORT_PA04F_TC0_WO0 (1u << 4)
|
||||
#define PIN_PA08E_TC0_WO0 8 /**< \brief TC0 signal: WO0 on PA08 mux E */
|
||||
#define MUX_PA08E_TC0_WO0 4
|
||||
#define PINMUX_PA08E_TC0_WO0 ((PIN_PA08E_TC0_WO0 << 16) | MUX_PA08E_TC0_WO0)
|
||||
#define PORT_PA08E_TC0_WO0 (1u << 8)
|
||||
#define PIN_PA05F_TC0_WO1 5 /**< \brief TC0 signal: WO1 on PA05 mux F */
|
||||
#define MUX_PA05F_TC0_WO1 5
|
||||
#define PINMUX_PA05F_TC0_WO1 ((PIN_PA05F_TC0_WO1 << 16) | MUX_PA05F_TC0_WO1)
|
||||
#define PORT_PA05F_TC0_WO1 (1u << 5)
|
||||
#define PIN_PA09E_TC0_WO1 9 /**< \brief TC0 signal: WO1 on PA09 mux E */
|
||||
#define MUX_PA09E_TC0_WO1 4
|
||||
#define PINMUX_PA09E_TC0_WO1 ((PIN_PA09E_TC0_WO1 << 16) | MUX_PA09E_TC0_WO1)
|
||||
#define PORT_PA09E_TC0_WO1 (1u << 9)
|
||||
/* ========== PORT definition for TC1 peripheral ========== */
|
||||
#define PIN_PA06F_TC1_WO0 6 /**< \brief TC1 signal: WO0 on PA06 mux F */
|
||||
#define MUX_PA06F_TC1_WO0 5
|
||||
#define PINMUX_PA06F_TC1_WO0 ((PIN_PA06F_TC1_WO0 << 16) | MUX_PA06F_TC1_WO0)
|
||||
#define PORT_PA06F_TC1_WO0 (1u << 6)
|
||||
#define PIN_PA30F_TC1_WO0 30 /**< \brief TC1 signal: WO0 on PA30 mux F */
|
||||
#define MUX_PA30F_TC1_WO0 5
|
||||
#define PINMUX_PA30F_TC1_WO0 ((PIN_PA30F_TC1_WO0 << 16) | MUX_PA30F_TC1_WO0)
|
||||
#define PORT_PA30F_TC1_WO0 (1u << 30)
|
||||
#define PIN_PA10E_TC1_WO0 10 /**< \brief TC1 signal: WO0 on PA10 mux E */
|
||||
#define MUX_PA10E_TC1_WO0 4
|
||||
#define PINMUX_PA10E_TC1_WO0 ((PIN_PA10E_TC1_WO0 << 16) | MUX_PA10E_TC1_WO0)
|
||||
#define PORT_PA10E_TC1_WO0 (1u << 10)
|
||||
#define PIN_PA07F_TC1_WO1 7 /**< \brief TC1 signal: WO1 on PA07 mux F */
|
||||
#define MUX_PA07F_TC1_WO1 5
|
||||
#define PINMUX_PA07F_TC1_WO1 ((PIN_PA07F_TC1_WO1 << 16) | MUX_PA07F_TC1_WO1)
|
||||
#define PORT_PA07F_TC1_WO1 (1u << 7)
|
||||
#define PIN_PA31F_TC1_WO1 31 /**< \brief TC1 signal: WO1 on PA31 mux F */
|
||||
#define MUX_PA31F_TC1_WO1 5
|
||||
#define PINMUX_PA31F_TC1_WO1 ((PIN_PA31F_TC1_WO1 << 16) | MUX_PA31F_TC1_WO1)
|
||||
#define PORT_PA31F_TC1_WO1 (1u << 31)
|
||||
#define PIN_PA11E_TC1_WO1 11 /**< \brief TC1 signal: WO1 on PA11 mux E */
|
||||
#define MUX_PA11E_TC1_WO1 4
|
||||
#define PINMUX_PA11E_TC1_WO1 ((PIN_PA11E_TC1_WO1 << 16) | MUX_PA11E_TC1_WO1)
|
||||
#define PORT_PA11E_TC1_WO1 (1u << 11)
|
||||
/* ========== PORT definition for TC2 peripheral ========== */
|
||||
#define PIN_PA16F_TC2_WO0 16 /**< \brief TC2 signal: WO0 on PA16 mux F */
|
||||
#define MUX_PA16F_TC2_WO0 5
|
||||
#define PINMUX_PA16F_TC2_WO0 ((PIN_PA16F_TC2_WO0 << 16) | MUX_PA16F_TC2_WO0)
|
||||
#define PORT_PA16F_TC2_WO0 (1u << 16)
|
||||
#define PIN_PA12E_TC2_WO0 12 /**< \brief TC2 signal: WO0 on PA12 mux E */
|
||||
#define MUX_PA12E_TC2_WO0 4
|
||||
#define PINMUX_PA12E_TC2_WO0 ((PIN_PA12E_TC2_WO0 << 16) | MUX_PA12E_TC2_WO0)
|
||||
#define PORT_PA12E_TC2_WO0 (1u << 12)
|
||||
#define PIN_PA00F_TC2_WO0 0 /**< \brief TC2 signal: WO0 on PA00 mux F */
|
||||
#define MUX_PA00F_TC2_WO0 5
|
||||
#define PINMUX_PA00F_TC2_WO0 ((PIN_PA00F_TC2_WO0 << 16) | MUX_PA00F_TC2_WO0)
|
||||
#define PORT_PA00F_TC2_WO0 (1u << 0)
|
||||
#define PIN_PA17F_TC2_WO1 17 /**< \brief TC2 signal: WO1 on PA17 mux F */
|
||||
#define MUX_PA17F_TC2_WO1 5
|
||||
#define PINMUX_PA17F_TC2_WO1 ((PIN_PA17F_TC2_WO1 << 16) | MUX_PA17F_TC2_WO1)
|
||||
#define PORT_PA17F_TC2_WO1 (1u << 17)
|
||||
#define PIN_PA13E_TC2_WO1 13 /**< \brief TC2 signal: WO1 on PA13 mux E */
|
||||
#define MUX_PA13E_TC2_WO1 4
|
||||
#define PINMUX_PA13E_TC2_WO1 ((PIN_PA13E_TC2_WO1 << 16) | MUX_PA13E_TC2_WO1)
|
||||
#define PORT_PA13E_TC2_WO1 (1u << 13)
|
||||
#define PIN_PA01F_TC2_WO1 1 /**< \brief TC2 signal: WO1 on PA01 mux F */
|
||||
#define MUX_PA01F_TC2_WO1 5
|
||||
#define PINMUX_PA01F_TC2_WO1 ((PIN_PA01F_TC2_WO1 << 16) | MUX_PA01F_TC2_WO1)
|
||||
#define PORT_PA01F_TC2_WO1 (1u << 1)
|
||||
/* ========== PORT definition for TC3 peripheral ========== */
|
||||
#define PIN_PA18F_TC3_WO0 18 /**< \brief TC3 signal: WO0 on PA18 mux F */
|
||||
#define MUX_PA18F_TC3_WO0 5
|
||||
#define PINMUX_PA18F_TC3_WO0 ((PIN_PA18F_TC3_WO0 << 16) | MUX_PA18F_TC3_WO0)
|
||||
#define PORT_PA18F_TC3_WO0 (1u << 18)
|
||||
#define PIN_PA14E_TC3_WO0 14 /**< \brief TC3 signal: WO0 on PA14 mux E */
|
||||
#define MUX_PA14E_TC3_WO0 4
|
||||
#define PINMUX_PA14E_TC3_WO0 ((PIN_PA14E_TC3_WO0 << 16) | MUX_PA14E_TC3_WO0)
|
||||
#define PORT_PA14E_TC3_WO0 (1u << 14)
|
||||
#define PIN_PA19F_TC3_WO1 19 /**< \brief TC3 signal: WO1 on PA19 mux F */
|
||||
#define MUX_PA19F_TC3_WO1 5
|
||||
#define PINMUX_PA19F_TC3_WO1 ((PIN_PA19F_TC3_WO1 << 16) | MUX_PA19F_TC3_WO1)
|
||||
#define PORT_PA19F_TC3_WO1 (1u << 19)
|
||||
#define PIN_PA15E_TC3_WO1 15 /**< \brief TC3 signal: WO1 on PA15 mux E */
|
||||
#define MUX_PA15E_TC3_WO1 4
|
||||
#define PINMUX_PA15E_TC3_WO1 ((PIN_PA15E_TC3_WO1 << 16) | MUX_PA15E_TC3_WO1)
|
||||
#define PORT_PA15E_TC3_WO1 (1u << 15)
|
||||
/* ========== PORT definition for TC4 peripheral ========== */
|
||||
#define PIN_PA22F_TC4_WO0 22 /**< \brief TC4 signal: WO0 on PA22 mux F */
|
||||
#define MUX_PA22F_TC4_WO0 5
|
||||
#define PINMUX_PA22F_TC4_WO0 ((PIN_PA22F_TC4_WO0 << 16) | MUX_PA22F_TC4_WO0)
|
||||
#define PORT_PA22F_TC4_WO0 (1u << 22)
|
||||
#define PIN_PB08F_TC4_WO0 40 /**< \brief TC4 signal: WO0 on PB08 mux F */
|
||||
#define MUX_PB08F_TC4_WO0 5
|
||||
#define PINMUX_PB08F_TC4_WO0 ((PIN_PB08F_TC4_WO0 << 16) | MUX_PB08F_TC4_WO0)
|
||||
#define PORT_PB08F_TC4_WO0 (1u << 8)
|
||||
#define PIN_PA23F_TC4_WO1 23 /**< \brief TC4 signal: WO1 on PA23 mux F */
|
||||
#define MUX_PA23F_TC4_WO1 5
|
||||
#define PINMUX_PA23F_TC4_WO1 ((PIN_PA23F_TC4_WO1 << 16) | MUX_PA23F_TC4_WO1)
|
||||
#define PORT_PA23F_TC4_WO1 (1u << 23)
|
||||
#define PIN_PB09F_TC4_WO1 41 /**< \brief TC4 signal: WO1 on PB09 mux F */
|
||||
#define MUX_PB09F_TC4_WO1 5
|
||||
#define PINMUX_PB09F_TC4_WO1 ((PIN_PB09F_TC4_WO1 << 16) | MUX_PB09F_TC4_WO1)
|
||||
#define PORT_PB09F_TC4_WO1 (1u << 9)
|
||||
/* ========== PORT definition for TC5 peripheral ========== */
|
||||
#define PIN_PA24F_TC5_WO0 24 /**< \brief TC5 signal: WO0 on PA24 mux F */
|
||||
#define MUX_PA24F_TC5_WO0 5
|
||||
#define PINMUX_PA24F_TC5_WO0 ((PIN_PA24F_TC5_WO0 << 16) | MUX_PA24F_TC5_WO0)
|
||||
#define PORT_PA24F_TC5_WO0 (1u << 24)
|
||||
#define PIN_PB10F_TC5_WO0 42 /**< \brief TC5 signal: WO0 on PB10 mux F */
|
||||
#define MUX_PB10F_TC5_WO0 5
|
||||
#define PINMUX_PB10F_TC5_WO0 ((PIN_PB10F_TC5_WO0 << 16) | MUX_PB10F_TC5_WO0)
|
||||
#define PORT_PB10F_TC5_WO0 (1u << 10)
|
||||
#define PIN_PA25F_TC5_WO1 25 /**< \brief TC5 signal: WO1 on PA25 mux F */
|
||||
#define MUX_PA25F_TC5_WO1 5
|
||||
#define PINMUX_PA25F_TC5_WO1 ((PIN_PA25F_TC5_WO1 << 16) | MUX_PA25F_TC5_WO1)
|
||||
#define PORT_PA25F_TC5_WO1 (1u << 25)
|
||||
#define PIN_PB11F_TC5_WO1 43 /**< \brief TC5 signal: WO1 on PB11 mux F */
|
||||
#define MUX_PB11F_TC5_WO1 5
|
||||
#define PINMUX_PB11F_TC5_WO1 ((PIN_PB11F_TC5_WO1 << 16) | MUX_PB11F_TC5_WO1)
|
||||
#define PORT_PB11F_TC5_WO1 (1u << 11)
|
||||
/* ========== PORT definition for TC6 peripheral ========== */
|
||||
#define PIN_PB02F_TC6_WO0 34 /**< \brief TC6 signal: WO0 on PB02 mux F */
|
||||
#define MUX_PB02F_TC6_WO0 5
|
||||
#define PINMUX_PB02F_TC6_WO0 ((PIN_PB02F_TC6_WO0 << 16) | MUX_PB02F_TC6_WO0)
|
||||
#define PORT_PB02F_TC6_WO0 (1u << 2)
|
||||
#define PIN_PB03F_TC6_WO1 35 /**< \brief TC6 signal: WO1 on PB03 mux F */
|
||||
#define MUX_PB03F_TC6_WO1 5
|
||||
#define PINMUX_PB03F_TC6_WO1 ((PIN_PB03F_TC6_WO1 << 16) | MUX_PB03F_TC6_WO1)
|
||||
#define PORT_PB03F_TC6_WO1 (1u << 3)
|
||||
/* ========== PORT definition for TC7 peripheral ========== */
|
||||
#define PIN_PB22F_TC7_WO0 54 /**< \brief TC7 signal: WO0 on PB22 mux F */
|
||||
#define MUX_PB22F_TC7_WO0 5
|
||||
#define PINMUX_PB22F_TC7_WO0 ((PIN_PB22F_TC7_WO0 << 16) | MUX_PB22F_TC7_WO0)
|
||||
#define PORT_PB22F_TC7_WO0 (1u << 22)
|
||||
#define PIN_PA20E_TC7_WO0 20 /**< \brief TC7 signal: WO0 on PA20 mux E */
|
||||
#define MUX_PA20E_TC7_WO0 4
|
||||
#define PINMUX_PA20E_TC7_WO0 ((PIN_PA20E_TC7_WO0 << 16) | MUX_PA20E_TC7_WO0)
|
||||
#define PORT_PA20E_TC7_WO0 (1u << 20)
|
||||
#define PIN_PB23F_TC7_WO1 55 /**< \brief TC7 signal: WO1 on PB23 mux F */
|
||||
#define MUX_PB23F_TC7_WO1 5
|
||||
#define PINMUX_PB23F_TC7_WO1 ((PIN_PB23F_TC7_WO1 << 16) | MUX_PB23F_TC7_WO1)
|
||||
#define PORT_PB23F_TC7_WO1 (1u << 23)
|
||||
#define PIN_PA21E_TC7_WO1 21 /**< \brief TC7 signal: WO1 on PA21 mux E */
|
||||
#define MUX_PA21E_TC7_WO1 4
|
||||
#define PINMUX_PA21E_TC7_WO1 ((PIN_PA21E_TC7_WO1 << 16) | MUX_PA21E_TC7_WO1)
|
||||
#define PORT_PA21E_TC7_WO1 (1u << 21)
|
||||
/* ========== PORT definition for ADC peripheral ========== */
|
||||
#define PIN_PA02B_ADC_AIN0 2 /**< \brief ADC signal: AIN0 on PA02 mux B */
|
||||
#define MUX_PA02B_ADC_AIN0 1
|
||||
#define PINMUX_PA02B_ADC_AIN0 ((PIN_PA02B_ADC_AIN0 << 16) | MUX_PA02B_ADC_AIN0)
|
||||
#define PORT_PA02B_ADC_AIN0 (1u << 2)
|
||||
#define PIN_PA03B_ADC_AIN1 3 /**< \brief ADC signal: AIN1 on PA03 mux B */
|
||||
#define MUX_PA03B_ADC_AIN1 1
|
||||
#define PINMUX_PA03B_ADC_AIN1 ((PIN_PA03B_ADC_AIN1 << 16) | MUX_PA03B_ADC_AIN1)
|
||||
#define PORT_PA03B_ADC_AIN1 (1u << 3)
|
||||
#define PIN_PB08B_ADC_AIN2 40 /**< \brief ADC signal: AIN2 on PB08 mux B */
|
||||
#define MUX_PB08B_ADC_AIN2 1
|
||||
#define PINMUX_PB08B_ADC_AIN2 ((PIN_PB08B_ADC_AIN2 << 16) | MUX_PB08B_ADC_AIN2)
|
||||
#define PORT_PB08B_ADC_AIN2 (1u << 8)
|
||||
#define PIN_PB09B_ADC_AIN3 41 /**< \brief ADC signal: AIN3 on PB09 mux B */
|
||||
#define MUX_PB09B_ADC_AIN3 1
|
||||
#define PINMUX_PB09B_ADC_AIN3 ((PIN_PB09B_ADC_AIN3 << 16) | MUX_PB09B_ADC_AIN3)
|
||||
#define PORT_PB09B_ADC_AIN3 (1u << 9)
|
||||
#define PIN_PA04B_ADC_AIN4 4 /**< \brief ADC signal: AIN4 on PA04 mux B */
|
||||
#define MUX_PA04B_ADC_AIN4 1
|
||||
#define PINMUX_PA04B_ADC_AIN4 ((PIN_PA04B_ADC_AIN4 << 16) | MUX_PA04B_ADC_AIN4)
|
||||
#define PORT_PA04B_ADC_AIN4 (1u << 4)
|
||||
#define PIN_PA05B_ADC_AIN5 5 /**< \brief ADC signal: AIN5 on PA05 mux B */
|
||||
#define MUX_PA05B_ADC_AIN5 1
|
||||
#define PINMUX_PA05B_ADC_AIN5 ((PIN_PA05B_ADC_AIN5 << 16) | MUX_PA05B_ADC_AIN5)
|
||||
#define PORT_PA05B_ADC_AIN5 (1u << 5)
|
||||
#define PIN_PA06B_ADC_AIN6 6 /**< \brief ADC signal: AIN6 on PA06 mux B */
|
||||
#define MUX_PA06B_ADC_AIN6 1
|
||||
#define PINMUX_PA06B_ADC_AIN6 ((PIN_PA06B_ADC_AIN6 << 16) | MUX_PA06B_ADC_AIN6)
|
||||
#define PORT_PA06B_ADC_AIN6 (1u << 6)
|
||||
#define PIN_PA07B_ADC_AIN7 7 /**< \brief ADC signal: AIN7 on PA07 mux B */
|
||||
#define MUX_PA07B_ADC_AIN7 1
|
||||
#define PINMUX_PA07B_ADC_AIN7 ((PIN_PA07B_ADC_AIN7 << 16) | MUX_PA07B_ADC_AIN7)
|
||||
#define PORT_PA07B_ADC_AIN7 (1u << 7)
|
||||
#define PIN_PB02B_ADC_AIN10 34 /**< \brief ADC signal: AIN10 on PB02 mux B */
|
||||
#define MUX_PB02B_ADC_AIN10 1
|
||||
#define PINMUX_PB02B_ADC_AIN10 ((PIN_PB02B_ADC_AIN10 << 16) | MUX_PB02B_ADC_AIN10)
|
||||
#define PORT_PB02B_ADC_AIN10 (1u << 2)
|
||||
#define PIN_PB03B_ADC_AIN11 35 /**< \brief ADC signal: AIN11 on PB03 mux B */
|
||||
#define MUX_PB03B_ADC_AIN11 1
|
||||
#define PINMUX_PB03B_ADC_AIN11 ((PIN_PB03B_ADC_AIN11 << 16) | MUX_PB03B_ADC_AIN11)
|
||||
#define PORT_PB03B_ADC_AIN11 (1u << 3)
|
||||
#define PIN_PA08B_ADC_AIN16 8 /**< \brief ADC signal: AIN16 on PA08 mux B */
|
||||
#define MUX_PA08B_ADC_AIN16 1
|
||||
#define PINMUX_PA08B_ADC_AIN16 ((PIN_PA08B_ADC_AIN16 << 16) | MUX_PA08B_ADC_AIN16)
|
||||
#define PORT_PA08B_ADC_AIN16 (1u << 8)
|
||||
#define PIN_PA09B_ADC_AIN17 9 /**< \brief ADC signal: AIN17 on PA09 mux B */
|
||||
#define MUX_PA09B_ADC_AIN17 1
|
||||
#define PINMUX_PA09B_ADC_AIN17 ((PIN_PA09B_ADC_AIN17 << 16) | MUX_PA09B_ADC_AIN17)
|
||||
#define PORT_PA09B_ADC_AIN17 (1u << 9)
|
||||
#define PIN_PA10B_ADC_AIN18 10 /**< \brief ADC signal: AIN18 on PA10 mux B */
|
||||
#define MUX_PA10B_ADC_AIN18 1
|
||||
#define PINMUX_PA10B_ADC_AIN18 ((PIN_PA10B_ADC_AIN18 << 16) | MUX_PA10B_ADC_AIN18)
|
||||
#define PORT_PA10B_ADC_AIN18 (1u << 10)
|
||||
#define PIN_PA11B_ADC_AIN19 11 /**< \brief ADC signal: AIN19 on PA11 mux B */
|
||||
#define MUX_PA11B_ADC_AIN19 1
|
||||
#define PINMUX_PA11B_ADC_AIN19 ((PIN_PA11B_ADC_AIN19 << 16) | MUX_PA11B_ADC_AIN19)
|
||||
#define PORT_PA11B_ADC_AIN19 (1u << 11)
|
||||
#define PIN_PA04B_ADC_VREFP 4 /**< \brief ADC signal: VREFP on PA04 mux B */
|
||||
#define MUX_PA04B_ADC_VREFP 1
|
||||
#define PINMUX_PA04B_ADC_VREFP ((PIN_PA04B_ADC_VREFP << 16) | MUX_PA04B_ADC_VREFP)
|
||||
#define PORT_PA04B_ADC_VREFP (1u << 4)
|
||||
/* ========== PORT definition for AC peripheral ========== */
|
||||
#define PIN_PA04B_AC_AIN0 4 /**< \brief AC signal: AIN0 on PA04 mux B */
|
||||
#define MUX_PA04B_AC_AIN0 1
|
||||
#define PINMUX_PA04B_AC_AIN0 ((PIN_PA04B_AC_AIN0 << 16) | MUX_PA04B_AC_AIN0)
|
||||
#define PORT_PA04B_AC_AIN0 (1u << 4)
|
||||
#define PIN_PA05B_AC_AIN1 5 /**< \brief AC signal: AIN1 on PA05 mux B */
|
||||
#define MUX_PA05B_AC_AIN1 1
|
||||
#define PINMUX_PA05B_AC_AIN1 ((PIN_PA05B_AC_AIN1 << 16) | MUX_PA05B_AC_AIN1)
|
||||
#define PORT_PA05B_AC_AIN1 (1u << 5)
|
||||
#define PIN_PA06B_AC_AIN2 6 /**< \brief AC signal: AIN2 on PA06 mux B */
|
||||
#define MUX_PA06B_AC_AIN2 1
|
||||
#define PINMUX_PA06B_AC_AIN2 ((PIN_PA06B_AC_AIN2 << 16) | MUX_PA06B_AC_AIN2)
|
||||
#define PORT_PA06B_AC_AIN2 (1u << 6)
|
||||
#define PIN_PA07B_AC_AIN3 7 /**< \brief AC signal: AIN3 on PA07 mux B */
|
||||
#define MUX_PA07B_AC_AIN3 1
|
||||
#define PINMUX_PA07B_AC_AIN3 ((PIN_PA07B_AC_AIN3 << 16) | MUX_PA07B_AC_AIN3)
|
||||
#define PORT_PA07B_AC_AIN3 (1u << 7)
|
||||
#define PIN_PA12H_AC_CMP0 12 /**< \brief AC signal: CMP0 on PA12 mux H */
|
||||
#define MUX_PA12H_AC_CMP0 7
|
||||
#define PINMUX_PA12H_AC_CMP0 ((PIN_PA12H_AC_CMP0 << 16) | MUX_PA12H_AC_CMP0)
|
||||
#define PORT_PA12H_AC_CMP0 (1u << 12)
|
||||
#define PIN_PA18H_AC_CMP0 18 /**< \brief AC signal: CMP0 on PA18 mux H */
|
||||
#define MUX_PA18H_AC_CMP0 7
|
||||
#define PINMUX_PA18H_AC_CMP0 ((PIN_PA18H_AC_CMP0 << 16) | MUX_PA18H_AC_CMP0)
|
||||
#define PORT_PA18H_AC_CMP0 (1u << 18)
|
||||
#define PIN_PA13H_AC_CMP1 13 /**< \brief AC signal: CMP1 on PA13 mux H */
|
||||
#define MUX_PA13H_AC_CMP1 7
|
||||
#define PINMUX_PA13H_AC_CMP1 ((PIN_PA13H_AC_CMP1 << 16) | MUX_PA13H_AC_CMP1)
|
||||
#define PORT_PA13H_AC_CMP1 (1u << 13)
|
||||
#define PIN_PA19H_AC_CMP1 19 /**< \brief AC signal: CMP1 on PA19 mux H */
|
||||
#define MUX_PA19H_AC_CMP1 7
|
||||
#define PINMUX_PA19H_AC_CMP1 ((PIN_PA19H_AC_CMP1 << 16) | MUX_PA19H_AC_CMP1)
|
||||
#define PORT_PA19H_AC_CMP1 (1u << 19)
|
||||
/* ========== PORT definition for DAC peripheral ========== */
|
||||
#define PIN_PA02B_DAC_VOUT 2 /**< \brief DAC signal: VOUT on PA02 mux B */
|
||||
#define MUX_PA02B_DAC_VOUT 1
|
||||
#define PINMUX_PA02B_DAC_VOUT ((PIN_PA02B_DAC_VOUT << 16) | MUX_PA02B_DAC_VOUT)
|
||||
#define PORT_PA02B_DAC_VOUT (1u << 2)
|
||||
#define PIN_PA03B_DAC_VREFP 3 /**< \brief DAC signal: VREFP on PA03 mux B */
|
||||
#define MUX_PA03B_DAC_VREFP 1
|
||||
#define PINMUX_PA03B_DAC_VREFP ((PIN_PA03B_DAC_VREFP << 16) | MUX_PA03B_DAC_VREFP)
|
||||
#define PORT_PA03B_DAC_VREFP (1u << 3)
|
||||
|
||||
#endif /* _SAMD20G18_PIO_ */
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue