1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

SimPosix: Reenabled File IO for UAVObject saving

This commit is contained in:
Corvus Corax 2012-03-24 19:24:13 +01:00
parent 0d23e78762
commit 9aca773714
2 changed files with 13 additions and 0 deletions

View File

@ -30,6 +30,18 @@
#ifndef SIM_POSIX_H_
#define SIM_POSIX_H_
/**
* glue macros for file IO
**/
#define FILEINFO FILE*
#define PIOS_FOPEN_READ(filename,file) (file=fopen((char*)filename,"r"))==NULL
#define PIOS_FOPEN_WRITE(filename,file) (file=fopen((char*)filename,"w"))==NULL
#define PIOS_FREAD(file,bufferadr,length,resultadr) (*resultadr=fread((uint8_t*)bufferadr,1,length,*file)) != length
#define PIOS_FWRITE(file,bufferadr,length,resultadr) *resultadr=fwrite((uint8_t*)bufferadr,1,length,*file)
#define PIOS_FCLOSE(file) fclose(file)
#define PIOS_FUNLINK(file) unlink((char*)filename)
//------------------------
// Timers and Channels Used
//------------------------

View File

@ -44,6 +44,7 @@
//#define PIOS_INCLUDE_I2C
#define PIOS_INCLUDE_IRQ
#define PIOS_INCLUDE_LED
#define PIOS_INCLUDE_SDCARD
//#define PIOS_INCLUDE_IAP
#define PIOS_INCLUDE_SERVO
#define PIOS_INCLUDE_SPI