mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-11-27 07:06:28 -05: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:
parent
54d99945f2
commit
2f4d222403
5 changed files with 52 additions and 10 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue