mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-08 14:42:33 -04:00
External module api (#2290)
* added external module debug view * integrated module driver into i2c subsystem * implemented i2c app loader * added view mirror api * fixed build * added i2c to module api * implemented standalone app touch event * implemented focus management * reverted formating change * refactoring * refactoring * implemented events * fixed memory usage
This commit is contained in:
parent
5a0066963e
commit
dcaa02c1e1
18 changed files with 667 additions and 24 deletions
|
@ -31,6 +31,7 @@
|
|||
#include "i2cdev_max17055.hpp"
|
||||
#include "i2cdev_ads1110.hpp"
|
||||
#include "i2cdev_bh1750.hpp"
|
||||
#include "i2cdev_ppmod.hpp"
|
||||
|
||||
namespace i2cdev {
|
||||
|
||||
|
@ -86,6 +87,11 @@ bool I2CDevManager::found(uint8_t addr) {
|
|||
if (!item.dev->init(addr)) item.dev = nullptr;
|
||||
}
|
||||
|
||||
if (!item.dev && (addr == I2CDEV_PPMOD_ADDR_1)) {
|
||||
item.dev = std::make_unique<I2cDev_PPmod>();
|
||||
if (!item.dev->init(addr)) item.dev = nullptr;
|
||||
}
|
||||
|
||||
// if can't find any driver, add it too with empty, so we won't try to init it again and again
|
||||
devlist.push_back(std::move(item));
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue