arranged by katano

Dependencies:   MPU9150_DMP Neon_F303K8 QuaternionMath iSDIO mbed-rtos mbed

Fork of Neon_F303K8 by Yasuhiro ISHII

Committer:
yakatano
Date:
Fri Aug 05 15:05:20 2016 +0000
Revision:
4:636bb3f66dcd
Parent:
1:73543a1fbe62
??????

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yishii 0:65a0ae5578da 1 #include "mbed.h"
yishii 0:65a0ae5578da 2 #include "common.h"
yishii 1:73543a1fbe62 3 #include "configure.h"
yishii 0:65a0ae5578da 4 #include "SDFileSystem.h"
yishii 0:65a0ae5578da 5 #include "rtos.h"
yishii 1:73543a1fbe62 6 #include "led.h"
yishii 1:73543a1fbe62 7
yishii 1:73543a1fbe62 8 #if 0
yishii 0:65a0ae5578da 9
yishii 0:65a0ae5578da 10 static SDFileSystem sd(PA_7,PA_6,PA_5,PA_4,"sd"); // MOSI,MISO,SCK,CS
yishii 0:65a0ae5578da 11
yishii 1:73543a1fbe62 12 extern Led LedStripe[NUMBER_OF_LEDS];
yishii 1:73543a1fbe62 13
yishii 0:65a0ae5578da 14 /*
yishii 0:65a0ae5578da 15 +--------+
yishii 0:65a0ae5578da 16 | |VOUT---+ ,--------+
yishii 0:65a0ae5578da 17 | | +-[47k]-----DAT2|9 |
yishii 0:65a0ae5578da 18 | PA_4|CS-----|-------------CS|1 |
yishii 0:65a0ae5578da 19 | PA_7|MOSI---|------------CMD|2 |
yishii 0:65a0ae5578da 20 | | | +---VSS1|3 SD |
yishii 0:65a0ae5578da 21 | Neon | +-------|----VDD|4 memory|
yishii 0:65a0ae5578da 22 | PA_5|SCK----|-------|----CLK|5 card |
yishii 0:65a0ae5578da 23 | | | +---VSS2|6 |
yishii 0:65a0ae5578da 24 | PA_6|MISO---|-------|---DAT0|7 |
yishii 0:65a0ae5578da 25 | | +-[47k]-|---DAT1|8 |
yishii 0:65a0ae5578da 26 | |GND------------+ +--------+
yishii 0:65a0ae5578da 27 +--------+
yishii 0:65a0ae5578da 28 */
yishii 0:65a0ae5578da 29
yishii 0:65a0ae5578da 30 void TaskFA(void const *argument)
yishii 0:65a0ae5578da 31 {
yishii 1:73543a1fbe62 32 printf("TaskFA started\r\n\r\n");
yishii 1:73543a1fbe62 33
yishii 1:73543a1fbe62 34 // create private directory
yishii 1:73543a1fbe62 35 mkdir("/sd/Neon", 0777);
yishii 0:65a0ae5578da 36
yishii 1:73543a1fbe62 37 FILE *fp = fopen("/sd/mydir/NeonInfo.txt", "w");
yishii 0:65a0ae5578da 38 if(fp == NULL) {
yishii 1:73543a1fbe62 39 printf("Could not open file for write\r\n");
yishii 0:65a0ae5578da 40 }
yishii 1:73543a1fbe62 41 fprintf(fp, "Neon firmware launched\r\n");
yishii 0:65a0ae5578da 42 fclose(fp);
yishii 0:65a0ae5578da 43
yishii 1:73543a1fbe62 44 printf("TaskFA process finished\r\n");
yishii 0:65a0ae5578da 45
yishii 1:73543a1fbe62 46 while(true){
yishii 1:73543a1fbe62 47 Thread::wait(10000); // 適当な待ち時間
yishii 0:65a0ae5578da 48 }
yishii 0:65a0ae5578da 49 }
yishii 1:73543a1fbe62 50 #endif