Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stm32f10x.h>
- #include <stm32f10x_rcc.h>
- #include <stm32f10x_gpio.h>
- void delay(volatile uint32_t nCount) {
- for (; nCount != 0; nCount--);
- }
- void main(void)
- {
- RCC->APB2ENR|=RCC_APB2ENR_IOPCEN;
- GPIOC->CRH=0x80200000;
- if(GPIOC->IDR&GPIO_IDR_IDR15)GPIOC->BRR|=GPIO_BSRR_BR13;
- else
- GPIOC->BSRR=GPIO_BSRR_BS13;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement