Color Oled(SSD1331) connect to STMicroelectronics Nucleo-F466

Dependencies:   ssd1331

Committer:
kadonotakashi
Date:
Thu Oct 11 02:27:46 2018 +0000
Revision:
3:f3764f852aa8
Parent:
0:8fdf9a60065b
Nucreo 446 + SSD1331 test version;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
kadonotakashi 0:8fdf9a60065b 1 /**************************************************************************//**
kadonotakashi 0:8fdf9a60065b 2 * @file i2c_reg.h
kadonotakashi 0:8fdf9a60065b 3 * @version V1.00
kadonotakashi 0:8fdf9a60065b 4 * @brief I2C register definition header file
kadonotakashi 0:8fdf9a60065b 5 *
kadonotakashi 0:8fdf9a60065b 6 * @copyright (C) 2017 Nuvoton Technology Corp. All rights reserved.
kadonotakashi 0:8fdf9a60065b 7 *****************************************************************************/
kadonotakashi 0:8fdf9a60065b 8 #ifndef __I2C_REG_H__
kadonotakashi 0:8fdf9a60065b 9 #define __I2C_REG_H__
kadonotakashi 0:8fdf9a60065b 10
kadonotakashi 0:8fdf9a60065b 11
kadonotakashi 0:8fdf9a60065b 12 /*---------------------- Inter-IC Bus Controller -------------------------*/
kadonotakashi 0:8fdf9a60065b 13 /**
kadonotakashi 0:8fdf9a60065b 14 @addtogroup I2C Inter-IC Bus Controller(I2C)
kadonotakashi 0:8fdf9a60065b 15 Memory Mapped Structure for I2C Controller
kadonotakashi 0:8fdf9a60065b 16 @{ */
kadonotakashi 0:8fdf9a60065b 17
kadonotakashi 0:8fdf9a60065b 18 typedef struct
kadonotakashi 0:8fdf9a60065b 19 {
kadonotakashi 0:8fdf9a60065b 20
kadonotakashi 0:8fdf9a60065b 21
kadonotakashi 0:8fdf9a60065b 22 /**
kadonotakashi 0:8fdf9a60065b 23 * @var I2C_T::CTL0
kadonotakashi 0:8fdf9a60065b 24 * Offset: 0x00 I2C Control Register 0
kadonotakashi 0:8fdf9a60065b 25 * ---------------------------------------------------------------------------------------------------
kadonotakashi 0:8fdf9a60065b 26 * |Bits |Field |Descriptions
kadonotakashi 0:8fdf9a60065b 27 * | :----: | :----: | :---- |
kadonotakashi 0:8fdf9a60065b 28 * |[2] |AA |Assert Acknowledge Control
kadonotakashi 0:8fdf9a60065b 29 * | | |When AA =1 prior to address or data is received, an acknowledged (low level to SDA) will be returned during the acknowledge clock pulse on the SCL line when 1.) A slave is acknowledging the address sent from master, 2.) The receiver devices are acknowledging the data sent by transmitter
kadonotakashi 0:8fdf9a60065b 30 * | | |When AA=0 prior to address or data received, a Not acknowledged (high level to SDA) will be returned during the acknowledge clock pulse on the SCL line
kadonotakashi 0:8fdf9a60065b 31 * |[3] |SI |I2C Interrupt Flag
kadonotakashi 0:8fdf9a60065b 32 * | | |When a new I2C state is present in the I2C_STATUS register, the SI flag is set by hardware
kadonotakashi 0:8fdf9a60065b 33 * | | |If bit INTEN (I2C_CTL [7]) is set, the I2C interrupt is requested
kadonotakashi 0:8fdf9a60065b 34 * | | |SI must be cleared by software
kadonotakashi 0:8fdf9a60065b 35 * | | |Clear SI by writing 1 to this bit.
kadonotakashi 0:8fdf9a60065b 36 * | | |For ACKMEN is set in slave read mode, the SI flag is set in 8th clock period for user to confirm the acknowledge bit and 9th clock period for user to read the data in the data buffer.
kadonotakashi 0:8fdf9a60065b 37 * |[4] |STO |I2C STOP Control
kadonotakashi 0:8fdf9a60065b 38 * | | |In Master mode, setting STO to transmit a STOP condition to bus then I2C controller will check the bus condition if a STOP condition is detected
kadonotakashi 0:8fdf9a60065b 39 * | | |This bit will be cleared by hardware automatically.
kadonotakashi 0:8fdf9a60065b 40 * |[5] |STA |I2C START Control
kadonotakashi 0:8fdf9a60065b 41 * | | |Setting STA to logic 1 to enter Master mode, the I2C hardware sends a START or repeat START condition to bus when the bus is free.
kadonotakashi 0:8fdf9a60065b 42 * |[6] |I2CEN |I2C Controller Enable Bit
kadonotakashi 0:8fdf9a60065b 43 * | | |Set to enable I2C serial function controller
kadonotakashi 0:8fdf9a60065b 44 * | | |When I2CEN=1 the I2C serial function enable
kadonotakashi 0:8fdf9a60065b 45 * | | |The multi-function pin function must set to SDA, and SCL of I2C function first.
kadonotakashi 0:8fdf9a60065b 46 * | | |0 = I2C controller Disabled.
kadonotakashi 0:8fdf9a60065b 47 * | | |1 = I2C controller Enabled.
kadonotakashi 0:8fdf9a60065b 48 * |[7] |INTEN |Enable Interrupt
kadonotakashi 0:8fdf9a60065b 49 * | | |0 = I2C interrupt Disabled.
kadonotakashi 0:8fdf9a60065b 50 * | | |1 = I2C interrupt Enabled.
kadonotakashi 0:8fdf9a60065b 51 * @var I2C_T::ADDR0
kadonotakashi 0:8fdf9a60065b 52 * Offset: 0x04 I2C Slave Address Register0
kadonotakashi 0:8fdf9a60065b 53 * ---------------------------------------------------------------------------------------------------
kadonotakashi 0:8fdf9a60065b 54 * |Bits |Field |Descriptions
kadonotakashi 0:8fdf9a60065b 55 * | :----: | :----: | :---- |
kadonotakashi 0:8fdf9a60065b 56 * |[0] |GC |General Call Function
kadonotakashi 0:8fdf9a60065b 57 * | | |0 = General Call Function Disabled.
kadonotakashi 0:8fdf9a60065b 58 * | | |1 = General Call Function Enabled.
kadonotakashi 0:8fdf9a60065b 59 * |[10:1] |ADDR |I2C Address
kadonotakashi 0:8fdf9a60065b 60 * | | |The content of this register is irrelevant when I2C is in Master mode
kadonotakashi 0:8fdf9a60065b 61 * | | |In the slave mode, the seven most significant bits must be loaded with the chip's own address
kadonotakashi 0:8fdf9a60065b 62 * | | |The I2C hardware will react if either of the address is matched.
kadonotakashi 0:8fdf9a60065b 63 * @var I2C_T::DAT
kadonotakashi 0:8fdf9a60065b 64 * Offset: 0x08 I2C Data Register
kadonotakashi 0:8fdf9a60065b 65 * ---------------------------------------------------------------------------------------------------
kadonotakashi 0:8fdf9a60065b 66 * |Bits |Field |Descriptions
kadonotakashi 0:8fdf9a60065b 67 * | :----: | :----: | :---- |
kadonotakashi 0:8fdf9a60065b 68 * |[7:0] |DAT |I2C Data
kadonotakashi 0:8fdf9a60065b 69 * | | |Bit [7:0] is located with the 8-bit transferred/received data of I2C serial port.
kadonotakashi 0:8fdf9a60065b 70 * @var I2C_T::STATUS0
kadonotakashi 0:8fdf9a60065b 71 * Offset: 0x0C I2C Status Register 0
kadonotakashi 0:8fdf9a60065b 72 * ---------------------------------------------------------------------------------------------------
kadonotakashi 0:8fdf9a60065b 73 * |Bits |Field |Descriptions
kadonotakashi 0:8fdf9a60065b 74 * | :----: | :----: | :---- |
kadonotakashi 0:8fdf9a60065b 75 * |[7:0] |STATUS |I2C Status
kadonotakashi 0:8fdf9a60065b 76 * | | |The three least significant bits are always 0
kadonotakashi 0:8fdf9a60065b 77 * | | |The five most significant bits contain the status code
kadonotakashi 0:8fdf9a60065b 78 * | | |There are 28 possible status codes
kadonotakashi 0:8fdf9a60065b 79 * | | |When the content of I2C_STATUS0 is F8H, no serial interrupt is requested
kadonotakashi 0:8fdf9a60065b 80 * | | |Others I2C_STATUS0 values correspond to defined I2C states
kadonotakashi 0:8fdf9a60065b 81 * | | |When each of these states is entered, a status interrupt is requested (SI = 1)
kadonotakashi 0:8fdf9a60065b 82 * | | |A valid status code is present in I2C_STATUS0 one cycle after SI is set by hardware and is still present one cycle after SI has been reset by software
kadonotakashi 0:8fdf9a60065b 83 * | | |In addition, states 00H stands for a Bus Error
kadonotakashi 0:8fdf9a60065b 84 * | | |A Bus Error occurs when a START or STOP condition is present at an illegal position in the formation frame
kadonotakashi 0:8fdf9a60065b 85 * | | |Example of illegal position are during the serial transfer of an address byte, a data byte or an acknowledge bit.
kadonotakashi 0:8fdf9a60065b 86 * @var I2C_T::CLKDIV
kadonotakashi 0:8fdf9a60065b 87 * Offset: 0x10 I2C Clock Divided Register
kadonotakashi 0:8fdf9a60065b 88 * ---------------------------------------------------------------------------------------------------
kadonotakashi 0:8fdf9a60065b 89 * |Bits |Field |Descriptions
kadonotakashi 0:8fdf9a60065b 90 * | :----: | :----: | :---- |
kadonotakashi 0:8fdf9a60065b 91 * |[9:0] |DIVIDER |I2C Clock Divided
kadonotakashi 0:8fdf9a60065b 92 * | | |Indicates the I2C clock rate: Data Baud Rate of I2C = (system clock) / (4x (I2C_CLKDIV+1)).
kadonotakashi 0:8fdf9a60065b 93 * | | |Note: The minimum value of I2C_CLKDIV is 4.
kadonotakashi 0:8fdf9a60065b 94 * @var I2C_T::TOCTL
kadonotakashi 0:8fdf9a60065b 95 * Offset: 0x14 I2C Time-out Control Register
kadonotakashi 0:8fdf9a60065b 96 * ---------------------------------------------------------------------------------------------------
kadonotakashi 0:8fdf9a60065b 97 * |Bits |Field |Descriptions
kadonotakashi 0:8fdf9a60065b 98 * | :----: | :----: | :---- |
kadonotakashi 0:8fdf9a60065b 99 * |[0] |TOIF |Time-out Flag
kadonotakashi 0:8fdf9a60065b 100 * | | |This bit is set by hardware when I2C time-out happened and it can interrupt CPU if I2C interrupt enable bit (INTEN) is set to 1.
kadonotakashi 0:8fdf9a60065b 101 * | | |Note: Software can write 1 to clear this bit.
kadonotakashi 0:8fdf9a60065b 102 * |[1] |TOCDIV4 |Time-out Counter Input Clock Divided by 4
kadonotakashi 0:8fdf9a60065b 103 * | | |When Enabled, The time-out period is extend 4 times.
kadonotakashi 0:8fdf9a60065b 104 * | | |0 = Time-out period is extend 4 times Disabled.
kadonotakashi 0:8fdf9a60065b 105 * | | |1 = Time-out period is extend 4 times Enabled.
kadonotakashi 0:8fdf9a60065b 106 * |[2] |TOCEN |Time-out Counter Enable Bit
kadonotakashi 0:8fdf9a60065b 107 * | | |When Enabled, the 14-bit time-out counter will start counting when SI is clear
kadonotakashi 0:8fdf9a60065b 108 * | | |Setting flag SI to u20181' will reset counter and re-start up counting after SI is cleared.
kadonotakashi 0:8fdf9a60065b 109 * | | |0 = Time-out counter Disabled.
kadonotakashi 0:8fdf9a60065b 110 * | | |1 = Time-out counter Enabled.
kadonotakashi 0:8fdf9a60065b 111 * @var I2C_T::ADDR1
kadonotakashi 0:8fdf9a60065b 112 * Offset: 0x18 I2C Slave Address Register1
kadonotakashi 0:8fdf9a60065b 113 * ---------------------------------------------------------------------------------------------------
kadonotakashi 0:8fdf9a60065b 114 * |Bits |Field |Descriptions
kadonotakashi 0:8fdf9a60065b 115 * | :----: | :----: | :---- |
kadonotakashi 0:8fdf9a60065b 116 * |[0] |GC |General Call Function
kadonotakashi 0:8fdf9a60065b 117 * | | |0 = General Call Function Disabled.
kadonotakashi 0:8fdf9a60065b 118 * | | |1 = General Call Function Enabled.
kadonotakashi 0:8fdf9a60065b 119 * |[10:1] |ADDR |I2C Address
kadonotakashi 0:8fdf9a60065b 120 * | | |The content of this register is irrelevant when I2C is in Master mode
kadonotakashi 0:8fdf9a60065b 121 * | | |In the slave mode, the seven most significant bits must be loaded with the chip's own address
kadonotakashi 0:8fdf9a60065b 122 * | | |The I2C hardware will react if either of the address is matched.
kadonotakashi 0:8fdf9a60065b 123 * @var I2C_T::ADDR2
kadonotakashi 0:8fdf9a60065b 124 * Offset: 0x1C I2C Slave Address Register2
kadonotakashi 0:8fdf9a60065b 125 * ---------------------------------------------------------------------------------------------------
kadonotakashi 0:8fdf9a60065b 126 * |Bits |Field |Descriptions
kadonotakashi 0:8fdf9a60065b 127 * | :----: | :----: | :---- |
kadonotakashi 0:8fdf9a60065b 128 * |[0] |GC |General Call Function
kadonotakashi 0:8fdf9a60065b 129 * | | |0 = General Call Function Disabled.
kadonotakashi 0:8fdf9a60065b 130 * | | |1 = General Call Function Enabled.
kadonotakashi 0:8fdf9a60065b 131 * |[10:1] |ADDR |I2C Address
kadonotakashi 0:8fdf9a60065b 132 * | | |The content of this register is irrelevant when I2C is in Master mode
kadonotakashi 0:8fdf9a60065b 133 * | | |In the slave mode, the seven most significant bits must be loaded with the chip's own address
kadonotakashi 0:8fdf9a60065b 134 * | | |The I2C hardware will react if either of the address is matched.
kadonotakashi 0:8fdf9a60065b 135 * @var I2C_T::ADDR3
kadonotakashi 0:8fdf9a60065b 136 * Offset: 0x20 I2C Slave Address Register3
kadonotakashi 0:8fdf9a60065b 137 * ---------------------------------------------------------------------------------------------------
kadonotakashi 0:8fdf9a60065b 138 * |Bits |Field |Descriptions
kadonotakashi 0:8fdf9a60065b 139 * | :----: | :----: | :---- |
kadonotakashi 0:8fdf9a60065b 140 * |[0] |GC |General Call Function
kadonotakashi 0:8fdf9a60065b 141 * | | |0 = General Call Function Disabled.
kadonotakashi 0:8fdf9a60065b 142 * | | |1 = General Call Function Enabled.
kadonotakashi 0:8fdf9a60065b 143 * |[10:1] |ADDR |I2C Address
kadonotakashi 0:8fdf9a60065b 144 * | | |The content of this register is irrelevant when I2C is in Master mode
kadonotakashi 0:8fdf9a60065b 145 * | | |In the slave mode, the seven most significant bits must be loaded with the chip's own address
kadonotakashi 0:8fdf9a60065b 146 * | | |The I2C hardware will react if either of the address is matched.
kadonotakashi 0:8fdf9a60065b 147 * @var I2C_T::ADDRMSK0
kadonotakashi 0:8fdf9a60065b 148 * Offset: 0x24 I2C Slave Address Mask Register0
kadonotakashi 0:8fdf9a60065b 149 * ---------------------------------------------------------------------------------------------------
kadonotakashi 0:8fdf9a60065b 150 * |Bits |Field |Descriptions
kadonotakashi 0:8fdf9a60065b 151 * | :----: | :----: | :---- |
kadonotakashi 0:8fdf9a60065b 152 * |[10:1] |ADDRMSK |I2C Address Mask
kadonotakashi 0:8fdf9a60065b 153 * | | |0 = Mask Disabled (the received corresponding register bit should be exact the same as address register.).
kadonotakashi 0:8fdf9a60065b 154 * | | |1 = Mask Enabled (the received corresponding address bit is don't care.).
kadonotakashi 0:8fdf9a60065b 155 * | | |I2C bus controllers support multiple address recognition with four address mask register
kadonotakashi 0:8fdf9a60065b 156 * | | |When the bit in the address mask register is set to one, it means the received corresponding address bit is don't-care
kadonotakashi 0:8fdf9a60065b 157 * | | |If the bit is set to zero, that means the received corresponding register bit should be exact the same as address register.
kadonotakashi 0:8fdf9a60065b 158 * | | |Note: The wake-up function can not use address mask.
kadonotakashi 0:8fdf9a60065b 159 * @var I2C_T::ADDRMSK1
kadonotakashi 0:8fdf9a60065b 160 * Offset: 0x28 I2C Slave Address Mask Register1
kadonotakashi 0:8fdf9a60065b 161 * ---------------------------------------------------------------------------------------------------
kadonotakashi 0:8fdf9a60065b 162 * |Bits |Field |Descriptions
kadonotakashi 0:8fdf9a60065b 163 * | :----: | :----: | :---- |
kadonotakashi 0:8fdf9a60065b 164 * |[10:1] |ADDRMSK |I2C Address Mask
kadonotakashi 0:8fdf9a60065b 165 * | | |0 = Mask Disabled (the received corresponding register bit should be exact the same as address register.).
kadonotakashi 0:8fdf9a60065b 166 * | | |1 = Mask Enabled (the received corresponding address bit is don't care.).
kadonotakashi 0:8fdf9a60065b 167 * | | |I2C bus controllers support multiple address recognition with four address mask register
kadonotakashi 0:8fdf9a60065b 168 * | | |When the bit in the address mask register is set to one, it means the received corresponding address bit is don't-care
kadonotakashi 0:8fdf9a60065b 169 * | | |If the bit is set to zero, that means the received corresponding register bit should be exact the same as address register.
kadonotakashi 0:8fdf9a60065b 170 * | | |Note: The wake-up function can not use address mask.
kadonotakashi 0:8fdf9a60065b 171 * @var I2C_T::ADDRMSK2
kadonotakashi 0:8fdf9a60065b 172 * Offset: 0x2C I2C Slave Address Mask Register2
kadonotakashi 0:8fdf9a60065b 173 * ---------------------------------------------------------------------------------------------------
kadonotakashi 0:8fdf9a60065b 174 * |Bits |Field |Descriptions
kadonotakashi 0:8fdf9a60065b 175 * | :----: | :----: | :---- |
kadonotakashi 0:8fdf9a60065b 176 * |[10:1] |ADDRMSK |I2C Address Mask
kadonotakashi 0:8fdf9a60065b 177 * | | |0 = Mask Disabled (the received corresponding register bit should be exact the same as address register.).
kadonotakashi 0:8fdf9a60065b 178 * | | |1 = Mask Enabled (the received corresponding address bit is don't care.).
kadonotakashi 0:8fdf9a60065b 179 * | | |I2C bus controllers support multiple address recognition with four address mask register
kadonotakashi 0:8fdf9a60065b 180 * | | |When the bit in the address mask register is set to one, it means the received corresponding address bit is don't-care
kadonotakashi 0:8fdf9a60065b 181 * | | |If the bit is set to zero, that means the received corresponding register bit should be exact the same as address register.
kadonotakashi 0:8fdf9a60065b 182 * | | |Note: The wake-up function can not use address mask.
kadonotakashi 0:8fdf9a60065b 183 * @var I2C_T::ADDRMSK3
kadonotakashi 0:8fdf9a60065b 184 * Offset: 0x30 I2C Slave Address Mask Register3
kadonotakashi 0:8fdf9a60065b 185 * ---------------------------------------------------------------------------------------------------
kadonotakashi 0:8fdf9a60065b 186 * |Bits |Field |Descriptions
kadonotakashi 0:8fdf9a60065b 187 * | :----: | :----: | :---- |
kadonotakashi 0:8fdf9a60065b 188 * |[10:1] |ADDRMSK |I2C Address Mask
kadonotakashi 0:8fdf9a60065b 189 * | | |0 = Mask Disabled (the received corresponding register bit should be exact the same as address register.).
kadonotakashi 0:8fdf9a60065b 190 * | | |1 = Mask Enabled (the received corresponding address bit is don't care.).
kadonotakashi 0:8fdf9a60065b 191 * | | |I2C bus controllers support multiple address recognition with four address mask register
kadonotakashi 0:8fdf9a60065b 192 * | | |When the bit in the address mask register is set to one, it means the received corresponding address bit is don't-care
kadonotakashi 0:8fdf9a60065b 193 * | | |If the bit is set to zero, that means the received corresponding register bit should be exact the same as address register.
kadonotakashi 0:8fdf9a60065b 194 * | | |Note: The wake-up function can not use address mask.
kadonotakashi 0:8fdf9a60065b 195 * @var I2C_T::WKCTL
kadonotakashi 0:8fdf9a60065b 196 * Offset: 0x3C I2C Wake-up Control Register
kadonotakashi 0:8fdf9a60065b 197 * ---------------------------------------------------------------------------------------------------
kadonotakashi 0:8fdf9a60065b 198 * |Bits |Field |Descriptions
kadonotakashi 0:8fdf9a60065b 199 * | :----: | :----: | :---- |
kadonotakashi 0:8fdf9a60065b 200 * |[0] |WKEN |I2C Wake-up Enable Bit
kadonotakashi 0:8fdf9a60065b 201 * | | |0 = I2C wake-up function Disabled.
kadonotakashi 0:8fdf9a60065b 202 * | | |1= I2C wake-up function Enabled.
kadonotakashi 0:8fdf9a60065b 203 * |[7] |NHDBUSEN |I2C No Hold BUS Enable Bit
kadonotakashi 0:8fdf9a60065b 204 * | | |0 = I2C don't hold bus after wake-up disable.
kadonotakashi 0:8fdf9a60065b 205 * | | |1= I2C don't hold bus after wake-up enable.
kadonotakashi 0:8fdf9a60065b 206 * | | |Note: I2C controller could response when WKIF event is not clear, it may cause error data transmitted or received
kadonotakashi 0:8fdf9a60065b 207 * | | |If data transmitted or received when WKIF event is not clear, user must reset I2C controller and execute the original operation again.
kadonotakashi 0:8fdf9a60065b 208 * @var I2C_T::WKSTS
kadonotakashi 0:8fdf9a60065b 209 * Offset: 0x40 I2C Wake-up Status Register
kadonotakashi 0:8fdf9a60065b 210 * ---------------------------------------------------------------------------------------------------
kadonotakashi 0:8fdf9a60065b 211 * |Bits |Field |Descriptions
kadonotakashi 0:8fdf9a60065b 212 * | :----: | :----: | :---- |
kadonotakashi 0:8fdf9a60065b 213 * |[0] |WKIF |I2C Wake-up Flag
kadonotakashi 0:8fdf9a60065b 214 * | | |When chip is woken up from Power-down mode by I2C, this bit is set to 1
kadonotakashi 0:8fdf9a60065b 215 * | | |Software can write 1 to clear this bit.
kadonotakashi 0:8fdf9a60065b 216 * |[1] |WKAKDONE |Wakeup Address Frame Acknowledge Bit Done
kadonotakashi 0:8fdf9a60065b 217 * | | |0 = The ACK bit cycle of address match frame isn't done.
kadonotakashi 0:8fdf9a60065b 218 * | | |1 = The ACK bit cycle of address match frame is done in power-down.
kadonotakashi 0:8fdf9a60065b 219 * | | |Note: This bit can't release WKIF. Software can write 1 to clear this bit.
kadonotakashi 0:8fdf9a60065b 220 * |[2] |WRSTSWK |Read/Write Status Bit in Address Wakeup Frame
kadonotakashi 0:8fdf9a60065b 221 * | | |0 = Write command be record on the address match wakeup frame.
kadonotakashi 0:8fdf9a60065b 222 * | | |1 = Read command be record on the address match wakeup frame.
kadonotakashi 0:8fdf9a60065b 223 * | | |Note: This bit will be cleared when software can write 1 to WKAKDONE bit.
kadonotakashi 0:8fdf9a60065b 224 * @var I2C_T::CTL1
kadonotakashi 0:8fdf9a60065b 225 * Offset: 0x44 I2C Control Register 1
kadonotakashi 0:8fdf9a60065b 226 * ---------------------------------------------------------------------------------------------------
kadonotakashi 0:8fdf9a60065b 227 * |Bits |Field |Descriptions
kadonotakashi 0:8fdf9a60065b 228 * | :----: | :----: | :---- |
kadonotakashi 0:8fdf9a60065b 229 * |[0] |TXPDMAEN |PDMA Transmit Channel Available
kadonotakashi 0:8fdf9a60065b 230 * | | |0 = Transmit PDMA function disable.
kadonotakashi 0:8fdf9a60065b 231 * | | |1 = Transmit PDMA function enable.
kadonotakashi 0:8fdf9a60065b 232 * |[1] |RXPDMAEN |PDMA Receive Channel Available
kadonotakashi 0:8fdf9a60065b 233 * | | |0 = Receive PDMA function disable.
kadonotakashi 0:8fdf9a60065b 234 * | | |1 = Receive PDMA function enable.
kadonotakashi 0:8fdf9a60065b 235 * |[2] |PDMARST |PDMA Reset
kadonotakashi 0:8fdf9a60065b 236 * | | |0 = No effect.
kadonotakashi 0:8fdf9a60065b 237 * | | |1 = Reset the I2C request to PDMA. This bit will be cleared to 0 automatically.
kadonotakashi 0:8fdf9a60065b 238 * |[8] |PDMASTR |PDMA Stretch Bit
kadonotakashi 0:8fdf9a60065b 239 * | | |0 = I2C send STOP automatically after PDMA transfer done. (only master TX)
kadonotakashi 0:8fdf9a60065b 240 * | | |1 = I2C SCL bus is stretched by hardware after PDMA transfer done if the SI is not cleared
kadonotakashi 0:8fdf9a60065b 241 * | | |(only master TX)
kadonotakashi 0:8fdf9a60065b 242 * |[9] |ADDR10EN |Address 10-bit Function Enable
kadonotakashi 0:8fdf9a60065b 243 * | | |0 = Address match 10-bit function is disabled.
kadonotakashi 0:8fdf9a60065b 244 * | | |1 = Address match 10-bit function is enabled.
kadonotakashi 0:8fdf9a60065b 245 * @var I2C_T::STATUS1
kadonotakashi 0:8fdf9a60065b 246 * Offset: 0x48 I2C Status Register 1
kadonotakashi 0:8fdf9a60065b 247 * ---------------------------------------------------------------------------------------------------
kadonotakashi 0:8fdf9a60065b 248 * |Bits |Field |Descriptions
kadonotakashi 0:8fdf9a60065b 249 * | :----: | :----: | :---- |
kadonotakashi 0:8fdf9a60065b 250 * |[0] |ADMAT0 |I2C Address 0 Match Status Register
kadonotakashi 0:8fdf9a60065b 251 * | | |When address 0 is matched, hardware will inform which address used
kadonotakashi 0:8fdf9a60065b 252 * | | |This bit will set to 1, and software can write 1 to clear this bit.
kadonotakashi 0:8fdf9a60065b 253 * |[1] |ADMAT1 |I2C Address 1 Match Status Register
kadonotakashi 0:8fdf9a60065b 254 * | | |When address 1 is matched, hardware will inform which address used
kadonotakashi 0:8fdf9a60065b 255 * | | |This bit will set to 1, and software can write 1 to clear this bit.
kadonotakashi 0:8fdf9a60065b 256 * |[2] |ADMAT2 |I2C Address 2 Match Status Register
kadonotakashi 0:8fdf9a60065b 257 * | | |When address 2 is matched, hardware will inform which address used
kadonotakashi 0:8fdf9a60065b 258 * | | |This bit will set to 1, and software can write 1 to clear this bit.
kadonotakashi 0:8fdf9a60065b 259 * |[3] |ADMAT3 |I2C Address 3 Match Status Register
kadonotakashi 0:8fdf9a60065b 260 * | | |When address 3 is matched, hardware will inform which address used
kadonotakashi 0:8fdf9a60065b 261 * | | |This bit will set to 1, and software can write 1 to clear this bit.
kadonotakashi 0:8fdf9a60065b 262 * |[8] |ONBUSY |On Bus Busy
kadonotakashi 0:8fdf9a60065b 263 * | | |Indicates that a communication is in progress on the bus
kadonotakashi 0:8fdf9a60065b 264 * | | |It is set by hardware when a START condition is detected
kadonotakashi 0:8fdf9a60065b 265 * | | |It is cleared by hardware when a STOP condition is detected.
kadonotakashi 0:8fdf9a60065b 266 * | | |0 = The bus is IDLE (both SCLK and SDA High).
kadonotakashi 0:8fdf9a60065b 267 * | | |1 = The bus is busy.
kadonotakashi 0:8fdf9a60065b 268 * | | |Note:This bit is read only.
kadonotakashi 0:8fdf9a60065b 269 * @var I2C_T::TMCTL
kadonotakashi 0:8fdf9a60065b 270 * Offset: 0x4C I2C Timing Configure Control Register
kadonotakashi 0:8fdf9a60065b 271 * ---------------------------------------------------------------------------------------------------
kadonotakashi 0:8fdf9a60065b 272 * |Bits |Field |Descriptions
kadonotakashi 0:8fdf9a60065b 273 * | :----: | :----: | :---- |
kadonotakashi 0:8fdf9a60065b 274 * |[8:0] |STCTL |Setup Time Configure Control Register
kadonotakashi 0:8fdf9a60065b 275 * | | |This field is used to generate a delay timing between SDA falling edge and SCL rising edge in transmission mode.
kadonotakashi 0:8fdf9a60065b 276 * | | |The delay setup time is numbers of peripheral clock = STCTL x PCLK.
kadonotakashi 0:8fdf9a60065b 277 * | | |Note: Setup time setting should not make SCL output less than three PCLKs.
kadonotakashi 0:8fdf9a60065b 278 * |[24:16] |HTCTL |Hold Time Configure Control Register
kadonotakashi 0:8fdf9a60065b 279 * | | |This field is used to generate the delay timing between SCL falling edge and SDA rising edge in transmission mode.
kadonotakashi 0:8fdf9a60065b 280 * | | |The delay hold time is numbers of peripheral clock = HTCTL x PCLK.
kadonotakashi 0:8fdf9a60065b 281 * @var I2C_T::BUSCTL
kadonotakashi 0:8fdf9a60065b 282 * Offset: 0x50 I2C Bus Management Control Register
kadonotakashi 0:8fdf9a60065b 283 * ---------------------------------------------------------------------------------------------------
kadonotakashi 0:8fdf9a60065b 284 * |Bits |Field |Descriptions
kadonotakashi 0:8fdf9a60065b 285 * | :----: | :----: | :---- |
kadonotakashi 0:8fdf9a60065b 286 * |[0] |ACKMEN |Acknowledge Control by Manual
kadonotakashi 0:8fdf9a60065b 287 * | | |In order to allow ACK control in slave reception including the command and data, slave byte control mode must be enabled by setting the ACKMEN bit.
kadonotakashi 0:8fdf9a60065b 288 * | | |0 = Slave byte control Disabled.
kadonotakashi 0:8fdf9a60065b 289 * | | |1 = Slave byte control Enabled
kadonotakashi 0:8fdf9a60065b 290 * | | |The 9th bit can response the ACK or NACK according the received data by user
kadonotakashi 0:8fdf9a60065b 291 * | | |When the byte is received, stretching the SCLK signal low between the 8th and 9th SCLK pulse.
kadonotakashi 0:8fdf9a60065b 292 * | | |Note: If the BMDEN =1 and this bit is enabled, the information of I2C_STATUS will be fixed as 0xF0 in slave receive condition.
kadonotakashi 0:8fdf9a60065b 293 * |[1] |PECEN |Packet Error Checking Calculation Enable Bit
kadonotakashi 0:8fdf9a60065b 294 * | | |0 = Packet Error Checking Calculation Disabled.
kadonotakashi 0:8fdf9a60065b 295 * | | |1 = Packet Error Checking Calculation Enabled.
kadonotakashi 0:8fdf9a60065b 296 * | | |Note: When I2C enter power down mode, the bit should be enabled after wake-up if needed PEC calculation.
kadonotakashi 0:8fdf9a60065b 297 * |[2] |BMDEN |Bus Management Device Default Address Enable Bit
kadonotakashi 0:8fdf9a60065b 298 * | | |0 = Device default address Disable
kadonotakashi 0:8fdf9a60065b 299 * | | |When the address 0'b1100001x coming and the both of BMDEN and ACKMEN are enabled, the device responses NACKed
kadonotakashi 0:8fdf9a60065b 300 * | | |1 = Device default address Enabled
kadonotakashi 0:8fdf9a60065b 301 * | | |When the address 0'b1100001x coming and the both of BMDEN and ACKMEN are enabled, the device responses ACKed.
kadonotakashi 0:8fdf9a60065b 302 * |[3] |BMHEN |Bus Management Host Enable Bit
kadonotakashi 0:8fdf9a60065b 303 * | | |0 = Host function Disabled.
kadonotakashi 0:8fdf9a60065b 304 * | | |1 = Host function Enabled.
kadonotakashi 0:8fdf9a60065b 305 * |[4] |ALERTEN |Bus Management Alert Enable Bit
kadonotakashi 0:8fdf9a60065b 306 * | | |Device Mode (BMHEN =0).
kadonotakashi 0:8fdf9a60065b 307 * | | |0 = Release the BM_ALERT pin high and Alert Response Header disabled: 0001100x followed by NACK if both of BMDEN and ACKMEN are enabled.
kadonotakashi 0:8fdf9a60065b 308 * | | |1 = Drive BM_ALERT pin low and Alert Response Address Header enables: 0001100x followed by ACK if both of BMDEN and ACKMEN are enabled.
kadonotakashi 0:8fdf9a60065b 309 * | | |Host Mode (BMHEN =1).
kadonotakashi 0:8fdf9a60065b 310 * | | |0 = BM_ALERT pin not supported.
kadonotakashi 0:8fdf9a60065b 311 * | | |1 = BM_ALERT pin supported.
kadonotakashi 0:8fdf9a60065b 312 * |[5] |SCTLOSTS |Suspend/Control Data Output Status
kadonotakashi 0:8fdf9a60065b 313 * | | |0 = The output of SUSCON pin is low.
kadonotakashi 0:8fdf9a60065b 314 * | | |1 = The output of SUSCON pin is high.
kadonotakashi 0:8fdf9a60065b 315 * |[6] |SCTLOEN |Suspend or Control Pin Output Enable Bit
kadonotakashi 0:8fdf9a60065b 316 * | | |0 = The SUSCON pin in input.
kadonotakashi 0:8fdf9a60065b 317 * | | |1 = The output enable is active on the SUSCON pin.
kadonotakashi 0:8fdf9a60065b 318 * |[7] |BUSEN |BUS Enable Bit
kadonotakashi 0:8fdf9a60065b 319 * | | |0 = The system management function is Disabled.
kadonotakashi 0:8fdf9a60065b 320 * | | |1 = The system management function is Enable.
kadonotakashi 0:8fdf9a60065b 321 * | | |Note: When the bit is enabled, the internal 14-bit counter is used to calculate the time out event of clock low condition.
kadonotakashi 0:8fdf9a60065b 322 * |[8] |PECTXEN |Packet Error Checking Byte Transmission/Reception
kadonotakashi 0:8fdf9a60065b 323 * | | |0 = No PEC transfer.
kadonotakashi 0:8fdf9a60065b 324 * | | |1 = PEC transmission is requested.
kadonotakashi 0:8fdf9a60065b 325 * | | |Note: 1.This bit has no effect in slave mode when ACKMEN =0.
kadonotakashi 0:8fdf9a60065b 326 * |[9] |TIDLE |Timer Check in Idle State
kadonotakashi 0:8fdf9a60065b 327 * | | |The BUSTOUT is used to calculate the time-out of clock low in bus active and the idle period in bus Idle
kadonotakashi 0:8fdf9a60065b 328 * | | |This bit is used to define which condition is enabled.
kadonotakashi 0:8fdf9a60065b 329 * | | |0 = The BUSTOUT is used to calculate the clock low period in bus active.
kadonotakashi 0:8fdf9a60065b 330 * | | |1 = The BUSTOUT is used to calculate the IDLE period in bus Idle.
kadonotakashi 0:8fdf9a60065b 331 * | | |Note: The BUSY (I2C_BUSSTS[0]) indicate the current bus state.
kadonotakashi 0:8fdf9a60065b 332 * |[10] |PECCLR |PEC Clear at Repeat Start
kadonotakashi 0:8fdf9a60065b 333 * | | |The calculation of PEC starts when PECEN is set to 1 and it is clear when the STA or STO bit is detected
kadonotakashi 0:8fdf9a60065b 334 * | | |This PECCLR bit is used to enable the condition of REPEAT START can clear the PEC calculation.
kadonotakashi 0:8fdf9a60065b 335 * | | |0 = The PEC calculation is cleared by Repeat Start function is Disabled.
kadonotakashi 0:8fdf9a60065b 336 * | | |1 = The PEC calculation is cleared by Repeat Start function is Enabled.
kadonotakashi 0:8fdf9a60065b 337 * |[11] |ACKM9SI |Acknowledge Manual Enable Extra SI Interrupt
kadonotakashi 0:8fdf9a60065b 338 * | | |0 = There is no SI interrupt in the 9th clock cycle when the BUSEN =1 and ACKMEN =1.
kadonotakashi 0:8fdf9a60065b 339 * | | |1 = There is SI interrupt in the 9th clock cycle when the BUSEN =1 and ACKMEN =1.
kadonotakashi 0:8fdf9a60065b 340 * |[12] |BCDIEN |Packet Error Checking Byte Count Done Interrupt Enable Bit
kadonotakashi 0:8fdf9a60065b 341 * | | |0 = Indicates the byte count done interrupt is Disabled.
kadonotakashi 0:8fdf9a60065b 342 * | | |1 = Indicates the byte count done interrupt is Enabled.
kadonotakashi 0:8fdf9a60065b 343 * | | |Note: This bit is used in PECEN =1.
kadonotakashi 0:8fdf9a60065b 344 * |[13] |PECDIEN |Packet Error Checking Byte Transfer Done Interrupt Enable Bit
kadonotakashi 0:8fdf9a60065b 345 * | | |0 = Indicates the PEC transfer done interrupt is Disabled.
kadonotakashi 0:8fdf9a60065b 346 * | | |1 = Indicates the PEC transfer done interrupt is Enabled.
kadonotakashi 0:8fdf9a60065b 347 * | | |Note: This bit is used in PECEN =1.
kadonotakashi 0:8fdf9a60065b 348 * @var I2C_T::BUSTCTL
kadonotakashi 0:8fdf9a60065b 349 * Offset: 0x54 I2C Bus Management Timer Control Register
kadonotakashi 0:8fdf9a60065b 350 * ---------------------------------------------------------------------------------------------------
kadonotakashi 0:8fdf9a60065b 351 * |Bits |Field |Descriptions
kadonotakashi 0:8fdf9a60065b 352 * | :----: | :----: | :---- |
kadonotakashi 0:8fdf9a60065b 353 * |[0] |BUSTOEN |Bus Time Out Enable Bit
kadonotakashi 0:8fdf9a60065b 354 * | | |0 = Indicates the bus clock low time-out detection is Disabled.
kadonotakashi 0:8fdf9a60065b 355 * | | |1 = Indicates the bus clock low time-out detection is Enabled (bus clock is low for more than Time-out (in BIDLE=0) or high more than Time-out(in BIDLE =1)
kadonotakashi 0:8fdf9a60065b 356 * |[1] |CLKTOEN |Cumulative Clock Low Time Out Enable Bit
kadonotakashi 0:8fdf9a60065b 357 * | | |0 = Indicates the cumulative clock low time-out detection is Disabled.
kadonotakashi 0:8fdf9a60065b 358 * | | |1 = Indicates the cumulative clock low time-out detection is Enabled.
kadonotakashi 0:8fdf9a60065b 359 * | | |For Master, it calculates the period from START to ACK
kadonotakashi 0:8fdf9a60065b 360 * | | |For Slave, it calculates the period from START to STOP
kadonotakashi 0:8fdf9a60065b 361 * |[2] |BUSTOIEN |Time-out Interrupt Enable Bit
kadonotakashi 0:8fdf9a60065b 362 * | | |BUSY =1.
kadonotakashi 0:8fdf9a60065b 363 * | | |0 = Indicates the SCLK low time-out interrupt is Disabled.
kadonotakashi 0:8fdf9a60065b 364 * | | |1 = Indicates the SCLK low time-out interrupt is Enabled.
kadonotakashi 0:8fdf9a60065b 365 * | | |BUSY =0.
kadonotakashi 0:8fdf9a60065b 366 * | | |0 = Indicates the bus IDLE time-out interrupt is Disabled.
kadonotakashi 0:8fdf9a60065b 367 * | | |1 = Indicates the bus IDLE time-out interrupt is Enabled.
kadonotakashi 0:8fdf9a60065b 368 * |[3] |CLKTOIEN |Extended Clock Time Out Interrupt Enable Bit
kadonotakashi 0:8fdf9a60065b 369 * | | |0 = Indicates the clock time out interrupt is Disabled.
kadonotakashi 0:8fdf9a60065b 370 * | | |1 = Indicates the clock time out interrupt is Enabled.
kadonotakashi 0:8fdf9a60065b 371 * |[4] |TORSTEN |Time Out Reset Enable Bit
kadonotakashi 0:8fdf9a60065b 372 * | | |0 = Indicates the I2C state machine reset is Disable.
kadonotakashi 0:8fdf9a60065b 373 * | | |1 = Indicates the I2C state machine reset is Enable. (The clock and data bus will be released to high)
kadonotakashi 0:8fdf9a60065b 374 * @var I2C_T::BUSSTS
kadonotakashi 0:8fdf9a60065b 375 * Offset: 0x58 I2C Bus Management Status Register
kadonotakashi 0:8fdf9a60065b 376 * ---------------------------------------------------------------------------------------------------
kadonotakashi 0:8fdf9a60065b 377 * |Bits |Field |Descriptions
kadonotakashi 0:8fdf9a60065b 378 * | :----: | :----: | :---- |
kadonotakashi 0:8fdf9a60065b 379 * |[0] |BUSY |Bus Busy
kadonotakashi 0:8fdf9a60065b 380 * | | |Indicates that a communication is in progress on the bus
kadonotakashi 0:8fdf9a60065b 381 * | | |It is set by hardware when a START condition is detected
kadonotakashi 0:8fdf9a60065b 382 * | | |It is cleared by hardware when a STOP condition is detected
kadonotakashi 0:8fdf9a60065b 383 * | | |0 = The bus is IDLE (both SCLK and SDA High).
kadonotakashi 0:8fdf9a60065b 384 * | | |1 = The bus is busy.
kadonotakashi 0:8fdf9a60065b 385 * |[1] |BCDONE |Byte Count Transmission/Receive Done
kadonotakashi 0:8fdf9a60065b 386 * | | |0 = Indicates the byte count transmission/ receive is not finished when the PECEN is set.
kadonotakashi 0:8fdf9a60065b 387 * | | |1 = Indicates the byte count transmission/ receive is finished when the PECEN is set.
kadonotakashi 0:8fdf9a60065b 388 * | | |Note: Software can write 1 to clear this bit.
kadonotakashi 0:8fdf9a60065b 389 * |[2] |PECERR |PEC Error in Reception
kadonotakashi 0:8fdf9a60065b 390 * | | |0 = Indicates the PEC value equal the received PEC data packet.
kadonotakashi 0:8fdf9a60065b 391 * | | |1 = Indicates the PEC value doesn't match the receive PEC data packet.
kadonotakashi 0:8fdf9a60065b 392 * | | |Note: Software can write 1 to clear this bit.
kadonotakashi 0:8fdf9a60065b 393 * |[3] |ALERT |SMBus Alert Status
kadonotakashi 0:8fdf9a60065b 394 * | | |Device Mode (BMHEN =0).
kadonotakashi 0:8fdf9a60065b 395 * | | |0 = Indicates SMBALERT pin state is low.
kadonotakashi 0:8fdf9a60065b 396 * | | |1 = Indicates SMBALERT pin state is high.
kadonotakashi 0:8fdf9a60065b 397 * | | |Host Mode (BMHEN =1).
kadonotakashi 0:8fdf9a60065b 398 * | | |0 = No SMBALERT event.
kadonotakashi 0:8fdf9a60065b 399 * | | |1 = Indicates there is SMBALERT event (falling edge) is detected in SMALERT pin when the BMHEN = 1 (SMBus host configuration) and the ALERTEN = 1.
kadonotakashi 0:8fdf9a60065b 400 * | | |Note: 1
kadonotakashi 0:8fdf9a60065b 401 * | | |The SMBALERT pin is an open-drain pin, the pull-high resistor is must in the system
kadonotakashi 0:8fdf9a60065b 402 * | | |2
kadonotakashi 0:8fdf9a60065b 403 * | | |Software can write 1 to clear this bit.
kadonotakashi 0:8fdf9a60065b 404 * |[4] |SCTLDIN |Bus Suspend or Control Signal Input Status
kadonotakashi 0:8fdf9a60065b 405 * | | |0 = The input status of SUSCON pin is 0.
kadonotakashi 0:8fdf9a60065b 406 * | | |1 = The input status of SUSCON pin is 1.
kadonotakashi 0:8fdf9a60065b 407 * |[5] |BUSTO |Bus Time-out Status
kadonotakashi 0:8fdf9a60065b 408 * | | |0 = Indicates that there is no any time-out or external clock time-out.
kadonotakashi 0:8fdf9a60065b 409 * | | |1 = Indicates that a time-out or external clock time-out occurred.
kadonotakashi 0:8fdf9a60065b 410 * | | |In bus busy, the bit indicates the total clock low time-out event occurred otherwise, it indicates the bus idle time-out event occurred.
kadonotakashi 0:8fdf9a60065b 411 * | | |Note: Software can write 1 to clear this bit.
kadonotakashi 0:8fdf9a60065b 412 * |[6] |CLKTO |Clock Low Accumulate Time-out Status
kadonotakashi 0:8fdf9a60065b 413 * | | |0 = Indicates that the cumulative clock low is no any time-out.
kadonotakashi 0:8fdf9a60065b 414 * | | |1 = Indicates that the cumulative clock low time-out occurred.
kadonotakashi 0:8fdf9a60065b 415 * | | |Note: Software can write 1 to clear this bit.
kadonotakashi 0:8fdf9a60065b 416 * |[7] |PECDONE |PEC Byte Transmission/Receive Done
kadonotakashi 0:8fdf9a60065b 417 * | | |0 = Indicates the PEC transmission/ receive is not finished when the PECEN is set.
kadonotakashi 0:8fdf9a60065b 418 * | | |1 = Indicates the PEC transmission/ receive is finished when the PECEN is set.
kadonotakashi 0:8fdf9a60065b 419 * | | |Note: Software can write 1 to clear this bit.
kadonotakashi 0:8fdf9a60065b 420 * @var I2C_T::PKTSIZE
kadonotakashi 0:8fdf9a60065b 421 * Offset: 0x5C I2C Packet Error Checking Byte Number Register
kadonotakashi 0:8fdf9a60065b 422 * ---------------------------------------------------------------------------------------------------
kadonotakashi 0:8fdf9a60065b 423 * |Bits |Field |Descriptions
kadonotakashi 0:8fdf9a60065b 424 * | :----: | :----: | :---- |
kadonotakashi 0:8fdf9a60065b 425 * |[8:0] |PLDSIZE |Transfer Byte Number
kadonotakashi 0:8fdf9a60065b 426 * | | |The transmission or receive byte number in one transaction when the PECEN is set
kadonotakashi 0:8fdf9a60065b 427 * | | |The maximum transaction or receive byte is 256 Bytes.
kadonotakashi 0:8fdf9a60065b 428 * | | |Notice: The byte number counting includes address, command code, and data frame.
kadonotakashi 0:8fdf9a60065b 429 * @var I2C_T::PKTCRC
kadonotakashi 0:8fdf9a60065b 430 * Offset: 0x60 I2C Packet Error Checking Byte Value Register
kadonotakashi 0:8fdf9a60065b 431 * ---------------------------------------------------------------------------------------------------
kadonotakashi 0:8fdf9a60065b 432 * |Bits |Field |Descriptions
kadonotakashi 0:8fdf9a60065b 433 * | :----: | :----: | :---- |
kadonotakashi 0:8fdf9a60065b 434 * |[7:0] |PECCRC |Packet Error Checking Byte Value
kadonotakashi 0:8fdf9a60065b 435 * | | |This byte indicates the packet error checking content after transmission or receive byte count by using the C(x) = X8 + X2 + X + 1
kadonotakashi 0:8fdf9a60065b 436 * | | |It is read only.
kadonotakashi 0:8fdf9a60065b 437 * @var I2C_T::BUSTOUT
kadonotakashi 0:8fdf9a60065b 438 * Offset: 0x64 I2C Bus Management Timer Register
kadonotakashi 0:8fdf9a60065b 439 * ---------------------------------------------------------------------------------------------------
kadonotakashi 0:8fdf9a60065b 440 * |Bits |Field |Descriptions
kadonotakashi 0:8fdf9a60065b 441 * | :----: | :----: | :---- |
kadonotakashi 0:8fdf9a60065b 442 * |[7:0] |BUSTO |Bus Management Time-out Value
kadonotakashi 0:8fdf9a60065b 443 * | | |Indicate the bus time-out value in bus is IDLE or SCLK low.
kadonotakashi 0:8fdf9a60065b 444 * | | |Note: If the user wants to revise the value of BUSTOUT, the TORSTEN (I2C_BUSTCTL[4]) bit shall be set to 1 and clear to 0 first in the BUSEN(I2C_BUSCTL[7]) is set.
kadonotakashi 0:8fdf9a60065b 445 * @var I2C_T::CLKTOUT
kadonotakashi 0:8fdf9a60065b 446 * Offset: 0x68 I2C Bus Management Clock Low Timer Register
kadonotakashi 0:8fdf9a60065b 447 * ---------------------------------------------------------------------------------------------------
kadonotakashi 0:8fdf9a60065b 448 * |Bits |Field |Descriptions
kadonotakashi 0:8fdf9a60065b 449 * | :----: | :----: | :---- |
kadonotakashi 0:8fdf9a60065b 450 * |[7:0] |CLKTO |Bus Clock Low Timer
kadonotakashi 0:8fdf9a60065b 451 * | | |The field is used to configure the cumulative clock extension time-out.
kadonotakashi 0:8fdf9a60065b 452 * | | |Note: If the user wants to revise the value of CLKLTOUT, the TORSTEN bit shall be set to 1 and clear to 0 first in the BUSEN is set.
kadonotakashi 0:8fdf9a60065b 453 */
kadonotakashi 0:8fdf9a60065b 454 __IO uint32_t CTL0; /*!< [0x0000] I2C Control Register 0 */
kadonotakashi 0:8fdf9a60065b 455 __IO uint32_t ADDR0; /*!< [0x0004] I2C Slave Address Register0 */
kadonotakashi 0:8fdf9a60065b 456 __IO uint32_t DAT; /*!< [0x0008] I2C Data Register */
kadonotakashi 0:8fdf9a60065b 457 __I uint32_t STATUS0; /*!< [0x000c] I2C Status Register 0 */
kadonotakashi 0:8fdf9a60065b 458 __IO uint32_t CLKDIV; /*!< [0x0010] I2C Clock Divided Register */
kadonotakashi 0:8fdf9a60065b 459 __IO uint32_t TOCTL; /*!< [0x0014] I2C Time-out Control Register */
kadonotakashi 0:8fdf9a60065b 460 __IO uint32_t ADDR1; /*!< [0x0018] I2C Slave Address Register1 */
kadonotakashi 0:8fdf9a60065b 461 __IO uint32_t ADDR2; /*!< [0x001c] I2C Slave Address Register2 */
kadonotakashi 0:8fdf9a60065b 462 __IO uint32_t ADDR3; /*!< [0x0020] I2C Slave Address Register3 */
kadonotakashi 0:8fdf9a60065b 463 __IO uint32_t ADDRMSK0; /*!< [0x0024] I2C Slave Address Mask Register0 */
kadonotakashi 0:8fdf9a60065b 464 __IO uint32_t ADDRMSK1; /*!< [0x0028] I2C Slave Address Mask Register1 */
kadonotakashi 0:8fdf9a60065b 465 __IO uint32_t ADDRMSK2; /*!< [0x002c] I2C Slave Address Mask Register2 */
kadonotakashi 0:8fdf9a60065b 466 __IO uint32_t ADDRMSK3; /*!< [0x0030] I2C Slave Address Mask Register3 */
kadonotakashi 0:8fdf9a60065b 467 __I uint32_t RESERVE0[2];
kadonotakashi 0:8fdf9a60065b 468 __IO uint32_t WKCTL; /*!< [0x003c] I2C Wake-up Control Register */
kadonotakashi 0:8fdf9a60065b 469 __IO uint32_t WKSTS; /*!< [0x0040] I2C Wake-up Status Register */
kadonotakashi 0:8fdf9a60065b 470 __IO uint32_t CTL1; /*!< [0x0044] I2C Control Register 1 */
kadonotakashi 0:8fdf9a60065b 471 __IO uint32_t STATUS1; /*!< [0x0048] I2C Status Register 1 */
kadonotakashi 0:8fdf9a60065b 472 __IO uint32_t TMCTL; /*!< [0x004c] I2C Timing Configure Control Register */
kadonotakashi 0:8fdf9a60065b 473 __IO uint32_t BUSCTL; /*!< [0x0050] I2C Bus Management Control Register */
kadonotakashi 0:8fdf9a60065b 474 __IO uint32_t BUSTCTL; /*!< [0x0054] I2C Bus Management Timer Control Register */
kadonotakashi 0:8fdf9a60065b 475 __IO uint32_t BUSSTS; /*!< [0x0058] I2C Bus Management Status Register */
kadonotakashi 0:8fdf9a60065b 476 __IO uint32_t PKTSIZE; /*!< [0x005c] I2C Packet Error Checking Byte Number Register */
kadonotakashi 0:8fdf9a60065b 477 __I uint32_t PKTCRC; /*!< [0x0060] I2C Packet Error Checking Byte Value Register */
kadonotakashi 0:8fdf9a60065b 478 __IO uint32_t BUSTOUT; /*!< [0x0064] I2C Bus Management Timer Register */
kadonotakashi 0:8fdf9a60065b 479 __IO uint32_t CLKTOUT; /*!< [0x0068] I2C Bus Management Clock Low Timer Register */
kadonotakashi 0:8fdf9a60065b 480
kadonotakashi 0:8fdf9a60065b 481 } I2C_T;
kadonotakashi 0:8fdf9a60065b 482
kadonotakashi 0:8fdf9a60065b 483 /**
kadonotakashi 0:8fdf9a60065b 484 @addtogroup I2C_CONST I2C Bit Field Definition
kadonotakashi 0:8fdf9a60065b 485 Constant Definitions for I2C Controller
kadonotakashi 0:8fdf9a60065b 486 @{ */
kadonotakashi 0:8fdf9a60065b 487
kadonotakashi 0:8fdf9a60065b 488 #define I2C_CTL0_AA_Pos (2) /*!< I2C_T::CTL0: AA Position */
kadonotakashi 0:8fdf9a60065b 489 #define I2C_CTL0_AA_Msk (0x1ul << I2C_CTL0_AA_Pos) /*!< I2C_T::CTL0: AA Mask */
kadonotakashi 0:8fdf9a60065b 490
kadonotakashi 0:8fdf9a60065b 491 #define I2C_CTL0_SI_Pos (3) /*!< I2C_T::CTL0: SI Position */
kadonotakashi 0:8fdf9a60065b 492 #define I2C_CTL0_SI_Msk (0x1ul << I2C_CTL0_SI_Pos) /*!< I2C_T::CTL0: SI Mask */
kadonotakashi 0:8fdf9a60065b 493
kadonotakashi 0:8fdf9a60065b 494 #define I2C_CTL0_STO_Pos (4) /*!< I2C_T::CTL0: STO Position */
kadonotakashi 0:8fdf9a60065b 495 #define I2C_CTL0_STO_Msk (0x1ul << I2C_CTL0_STO_Pos) /*!< I2C_T::CTL0: STO Mask */
kadonotakashi 0:8fdf9a60065b 496
kadonotakashi 0:8fdf9a60065b 497 #define I2C_CTL0_STA_Pos (5) /*!< I2C_T::CTL0: STA Position */
kadonotakashi 0:8fdf9a60065b 498 #define I2C_CTL0_STA_Msk (0x1ul << I2C_CTL0_STA_Pos) /*!< I2C_T::CTL0: STA Mask */
kadonotakashi 0:8fdf9a60065b 499
kadonotakashi 0:8fdf9a60065b 500 #define I2C_CTL0_I2CEN_Pos (6) /*!< I2C_T::CTL0: I2CEN Position */
kadonotakashi 0:8fdf9a60065b 501 #define I2C_CTL0_I2CEN_Msk (0x1ul << I2C_CTL0_I2CEN_Pos) /*!< I2C_T::CTL0: I2CEN Mask */
kadonotakashi 0:8fdf9a60065b 502
kadonotakashi 0:8fdf9a60065b 503 #define I2C_CTL0_INTEN_Pos (7) /*!< I2C_T::CTL0: INTEN Position */
kadonotakashi 0:8fdf9a60065b 504 #define I2C_CTL0_INTEN_Msk (0x1ul << I2C_CTL0_INTEN_Pos) /*!< I2C_T::CTL0: INTEN Mask */
kadonotakashi 0:8fdf9a60065b 505
kadonotakashi 0:8fdf9a60065b 506 #define I2C_ADDR0_GC_Pos (0) /*!< I2C_T::ADDR0: GC Position */
kadonotakashi 0:8fdf9a60065b 507 #define I2C_ADDR0_GC_Msk (0x1ul << I2C_ADDR0_GC_Pos) /*!< I2C_T::ADDR0: GC Mask */
kadonotakashi 0:8fdf9a60065b 508
kadonotakashi 0:8fdf9a60065b 509 #define I2C_ADDR0_ADDR_Pos (1) /*!< I2C_T::ADDR0: ADDR Position */
kadonotakashi 0:8fdf9a60065b 510 #define I2C_ADDR0_ADDR_Msk (0x3fful << I2C_ADDR0_ADDR_Pos) /*!< I2C_T::ADDR0: ADDR Mask */
kadonotakashi 0:8fdf9a60065b 511
kadonotakashi 0:8fdf9a60065b 512 #define I2C_DAT_DAT_Pos (0) /*!< I2C_T::DAT: DAT Position */
kadonotakashi 0:8fdf9a60065b 513 #define I2C_DAT_DAT_Msk (0xfful << I2C_DAT_DAT_Pos) /*!< I2C_T::DAT: DAT Mask */
kadonotakashi 0:8fdf9a60065b 514
kadonotakashi 0:8fdf9a60065b 515 #define I2C_STATUS0_STATUS_Pos (0) /*!< I2C_T::STATUS0: STATUS Position */
kadonotakashi 0:8fdf9a60065b 516 #define I2C_STATUS0_STATUS_Msk (0xfful << I2C_STATUS0_STATUS_Pos) /*!< I2C_T::STATUS0: STATUS Mask */
kadonotakashi 0:8fdf9a60065b 517
kadonotakashi 0:8fdf9a60065b 518 #define I2C_CLKDIV_DIVIDER_Pos (0) /*!< I2C_T::CLKDIV: DIVIDER Position */
kadonotakashi 0:8fdf9a60065b 519 #define I2C_CLKDIV_DIVIDER_Msk (0x3fful << I2C_CLKDIV_DIVIDER_Pos) /*!< I2C_T::CLKDIV: DIVIDER Mask */
kadonotakashi 0:8fdf9a60065b 520
kadonotakashi 0:8fdf9a60065b 521 #define I2C_TOCTL_TOIF_Pos (0) /*!< I2C_T::TOCTL: TOIF Position */
kadonotakashi 0:8fdf9a60065b 522 #define I2C_TOCTL_TOIF_Msk (0x1ul << I2C_TOCTL_TOIF_Pos) /*!< I2C_T::TOCTL: TOIF Mask */
kadonotakashi 0:8fdf9a60065b 523
kadonotakashi 0:8fdf9a60065b 524 #define I2C_TOCTL_TOCDIV4_Pos (1) /*!< I2C_T::TOCTL: TOCDIV4 Position */
kadonotakashi 0:8fdf9a60065b 525 #define I2C_TOCTL_TOCDIV4_Msk (0x1ul << I2C_TOCTL_TOCDIV4_Pos) /*!< I2C_T::TOCTL: TOCDIV4 Mask */
kadonotakashi 0:8fdf9a60065b 526
kadonotakashi 0:8fdf9a60065b 527 #define I2C_TOCTL_TOCEN_Pos (2) /*!< I2C_T::TOCTL: TOCEN Position */
kadonotakashi 0:8fdf9a60065b 528 #define I2C_TOCTL_TOCEN_Msk (0x1ul << I2C_TOCTL_TOCEN_Pos) /*!< I2C_T::TOCTL: TOCEN Mask */
kadonotakashi 0:8fdf9a60065b 529
kadonotakashi 0:8fdf9a60065b 530 #define I2C_ADDR1_GC_Pos (0) /*!< I2C_T::ADDR1: GC Position */
kadonotakashi 0:8fdf9a60065b 531 #define I2C_ADDR1_GC_Msk (0x1ul << I2C_ADDR1_GC_Pos) /*!< I2C_T::ADDR1: GC Mask */
kadonotakashi 0:8fdf9a60065b 532
kadonotakashi 0:8fdf9a60065b 533 #define I2C_ADDR1_ADDR_Pos (1) /*!< I2C_T::ADDR1: ADDR Position */
kadonotakashi 0:8fdf9a60065b 534 #define I2C_ADDR1_ADDR_Msk (0x3fful << I2C_ADDR1_ADDR_Pos) /*!< I2C_T::ADDR1: ADDR Mask */
kadonotakashi 0:8fdf9a60065b 535
kadonotakashi 0:8fdf9a60065b 536 #define I2C_ADDR2_GC_Pos (0) /*!< I2C_T::ADDR2: GC Position */
kadonotakashi 0:8fdf9a60065b 537 #define I2C_ADDR2_GC_Msk (0x1ul << I2C_ADDR2_GC_Pos) /*!< I2C_T::ADDR2: GC Mask */
kadonotakashi 0:8fdf9a60065b 538
kadonotakashi 0:8fdf9a60065b 539 #define I2C_ADDR2_ADDR_Pos (1) /*!< I2C_T::ADDR2: ADDR Position */
kadonotakashi 0:8fdf9a60065b 540 #define I2C_ADDR2_ADDR_Msk (0x3fful << I2C_ADDR2_ADDR_Pos) /*!< I2C_T::ADDR2: ADDR Mask */
kadonotakashi 0:8fdf9a60065b 541
kadonotakashi 0:8fdf9a60065b 542 #define I2C_ADDR3_GC_Pos (0) /*!< I2C_T::ADDR3: GC Position */
kadonotakashi 0:8fdf9a60065b 543 #define I2C_ADDR3_GC_Msk (0x1ul << I2C_ADDR3_GC_Pos) /*!< I2C_T::ADDR3: GC Mask */
kadonotakashi 0:8fdf9a60065b 544
kadonotakashi 0:8fdf9a60065b 545 #define I2C_ADDR3_ADDR_Pos (1) /*!< I2C_T::ADDR3: ADDR Position */
kadonotakashi 0:8fdf9a60065b 546 #define I2C_ADDR3_ADDR_Msk (0x3fful << I2C_ADDR3_ADDR_Pos) /*!< I2C_T::ADDR3: ADDR Mask */
kadonotakashi 0:8fdf9a60065b 547
kadonotakashi 0:8fdf9a60065b 548 #define I2C_ADDRMSK0_ADDRMSK_Pos (1) /*!< I2C_T::ADDRMSK0: ADDRMSK Position */
kadonotakashi 0:8fdf9a60065b 549 #define I2C_ADDRMSK0_ADDRMSK_Msk (0x3fful << I2C_ADDRMSK0_ADDRMSK_Pos) /*!< I2C_T::ADDRMSK0: ADDRMSK Mask */
kadonotakashi 0:8fdf9a60065b 550
kadonotakashi 0:8fdf9a60065b 551 #define I2C_ADDRMSK1_ADDRMSK_Pos (1) /*!< I2C_T::ADDRMSK1: ADDRMSK Position */
kadonotakashi 0:8fdf9a60065b 552 #define I2C_ADDRMSK1_ADDRMSK_Msk (0x3fful << I2C_ADDRMSK1_ADDRMSK_Pos) /*!< I2C_T::ADDRMSK1: ADDRMSK Mask */
kadonotakashi 0:8fdf9a60065b 553
kadonotakashi 0:8fdf9a60065b 554 #define I2C_ADDRMSK2_ADDRMSK_Pos (1) /*!< I2C_T::ADDRMSK2: ADDRMSK Position */
kadonotakashi 0:8fdf9a60065b 555 #define I2C_ADDRMSK2_ADDRMSK_Msk (0x3fful << I2C_ADDRMSK2_ADDRMSK_Pos) /*!< I2C_T::ADDRMSK2: ADDRMSK Mask */
kadonotakashi 0:8fdf9a60065b 556
kadonotakashi 0:8fdf9a60065b 557 #define I2C_ADDRMSK3_ADDRMSK_Pos (1) /*!< I2C_T::ADDRMSK3: ADDRMSK Position */
kadonotakashi 0:8fdf9a60065b 558 #define I2C_ADDRMSK3_ADDRMSK_Msk (0x3fful << I2C_ADDRMSK3_ADDRMSK_Pos) /*!< I2C_T::ADDRMSK3: ADDRMSK Mask */
kadonotakashi 0:8fdf9a60065b 559
kadonotakashi 0:8fdf9a60065b 560 #define I2C_WKCTL_WKEN_Pos (0) /*!< I2C_T::WKCTL: WKEN Position */
kadonotakashi 0:8fdf9a60065b 561 #define I2C_WKCTL_WKEN_Msk (0x1ul << I2C_WKCTL_WKEN_Pos) /*!< I2C_T::WKCTL: WKEN Mask */
kadonotakashi 0:8fdf9a60065b 562
kadonotakashi 0:8fdf9a60065b 563 #define I2C_WKCTL_NHDBUSEN_Pos (7) /*!< I2C_T::WKCTL: NHDBUSEN Position */
kadonotakashi 0:8fdf9a60065b 564 #define I2C_WKCTL_NHDBUSEN_Msk (0x1ul << I2C_WKCTL_NHDBUSEN_Pos) /*!< I2C_T::WKCTL: NHDBUSEN Mask */
kadonotakashi 0:8fdf9a60065b 565
kadonotakashi 0:8fdf9a60065b 566 #define I2C_WKSTS_WKIF_Pos (0) /*!< I2C_T::WKSTS: WKIF Position */
kadonotakashi 0:8fdf9a60065b 567 #define I2C_WKSTS_WKIF_Msk (0x1ul << I2C_WKSTS_WKIF_Pos) /*!< I2C_T::WKSTS: WKIF Mask */
kadonotakashi 0:8fdf9a60065b 568
kadonotakashi 0:8fdf9a60065b 569 #define I2C_WKSTS_WKAKDONE_Pos (1) /*!< I2C_T::WKSTS: WKAKDONE Position */
kadonotakashi 0:8fdf9a60065b 570 #define I2C_WKSTS_WKAKDONE_Msk (0x1ul << I2C_WKSTS_WKAKDONE_Pos) /*!< I2C_T::WKSTS: WKAKDONE Mask */
kadonotakashi 0:8fdf9a60065b 571
kadonotakashi 0:8fdf9a60065b 572 #define I2C_WKSTS_WRSTSWK_Pos (2) /*!< I2C_T::WKSTS: WRSTSWK Position */
kadonotakashi 0:8fdf9a60065b 573 #define I2C_WKSTS_WRSTSWK_Msk (0x1ul << I2C_WKSTS_WRSTSWK_Pos) /*!< I2C_T::WKSTS: WRSTSWK Mask */
kadonotakashi 0:8fdf9a60065b 574
kadonotakashi 0:8fdf9a60065b 575 #define I2C_CTL1_TXPDMAEN_Pos (0) /*!< I2C_T::CTL1: TXPDMAEN Position */
kadonotakashi 0:8fdf9a60065b 576 #define I2C_CTL1_TXPDMAEN_Msk (0x1ul << I2C_CTL1_TXPDMAEN_Pos) /*!< I2C_T::CTL1: TXPDMAEN Mask */
kadonotakashi 0:8fdf9a60065b 577
kadonotakashi 0:8fdf9a60065b 578 #define I2C_CTL1_RXPDMAEN_Pos (1) /*!< I2C_T::CTL1: RXPDMAEN Position */
kadonotakashi 0:8fdf9a60065b 579 #define I2C_CTL1_RXPDMAEN_Msk (0x1ul << I2C_CTL1_RXPDMAEN_Pos) /*!< I2C_T::CTL1: RXPDMAEN Mask */
kadonotakashi 0:8fdf9a60065b 580
kadonotakashi 0:8fdf9a60065b 581 #define I2C_CTL1_PDMARST_Pos (2) /*!< I2C_T::CTL1: PDMARST Position */
kadonotakashi 0:8fdf9a60065b 582 #define I2C_CTL1_PDMARST_Msk (0x1ul << I2C_CTL1_PDMARST_Pos) /*!< I2C_T::CTL1: PDMARST Mask */
kadonotakashi 0:8fdf9a60065b 583
kadonotakashi 0:8fdf9a60065b 584 #define I2C_CTL1_PDMASTR_Pos (8) /*!< I2C_T::CTL1: PDMASTR Position */
kadonotakashi 0:8fdf9a60065b 585 #define I2C_CTL1_PDMASTR_Msk (0x1ul << I2C_CTL1_PDMASTR_Pos) /*!< I2C_T::CTL1: PDMASTR Mask */
kadonotakashi 0:8fdf9a60065b 586
kadonotakashi 0:8fdf9a60065b 587 #define I2C_CTL1_ADDR10EN_Pos (9) /*!< I2C_T::CTL1: ADDR10EN Position */
kadonotakashi 0:8fdf9a60065b 588 #define I2C_CTL1_ADDR10EN_Msk (0x1ul << I2C_CTL1_ADDR10EN_Pos) /*!< I2C_T::CTL1: ADDR10EN Mask */
kadonotakashi 0:8fdf9a60065b 589
kadonotakashi 0:8fdf9a60065b 590 #define I2C_STATUS1_ADMAT0_Pos (0) /*!< I2C_T::STATUS1: ADMAT0 Position */
kadonotakashi 0:8fdf9a60065b 591 #define I2C_STATUS1_ADMAT0_Msk (0x1ul << I2C_STATUS1_ADMAT0_Pos) /*!< I2C_T::STATUS1: ADMAT0 Mask */
kadonotakashi 0:8fdf9a60065b 592
kadonotakashi 0:8fdf9a60065b 593 #define I2C_STATUS1_ADMAT1_Pos (1) /*!< I2C_T::STATUS1: ADMAT1 Position */
kadonotakashi 0:8fdf9a60065b 594 #define I2C_STATUS1_ADMAT1_Msk (0x1ul << I2C_STATUS1_ADMAT1_Pos) /*!< I2C_T::STATUS1: ADMAT1 Mask */
kadonotakashi 0:8fdf9a60065b 595
kadonotakashi 0:8fdf9a60065b 596 #define I2C_STATUS1_ADMAT2_Pos (2) /*!< I2C_T::STATUS1: ADMAT2 Position */
kadonotakashi 0:8fdf9a60065b 597 #define I2C_STATUS1_ADMAT2_Msk (0x1ul << I2C_STATUS1_ADMAT2_Pos) /*!< I2C_T::STATUS1: ADMAT2 Mask */
kadonotakashi 0:8fdf9a60065b 598
kadonotakashi 0:8fdf9a60065b 599 #define I2C_STATUS1_ADMAT3_Pos (3) /*!< I2C_T::STATUS1: ADMAT3 Position */
kadonotakashi 0:8fdf9a60065b 600 #define I2C_STATUS1_ADMAT3_Msk (0x1ul << I2C_STATUS1_ADMAT3_Pos) /*!< I2C_T::STATUS1: ADMAT3 Mask */
kadonotakashi 0:8fdf9a60065b 601
kadonotakashi 0:8fdf9a60065b 602 #define I2C_STATUS1_ONBUSY_Pos (8) /*!< I2C_T::STATUS1: ONBUSY Position */
kadonotakashi 0:8fdf9a60065b 603 #define I2C_STATUS1_ONBUSY_Msk (0x1ul << I2C_STATUS1_ONBUSY_Pos) /*!< I2C_T::STATUS1: ONBUSY Mask */
kadonotakashi 0:8fdf9a60065b 604
kadonotakashi 0:8fdf9a60065b 605 #define I2C_TMCTL_STCTL_Pos (0) /*!< I2C_T::TMCTL: STCTL Position */
kadonotakashi 0:8fdf9a60065b 606 #define I2C_TMCTL_STCTL_Msk (0x1fful << I2C_TMCTL_STCTL_Pos) /*!< I2C_T::TMCTL: STCTL Mask */
kadonotakashi 0:8fdf9a60065b 607
kadonotakashi 0:8fdf9a60065b 608 #define I2C_TMCTL_HTCTL_Pos (16) /*!< I2C_T::TMCTL: HTCTL Position */
kadonotakashi 0:8fdf9a60065b 609 #define I2C_TMCTL_HTCTL_Msk (0x1fful << I2C_TMCTL_HTCTL_Pos) /*!< I2C_T::TMCTL: HTCTL Mask */
kadonotakashi 0:8fdf9a60065b 610
kadonotakashi 0:8fdf9a60065b 611 #define I2C_BUSCTL_ACKMEN_Pos (0) /*!< I2C_T::BUSCTL: ACKMEN Position */
kadonotakashi 0:8fdf9a60065b 612 #define I2C_BUSCTL_ACKMEN_Msk (0x1ul << I2C_BUSCTL_ACKMEN_Pos) /*!< I2C_T::BUSCTL: ACKMEN Mask */
kadonotakashi 0:8fdf9a60065b 613
kadonotakashi 0:8fdf9a60065b 614 #define I2C_BUSCTL_PECEN_Pos (1) /*!< I2C_T::BUSCTL: PECEN Position */
kadonotakashi 0:8fdf9a60065b 615 #define I2C_BUSCTL_PECEN_Msk (0x1ul << I2C_BUSCTL_PECEN_Pos) /*!< I2C_T::BUSCTL: PECEN Mask */
kadonotakashi 0:8fdf9a60065b 616
kadonotakashi 0:8fdf9a60065b 617 #define I2C_BUSCTL_BMDEN_Pos (2) /*!< I2C_T::BUSCTL: BMDEN Position */
kadonotakashi 0:8fdf9a60065b 618 #define I2C_BUSCTL_BMDEN_Msk (0x1ul << I2C_BUSCTL_BMDEN_Pos) /*!< I2C_T::BUSCTL: BMDEN Mask */
kadonotakashi 0:8fdf9a60065b 619
kadonotakashi 0:8fdf9a60065b 620 #define I2C_BUSCTL_BMHEN_Pos (3) /*!< I2C_T::BUSCTL: BMHEN Position */
kadonotakashi 0:8fdf9a60065b 621 #define I2C_BUSCTL_BMHEN_Msk (0x1ul << I2C_BUSCTL_BMHEN_Pos) /*!< I2C_T::BUSCTL: BMHEN Mask */
kadonotakashi 0:8fdf9a60065b 622
kadonotakashi 0:8fdf9a60065b 623 #define I2C_BUSCTL_ALERTEN_Pos (4) /*!< I2C_T::BUSCTL: ALERTEN Position */
kadonotakashi 0:8fdf9a60065b 624 #define I2C_BUSCTL_ALERTEN_Msk (0x1ul << I2C_BUSCTL_ALERTEN_Pos) /*!< I2C_T::BUSCTL: ALERTEN Mask */
kadonotakashi 0:8fdf9a60065b 625
kadonotakashi 0:8fdf9a60065b 626 #define I2C_BUSCTL_SCTLOSTS_Pos (5) /*!< I2C_T::BUSCTL: SCTLOSTS Position */
kadonotakashi 0:8fdf9a60065b 627 #define I2C_BUSCTL_SCTLOSTS_Msk (0x1ul << I2C_BUSCTL_SCTLOSTS_Pos) /*!< I2C_T::BUSCTL: SCTLOSTS Mask */
kadonotakashi 0:8fdf9a60065b 628
kadonotakashi 0:8fdf9a60065b 629 #define I2C_BUSCTL_SCTLOEN_Pos (6) /*!< I2C_T::BUSCTL: SCTLOEN Position */
kadonotakashi 0:8fdf9a60065b 630 #define I2C_BUSCTL_SCTLOEN_Msk (0x1ul << I2C_BUSCTL_SCTLOEN_Pos) /*!< I2C_T::BUSCTL: SCTLOEN Mask */
kadonotakashi 0:8fdf9a60065b 631
kadonotakashi 0:8fdf9a60065b 632 #define I2C_BUSCTL_BUSEN_Pos (7) /*!< I2C_T::BUSCTL: BUSEN Position */
kadonotakashi 0:8fdf9a60065b 633 #define I2C_BUSCTL_BUSEN_Msk (0x1ul << I2C_BUSCTL_BUSEN_Pos) /*!< I2C_T::BUSCTL: BUSEN Mask */
kadonotakashi 0:8fdf9a60065b 634
kadonotakashi 0:8fdf9a60065b 635 #define I2C_BUSCTL_PECTXEN_Pos (8) /*!< I2C_T::BUSCTL: PECTXEN Position */
kadonotakashi 0:8fdf9a60065b 636 #define I2C_BUSCTL_PECTXEN_Msk (0x1ul << I2C_BUSCTL_PECTXEN_Pos) /*!< I2C_T::BUSCTL: PECTXEN Mask */
kadonotakashi 0:8fdf9a60065b 637
kadonotakashi 0:8fdf9a60065b 638 #define I2C_BUSCTL_TIDLE_Pos (9) /*!< I2C_T::BUSCTL: TIDLE Position */
kadonotakashi 0:8fdf9a60065b 639 #define I2C_BUSCTL_TIDLE_Msk (0x1ul << I2C_BUSCTL_TIDLE_Pos) /*!< I2C_T::BUSCTL: TIDLE Mask */
kadonotakashi 0:8fdf9a60065b 640
kadonotakashi 0:8fdf9a60065b 641 #define I2C_BUSCTL_PECCLR_Pos (10) /*!< I2C_T::BUSCTL: PECCLR Position */
kadonotakashi 0:8fdf9a60065b 642 #define I2C_BUSCTL_PECCLR_Msk (0x1ul << I2C_BUSCTL_PECCLR_Pos) /*!< I2C_T::BUSCTL: PECCLR Mask */
kadonotakashi 0:8fdf9a60065b 643
kadonotakashi 0:8fdf9a60065b 644 #define I2C_BUSCTL_ACKM9SI_Pos (11) /*!< I2C_T::BUSCTL: ACKM9SI Position */
kadonotakashi 0:8fdf9a60065b 645 #define I2C_BUSCTL_ACKM9SI_Msk (0x1ul << I2C_BUSCTL_ACKM9SI_Pos) /*!< I2C_T::BUSCTL: ACKM9SI Mask */
kadonotakashi 0:8fdf9a60065b 646
kadonotakashi 0:8fdf9a60065b 647 #define I2C_BUSCTL_BCDIEN_Pos (12) /*!< I2C_T::BUSCTL: BCDIEN Position */
kadonotakashi 0:8fdf9a60065b 648 #define I2C_BUSCTL_BCDIEN_Msk (0x1ul << I2C_BUSCTL_BCDIEN_Pos) /*!< I2C_T::BUSCTL: BCDIEN Mask */
kadonotakashi 0:8fdf9a60065b 649
kadonotakashi 0:8fdf9a60065b 650 #define I2C_BUSCTL_PECDIEN_Pos (13) /*!< I2C_T::BUSCTL: PECDIEN Position */
kadonotakashi 0:8fdf9a60065b 651 #define I2C_BUSCTL_PECDIEN_Msk (0x1ul << I2C_BUSCTL_PECDIEN_Pos) /*!< I2C_T::BUSCTL: PECDIEN Mask */
kadonotakashi 0:8fdf9a60065b 652
kadonotakashi 0:8fdf9a60065b 653 #define I2C_BUSTCTL_BUSTOEN_Pos (0) /*!< I2C_T::BUSTCTL: BUSTOEN Position */
kadonotakashi 0:8fdf9a60065b 654 #define I2C_BUSTCTL_BUSTOEN_Msk (0x1ul << I2C_BUSTCTL_BUSTOEN_Pos) /*!< I2C_T::BUSTCTL: BUSTOEN Mask */
kadonotakashi 0:8fdf9a60065b 655
kadonotakashi 0:8fdf9a60065b 656 #define I2C_BUSTCTL_CLKTOEN_Pos (1) /*!< I2C_T::BUSTCTL: CLKTOEN Position */
kadonotakashi 0:8fdf9a60065b 657 #define I2C_BUSTCTL_CLKTOEN_Msk (0x1ul << I2C_BUSTCTL_CLKTOEN_Pos) /*!< I2C_T::BUSTCTL: CLKTOEN Mask */
kadonotakashi 0:8fdf9a60065b 658
kadonotakashi 0:8fdf9a60065b 659 #define I2C_BUSTCTL_BUSTOIEN_Pos (2) /*!< I2C_T::BUSTCTL: BUSTOIEN Position */
kadonotakashi 0:8fdf9a60065b 660 #define I2C_BUSTCTL_BUSTOIEN_Msk (0x1ul << I2C_BUSTCTL_BUSTOIEN_Pos) /*!< I2C_T::BUSTCTL: BUSTOIEN Mask */
kadonotakashi 0:8fdf9a60065b 661
kadonotakashi 0:8fdf9a60065b 662 #define I2C_BUSTCTL_CLKTOIEN_Pos (3) /*!< I2C_T::BUSTCTL: CLKTOIEN Position */
kadonotakashi 0:8fdf9a60065b 663 #define I2C_BUSTCTL_CLKTOIEN_Msk (0x1ul << I2C_BUSTCTL_CLKTOIEN_Pos) /*!< I2C_T::BUSTCTL: CLKTOIEN Mask */
kadonotakashi 0:8fdf9a60065b 664
kadonotakashi 0:8fdf9a60065b 665 #define I2C_BUSTCTL_TORSTEN_Pos (4) /*!< I2C_T::BUSTCTL: TORSTEN Position */
kadonotakashi 0:8fdf9a60065b 666 #define I2C_BUSTCTL_TORSTEN_Msk (0x1ul << I2C_BUSTCTL_TORSTEN_Pos) /*!< I2C_T::BUSTCTL: TORSTEN Mask */
kadonotakashi 0:8fdf9a60065b 667
kadonotakashi 0:8fdf9a60065b 668 #define I2C_BUSSTS_BUSY_Pos (0) /*!< I2C_T::BUSSTS: BUSY Position */
kadonotakashi 0:8fdf9a60065b 669 #define I2C_BUSSTS_BUSY_Msk (0x1ul << I2C_BUSSTS_BUSY_Pos) /*!< I2C_T::BUSSTS: BUSY Mask */
kadonotakashi 0:8fdf9a60065b 670
kadonotakashi 0:8fdf9a60065b 671 #define I2C_BUSSTS_BCDONE_Pos (1) /*!< I2C_T::BUSSTS: BCDONE Position */
kadonotakashi 0:8fdf9a60065b 672 #define I2C_BUSSTS_BCDONE_Msk (0x1ul << I2C_BUSSTS_BCDONE_Pos) /*!< I2C_T::BUSSTS: BCDONE Mask */
kadonotakashi 0:8fdf9a60065b 673
kadonotakashi 0:8fdf9a60065b 674 #define I2C_BUSSTS_PECERR_Pos (2) /*!< I2C_T::BUSSTS: PECERR Position */
kadonotakashi 0:8fdf9a60065b 675 #define I2C_BUSSTS_PECERR_Msk (0x1ul << I2C_BUSSTS_PECERR_Pos) /*!< I2C_T::BUSSTS: PECERR Mask */
kadonotakashi 0:8fdf9a60065b 676
kadonotakashi 0:8fdf9a60065b 677 #define I2C_BUSSTS_ALERT_Pos (3) /*!< I2C_T::BUSSTS: ALERT Position */
kadonotakashi 0:8fdf9a60065b 678 #define I2C_BUSSTS_ALERT_Msk (0x1ul << I2C_BUSSTS_ALERT_Pos) /*!< I2C_T::BUSSTS: ALERT Mask */
kadonotakashi 0:8fdf9a60065b 679
kadonotakashi 0:8fdf9a60065b 680 #define I2C_BUSSTS_SCTLDIN_Pos (4) /*!< I2C_T::BUSSTS: SCTLDIN Position */
kadonotakashi 0:8fdf9a60065b 681 #define I2C_BUSSTS_SCTLDIN_Msk (0x1ul << I2C_BUSSTS_SCTLDIN_Pos) /*!< I2C_T::BUSSTS: SCTLDIN Mask */
kadonotakashi 0:8fdf9a60065b 682
kadonotakashi 0:8fdf9a60065b 683 #define I2C_BUSSTS_BUSTO_Pos (5) /*!< I2C_T::BUSSTS: BUSTO Position */
kadonotakashi 0:8fdf9a60065b 684 #define I2C_BUSSTS_BUSTO_Msk (0x1ul << I2C_BUSSTS_BUSTO_Pos) /*!< I2C_T::BUSSTS: BUSTO Mask */
kadonotakashi 0:8fdf9a60065b 685
kadonotakashi 0:8fdf9a60065b 686 #define I2C_BUSSTS_CLKTO_Pos (6) /*!< I2C_T::BUSSTS: CLKTO Position */
kadonotakashi 0:8fdf9a60065b 687 #define I2C_BUSSTS_CLKTO_Msk (0x1ul << I2C_BUSSTS_CLKTO_Pos) /*!< I2C_T::BUSSTS: CLKTO Mask */
kadonotakashi 0:8fdf9a60065b 688
kadonotakashi 0:8fdf9a60065b 689 #define I2C_BUSSTS_PECDONE_Pos (7) /*!< I2C_T::BUSSTS: PECDONE Position */
kadonotakashi 0:8fdf9a60065b 690 #define I2C_BUSSTS_PECDONE_Msk (0x1ul << I2C_BUSSTS_PECDONE_Pos) /*!< I2C_T::BUSSTS: PECDONE Mask */
kadonotakashi 0:8fdf9a60065b 691
kadonotakashi 0:8fdf9a60065b 692 #define I2C_PKTSIZE_PLDSIZE_Pos (0) /*!< I2C_T::PKTSIZE: PLDSIZE Position */
kadonotakashi 0:8fdf9a60065b 693 #define I2C_PKTSIZE_PLDSIZE_Msk (0x1fful << I2C_PKTSIZE_PLDSIZE_Pos) /*!< I2C_T::PKTSIZE: PLDSIZE Mask */
kadonotakashi 0:8fdf9a60065b 694
kadonotakashi 0:8fdf9a60065b 695 #define I2C_PKTCRC_PECCRC_Pos (0) /*!< I2C_T::PKTCRC: PECCRC Position */
kadonotakashi 0:8fdf9a60065b 696 #define I2C_PKTCRC_PECCRC_Msk (0xfful << I2C_PKTCRC_PECCRC_Pos) /*!< I2C_T::PKTCRC: PECCRC Mask */
kadonotakashi 0:8fdf9a60065b 697
kadonotakashi 0:8fdf9a60065b 698 #define I2C_BUSTOUT_BUSTO_Pos (0) /*!< I2C_T::BUSTOUT: BUSTO Position */
kadonotakashi 0:8fdf9a60065b 699 #define I2C_BUSTOUT_BUSTO_Msk (0xfful << I2C_BUSTOUT_BUSTO_Pos) /*!< I2C_T::BUSTOUT: BUSTO Mask */
kadonotakashi 0:8fdf9a60065b 700
kadonotakashi 0:8fdf9a60065b 701 #define I2C_CLKTOUT_CLKTO_Pos (0) /*!< I2C_T::CLKTOUT: CLKTO Position */
kadonotakashi 0:8fdf9a60065b 702 #define I2C_CLKTOUT_CLKTO_Msk (0xfful << I2C_CLKTOUT_CLKTO_Pos) /*!< I2C_T::CLKTOUT: CLKTO Mask */
kadonotakashi 0:8fdf9a60065b 703
kadonotakashi 0:8fdf9a60065b 704 /**@}*/ /* I2C_CONST */
kadonotakashi 0:8fdf9a60065b 705 /**@}*/ /* end of I2C register group */
kadonotakashi 0:8fdf9a60065b 706
kadonotakashi 0:8fdf9a60065b 707
kadonotakashi 0:8fdf9a60065b 708 #endif /* __I2C_REG_H__ */