STM8L15x Standard Peripherals Drivers: I2C_Registers_Bits_Definition

STM8L15x/16x Standard Peripherals Drivers

STM8L15x Standard Peripherals Drivers

I2C_Registers_Bits_Definition

Defines

#define I2C_CCRH_CCR   ((uint8_t)0x0F)
#define I2C_CCRH_DUTY   ((uint8_t)0x40)
#define I2C_CCRH_FS   ((uint8_t)0x80)
#define I2C_CCRL_CCR   ((uint8_t)0xFF)
#define I2C_CR1_ARP   ((uint8_t)0x10)
#define I2C_CR1_ENGC   ((uint8_t)0x40)
#define I2C_CR1_ENPEC   ((uint8_t)0x20)
#define I2C_CR1_NOSTRETCH   ((uint8_t)0x80)
#define I2C_CR1_PE   ((uint8_t)0x01)
#define I2C_CR1_SMBTYPE   ((uint8_t)0x08)
#define I2C_CR1_SMBUS   ((uint8_t)0x02)
#define I2C_CR2_ACK   ((uint8_t)0x04)
#define I2C_CR2_ALERT   ((uint8_t)0x20)
#define I2C_CR2_PEC   ((uint8_t)0x10)
#define I2C_CR2_POS   ((uint8_t)0x08)
#define I2C_CR2_START   ((uint8_t)0x01)
#define I2C_CR2_STOP   ((uint8_t)0x02)
#define I2C_CR2_SWRST   ((uint8_t)0x80)
#define I2C_DR_DR   ((uint8_t)0xFF)
#define I2C_FREQR_FREQ   ((uint8_t)0x3F)
#define I2C_ITR_DMAEN   ((uint8_t)0x08)
#define I2C_ITR_ITBUFEN   ((uint8_t)0x04)
#define I2C_ITR_ITERREN   ((uint8_t)0x01)
#define I2C_ITR_ITEVTEN   ((uint8_t)0x02)
#define I2C_ITR_LAST   ((uint8_t)0x10)
#define I2C_OAR2_ADD2   ((uint8_t)0xFE)
#define I2C_OAR2_ENDUAL   ((uint8_t)0x01)
#define I2C_OARH_ADD   ((uint8_t)0x06)
#define I2C_OARH_ADDCONF   ((uint8_t)0x40)
#define I2C_OARH_ADDMODE   ((uint8_t)0x80)
#define I2C_OARL_ADD   ((uint8_t)0xFE)
#define I2C_OARL_ADD0   ((uint8_t)0x01)
#define I2C_PECR_PEC   ((uint8_t)0xFF)
#define I2C_SR1_ADD10   ((uint8_t)0x08)
#define I2C_SR1_ADDR   ((uint8_t)0x02)
#define I2C_SR1_BTF   ((uint8_t)0x04)
#define I2C_SR1_RXNE   ((uint8_t)0x40)
#define I2C_SR1_SB   ((uint8_t)0x01)
#define I2C_SR1_STOPF   ((uint8_t)0x10)
#define I2C_SR1_TXE   ((uint8_t)0x80)
#define I2C_SR2_AF   ((uint8_t)0x04)
#define I2C_SR2_ARLO   ((uint8_t)0x02)
#define I2C_SR2_BERR   ((uint8_t)0x01)
#define I2C_SR2_OVR   ((uint8_t)0x08)
#define I2C_SR2_PECERR   ((uint8_t)0x10)
#define I2C_SR2_SMBALERT   ((uint8_t)0x80)
#define I2C_SR2_TIMEOUT   ((uint8_t)0x40)
#define I2C_SR2_WUFH   ((uint8_t)0x20)
#define I2C_SR3_BUSY   ((uint8_t)0x02)
#define I2C_SR3_DUALF   ((uint8_t)0x80)
#define I2C_SR3_GENCALL   ((uint8_t)0x10)
#define I2C_SR3_MSL   ((uint8_t)0x01)
#define I2C_SR3_SMBDEFAULT   ((uint8_t)0x20)
#define I2C_SR3_SMBHOST   ((uint8_t)0x40)
#define I2C_SR3_TRA   ((uint8_t)0x04)
#define I2C_TRISER_TRISE   ((uint8_t)0x3F)

Define Documentation

#define I2C_CCRH_CCR   ((uint8_t)0x0F)

Clock Control Register in Fast/Standard mode (Master mode) bits [11..8]

Definition at line 1160 of file stm8l15x.h.

Referenced by I2C_Init().

#define I2C_CCRH_DUTY   ((uint8_t)0x40)

Fast Mode Duty Cycle

Definition at line 1159 of file stm8l15x.h.

Referenced by I2C_FastModeDutyCycleConfig(), and I2C_Init().

#define I2C_CCRH_FS   ((uint8_t)0x80)

Master Mode Selection

Definition at line 1158 of file stm8l15x.h.

Referenced by I2C_Init().

#define I2C_CCRL_CCR   ((uint8_t)0xFF)

Clock Control Register (Master mode)

Definition at line 1156 of file stm8l15x.h.

Referenced by I2C_Init().

#define I2C_CR1_ARP   ((uint8_t)0x10)

ARP Enable

Definition at line 1098 of file stm8l15x.h.

Referenced by I2C_ARPCmd().

#define I2C_CR1_ENGC   ((uint8_t)0x40)

General Call Enable

Definition at line 1096 of file stm8l15x.h.

Referenced by I2C_GeneralCallCmd().

#define I2C_CR1_ENPEC   ((uint8_t)0x20)

PEC Enable

Definition at line 1097 of file stm8l15x.h.

Referenced by I2C_CalculatePEC().

#define I2C_CR1_NOSTRETCH   ((uint8_t)0x80)

Clock Stretching Disable (Slave mode)

Definition at line 1095 of file stm8l15x.h.

Referenced by I2C_StretchClockCmd().

#define I2C_CR1_PE   ((uint8_t)0x01)

Peripheral Enable

Definition at line 1101 of file stm8l15x.h.

Referenced by I2C_Cmd(), and I2C_Init().

#define I2C_CR1_SMBTYPE   ((uint8_t)0x08)

SMBus type

Definition at line 1099 of file stm8l15x.h.

#define I2C_CR1_SMBUS   ((uint8_t)0x02)

SMBus mode

Definition at line 1100 of file stm8l15x.h.

#define I2C_CR2_ACK   ((uint8_t)0x04)

Acknowledge Enable

Definition at line 1107 of file stm8l15x.h.

Referenced by I2C_AcknowledgeConfig().

#define I2C_CR2_ALERT   ((uint8_t)0x20)

SMBus Alert

Definition at line 1104 of file stm8l15x.h.

Referenced by I2C_SMBusAlertConfig().

#define I2C_CR2_PEC   ((uint8_t)0x10)

Packet Error Checking

Definition at line 1105 of file stm8l15x.h.

Referenced by I2C_TransmitPEC().

#define I2C_CR2_POS   ((uint8_t)0x08)

Acknowledge

Definition at line 1106 of file stm8l15x.h.

Referenced by I2C_AckPositionConfig(), and I2C_PECPositionConfig().

#define I2C_CR2_START   ((uint8_t)0x01)

Start Generation

Definition at line 1109 of file stm8l15x.h.

Referenced by I2C_GenerateSTART().

#define I2C_CR2_STOP   ((uint8_t)0x02)

Stop Generation

Definition at line 1108 of file stm8l15x.h.

Referenced by I2C_GenerateSTOP().

#define I2C_CR2_SWRST   ((uint8_t)0x80)

Software Reset

Definition at line 1103 of file stm8l15x.h.

Referenced by I2C_SoftwareResetCmd().

#define I2C_DR_DR   ((uint8_t)0xFF)

Data Register

Definition at line 1123 of file stm8l15x.h.

#define I2C_FREQR_FREQ   ((uint8_t)0x3F)

Peripheral Clock Frequency

Definition at line 1111 of file stm8l15x.h.

Referenced by I2C_Init().

#define I2C_ITR_DMAEN   ((uint8_t)0x08)

DMA request Enable

Definition at line 1151 of file stm8l15x.h.

Referenced by I2C_DMACmd().

#define I2C_ITR_ITBUFEN   ((uint8_t)0x04)

Buffer Interrupt Enable

Definition at line 1152 of file stm8l15x.h.

#define I2C_ITR_ITERREN   ((uint8_t)0x01)

Error Interrupt Enable

Definition at line 1154 of file stm8l15x.h.

#define I2C_ITR_ITEVTEN   ((uint8_t)0x02)

Event Interrupt Enable

Definition at line 1153 of file stm8l15x.h.

#define I2C_ITR_LAST   ((uint8_t)0x10)

DMA Last transfer

Definition at line 1150 of file stm8l15x.h.

Referenced by I2C_DMALastTransferCmd().

#define I2C_OAR2_ADD2   ((uint8_t)0xFE)

Interface Address bits [7..1]

Definition at line 1120 of file stm8l15x.h.

Referenced by I2C_OwnAddress2Config().

#define I2C_OAR2_ENDUAL   ((uint8_t)0x01)

Dual addressing mode enable

Definition at line 1121 of file stm8l15x.h.

Referenced by I2C_DualAddressCmd().

#define I2C_OARH_ADD   ((uint8_t)0x06)

Interface Address bits [9..8]

Definition at line 1118 of file stm8l15x.h.

#define I2C_OARH_ADDCONF   ((uint8_t)0x40)

Address mode configuration

Definition at line 1117 of file stm8l15x.h.

Referenced by I2C_Init().

#define I2C_OARH_ADDMODE   ((uint8_t)0x80)

Addressing Mode (Slave mode)

Definition at line 1116 of file stm8l15x.h.

#define I2C_OARL_ADD   ((uint8_t)0xFE)

Interface Address bits [7..1]

Definition at line 1113 of file stm8l15x.h.

#define I2C_OARL_ADD0   ((uint8_t)0x01)

Interface Address bit0

Definition at line 1114 of file stm8l15x.h.

#define I2C_PECR_PEC   ((uint8_t)0xFF)

Packet error checking

Definition at line 1164 of file stm8l15x.h.

#define I2C_SR1_ADD10   ((uint8_t)0x08)

10-bit header sent (Master mode)

Definition at line 1128 of file stm8l15x.h.

#define I2C_SR1_ADDR   ((uint8_t)0x02)

Address sent (master mode)/matched (slave mode)

Definition at line 1130 of file stm8l15x.h.

#define I2C_SR1_BTF   ((uint8_t)0x04)

Byte Transfer Finished

Definition at line 1129 of file stm8l15x.h.

#define I2C_SR1_RXNE   ((uint8_t)0x40)

Data Register not Empty (receivers)

Definition at line 1126 of file stm8l15x.h.

#define I2C_SR1_SB   ((uint8_t)0x01)

Start Bit (Master mode)

Definition at line 1131 of file stm8l15x.h.

#define I2C_SR1_STOPF   ((uint8_t)0x10)

Stop detection (Slave mode)

Definition at line 1127 of file stm8l15x.h.

#define I2C_SR1_TXE   ((uint8_t)0x80)

Data Register Empty (transmitters)

Definition at line 1125 of file stm8l15x.h.

#define I2C_SR2_AF   ((uint8_t)0x04)

Acknowledge Failure

Definition at line 1138 of file stm8l15x.h.

Referenced by I2C_CheckEvent(), and I2C_GetLastEvent().

#define I2C_SR2_ARLO   ((uint8_t)0x02)

Arbitration Lost (master mode)

Definition at line 1139 of file stm8l15x.h.

#define I2C_SR2_BERR   ((uint8_t)0x01)

Bus Error

Definition at line 1140 of file stm8l15x.h.

#define I2C_SR2_OVR   ((uint8_t)0x08)

Overrun/Underrun

Definition at line 1137 of file stm8l15x.h.

#define I2C_SR2_PECERR   ((uint8_t)0x10)

PEC error in reception

Definition at line 1136 of file stm8l15x.h.

#define I2C_SR2_SMBALERT   ((uint8_t)0x80)

SMBus Alert

Definition at line 1133 of file stm8l15x.h.

#define I2C_SR2_TIMEOUT   ((uint8_t)0x40)

Time out or TLow error

Definition at line 1134 of file stm8l15x.h.

#define I2C_SR2_WUFH   ((uint8_t)0x20)

Wake-up from Halt

Definition at line 1135 of file stm8l15x.h.

#define I2C_SR3_BUSY   ((uint8_t)0x02)

Bus Busy

Definition at line 1147 of file stm8l15x.h.

#define I2C_SR3_DUALF   ((uint8_t)0x80)

Dual flag (Slave mode)

Definition at line 1142 of file stm8l15x.h.

#define I2C_SR3_GENCALL   ((uint8_t)0x10)

General Call Header (Slave mode)

Definition at line 1145 of file stm8l15x.h.

#define I2C_SR3_MSL   ((uint8_t)0x01)

Master/Slave

Definition at line 1148 of file stm8l15x.h.

#define I2C_SR3_SMBDEFAULT   ((uint8_t)0x20)

SMBus Default Header (Slave mode)

Definition at line 1144 of file stm8l15x.h.

#define I2C_SR3_SMBHOST   ((uint8_t)0x40)

SMBus Host Header (Slave mode)

Definition at line 1143 of file stm8l15x.h.

#define I2C_SR3_TRA   ((uint8_t)0x04)

Transmitter/Receiver

Definition at line 1146 of file stm8l15x.h.

#define I2C_TRISER_TRISE   ((uint8_t)0x3F)

Maximum Rise Time in Fast/Standard mode (Master mode)

Definition at line 1162 of file stm8l15x.h.

STM8S Firmware Library: Overview

 

 

 

For complete documentation on STM8L15x 8-bit microcontrollers platform visit www.st.com