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:
Totoo 2025-10-14 09:45:52 +02:00 committed by GitHub
parent 54d99945f2
commit 2f4d222403
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 52 additions and 10 deletions

View file

@ -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;
}