BE_VOILIER/Pilotes/Source/I2C.c

9 lines
No EOL
203 B
C
Executable file

#include <stm32f10x.h>
#include "I2C.h"
void initI2C() {
RCC -> APB1ENR |= 0x1 << 21; // Enable clock
I2C1 -> CR1 |= 0x1 << 0; // Peripheral enable
I2C1 -> CR1 &= ~(0x1 << 1); // I2C mode
}