Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stm32f1xx.h>
- int main(int argc, char *argv[])
- {
- RCC->APB2ENR |= RCC_APB2ENR_IOPCEN;
- GPIOC->CRH &= ~(GPIO_CRH_MODE13_Msk | GPIO_CRH_CNF13_Msk);
- GPIOC->CRH |= (GPIO_CRH_MODE13_0);
- while (1) {
- for (volatile int i = 0; i < 100000; i++)
- ;
- GPIOC->ODR ^= (1 << 13);
- }
- }
Add Comment
Please, Sign In to add comment