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:
parent
0d23e78762
commit
9aca773714
@ -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
|
||||
//------------------------
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user