mirror of
https://github.com/EranMorkon/AMTS.git
synced 2023-12-28 16:48:38 +00:00
Initial commit
This commit is contained in:
commit
1f0e2aad64
64 changed files with 2531 additions and 0 deletions
20
Mieke/Tutorial/Listings/example1.c
Normal file
20
Mieke/Tutorial/Listings/example1.c
Normal file
|
@ -0,0 +1,20 @@
|
|||
#include "stm32f10x.h"
|
||||
|
||||
void init_leds_switches(void) {
|
||||
RCC->APB2ENR |= RCC_APB2ENR_IOPBEN;
|
||||
GPIOB->CRH &= 0x00000000;
|
||||
GPIOB->CRH |= 0x00000003;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int i;
|
||||
init_leds_switches();
|
||||
|
||||
for (;;) {
|
||||
GPIOB->ODR = 0x01FF & ~(GPIOB->ODR & 0x01FF);
|
||||
for (i=0; i < 65535; i++);
|
||||
for (i=0; i < 65535; i++);
|
||||
for (i=0; i < 65535; i++);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue