arranged by katano

Dependencies:   MPU9150_DMP Neon_F303K8 QuaternionMath iSDIO mbed-rtos mbed

Fork of Neon_F303K8 by Yasuhiro ISHII

taskFA.cpp

Committer:
yakatano
Date:
2016-08-05
Revision:
4:636bb3f66dcd
Parent:
1:73543a1fbe62

File content as of revision 4:636bb3f66dcd:

#include "mbed.h"
#include "common.h"
#include "configure.h"
#include "SDFileSystem.h"
#include "rtos.h"
#include "led.h"

#if 0

static SDFileSystem sd(PA_7,PA_6,PA_5,PA_4,"sd"); // MOSI,MISO,SCK,CS

extern Led LedStripe[NUMBER_OF_LEDS];

/*
    +--------+
    |        |VOUT---+               ,--------+
    |        |       +-[47k]-----DAT2|9       |
    |    PA_4|CS-----|-------------CS|1       |
    |    PA_7|MOSI---|------------CMD|2       |
    |        |       |       +---VSS1|3   SD  |
    |  Neon  |       +-------|----VDD|4 memory|
    |    PA_5|SCK----|-------|----CLK|5  card |
    |        |       |       +---VSS2|6       |
    |    PA_6|MISO---|-------|---DAT0|7       |
    |        |       +-[47k]-|---DAT1|8       |
    |        |GND------------+       +--------+
    +--------+
*/

void TaskFA(void const *argument)
{
    printf("TaskFA started\r\n\r\n");

    // create private directory
    mkdir("/sd/Neon", 0777);
    
    FILE *fp = fopen("/sd/mydir/NeonInfo.txt", "w");
    if(fp == NULL) {
        printf("Could not open file for write\r\n");
    }
    fprintf(fp, "Neon firmware launched\r\n");
    fclose(fp);
    
    printf("TaskFA process finished\r\n");

    while(true){
        Thread::wait(10000); // 適当な待ち時間
    }
}
#endif