2015-04-26 17:54:51 +02:00
|
|
|
/*
|
|
|
|
* main.c
|
|
|
|
*
|
|
|
|
* Created on: Apr 25, 2015
|
|
|
|
* Author: mari
|
|
|
|
*/
|
|
|
|
#include <stm32f4xx.h>
|
2017-03-31 13:25:42 +02:00
|
|
|
#include <cmsis/arm_math.h>
|
|
|
|
#include <fatfs/ff.h>
|
2015-04-26 17:54:51 +02:00
|
|
|
|
|
|
|
#define OUTPUT(pin) (0b01 << (pin * 2))
|
|
|
|
|
|
|
|
FATFS SDfs;
|
2015-04-30 11:59:37 +02:00
|
|
|
FIL file;
|
2015-12-08 21:31:41 +01:00
|
|
|
|
|
|
|
void test(char a, char b, char c, char d, char e,char f, char g, char h, char i, char j);
|
|
|
|
void gna();
|
2015-04-26 17:54:51 +02:00
|
|
|
int main() {
|
|
|
|
RCC->AHB1ENR |= RCC_AHB1ENR_GPIODEN;
|
|
|
|
__DSB();
|
|
|
|
GPIOD->MODER = OUTPUT(12);
|
|
|
|
SysTick_Config(8*1680000);
|
2017-01-27 00:05:23 +01:00
|
|
|
|
2015-04-26 17:54:51 +02:00
|
|
|
while(1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-12-08 21:31:41 +01:00
|
|
|
|
|
|
|
void test(char a, char b, char c, char d, char e,char f, char g, char h, char i, char j) {
|
|
|
|
gna();
|
2017-01-27 00:05:23 +01:00
|
|
|
//GPIOD->ODR ^= a+b+c+d+e+f+g+h+i+j;
|
2015-12-08 21:31:41 +01:00
|
|
|
}
|
|
|
|
void gna() {
|
|
|
|
GPIOD->ODR = 0;
|
|
|
|
}
|
2015-04-26 17:54:51 +02:00
|
|
|
void SysTick_Handler()
|
|
|
|
{
|
|
|
|
GPIOD->ODR ^= (1<<12);
|
|
|
|
}
|