mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-12-05 07:22:12 +00:00
New memory address for i2c dev loaded apps (#2817)
* New memory address for i2c dev loaded apps * better download handling on error * new hackrf version (added PortapackRf support) * lock i2cdev while loading apps
This commit is contained in:
@@ -108,6 +108,19 @@ FROM HERE YOU SHOULDN'T WRITE ANYTHING IF YOU JUST IMPLEMENT A NEW DRIVER
|
||||
|
||||
*/
|
||||
|
||||
void I2cDev::unlockDevice() {
|
||||
mtx = 0;
|
||||
}
|
||||
|
||||
// when device is locked, all not important queries will return 0 or nullopt, so no communication broken.
|
||||
bool I2cDev::lockDevice() {
|
||||
if (mtx == 0) {
|
||||
mtx = 1;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void I2cDev::set_update_interval(uint8_t interval) {
|
||||
query_interval = interval;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user