t
Dependencies: DM_FATFileSystem DM_HttpServer DM_USBHost EthernetInterface USBDevice mbed-rpc mbed-rtos
Fork of DMSupport by
Diff: Bios/BiosLoader.cpp
- Revision:
- 31:d47cffcb0a3e
- Parent:
- 29:b1ec19000e15
- Child:
- 34:fc366bab393f
--- a/Bios/BiosLoader.cpp Mon Jan 26 15:24:15 2015 +0100 +++ b/Bios/BiosLoader.cpp Tue Feb 17 10:41:48 2015 +0100 @@ -108,7 +108,8 @@ _initialized(false), _biosData(NULL), _conf(NULL), - _confSize(0) + _confSize(0), + _stats(0) { } @@ -183,6 +184,7 @@ // Bios header has been verified and seems ok *data = _conf; *size = _confSize; + _stats = fh.version; err = DMBoard::Ok; } while (false); @@ -353,8 +355,14 @@ void BiosLoader::handleI2CInterrupt() { - SET_MEAS_PIN_2(); _bios.i2cIRQHandler(_biosData); - CLR_MEAS_PIN_2(); } +void BiosLoader::getBiosStats(uint8_t& type, uint8_t& major, uint8_t& minor, uint8_t& rev) +{ + type = (_stats >> 24) & 0xff; + major = (_stats >> 16) & 0xff; + minor = (_stats >> 8) & 0xff; + rev = (_stats >> 0) & 0xff; +} +