|
TM STM32F4xx Libraries
v1.0.0
Libraries for STM32F4xx devices from Tilen Majerle
|
I2C library for STM32F4xx - http://stm32f4-discovery.com/2014/05/library-09-i2c-for-stm32f4xx/. More...
Modules | |
| TM_I2C_Macros | |
| Library defines. | |
| TM_I2C_Typedefs | |
| Library Typedefs. | |
| TM_I2C_Functions | |
| Library Functions. | |
I2C library for STM32F4xx - http://stm32f4-discovery.com/2014/05/library-09-i2c-for-stm32f4xx/.
|PINSPACK 1 |PINSPACK 2 |PINSPACK 3
I2CX |SCL SDA |SCL SDA |SCL SDA
| | |
I2C1 |PB6 PB7 |PB8 PB9 |PB6 PB9
I2C2 |PB10 PB11 |PF1 PF0 |PH4 PH5
I2C3 |PA8 PC9 |PH7 PH8 |- -
In case these pins are not good for you, you can use TM_I2C_PinsPack_Custom in TM_I2C_Init() function and callback function will be called, where you can initialize your custom pinout for your I2C peripheral
Possible changes in your defines.h file: Change x to your I2C used, 1-3
//By default library support only 7bit long address #define TM_I2Cx_ACKNOWLEDGED_ADDRESS I2C_AcknowledgedAddress_7bit //Library supports I2C mode #define TM_I2Cx_MODE I2C_Mode_I2C //Own address, if slave mode #define TM_I2Cx_OWN_ADDRESS 0x00 //By default, disable ack #define TM_I2Cx_ACK I2C_Ack_Disable //Duty cycle 2, 50% #define TM_I2Cx_DUTY_CYCLE I2C_DutyCycle_2
Version 1.6.1 - March 31, 2015 - Fixed I2C issue when sometime it didn't send data Version 1.6 - March 13, 2015 - Added new function to write multi bytes to device without specify register address Version 1.5 - March 10, 2015 - Updated to be more independent of HAL/STD drivers. Version 1.4 - March 08, 2015 - Added support for new GPIO settings Version 1.3 - December 22, 2014 - Added option to read multi bytes from device without setting register from where Version 1.2 - August 14, 2014 - If you connect more devices on one I2C with different max SCL speed, low speed will be always selected. - Added some additional pins for I2C Version 1.1 - September 08, 2014 - Added support to check if device is connected to I2C bus Version 1.0 - First release
- STM32F4xx - STM32F4xx I2C - defines.h - attributes.h - TM GPIO