programma di test per vedere se funziona

Dependencies:   SDFileSystem_conMOD mbed-rtos mbed

Fork of f4_sd_imu_4 by ratto killer

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers sd_binario.h Source File

sd_binario.h

00001 
00002 
00003 struct r_f{
00004 char r_d;
00005 char r_s;   
00006     
00007 };
00008 
00009 void scrivi_rf(r_f ruote,bool flag=false){
00010 
00011     if(flag){
00012      ruote.r_d=255;
00013     ruote.r_s=255;
00014     }
00015  fwrite(&ruote, sizeof(r_f), 1, fp);    
00016     
00017     
00018 }
00019 
00020 #define N 10
00021 void scrivi_imu(message_t*  imu){
00022 static int n=0;
00023 
00024 static message_t msg[N];
00025 copia(msg[n],*imu);
00026 if(n==N){
00027  fwrite(&imu, sizeof(message_t ), N, fp);    
00028     n=0;
00029 }
00030     
00031 }
00032