Advertisement
Guest User

Untitled

a guest
Nov 28th, 2015
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "stm32f10x.h"
  2.  
  3. RCC->APB2ENR |= RCC_APB2ENR_IOPAEN;
  4.  
  5. GPIOA->CRL &= ~(GPIO_CRL_MODE6 | GPIO_CRL_CNF6); //Очищаем регистры MODE и CNF
  6. GPIOA->CRL |= GPIO_CRL_MODE6_1; //выход, 2MHz, push-pull
  7. GPIOA->CRL &= ~(GPIO_CRL_MODE7 | GPIO_CRL_CNF7); //Очищаем регистры MODE и CNF
  8. GPIOA->CRL |= GPIO_CRL_MODE7_1; //выход, 2MHz, push-pull
  9.  
  10. GPIOA->BSRR |= GPIO_BSRR_BS7;
  11. GPIOA->BSRR |= GPIO_BSRR_BS6;
  12.  
  13. //GPIOA->BSRR |= GPIO_BSRR_BR7;
  14. //GPIOA->BSRR |= GPIO_BSRR_BR6;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement