33 lines
429 B
C
33 lines
429 B
C
/*
|
|
* main.c
|
|
*
|
|
* Created on: Apr 25, 2015
|
|
* Author: mari
|
|
*/
|
|
#include <stm32f4xx.h>
|
|
#include <arm_math.h>
|
|
#include <system_stm32f4xx.h>
|
|
|
|
#include <ff.h>
|
|
|
|
#define OUTPUT(pin) (0b01 << (pin * 2))
|
|
|
|
FATFS SDfs;
|
|
|
|
int main() {
|
|
RCC->AHB1ENR |= RCC_AHB1ENR_GPIODEN;
|
|
__DSB();
|
|
GPIOD->MODER = OUTPUT(12);
|
|
SysTick_Config(8*1680000);
|
|
|
|
f_mount(&SDfs, "0:/",1);
|
|
|
|
while(1);
|
|
|
|
}
|
|
|
|
void SysTick_Handler()
|
|
{
|
|
GPIOD->ODR ^= (1<<12);
|
|
}
|