portduino: gpios now kinda work on linux

This commit is contained in:
Kevin Hester
2021-01-02 11:06:38 +08:00
parent d289e8a86f
commit ebdad76fb2
2 changed files with 14 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
#include "CryptoEngine.h"
#include "target_specific.h"
#include "PortduinoGPIO.h"
#include <Utility.h>
#include "sleep.h"
@@ -34,4 +35,15 @@ void cpuDeepSleep(uint64_t msecs) {
// FIXME - implement real crypto for linux
CryptoEngine *crypto = new CryptoEngine();
void updateBatteryLevel(uint8_t level) NOT_IMPLEMENTED("updateBatteryLevel");
void updateBatteryLevel(uint8_t level) NOT_IMPLEMENTED("updateBatteryLevel");
/** apps run under portduino can optionally define a portduinoSetup() to
* use portduino specific init code (such as gpioBind) to setup portduino on their host machine,
* before running 'arduino' code.
*/
void portduinoSetup() {
printf("Setting up Meshtastic on Porduino...\n");
gpioBind((new SimGPIOPin(RF95_NSS, "RF95_NSS"))->setSilent());
}