kh

ghi
ghi

Tuesday, December 1, 2015

Introduction into the ARM microcontroller family: using the STM32 discovery board



source code for project:

   void main(){
 GPIO_Digital_Output(&GPIOC_BASE, _GPIO_PINMASK_9);   ///for the red led
 GPIO_Digital_Output(&GPIOC_BASE, _GPIO_PINMASK_8);
 GPIOC_ODR.B9 = 0;
 GPIOC_ODR.B8 = 0;

 while(1){
  GPIOC_ODR.B9 = 1;
  GPIOC_ODR.B8 = 0;
  Delay_ms(500);
  GPIOC_ODR.B8 = 1;
  GPIOC_ODR.B9 = 0;
  Delay_ms(500);
  }
}


0 comments:

Post a Comment