1234567891011121314151617181920 |
- #ifndef __HAL_I2C_H
- #define __HAL_I2C_H
- #include "stm32f4xx.h"
- #define HAL_I2C1_SCL_PORT GPIOB
- #define HAL_I2C1_SCL_PIN GPIO_Pin_8
- #define HAL_I2C1_SCL_SOURCE GPIO_PinSource8
- #define HAL_I2C1_SCL_CLK RCC_AHB1Periph_GPIOB
- #define HAL_I2C1_SDA_PORT GPIOB
- #define HAL_I2C1_SDA_PIN GPIO_Pin_9
- #define HAL_I2C1_SDA_SOURCE GPIO_PinSource9
- #define HAL_I2C1_SDA_CLK RCC_AHB1Periph_GPIOB
- #define HAL_I2C1_ADDRESS 0xA0
- #define HAL_I2C1_SPEED 100000U
- void hal_i2c1_init(void);
- #endif // __HAL_I2C_H
|