firmware/src/portduino/PortduinoGlue.cpp

32 lines
693 B
C++
Raw Normal View History

2020-09-06 16:24:08 +00:00
#include "CryptoEngine.h"
#include "target_specific.h"
#include <Utility.h>
// FIXME - move getMacAddr/setBluetoothEnable into a HALPlatform class
2020-09-06 23:07:32 +00:00
uint32_t hwId; // fixme move into portduino
2020-09-06 16:24:08 +00:00
void getMacAddr(uint8_t *dmac)
{
2020-09-06 23:07:32 +00:00
if (!hwId) {
notImplemented("getMacAddr");
hwId = random();
}
dmac[0] = 0x80;
dmac[1] = 0;
dmac[2] = 0;
dmac[3] = hwId >> 16;
dmac[4] = hwId >> 8;
dmac[5] = hwId & 0xff;
2020-09-06 16:24:08 +00:00
}
void setBluetoothEnable(bool on)
{
notImplemented("setBluetoothEnable");
}
// FIXME - implement real crypto for linux
CryptoEngine *crypto = new CryptoEngine();
void updateBatteryLevel(uint8_t level) NOT_IMPLEMENTED("updateBatteryLevel");