PokittoLib is the library needed for programming the Pokitto DIY game console (www.pokitto.com)
Diff: POKITTO_CORE/PokittoCookie.cpp
- Revision:
- 58:5f58a2846a20
- Parent:
- 51:113b1d84c34f
--- a/POKITTO_CORE/PokittoCookie.cpp Tue Oct 02 20:38:50 2018 +0000 +++ b/POKITTO_CORE/PokittoCookie.cpp Sun Oct 07 10:06:28 2018 +0000 @@ -124,6 +124,7 @@ _block=0; _block=findMyNextBlock(); for (int i=0; i<_datasize; i++) writeQueue(*p++); + return true; } bool Cookie::loadCookie() { @@ -133,6 +134,7 @@ _block=0; _block=findMyNextBlock(); for (int i=0; i<_datasize; i++) *p++ = readQueue(); + return true; } void Cookie::deleteCookie() { @@ -245,7 +247,7 @@ #ifndef POK_SIM return eeprom_read_byte((uint16_t*)(SBKEYSIZE*SBMAXKEYS+n)); #endif - return 0x80; + //return 0x80; } void Cookie::readBlock(int n, char* data) { @@ -356,6 +358,7 @@ int Cookie::findMyNextBlock() { if (!_status) return SBINVALIDBLOCK; for (int i=_block; i<SBMAXBLOCKS;i++) if (isMyBlock(i)) return i; + return SBINVALIDBLOCK; }