v0.1 board believed to be reading Vbat, Pressure, and X/Y/Z correctly now,
[fw/openalt] / iap / iap.h
1 #ifndef _IAP_H_
2 #define _IAP_H_
3
4 //
5 //
6 //
7 #define IAP_RESULT_X_NOTSAFEREGION      (IAP_RESULT_LAST + 1)
8 #define IAP_RESULT_X_NOSAFEREGIONAVAIL  (IAP_RESULT_LAST + 2)
9
10 //
11 //
12 //
13 void iapInit (void);
14 int iapSectorToAddress (int sectorNumber, unsigned long *address, int *sectorSize);
15 int iapAddressToSector (unsigned long address);
16 int iapIsSafeAddress (unsigned long address);;
17 int iapIsSafeSector (int sector);
18 int iapFindSafeSector (void);
19 int iapIsValidSector (int sector);
20 int iapGetErrno (void);
21 const char *iapStrerror (int err);
22 int iapPrepareSectors (int startingSector, int endingSector);
23 int iapFillSectors (int startingSector, int endingSector, int byte);
24 int iapWriteSectors (unsigned int address, unsigned char *buffer, int bufferLen);
25 int iapEraseSectors (int startingSector, int endingSector);
26 int iapBlankCheckSectors (int startingSector, int endingSector);
27 unsigned int iapReadPartID (void);
28 unsigned int iapReadBootCodeVersion (void);
29 int iapCompare (unsigned int address, unsigned char *buffer, int bufferLen);
30 void iapISP (void);
31
32 #endif