Repostiory containing DAPLink source code with Reset Pin workaround for HANI_IOT board.
Upstream: https://github.com/ARMmbed/DAPLink
source/hic_hal/atmel/sam3u2c/component/usart.h@0:01f31e923fe2, 2020-04-07 (annotated)
- Committer:
- Pawel Zarembski
- Date:
- Tue Apr 07 12:55:42 2020 +0200
- Revision:
- 0:01f31e923fe2
hani: DAPLink with reset workaround
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Pawel Zarembski |
0:01f31e923fe2 | 1 | /* ---------------------------------------------------------------------------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 2 | /* Atmel Microcontroller Software Support */ |
Pawel Zarembski |
0:01f31e923fe2 | 3 | /* SAM Software Package License */ |
Pawel Zarembski |
0:01f31e923fe2 | 4 | /* ---------------------------------------------------------------------------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 5 | /* Copyright (c) %copyright_year%, Atmel Corporation */ |
Pawel Zarembski |
0:01f31e923fe2 | 6 | /* */ |
Pawel Zarembski |
0:01f31e923fe2 | 7 | /* All rights reserved. */ |
Pawel Zarembski |
0:01f31e923fe2 | 8 | /* */ |
Pawel Zarembski |
0:01f31e923fe2 | 9 | /* Redistribution and use in source and binary forms, with or without */ |
Pawel Zarembski |
0:01f31e923fe2 | 10 | /* modification, are permitted provided that the following condition is met: */ |
Pawel Zarembski |
0:01f31e923fe2 | 11 | /* */ |
Pawel Zarembski |
0:01f31e923fe2 | 12 | /* - Redistributions of source code must retain the above copyright notice, */ |
Pawel Zarembski |
0:01f31e923fe2 | 13 | /* this list of conditions and the disclaimer below. */ |
Pawel Zarembski |
0:01f31e923fe2 | 14 | /* */ |
Pawel Zarembski |
0:01f31e923fe2 | 15 | /* Atmel's name may not be used to endorse or promote products derived from */ |
Pawel Zarembski |
0:01f31e923fe2 | 16 | /* this software without specific prior written permission. */ |
Pawel Zarembski |
0:01f31e923fe2 | 17 | /* */ |
Pawel Zarembski |
0:01f31e923fe2 | 18 | /* DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR */ |
Pawel Zarembski |
0:01f31e923fe2 | 19 | /* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ |
Pawel Zarembski |
0:01f31e923fe2 | 20 | /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE */ |
Pawel Zarembski |
0:01f31e923fe2 | 21 | /* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, */ |
Pawel Zarembski |
0:01f31e923fe2 | 22 | /* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */ |
Pawel Zarembski |
0:01f31e923fe2 | 23 | /* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */ |
Pawel Zarembski |
0:01f31e923fe2 | 24 | /* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ |
Pawel Zarembski |
0:01f31e923fe2 | 25 | /* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */ |
Pawel Zarembski |
0:01f31e923fe2 | 26 | /* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, */ |
Pawel Zarembski |
0:01f31e923fe2 | 27 | /* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ |
Pawel Zarembski |
0:01f31e923fe2 | 28 | /* ---------------------------------------------------------------------------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 29 | |
Pawel Zarembski |
0:01f31e923fe2 | 30 | #ifndef _SAM3U_USART_COMPONENT_ |
Pawel Zarembski |
0:01f31e923fe2 | 31 | #define _SAM3U_USART_COMPONENT_ |
Pawel Zarembski |
0:01f31e923fe2 | 32 | |
Pawel Zarembski |
0:01f31e923fe2 | 33 | /* ============================================================================= */ |
Pawel Zarembski |
0:01f31e923fe2 | 34 | /** SOFTWARE API DEFINITION FOR Universal Synchronous Asynchronous Receiver Transmitter */ |
Pawel Zarembski |
0:01f31e923fe2 | 35 | /* ============================================================================= */ |
Pawel Zarembski |
0:01f31e923fe2 | 36 | /** \addtogroup SAM3U_USART Universal Synchronous Asynchronous Receiver Transmitter */ |
Pawel Zarembski |
0:01f31e923fe2 | 37 | /*@{*/ |
Pawel Zarembski |
0:01f31e923fe2 | 38 | |
Pawel Zarembski |
0:01f31e923fe2 | 39 | #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) |
Pawel Zarembski |
0:01f31e923fe2 | 40 | /** \brief Usart hardware registers */ |
Pawel Zarembski |
0:01f31e923fe2 | 41 | typedef struct { |
Pawel Zarembski |
0:01f31e923fe2 | 42 | WoReg US_CR; /**< \brief (Usart Offset: 0x0000) Control Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 43 | RwReg US_MR; /**< \brief (Usart Offset: 0x0004) Mode Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 44 | WoReg US_IER; /**< \brief (Usart Offset: 0x0008) Interrupt Enable Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 45 | WoReg US_IDR; /**< \brief (Usart Offset: 0x000C) Interrupt Disable Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 46 | RoReg US_IMR; /**< \brief (Usart Offset: 0x0010) Interrupt Mask Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 47 | RoReg US_CSR; /**< \brief (Usart Offset: 0x0014) Channel Status Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 48 | RoReg US_RHR; /**< \brief (Usart Offset: 0x0018) Receiver Holding Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 49 | WoReg US_THR; /**< \brief (Usart Offset: 0x001C) Transmitter Holding Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 50 | RwReg US_BRGR; /**< \brief (Usart Offset: 0x0020) Baud Rate Generator Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 51 | RwReg US_RTOR; /**< \brief (Usart Offset: 0x0024) Receiver Time-out Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 52 | RwReg US_TTGR; /**< \brief (Usart Offset: 0x0028) Transmitter Timeguard Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 53 | RoReg Reserved1[5]; |
Pawel Zarembski |
0:01f31e923fe2 | 54 | RwReg US_FIDI; /**< \brief (Usart Offset: 0x0040) FI DI Ratio Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 55 | RoReg US_NER; /**< \brief (Usart Offset: 0x0044) Number of Errors Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 56 | RoReg Reserved2[1]; |
Pawel Zarembski |
0:01f31e923fe2 | 57 | RwReg US_IF; /**< \brief (Usart Offset: 0x004C) IrDA Filter Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 58 | RwReg US_MAN; /**< \brief (Usart Offset: 0x0050) Manchester Encoder Decoder Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 59 | RoReg Reserved3[36]; |
Pawel Zarembski |
0:01f31e923fe2 | 60 | RwReg US_WPMR; /**< \brief (Usart Offset: 0xE4) Write Protect Mode Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 61 | RoReg US_WPSR; /**< \brief (Usart Offset: 0xE8) Write Protect Status Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 62 | RoReg Reserved4[5]; |
Pawel Zarembski |
0:01f31e923fe2 | 63 | RwReg US_RPR; /**< \brief (Usart Offset: 0x100) Receive Pointer Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 64 | RwReg US_RCR; /**< \brief (Usart Offset: 0x104) Receive Counter Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 65 | RwReg US_TPR; /**< \brief (Usart Offset: 0x108) Transmit Pointer Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 66 | RwReg US_TCR; /**< \brief (Usart Offset: 0x10C) Transmit Counter Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 67 | RwReg US_RNPR; /**< \brief (Usart Offset: 0x110) Receive Next Pointer Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 68 | RwReg US_RNCR; /**< \brief (Usart Offset: 0x114) Receive Next Counter Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 69 | RwReg US_TNPR; /**< \brief (Usart Offset: 0x118) Transmit Next Pointer Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 70 | RwReg US_TNCR; /**< \brief (Usart Offset: 0x11C) Transmit Next Counter Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 71 | WoReg US_PTCR; /**< \brief (Usart Offset: 0x120) Transfer Control Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 72 | RoReg US_PTSR; /**< \brief (Usart Offset: 0x124) Transfer Status Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 73 | } Usart; |
Pawel Zarembski |
0:01f31e923fe2 | 74 | #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ |
Pawel Zarembski |
0:01f31e923fe2 | 75 | /* -------- US_CR : (USART Offset: 0x0000) Control Register -------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 76 | #define US_CR_RSTRX (0x1u << 2) /**< \brief (US_CR) Reset Receiver */ |
Pawel Zarembski |
0:01f31e923fe2 | 77 | #define US_CR_RSTTX (0x1u << 3) /**< \brief (US_CR) Reset Transmitter */ |
Pawel Zarembski |
0:01f31e923fe2 | 78 | #define US_CR_RXEN (0x1u << 4) /**< \brief (US_CR) Receiver Enable */ |
Pawel Zarembski |
0:01f31e923fe2 | 79 | #define US_CR_RXDIS (0x1u << 5) /**< \brief (US_CR) Receiver Disable */ |
Pawel Zarembski |
0:01f31e923fe2 | 80 | #define US_CR_TXEN (0x1u << 6) /**< \brief (US_CR) Transmitter Enable */ |
Pawel Zarembski |
0:01f31e923fe2 | 81 | #define US_CR_TXDIS (0x1u << 7) /**< \brief (US_CR) Transmitter Disable */ |
Pawel Zarembski |
0:01f31e923fe2 | 82 | #define US_CR_RSTSTA (0x1u << 8) /**< \brief (US_CR) Reset Status Bits */ |
Pawel Zarembski |
0:01f31e923fe2 | 83 | #define US_CR_STTBRK (0x1u << 9) /**< \brief (US_CR) Start Break */ |
Pawel Zarembski |
0:01f31e923fe2 | 84 | #define US_CR_STPBRK (0x1u << 10) /**< \brief (US_CR) Stop Break */ |
Pawel Zarembski |
0:01f31e923fe2 | 85 | #define US_CR_STTTO (0x1u << 11) /**< \brief (US_CR) Start Time-out */ |
Pawel Zarembski |
0:01f31e923fe2 | 86 | #define US_CR_SENDA (0x1u << 12) /**< \brief (US_CR) Send Address */ |
Pawel Zarembski |
0:01f31e923fe2 | 87 | #define US_CR_RSTIT (0x1u << 13) /**< \brief (US_CR) Reset Iterations */ |
Pawel Zarembski |
0:01f31e923fe2 | 88 | #define US_CR_RSTNACK (0x1u << 14) /**< \brief (US_CR) Reset Non Acknowledge */ |
Pawel Zarembski |
0:01f31e923fe2 | 89 | #define US_CR_RETTO (0x1u << 15) /**< \brief (US_CR) Rearm Time-out */ |
Pawel Zarembski |
0:01f31e923fe2 | 90 | #define US_CR_DTREN (0x1u << 16) /**< \brief (US_CR) Data Terminal Ready Enable */ |
Pawel Zarembski |
0:01f31e923fe2 | 91 | #define US_CR_DTRDIS (0x1u << 17) /**< \brief (US_CR) Data Terminal Ready Disable */ |
Pawel Zarembski |
0:01f31e923fe2 | 92 | #define US_CR_RTSEN (0x1u << 18) /**< \brief (US_CR) Request to Send Enable */ |
Pawel Zarembski |
0:01f31e923fe2 | 93 | #define US_CR_RTSDIS (0x1u << 19) /**< \brief (US_CR) Request to Send Disable */ |
Pawel Zarembski |
0:01f31e923fe2 | 94 | #define US_CR_FCS (0x1u << 18) /**< \brief (US_CR) Force SPI Chip Select */ |
Pawel Zarembski |
0:01f31e923fe2 | 95 | #define US_CR_RCS (0x1u << 19) /**< \brief (US_CR) Release SPI Chip Select */ |
Pawel Zarembski |
0:01f31e923fe2 | 96 | /* -------- US_MR : (USART Offset: 0x0004) Mode Register -------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 97 | #define US_MR_USART_MODE_Pos 0 |
Pawel Zarembski |
0:01f31e923fe2 | 98 | #define US_MR_USART_MODE_Msk (0xfu << US_MR_USART_MODE_Pos) /**< \brief (US_MR) USART Mode of Operation */ |
Pawel Zarembski |
0:01f31e923fe2 | 99 | #define US_MR_USART_MODE_NORMAL (0x0u << 0) /**< \brief (US_MR) Normal mode */ |
Pawel Zarembski |
0:01f31e923fe2 | 100 | #define US_MR_USART_MODE_RS485 (0x1u << 0) /**< \brief (US_MR) RS485 */ |
Pawel Zarembski |
0:01f31e923fe2 | 101 | #define US_MR_USART_MODE_HW_HANDSHAKING (0x2u << 0) /**< \brief (US_MR) Hardware Handshaking */ |
Pawel Zarembski |
0:01f31e923fe2 | 102 | #define US_MR_USART_MODE_MODEM (0x3u << 0) /**< \brief (US_MR) Modem */ |
Pawel Zarembski |
0:01f31e923fe2 | 103 | #define US_MR_USART_MODE_IS07816_T_0 (0x4u << 0) /**< \brief (US_MR) IS07816 Protocol: T = 0 */ |
Pawel Zarembski |
0:01f31e923fe2 | 104 | #define US_MR_USART_MODE_IS07816_T_1 (0x6u << 0) /**< \brief (US_MR) IS07816 Protocol: T = 1 */ |
Pawel Zarembski |
0:01f31e923fe2 | 105 | #define US_MR_USART_MODE_IRDA (0x8u << 0) /**< \brief (US_MR) IrDA */ |
Pawel Zarembski |
0:01f31e923fe2 | 106 | #define US_MR_USART_MODE_SPI_MASTER (0xEu << 0) /**< \brief (US_MR) SPI Master */ |
Pawel Zarembski |
0:01f31e923fe2 | 107 | #define US_MR_USART_MODE_SPI_SLAVE (0xFu << 0) /**< \brief (US_MR) SPI Slave */ |
Pawel Zarembski |
0:01f31e923fe2 | 108 | #define US_MR_USCLKS_Pos 4 |
Pawel Zarembski |
0:01f31e923fe2 | 109 | #define US_MR_USCLKS_Msk (0x3u << US_MR_USCLKS_Pos) /**< \brief (US_MR) Clock Selection */ |
Pawel Zarembski |
0:01f31e923fe2 | 110 | #define US_MR_USCLKS_MCK (0x0u << 4) /**< \brief (US_MR) Master Clock MCK is selected */ |
Pawel Zarembski |
0:01f31e923fe2 | 111 | #define US_MR_USCLKS_DIV (0x1u << 4) /**< \brief (US_MR) Internal Clock Divided MCK/DIV (DIV=8) is selected */ |
Pawel Zarembski |
0:01f31e923fe2 | 112 | #define US_MR_USCLKS_SCK (0x3u << 4) /**< \brief (US_MR) Serial Clock SLK is selected */ |
Pawel Zarembski |
0:01f31e923fe2 | 113 | #define US_MR_CHRL_Pos 6 |
Pawel Zarembski |
0:01f31e923fe2 | 114 | #define US_MR_CHRL_Msk (0x3u << US_MR_CHRL_Pos) /**< \brief (US_MR) Character Length. */ |
Pawel Zarembski |
0:01f31e923fe2 | 115 | #define US_MR_CHRL_5_BIT (0x0u << 6) /**< \brief (US_MR) Character length is 5 bits */ |
Pawel Zarembski |
0:01f31e923fe2 | 116 | #define US_MR_CHRL_6_BIT (0x1u << 6) /**< \brief (US_MR) Character length is 6 bits */ |
Pawel Zarembski |
0:01f31e923fe2 | 117 | #define US_MR_CHRL_7_BIT (0x2u << 6) /**< \brief (US_MR) Character length is 7 bits */ |
Pawel Zarembski |
0:01f31e923fe2 | 118 | #define US_MR_CHRL_8_BIT (0x3u << 6) /**< \brief (US_MR) Character length is 8 bits */ |
Pawel Zarembski |
0:01f31e923fe2 | 119 | #define US_MR_SYNC (0x1u << 8) /**< \brief (US_MR) Synchronous Mode Select */ |
Pawel Zarembski |
0:01f31e923fe2 | 120 | #define US_MR_PAR_Pos 9 |
Pawel Zarembski |
0:01f31e923fe2 | 121 | #define US_MR_PAR_Msk (0x7u << US_MR_PAR_Pos) /**< \brief (US_MR) Parity Type */ |
Pawel Zarembski |
0:01f31e923fe2 | 122 | #define US_MR_PAR_EVEN (0x0u << 9) /**< \brief (US_MR) Even parity */ |
Pawel Zarembski |
0:01f31e923fe2 | 123 | #define US_MR_PAR_ODD (0x1u << 9) /**< \brief (US_MR) Odd parity */ |
Pawel Zarembski |
0:01f31e923fe2 | 124 | #define US_MR_PAR_SPACE (0x2u << 9) /**< \brief (US_MR) Parity forced to 0 (Space) */ |
Pawel Zarembski |
0:01f31e923fe2 | 125 | #define US_MR_PAR_MARK (0x3u << 9) /**< \brief (US_MR) Parity forced to 1 (Mark) */ |
Pawel Zarembski |
0:01f31e923fe2 | 126 | #define US_MR_PAR_NO (0x4u << 9) /**< \brief (US_MR) No parity */ |
Pawel Zarembski |
0:01f31e923fe2 | 127 | #define US_MR_PAR_MULTIDROP (0x6u << 9) /**< \brief (US_MR) Multidrop mode */ |
Pawel Zarembski |
0:01f31e923fe2 | 128 | #define US_MR_NBSTOP_Pos 12 |
Pawel Zarembski |
0:01f31e923fe2 | 129 | #define US_MR_NBSTOP_Msk (0x3u << US_MR_NBSTOP_Pos) /**< \brief (US_MR) Number of Stop Bits */ |
Pawel Zarembski |
0:01f31e923fe2 | 130 | #define US_MR_NBSTOP_1_BIT (0x0u << 12) /**< \brief (US_MR) 1 stop bit */ |
Pawel Zarembski |
0:01f31e923fe2 | 131 | #define US_MR_NBSTOP_1_5_BIT (0x1u << 12) /**< \brief (US_MR) 1.5 stop bit (SYNC = 0) or reserved (SYNC = 1) */ |
Pawel Zarembski |
0:01f31e923fe2 | 132 | #define US_MR_NBSTOP_2_BIT (0x2u << 12) /**< \brief (US_MR) 2 stop bits */ |
Pawel Zarembski |
0:01f31e923fe2 | 133 | #define US_MR_CHMODE_Pos 14 |
Pawel Zarembski |
0:01f31e923fe2 | 134 | #define US_MR_CHMODE_Msk (0x3u << US_MR_CHMODE_Pos) /**< \brief (US_MR) Channel Mode */ |
Pawel Zarembski |
0:01f31e923fe2 | 135 | #define US_MR_CHMODE_NORMAL (0x0u << 14) /**< \brief (US_MR) Normal Mode */ |
Pawel Zarembski |
0:01f31e923fe2 | 136 | #define US_MR_CHMODE_AUTOMATIC (0x1u << 14) /**< \brief (US_MR) Automatic Echo. Receiver input is connected to the TXD pin. */ |
Pawel Zarembski |
0:01f31e923fe2 | 137 | #define US_MR_CHMODE_LOCAL_LOOPBACK (0x2u << 14) /**< \brief (US_MR) Local Loopback. Transmitter output is connected to the Receiver Input. */ |
Pawel Zarembski |
0:01f31e923fe2 | 138 | #define US_MR_CHMODE_REMOTE_LOOPBACK (0x3u << 14) /**< \brief (US_MR) Remote Loopback. RXD pin is internally connected to the TXD pin. */ |
Pawel Zarembski |
0:01f31e923fe2 | 139 | #define US_MR_MSBF (0x1u << 16) /**< \brief (US_MR) Bit Order */ |
Pawel Zarembski |
0:01f31e923fe2 | 140 | #define US_MR_MODE9 (0x1u << 17) /**< \brief (US_MR) 9-bit Character Length */ |
Pawel Zarembski |
0:01f31e923fe2 | 141 | #define US_MR_CLKO (0x1u << 18) /**< \brief (US_MR) Clock Output Select */ |
Pawel Zarembski |
0:01f31e923fe2 | 142 | #define US_MR_OVER (0x1u << 19) /**< \brief (US_MR) Oversampling Mode */ |
Pawel Zarembski |
0:01f31e923fe2 | 143 | #define US_MR_INACK (0x1u << 20) /**< \brief (US_MR) Inhibit Non Acknowledge */ |
Pawel Zarembski |
0:01f31e923fe2 | 144 | #define US_MR_DSNACK (0x1u << 21) /**< \brief (US_MR) Disable Successive NACK */ |
Pawel Zarembski |
0:01f31e923fe2 | 145 | #define US_MR_VAR_SYNC (0x1u << 22) /**< \brief (US_MR) Variable Synchronization of Command/Data Sync Start Frame Delimiter */ |
Pawel Zarembski |
0:01f31e923fe2 | 146 | #define US_MR_INVDATA (0x1u << 23) /**< \brief (US_MR) INverted Data */ |
Pawel Zarembski |
0:01f31e923fe2 | 147 | #define US_MR_MAX_ITERATION_Pos 24 |
Pawel Zarembski |
0:01f31e923fe2 | 148 | #define US_MR_MAX_ITERATION_Msk (0x7u << US_MR_MAX_ITERATION_Pos) /**< \brief (US_MR) Maximum Number of Automatic Iteration */ |
Pawel Zarembski |
0:01f31e923fe2 | 149 | #define US_MR_MAX_ITERATION(value) ((US_MR_MAX_ITERATION_Msk & ((value) << US_MR_MAX_ITERATION_Pos))) |
Pawel Zarembski |
0:01f31e923fe2 | 150 | #define US_MR_FILTER (0x1u << 28) /**< \brief (US_MR) Infrared Receive Line Filter */ |
Pawel Zarembski |
0:01f31e923fe2 | 151 | #define US_MR_MAN (0x1u << 29) /**< \brief (US_MR) Manchester Encoder/Decoder Enable */ |
Pawel Zarembski |
0:01f31e923fe2 | 152 | #define US_MR_MODSYNC (0x1u << 30) /**< \brief (US_MR) Manchester Synchronization Mode */ |
Pawel Zarembski |
0:01f31e923fe2 | 153 | #define US_MR_ONEBIT (0x1u << 31) /**< \brief (US_MR) Start Frame Delimiter Selector */ |
Pawel Zarembski |
0:01f31e923fe2 | 154 | #define US_MR_CPHA (0x1u << 8) /**< \brief (US_MR) SPI Clock Phase */ |
Pawel Zarembski |
0:01f31e923fe2 | 155 | #define US_MR_CPOL (0x1u << 16) /**< \brief (US_MR) SPI Clock Polarity */ |
Pawel Zarembski |
0:01f31e923fe2 | 156 | #define US_MR_WRDBT (0x1u << 20) /**< \brief (US_MR) Wait Read Data Before Transfer */ |
Pawel Zarembski |
0:01f31e923fe2 | 157 | /* -------- US_IER : (USART Offset: 0x0008) Interrupt Enable Register -------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 158 | #define US_IER_RXRDY (0x1u << 0) /**< \brief (US_IER) RXRDY Interrupt Enable */ |
Pawel Zarembski |
0:01f31e923fe2 | 159 | #define US_IER_TXRDY (0x1u << 1) /**< \brief (US_IER) TXRDY Interrupt Enable */ |
Pawel Zarembski |
0:01f31e923fe2 | 160 | #define US_IER_RXBRK (0x1u << 2) /**< \brief (US_IER) Receiver Break Interrupt Enable */ |
Pawel Zarembski |
0:01f31e923fe2 | 161 | #define US_IER_ENDRX (0x1u << 3) /**< \brief (US_IER) End of Receive Transfer Interrupt Enable (available in all USART modes of operation) */ |
Pawel Zarembski |
0:01f31e923fe2 | 162 | #define US_IER_ENDTX (0x1u << 4) /**< \brief (US_IER) End of Transmit Interrupt Enable (available in all USART modes of operation) */ |
Pawel Zarembski |
0:01f31e923fe2 | 163 | #define US_IER_OVRE (0x1u << 5) /**< \brief (US_IER) Overrun Error Interrupt Enable */ |
Pawel Zarembski |
0:01f31e923fe2 | 164 | #define US_IER_FRAME (0x1u << 6) /**< \brief (US_IER) Framing Error Interrupt Enable */ |
Pawel Zarembski |
0:01f31e923fe2 | 165 | #define US_IER_PARE (0x1u << 7) /**< \brief (US_IER) Parity Error Interrupt Enable */ |
Pawel Zarembski |
0:01f31e923fe2 | 166 | #define US_IER_TIMEOUT (0x1u << 8) /**< \brief (US_IER) Time-out Interrupt Enable */ |
Pawel Zarembski |
0:01f31e923fe2 | 167 | #define US_IER_TXEMPTY (0x1u << 9) /**< \brief (US_IER) TXEMPTY Interrupt Enable */ |
Pawel Zarembski |
0:01f31e923fe2 | 168 | #define US_IER_ITER (0x1u << 10) /**< \brief (US_IER) Max number of Repetitions Reached Interrupt Enable */ |
Pawel Zarembski |
0:01f31e923fe2 | 169 | #define US_IER_TXBUFE (0x1u << 11) /**< \brief (US_IER) Buffer Empty Interrupt Enable (available in all USART modes of operation) */ |
Pawel Zarembski |
0:01f31e923fe2 | 170 | #define US_IER_RXBUFF (0x1u << 12) /**< \brief (US_IER) Buffer Full Interrupt Enable (available in all USART modes of operation) */ |
Pawel Zarembski |
0:01f31e923fe2 | 171 | #define US_IER_NACK (0x1u << 13) /**< \brief (US_IER) Non AcknowledgeInterrupt Enable */ |
Pawel Zarembski |
0:01f31e923fe2 | 172 | #define US_IER_RIIC (0x1u << 16) /**< \brief (US_IER) Ring Indicator Input Change Enable */ |
Pawel Zarembski |
0:01f31e923fe2 | 173 | #define US_IER_DSRIC (0x1u << 17) /**< \brief (US_IER) Data Set Ready Input Change Enable */ |
Pawel Zarembski |
0:01f31e923fe2 | 174 | #define US_IER_DCDIC (0x1u << 18) /**< \brief (US_IER) Data Carrier Detect Input Change Interrupt Enable */ |
Pawel Zarembski |
0:01f31e923fe2 | 175 | #define US_IER_CTSIC (0x1u << 19) /**< \brief (US_IER) Clear to Send Input Change Interrupt Enable */ |
Pawel Zarembski |
0:01f31e923fe2 | 176 | #define US_IER_MANE (0x1u << 24) /**< \brief (US_IER) Manchester Error Interrupt Enable */ |
Pawel Zarembski |
0:01f31e923fe2 | 177 | #define US_IER_UNRE (0x1u << 10) /**< \brief (US_IER) SPI Underrun Error Interrupt Enable */ |
Pawel Zarembski |
0:01f31e923fe2 | 178 | /* -------- US_IDR : (USART Offset: 0x000C) Interrupt Disable Register -------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 179 | #define US_IDR_RXRDY (0x1u << 0) /**< \brief (US_IDR) RXRDY Interrupt Disable */ |
Pawel Zarembski |
0:01f31e923fe2 | 180 | #define US_IDR_TXRDY (0x1u << 1) /**< \brief (US_IDR) TXRDY Interrupt Disable */ |
Pawel Zarembski |
0:01f31e923fe2 | 181 | #define US_IDR_RXBRK (0x1u << 2) /**< \brief (US_IDR) Receiver Break Interrupt Disable */ |
Pawel Zarembski |
0:01f31e923fe2 | 182 | #define US_IDR_ENDRX (0x1u << 3) /**< \brief (US_IDR) End of Receive Transfer Interrupt Disable (available in all USART modes of operation) */ |
Pawel Zarembski |
0:01f31e923fe2 | 183 | #define US_IDR_ENDTX (0x1u << 4) /**< \brief (US_IDR) End of Transmit Interrupt Disable (available in all USART modes of operation) */ |
Pawel Zarembski |
0:01f31e923fe2 | 184 | #define US_IDR_OVRE (0x1u << 5) /**< \brief (US_IDR) Overrun Error Interrupt Enable */ |
Pawel Zarembski |
0:01f31e923fe2 | 185 | #define US_IDR_FRAME (0x1u << 6) /**< \brief (US_IDR) Framing Error Interrupt Disable */ |
Pawel Zarembski |
0:01f31e923fe2 | 186 | #define US_IDR_PARE (0x1u << 7) /**< \brief (US_IDR) Parity Error Interrupt Disable */ |
Pawel Zarembski |
0:01f31e923fe2 | 187 | #define US_IDR_TIMEOUT (0x1u << 8) /**< \brief (US_IDR) Time-out Interrupt Disable */ |
Pawel Zarembski |
0:01f31e923fe2 | 188 | #define US_IDR_TXEMPTY (0x1u << 9) /**< \brief (US_IDR) TXEMPTY Interrupt Disable */ |
Pawel Zarembski |
0:01f31e923fe2 | 189 | #define US_IDR_ITER (0x1u << 10) /**< \brief (US_IDR) Max number of Repetitions Reached Interrupt Disable */ |
Pawel Zarembski |
0:01f31e923fe2 | 190 | #define US_IDR_TXBUFE (0x1u << 11) /**< \brief (US_IDR) Buffer Empty Interrupt Disable (available in all USART modes of operation) */ |
Pawel Zarembski |
0:01f31e923fe2 | 191 | #define US_IDR_RXBUFF (0x1u << 12) /**< \brief (US_IDR) Buffer Full Interrupt Disable (available in all USART modes of operation) */ |
Pawel Zarembski |
0:01f31e923fe2 | 192 | #define US_IDR_NACK (0x1u << 13) /**< \brief (US_IDR) Non AcknowledgeInterrupt Disable */ |
Pawel Zarembski |
0:01f31e923fe2 | 193 | #define US_IDR_RIIC (0x1u << 16) /**< \brief (US_IDR) Ring Indicator Input Change Disable */ |
Pawel Zarembski |
0:01f31e923fe2 | 194 | #define US_IDR_DSRIC (0x1u << 17) /**< \brief (US_IDR) Data Set Ready Input Change Disable */ |
Pawel Zarembski |
0:01f31e923fe2 | 195 | #define US_IDR_DCDIC (0x1u << 18) /**< \brief (US_IDR) Data Carrier Detect Input Change Interrupt Disable */ |
Pawel Zarembski |
0:01f31e923fe2 | 196 | #define US_IDR_CTSIC (0x1u << 19) /**< \brief (US_IDR) Clear to Send Input Change Interrupt Disable */ |
Pawel Zarembski |
0:01f31e923fe2 | 197 | #define US_IDR_MANE (0x1u << 24) /**< \brief (US_IDR) Manchester Error Interrupt Disable */ |
Pawel Zarembski |
0:01f31e923fe2 | 198 | #define US_IDR_UNRE (0x1u << 10) /**< \brief (US_IDR) SPI Underrun Error Interrupt Disable */ |
Pawel Zarembski |
0:01f31e923fe2 | 199 | /* -------- US_IMR : (USART Offset: 0x0010) Interrupt Mask Register -------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 200 | #define US_IMR_RXRDY (0x1u << 0) /**< \brief (US_IMR) RXRDY Interrupt Mask */ |
Pawel Zarembski |
0:01f31e923fe2 | 201 | #define US_IMR_TXRDY (0x1u << 1) /**< \brief (US_IMR) TXRDY Interrupt Mask */ |
Pawel Zarembski |
0:01f31e923fe2 | 202 | #define US_IMR_RXBRK (0x1u << 2) /**< \brief (US_IMR) Receiver Break Interrupt Mask */ |
Pawel Zarembski |
0:01f31e923fe2 | 203 | #define US_IMR_ENDRX (0x1u << 3) /**< \brief (US_IMR) End of Receive Transfer Interrupt Mask (available in all USART modes of operation) */ |
Pawel Zarembski |
0:01f31e923fe2 | 204 | #define US_IMR_ENDTX (0x1u << 4) /**< \brief (US_IMR) End of Transmit Interrupt Mask (available in all USART modes of operation) */ |
Pawel Zarembski |
0:01f31e923fe2 | 205 | #define US_IMR_OVRE (0x1u << 5) /**< \brief (US_IMR) Overrun Error Interrupt Mask */ |
Pawel Zarembski |
0:01f31e923fe2 | 206 | #define US_IMR_FRAME (0x1u << 6) /**< \brief (US_IMR) Framing Error Interrupt Mask */ |
Pawel Zarembski |
0:01f31e923fe2 | 207 | #define US_IMR_PARE (0x1u << 7) /**< \brief (US_IMR) Parity Error Interrupt Mask */ |
Pawel Zarembski |
0:01f31e923fe2 | 208 | #define US_IMR_TIMEOUT (0x1u << 8) /**< \brief (US_IMR) Time-out Interrupt Mask */ |
Pawel Zarembski |
0:01f31e923fe2 | 209 | #define US_IMR_TXEMPTY (0x1u << 9) /**< \brief (US_IMR) TXEMPTY Interrupt Mask */ |
Pawel Zarembski |
0:01f31e923fe2 | 210 | #define US_IMR_ITER (0x1u << 10) /**< \brief (US_IMR) Max number of Repetitions Reached Interrupt Mask */ |
Pawel Zarembski |
0:01f31e923fe2 | 211 | #define US_IMR_TXBUFE (0x1u << 11) /**< \brief (US_IMR) Buffer Empty Interrupt Mask (available in all USART modes of operation) */ |
Pawel Zarembski |
0:01f31e923fe2 | 212 | #define US_IMR_RXBUFF (0x1u << 12) /**< \brief (US_IMR) Buffer Full Interrupt Mask (available in all USART modes of operation) */ |
Pawel Zarembski |
0:01f31e923fe2 | 213 | #define US_IMR_NACK (0x1u << 13) /**< \brief (US_IMR) Non AcknowledgeInterrupt Mask */ |
Pawel Zarembski |
0:01f31e923fe2 | 214 | #define US_IMR_RIIC (0x1u << 16) /**< \brief (US_IMR) Ring Indicator Input Change Mask */ |
Pawel Zarembski |
0:01f31e923fe2 | 215 | #define US_IMR_DSRIC (0x1u << 17) /**< \brief (US_IMR) Data Set Ready Input Change Mask */ |
Pawel Zarembski |
0:01f31e923fe2 | 216 | #define US_IMR_DCDIC (0x1u << 18) /**< \brief (US_IMR) Data Carrier Detect Input Change Interrupt Mask */ |
Pawel Zarembski |
0:01f31e923fe2 | 217 | #define US_IMR_CTSIC (0x1u << 19) /**< \brief (US_IMR) Clear to Send Input Change Interrupt Mask */ |
Pawel Zarembski |
0:01f31e923fe2 | 218 | #define US_IMR_MANE (0x1u << 24) /**< \brief (US_IMR) Manchester Error Interrupt Mask */ |
Pawel Zarembski |
0:01f31e923fe2 | 219 | #define US_IMR_UNRE (0x1u << 10) /**< \brief (US_IMR) SPI Underrun Error Interrupt Mask */ |
Pawel Zarembski |
0:01f31e923fe2 | 220 | /* -------- US_CSR : (USART Offset: 0x0014) Channel Status Register -------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 221 | #define US_CSR_RXRDY (0x1u << 0) /**< \brief (US_CSR) Receiver Ready */ |
Pawel Zarembski |
0:01f31e923fe2 | 222 | #define US_CSR_TXRDY (0x1u << 1) /**< \brief (US_CSR) Transmitter Ready */ |
Pawel Zarembski |
0:01f31e923fe2 | 223 | #define US_CSR_RXBRK (0x1u << 2) /**< \brief (US_CSR) Break Received/End of Break */ |
Pawel Zarembski |
0:01f31e923fe2 | 224 | #define US_CSR_ENDRX (0x1u << 3) /**< \brief (US_CSR) End of Receiver Transfer */ |
Pawel Zarembski |
0:01f31e923fe2 | 225 | #define US_CSR_ENDTX (0x1u << 4) /**< \brief (US_CSR) End of Transmitter Transfer */ |
Pawel Zarembski |
0:01f31e923fe2 | 226 | #define US_CSR_OVRE (0x1u << 5) /**< \brief (US_CSR) Overrun Error */ |
Pawel Zarembski |
0:01f31e923fe2 | 227 | #define US_CSR_FRAME (0x1u << 6) /**< \brief (US_CSR) Framing Error */ |
Pawel Zarembski |
0:01f31e923fe2 | 228 | #define US_CSR_PARE (0x1u << 7) /**< \brief (US_CSR) Parity Error */ |
Pawel Zarembski |
0:01f31e923fe2 | 229 | #define US_CSR_TIMEOUT (0x1u << 8) /**< \brief (US_CSR) Receiver Time-out */ |
Pawel Zarembski |
0:01f31e923fe2 | 230 | #define US_CSR_TXEMPTY (0x1u << 9) /**< \brief (US_CSR) Transmitter Empty */ |
Pawel Zarembski |
0:01f31e923fe2 | 231 | #define US_CSR_ITER (0x1u << 10) /**< \brief (US_CSR) Max number of Repetitions Reached */ |
Pawel Zarembski |
0:01f31e923fe2 | 232 | #define US_CSR_TXBUFE (0x1u << 11) /**< \brief (US_CSR) Transmission Buffer Empty */ |
Pawel Zarembski |
0:01f31e923fe2 | 233 | #define US_CSR_RXBUFF (0x1u << 12) /**< \brief (US_CSR) Reception Buffer Full */ |
Pawel Zarembski |
0:01f31e923fe2 | 234 | #define US_CSR_NACK (0x1u << 13) /**< \brief (US_CSR) Non AcknowledgeInterrupt */ |
Pawel Zarembski |
0:01f31e923fe2 | 235 | #define US_CSR_RIIC (0x1u << 16) /**< \brief (US_CSR) Ring Indicator Input Change Flag */ |
Pawel Zarembski |
0:01f31e923fe2 | 236 | #define US_CSR_DSRIC (0x1u << 17) /**< \brief (US_CSR) Data Set Ready Input Change Flag */ |
Pawel Zarembski |
0:01f31e923fe2 | 237 | #define US_CSR_DCDIC (0x1u << 18) /**< \brief (US_CSR) Data Carrier Detect Input Change Flag */ |
Pawel Zarembski |
0:01f31e923fe2 | 238 | #define US_CSR_CTSIC (0x1u << 19) /**< \brief (US_CSR) Clear to Send Input Change Flag */ |
Pawel Zarembski |
0:01f31e923fe2 | 239 | #define US_CSR_RI (0x1u << 20) /**< \brief (US_CSR) Image of RI Input */ |
Pawel Zarembski |
0:01f31e923fe2 | 240 | #define US_CSR_DSR (0x1u << 21) /**< \brief (US_CSR) Image of DSR Input */ |
Pawel Zarembski |
0:01f31e923fe2 | 241 | #define US_CSR_DCD (0x1u << 22) /**< \brief (US_CSR) Image of DCD Input */ |
Pawel Zarembski |
0:01f31e923fe2 | 242 | #define US_CSR_CTS (0x1u << 23) /**< \brief (US_CSR) Image of CTS Input */ |
Pawel Zarembski |
0:01f31e923fe2 | 243 | #define US_CSR_MANERR (0x1u << 24) /**< \brief (US_CSR) Manchester Error */ |
Pawel Zarembski |
0:01f31e923fe2 | 244 | #define US_CSR_UNRE (0x1u << 10) /**< \brief (US_CSR) Underrun Error */ |
Pawel Zarembski |
0:01f31e923fe2 | 245 | /* -------- US_RHR : (USART Offset: 0x0018) Receiver Holding Register -------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 246 | #define US_RHR_RXCHR_Pos 0 |
Pawel Zarembski |
0:01f31e923fe2 | 247 | #define US_RHR_RXCHR_Msk (0x1ffu << US_RHR_RXCHR_Pos) /**< \brief (US_RHR) Received Character */ |
Pawel Zarembski |
0:01f31e923fe2 | 248 | #define US_RHR_RXSYNH (0x1u << 15) /**< \brief (US_RHR) Received Sync */ |
Pawel Zarembski |
0:01f31e923fe2 | 249 | /* -------- US_THR : (USART Offset: 0x001C) Transmitter Holding Register -------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 250 | #define US_THR_TXCHR_Pos 0 |
Pawel Zarembski |
0:01f31e923fe2 | 251 | #define US_THR_TXCHR_Msk (0x1ffu << US_THR_TXCHR_Pos) /**< \brief (US_THR) Character to be Transmitted */ |
Pawel Zarembski |
0:01f31e923fe2 | 252 | #define US_THR_TXCHR(value) ((US_THR_TXCHR_Msk & ((value) << US_THR_TXCHR_Pos))) |
Pawel Zarembski |
0:01f31e923fe2 | 253 | #define US_THR_TXSYNH (0x1u << 15) /**< \brief (US_THR) Sync Field to be transmitted */ |
Pawel Zarembski |
0:01f31e923fe2 | 254 | /* -------- US_BRGR : (USART Offset: 0x0020) Baud Rate Generator Register -------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 255 | #define US_BRGR_CD_Pos 0 |
Pawel Zarembski |
0:01f31e923fe2 | 256 | #define US_BRGR_CD_Msk (0xffffu << US_BRGR_CD_Pos) /**< \brief (US_BRGR) Clock Divider */ |
Pawel Zarembski |
0:01f31e923fe2 | 257 | #define US_BRGR_CD(value) ((US_BRGR_CD_Msk & ((value) << US_BRGR_CD_Pos))) |
Pawel Zarembski |
0:01f31e923fe2 | 258 | #define US_BRGR_FP_Pos 16 |
Pawel Zarembski |
0:01f31e923fe2 | 259 | #define US_BRGR_FP_Msk (0x7u << US_BRGR_FP_Pos) /**< \brief (US_BRGR) Fractional Part */ |
Pawel Zarembski |
0:01f31e923fe2 | 260 | #define US_BRGR_FP(value) ((US_BRGR_FP_Msk & ((value) << US_BRGR_FP_Pos))) |
Pawel Zarembski |
0:01f31e923fe2 | 261 | /* -------- US_RTOR : (USART Offset: 0x0024) Receiver Time-out Register -------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 262 | #define US_RTOR_TO_Pos 0 |
Pawel Zarembski |
0:01f31e923fe2 | 263 | #define US_RTOR_TO_Msk (0xffffu << US_RTOR_TO_Pos) /**< \brief (US_RTOR) Time-out Value */ |
Pawel Zarembski |
0:01f31e923fe2 | 264 | #define US_RTOR_TO(value) ((US_RTOR_TO_Msk & ((value) << US_RTOR_TO_Pos))) |
Pawel Zarembski |
0:01f31e923fe2 | 265 | /* -------- US_TTGR : (USART Offset: 0x0028) Transmitter Timeguard Register -------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 266 | #define US_TTGR_TG_Pos 0 |
Pawel Zarembski |
0:01f31e923fe2 | 267 | #define US_TTGR_TG_Msk (0xffu << US_TTGR_TG_Pos) /**< \brief (US_TTGR) Timeguard Value */ |
Pawel Zarembski |
0:01f31e923fe2 | 268 | #define US_TTGR_TG(value) ((US_TTGR_TG_Msk & ((value) << US_TTGR_TG_Pos))) |
Pawel Zarembski |
0:01f31e923fe2 | 269 | /* -------- US_FIDI : (USART Offset: 0x0040) FI DI Ratio Register -------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 270 | #define US_FIDI_FI_DI_RATIO_Pos 0 |
Pawel Zarembski |
0:01f31e923fe2 | 271 | #define US_FIDI_FI_DI_RATIO_Msk (0x7ffu << US_FIDI_FI_DI_RATIO_Pos) /**< \brief (US_FIDI) FI Over DI Ratio Value */ |
Pawel Zarembski |
0:01f31e923fe2 | 272 | #define US_FIDI_FI_DI_RATIO(value) ((US_FIDI_FI_DI_RATIO_Msk & ((value) << US_FIDI_FI_DI_RATIO_Pos))) |
Pawel Zarembski |
0:01f31e923fe2 | 273 | /* -------- US_NER : (USART Offset: 0x0044) Number of Errors Register -------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 274 | #define US_NER_NB_ERRORS_Pos 0 |
Pawel Zarembski |
0:01f31e923fe2 | 275 | #define US_NER_NB_ERRORS_Msk (0xffu << US_NER_NB_ERRORS_Pos) /**< \brief (US_NER) Number of Errors */ |
Pawel Zarembski |
0:01f31e923fe2 | 276 | /* -------- US_IF : (USART Offset: 0x004C) IrDA Filter Register -------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 277 | #define US_IF_IRDA_FILTER_Pos 0 |
Pawel Zarembski |
0:01f31e923fe2 | 278 | #define US_IF_IRDA_FILTER_Msk (0xffu << US_IF_IRDA_FILTER_Pos) /**< \brief (US_IF) IrDA Filter */ |
Pawel Zarembski |
0:01f31e923fe2 | 279 | #define US_IF_IRDA_FILTER(value) ((US_IF_IRDA_FILTER_Msk & ((value) << US_IF_IRDA_FILTER_Pos))) |
Pawel Zarembski |
0:01f31e923fe2 | 280 | /* -------- US_MAN : (USART Offset: 0x0050) Manchester Encoder Decoder Register -------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 281 | #define US_MAN_TX_PL_Pos 0 |
Pawel Zarembski |
0:01f31e923fe2 | 282 | #define US_MAN_TX_PL_Msk (0xfu << US_MAN_TX_PL_Pos) /**< \brief (US_MAN) Transmitter Preamble Length */ |
Pawel Zarembski |
0:01f31e923fe2 | 283 | #define US_MAN_TX_PL(value) ((US_MAN_TX_PL_Msk & ((value) << US_MAN_TX_PL_Pos))) |
Pawel Zarembski |
0:01f31e923fe2 | 284 | #define US_MAN_TX_PP_Pos 8 |
Pawel Zarembski |
0:01f31e923fe2 | 285 | #define US_MAN_TX_PP_Msk (0x3u << US_MAN_TX_PP_Pos) /**< \brief (US_MAN) Transmitter Preamble Pattern */ |
Pawel Zarembski |
0:01f31e923fe2 | 286 | #define US_MAN_TX_PP_ALL_ONE (0x0u << 8) /**< \brief (US_MAN) The preamble is composed of '1's */ |
Pawel Zarembski |
0:01f31e923fe2 | 287 | #define US_MAN_TX_PP_ALL_ZERO (0x1u << 8) /**< \brief (US_MAN) The preamble is composed of '0's */ |
Pawel Zarembski |
0:01f31e923fe2 | 288 | #define US_MAN_TX_PP_ZERO_ONE (0x2u << 8) /**< \brief (US_MAN) The preamble is composed of '01's */ |
Pawel Zarembski |
0:01f31e923fe2 | 289 | #define US_MAN_TX_PP_ONE_ZERO (0x3u << 8) /**< \brief (US_MAN) The preamble is composed of '10's */ |
Pawel Zarembski |
0:01f31e923fe2 | 290 | #define US_MAN_TX_MPOL (0x1u << 12) /**< \brief (US_MAN) Transmitter Manchester Polarity */ |
Pawel Zarembski |
0:01f31e923fe2 | 291 | #define US_MAN_RX_PL_Pos 16 |
Pawel Zarembski |
0:01f31e923fe2 | 292 | #define US_MAN_RX_PL_Msk (0xfu << US_MAN_RX_PL_Pos) /**< \brief (US_MAN) Receiver Preamble Length */ |
Pawel Zarembski |
0:01f31e923fe2 | 293 | #define US_MAN_RX_PL(value) ((US_MAN_RX_PL_Msk & ((value) << US_MAN_RX_PL_Pos))) |
Pawel Zarembski |
0:01f31e923fe2 | 294 | #define US_MAN_RX_PP_Pos 24 |
Pawel Zarembski |
0:01f31e923fe2 | 295 | #define US_MAN_RX_PP_Msk (0x3u << US_MAN_RX_PP_Pos) /**< \brief (US_MAN) Receiver Preamble Pattern detected */ |
Pawel Zarembski |
0:01f31e923fe2 | 296 | #define US_MAN_RX_PP_ALL_ONE (0x0u << 24) /**< \brief (US_MAN) The preamble is composed of '1's */ |
Pawel Zarembski |
0:01f31e923fe2 | 297 | #define US_MAN_RX_PP_ALL_ZERO (0x1u << 24) /**< \brief (US_MAN) The preamble is composed of '0's */ |
Pawel Zarembski |
0:01f31e923fe2 | 298 | #define US_MAN_RX_PP_ZERO_ONE (0x2u << 24) /**< \brief (US_MAN) The preamble is composed of '01's */ |
Pawel Zarembski |
0:01f31e923fe2 | 299 | #define US_MAN_RX_PP_ONE_ZERO (0x3u << 24) /**< \brief (US_MAN) The preamble is composed of '10's */ |
Pawel Zarembski |
0:01f31e923fe2 | 300 | #define US_MAN_RX_MPOL (0x1u << 28) /**< \brief (US_MAN) Receiver Manchester Polarity */ |
Pawel Zarembski |
0:01f31e923fe2 | 301 | #define US_MAN_ONE (0x1u << 29) /**< \brief (US_MAN) Must Be Set to 1 */ |
Pawel Zarembski |
0:01f31e923fe2 | 302 | #define US_MAN_DRIFT (0x1u << 30) /**< \brief (US_MAN) Drift compensation */ |
Pawel Zarembski |
0:01f31e923fe2 | 303 | /* -------- US_WPMR : (USART Offset: 0xE4) Write Protect Mode Register -------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 304 | #define US_WPMR_WPEN (0x1u << 0) /**< \brief (US_WPMR) Write Protect Enable */ |
Pawel Zarembski |
0:01f31e923fe2 | 305 | #define US_WPMR_WPKEY_Pos 8 |
Pawel Zarembski |
0:01f31e923fe2 | 306 | #define US_WPMR_WPKEY_Msk (0xffffffu << US_WPMR_WPKEY_Pos) /**< \brief (US_WPMR) Write Protect KEY */ |
Pawel Zarembski |
0:01f31e923fe2 | 307 | #define US_WPMR_WPKEY(value) ((US_WPMR_WPKEY_Msk & ((value) << US_WPMR_WPKEY_Pos))) |
Pawel Zarembski |
0:01f31e923fe2 | 308 | /* -------- US_WPSR : (USART Offset: 0xE8) Write Protect Status Register -------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 309 | #define US_WPSR_WPVS (0x1u << 0) /**< \brief (US_WPSR) Write Protect Violation Status */ |
Pawel Zarembski |
0:01f31e923fe2 | 310 | #define US_WPSR_WPVSRC_Pos 8 |
Pawel Zarembski |
0:01f31e923fe2 | 311 | #define US_WPSR_WPVSRC_Msk (0xffffu << US_WPSR_WPVSRC_Pos) /**< \brief (US_WPSR) Write Protect Violation Source */ |
Pawel Zarembski |
0:01f31e923fe2 | 312 | /* -------- US_RPR : (USART Offset: 0x100) Receive Pointer Register -------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 313 | #define US_RPR_RXPTR_Pos 0 |
Pawel Zarembski |
0:01f31e923fe2 | 314 | #define US_RPR_RXPTR_Msk (0xffffffffu << US_RPR_RXPTR_Pos) /**< \brief (US_RPR) Receive Pointer Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 315 | #define US_RPR_RXPTR(value) ((US_RPR_RXPTR_Msk & ((value) << US_RPR_RXPTR_Pos))) |
Pawel Zarembski |
0:01f31e923fe2 | 316 | /* -------- US_RCR : (USART Offset: 0x104) Receive Counter Register -------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 317 | #define US_RCR_RXCTR_Pos 0 |
Pawel Zarembski |
0:01f31e923fe2 | 318 | #define US_RCR_RXCTR_Msk (0xffffu << US_RCR_RXCTR_Pos) /**< \brief (US_RCR) Receive Counter Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 319 | #define US_RCR_RXCTR(value) ((US_RCR_RXCTR_Msk & ((value) << US_RCR_RXCTR_Pos))) |
Pawel Zarembski |
0:01f31e923fe2 | 320 | /* -------- US_TPR : (USART Offset: 0x108) Transmit Pointer Register -------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 321 | #define US_TPR_TXPTR_Pos 0 |
Pawel Zarembski |
0:01f31e923fe2 | 322 | #define US_TPR_TXPTR_Msk (0xffffffffu << US_TPR_TXPTR_Pos) /**< \brief (US_TPR) Transmit Counter Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 323 | #define US_TPR_TXPTR(value) ((US_TPR_TXPTR_Msk & ((value) << US_TPR_TXPTR_Pos))) |
Pawel Zarembski |
0:01f31e923fe2 | 324 | /* -------- US_TCR : (USART Offset: 0x10C) Transmit Counter Register -------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 325 | #define US_TCR_TXCTR_Pos 0 |
Pawel Zarembski |
0:01f31e923fe2 | 326 | #define US_TCR_TXCTR_Msk (0xffffu << US_TCR_TXCTR_Pos) /**< \brief (US_TCR) Transmit Counter Register */ |
Pawel Zarembski |
0:01f31e923fe2 | 327 | #define US_TCR_TXCTR(value) ((US_TCR_TXCTR_Msk & ((value) << US_TCR_TXCTR_Pos))) |
Pawel Zarembski |
0:01f31e923fe2 | 328 | /* -------- US_RNPR : (USART Offset: 0x110) Receive Next Pointer Register -------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 329 | #define US_RNPR_RXNPTR_Pos 0 |
Pawel Zarembski |
0:01f31e923fe2 | 330 | #define US_RNPR_RXNPTR_Msk (0xffffffffu << US_RNPR_RXNPTR_Pos) /**< \brief (US_RNPR) Receive Next Pointer */ |
Pawel Zarembski |
0:01f31e923fe2 | 331 | #define US_RNPR_RXNPTR(value) ((US_RNPR_RXNPTR_Msk & ((value) << US_RNPR_RXNPTR_Pos))) |
Pawel Zarembski |
0:01f31e923fe2 | 332 | /* -------- US_RNCR : (USART Offset: 0x114) Receive Next Counter Register -------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 333 | #define US_RNCR_RXNCTR_Pos 0 |
Pawel Zarembski |
0:01f31e923fe2 | 334 | #define US_RNCR_RXNCTR_Msk (0xffffu << US_RNCR_RXNCTR_Pos) /**< \brief (US_RNCR) Receive Next Counter */ |
Pawel Zarembski |
0:01f31e923fe2 | 335 | #define US_RNCR_RXNCTR(value) ((US_RNCR_RXNCTR_Msk & ((value) << US_RNCR_RXNCTR_Pos))) |
Pawel Zarembski |
0:01f31e923fe2 | 336 | /* -------- US_TNPR : (USART Offset: 0x118) Transmit Next Pointer Register -------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 337 | #define US_TNPR_TXNPTR_Pos 0 |
Pawel Zarembski |
0:01f31e923fe2 | 338 | #define US_TNPR_TXNPTR_Msk (0xffffffffu << US_TNPR_TXNPTR_Pos) /**< \brief (US_TNPR) Transmit Next Pointer */ |
Pawel Zarembski |
0:01f31e923fe2 | 339 | #define US_TNPR_TXNPTR(value) ((US_TNPR_TXNPTR_Msk & ((value) << US_TNPR_TXNPTR_Pos))) |
Pawel Zarembski |
0:01f31e923fe2 | 340 | /* -------- US_TNCR : (USART Offset: 0x11C) Transmit Next Counter Register -------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 341 | #define US_TNCR_TXNCTR_Pos 0 |
Pawel Zarembski |
0:01f31e923fe2 | 342 | #define US_TNCR_TXNCTR_Msk (0xffffu << US_TNCR_TXNCTR_Pos) /**< \brief (US_TNCR) Transmit Counter Next */ |
Pawel Zarembski |
0:01f31e923fe2 | 343 | #define US_TNCR_TXNCTR(value) ((US_TNCR_TXNCTR_Msk & ((value) << US_TNCR_TXNCTR_Pos))) |
Pawel Zarembski |
0:01f31e923fe2 | 344 | /* -------- US_PTCR : (USART Offset: 0x120) Transfer Control Register -------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 345 | #define US_PTCR_RXTEN (0x1u << 0) /**< \brief (US_PTCR) Receiver Transfer Enable */ |
Pawel Zarembski |
0:01f31e923fe2 | 346 | #define US_PTCR_RXTDIS (0x1u << 1) /**< \brief (US_PTCR) Receiver Transfer Disable */ |
Pawel Zarembski |
0:01f31e923fe2 | 347 | #define US_PTCR_TXTEN (0x1u << 8) /**< \brief (US_PTCR) Transmitter Transfer Enable */ |
Pawel Zarembski |
0:01f31e923fe2 | 348 | #define US_PTCR_TXTDIS (0x1u << 9) /**< \brief (US_PTCR) Transmitter Transfer Disable */ |
Pawel Zarembski |
0:01f31e923fe2 | 349 | /* -------- US_PTSR : (USART Offset: 0x124) Transfer Status Register -------- */ |
Pawel Zarembski |
0:01f31e923fe2 | 350 | #define US_PTSR_RXTEN (0x1u << 0) /**< \brief (US_PTSR) Receiver Transfer Enable */ |
Pawel Zarembski |
0:01f31e923fe2 | 351 | #define US_PTSR_TXTEN (0x1u << 8) /**< \brief (US_PTSR) Transmitter Transfer Enable */ |
Pawel Zarembski |
0:01f31e923fe2 | 352 | |
Pawel Zarembski |
0:01f31e923fe2 | 353 | /*@}*/ |
Pawel Zarembski |
0:01f31e923fe2 | 354 | |
Pawel Zarembski |
0:01f31e923fe2 | 355 | |
Pawel Zarembski |
0:01f31e923fe2 | 356 | #endif /* _SAM3U_USART_COMPONENT_ */ |