Fake input and bug fixes

* Press W in simulator to activate (pretty slow shit, do avoid unless compiling with optimisations)
 * Tiny improvement of the EEPROM simulation.
 * Fixed type typo for millis and micros
This commit is contained in:
Mikael Degerfält 2019-06-14 22:23:53 +02:00
parent 266b3334cb
commit 1be998153a
6 changed files with 58 additions and 45 deletions

View file

@ -101,9 +101,9 @@ class Adafruit_MPR121 {
void setThreshholds(uint8_t touch, uint8_t release) __attribute__((deprecated));
void setThresholds(uint8_t touch, uint8_t release);
uint8_t _registers[48];
private:
int8_t _i2caddr;
uint8_t _registers[24];
};
#endif // ADAFRUIT_MPR121_H

View file

@ -73,8 +73,8 @@ extern SimSerial Serial;
//extern void putString(int row, int col, int color, const char* msg, const FONT_INFO fontInfo);
uint16_t micros();
uint16_t millis();
uint32_t micros();
uint32_t millis();
void delay(uint32_t millis);
void delayMicroseconds(uint32_t micros);

View file

@ -5,6 +5,7 @@
struct EEPROMClass
{
EEPROMClass();
//Basic user access methods.
// EERef operator[]( const int idx ) { return idx; }
uint8_t read( int idx ); // { return EERef( idx ); }
@ -34,6 +35,10 @@ struct EEPROMClass
// #endif
// return t;
// }
private:
char someFakeEEPROM_memory[4096];
};
static EEPROMClass EEPROM __attribute__ ((unused));