STM8S/A Standard Peripherals Drivers: I2C_Registers_Bits_Definition

STM8S/A

STM8S/A 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_ENGC   ((uint8_t)0x40)
#define I2C_CR1_NOSTRETCH   ((uint8_t)0x80)
#define I2C_CR1_PE   ((uint8_t)0x01)
#define I2C_CR2_ACK   ((uint8_t)0x04)
#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_ITBUFEN   ((uint8_t)0x04)
#define I2C_ITR_ITERREN   ((uint8_t)0x01)
#define I2C_ITR_ITEVTEN   ((uint8_t)0x02)
#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_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_WUFH   ((uint8_t)0x20)
#define I2C_SR3_BUSY   ((uint8_t)0x02)
#define I2C_SR3_GENCALL   ((uint8_t)0x10)
#define I2C_SR3_MSL   ((uint8_t)0x01)
#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 1422 of file stm8s.h.

Referenced by I2C_Init().

#define I2C_CCRH_DUTY   ((uint8_t)0x40)

Fast Mode Duty Cycle

Definition at line 1421 of file stm8s.h.

Referenced by I2C_FastModeDutyCycleConfig(), and I2C_Init().

#define I2C_CCRH_FS   ((uint8_t)0x80)

Master Mode Selection

Definition at line 1420 of file stm8s.h.

Referenced by I2C_Init().

#define I2C_CCRL_CCR   ((uint8_t)0xFF)

Clock Control Register (Master mode)

Definition at line 1418 of file stm8s.h.

Referenced by I2C_Init().

#define I2C_CR1_ENGC   ((uint8_t)0x40)

General Call Enable

Definition at line 1375 of file stm8s.h.

Referenced by I2C_GeneralCallCmd().

#define I2C_CR1_NOSTRETCH   ((uint8_t)0x80)

Clock Stretching Disable (Slave mode)

Definition at line 1374 of file stm8s.h.

Referenced by I2C_StretchClockCmd().

#define I2C_CR1_PE   ((uint8_t)0x01)

Peripheral Enable

Definition at line 1376 of file stm8s.h.

Referenced by I2C_Cmd(), and I2C_Init().

#define I2C_CR2_ACK   ((uint8_t)0x04)

Acknowledge Enable

Definition at line 1380 of file stm8s.h.

Referenced by I2C_AcknowledgeConfig().

#define I2C_CR2_POS   ((uint8_t)0x08)

Acknowledge

Definition at line 1379 of file stm8s.h.

Referenced by I2C_AcknowledgeConfig().

#define I2C_CR2_START   ((uint8_t)0x01)

Start Generation

Definition at line 1382 of file stm8s.h.

Referenced by I2C_GenerateSTART().

#define I2C_CR2_STOP   ((uint8_t)0x02)

Stop Generation

Definition at line 1381 of file stm8s.h.

Referenced by I2C_GenerateSTOP().

#define I2C_CR2_SWRST   ((uint8_t)0x80)

Software Reset

Definition at line 1378 of file stm8s.h.

Referenced by I2C_SoftwareResetCmd().

#define I2C_DR_DR   ((uint8_t)0xFF)

Data Register

Definition at line 1393 of file stm8s.h.

#define I2C_FREQR_FREQ   ((uint8_t)0x3F)

Peripheral Clock Frequency

Definition at line 1384 of file stm8s.h.

Referenced by I2C_Init().

#define I2C_ITR_ITBUFEN   ((uint8_t)0x04)

Buffer Interrupt Enable

Definition at line 1414 of file stm8s.h.

#define I2C_ITR_ITERREN   ((uint8_t)0x01)

Error Interrupt Enable

Definition at line 1416 of file stm8s.h.

#define I2C_ITR_ITEVTEN   ((uint8_t)0x02)

Event Interrupt Enable

Definition at line 1415 of file stm8s.h.

#define I2C_OARH_ADD   ((uint8_t)0x06)

Interface Address bits [9..8]

Definition at line 1391 of file stm8s.h.

#define I2C_OARH_ADDCONF   ((uint8_t)0x40)

Address Mode Configuration

Definition at line 1390 of file stm8s.h.

Referenced by I2C_Init().

#define I2C_OARH_ADDMODE   ((uint8_t)0x80)

Addressing Mode (Slave mode)

Definition at line 1389 of file stm8s.h.

#define I2C_OARL_ADD   ((uint8_t)0xFE)

Interface Address bits [7..1]

Definition at line 1386 of file stm8s.h.

#define I2C_OARL_ADD0   ((uint8_t)0x01)

Interface Address bit0

Definition at line 1387 of file stm8s.h.

#define I2C_SR1_ADD10   ((uint8_t)0x08)

10-bit header sent (Master mode)

Definition at line 1398 of file stm8s.h.

#define I2C_SR1_ADDR   ((uint8_t)0x02)

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

Definition at line 1400 of file stm8s.h.

#define I2C_SR1_BTF   ((uint8_t)0x04)

Byte Transfer Finished

Definition at line 1399 of file stm8s.h.

#define I2C_SR1_RXNE   ((uint8_t)0x40)

Data Register not Empty (receivers)

Definition at line 1396 of file stm8s.h.

#define I2C_SR1_SB   ((uint8_t)0x01)

Start Bit (Master mode)

Definition at line 1401 of file stm8s.h.

#define I2C_SR1_STOPF   ((uint8_t)0x10)

Stop detection (Slave mode)

Definition at line 1397 of file stm8s.h.

#define I2C_SR1_TXE   ((uint8_t)0x80)

Data Register Empty (transmitters)

Definition at line 1395 of file stm8s.h.

#define I2C_SR2_AF   ((uint8_t)0x04)

Acknowledge Failure

Definition at line 1405 of file stm8s.h.

Referenced by I2C_CheckEvent(), and I2C_GetLastEvent().

#define I2C_SR2_ARLO   ((uint8_t)0x02)

Arbitration Lost (master mode)

Definition at line 1406 of file stm8s.h.

#define I2C_SR2_BERR   ((uint8_t)0x01)

Bus Error

Definition at line 1407 of file stm8s.h.

#define I2C_SR2_OVR   ((uint8_t)0x08)

Overrun/Underrun

Definition at line 1404 of file stm8s.h.

#define I2C_SR2_WUFH   ((uint8_t)0x20)

Wake-up from Halt

Definition at line 1403 of file stm8s.h.

#define I2C_SR3_BUSY   ((uint8_t)0x02)

Bus Busy

Definition at line 1411 of file stm8s.h.

#define I2C_SR3_GENCALL   ((uint8_t)0x10)

General Call Header (Slave mode)

Definition at line 1409 of file stm8s.h.

#define I2C_SR3_MSL   ((uint8_t)0x01)

Master/Slave

Definition at line 1412 of file stm8s.h.

#define I2C_SR3_TRA   ((uint8_t)0x04)

Transmitter/Receiver

Definition at line 1410 of file stm8s.h.

#define I2C_TRISER_TRISE   ((uint8_t)0x3F)

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

Definition at line 1424 of file stm8s.h.

STM8 Standard Peripherals Library: Footer

 

 

 

      For complete documentation on STM8 8-bit Microcontrollers platform visit www.st.com