stm32f4-sdio/main.c

39 lines
667 B
C

/*
* main.c
*
* Created on: Apr 25, 2015
* Author: mari
*/
#include <stm32f4xx.h>
#include <cmsis/arm_math.h>
#include <fatfs/ff.h>
#define OUTPUT(pin) (0b01 << (pin * 2))
FATFS SDfs;
FIL file;
void test(char a, char b, char c, char d, char e,char f, char g, char h, char i, char j);
void gna();
int main() {
RCC->AHB1ENR |= RCC_AHB1ENR_GPIODEN;
__DSB();
GPIOD->MODER = OUTPUT(12);
SysTick_Config(8*1680000);
while(1);
}
void test(char a, char b, char c, char d, char e,char f, char g, char h, char i, char j) {
gna();
//GPIOD->ODR ^= a+b+c+d+e+f+g+h+i+j;
}
void gna() {
GPIOD->ODR = 0;
}
void SysTick_Handler()
{
GPIOD->ODR ^= (1<<12);
}