minor fixups to get nrf52 building again

This commit is contained in:
geeksville
2020-05-09 21:02:56 -07:00
parent 190a3c2d6b
commit 2fa595523f
6 changed files with 16 additions and 6 deletions

View File

@@ -116,7 +116,7 @@ bool FloodingRouter::wasSeenRecently(const MeshPacket *p)
}
uint32_t now = millis();
for (int i = 0; i < recentBroadcasts.size();) {
for (size_t i = 0; i < recentBroadcasts.size();) {
BroadcastRecord &r = recentBroadcasts[i];
if ((now - r.rxTimeMsec) >= FLOOD_EXPIRE_TIME) {

View File

@@ -197,6 +197,9 @@ void RadioLibInterface::loop()
#ifndef NO_ESP32
#define USE_HW_TIMER
#else
// Not needed on NRF52
#define IRAM_ATTR
#endif
void IRAM_ATTR RadioLibInterface::timerCallback(void *p1, uint32_t p2)

View File

@@ -31,7 +31,7 @@ void StreamAPI::readStream()
if (c != START2)
rxPtr = 0; // failed to find framing
} else if (ptr >= HEADER_LEN) { // we have at least read our 4 byte framing
uint16_t len = (rxBuf[2] << 8) + rxBuf[3]; // big endian 16 bit length follows framing
uint32_t len = (rxBuf[2] << 8) + rxBuf[3]; // big endian 16 bit length follows framing
if (ptr == HEADER_LEN) {
// we _just_ finished our 4 byte header, validate length now (note: a length of zero is a valid

View File

@@ -0,0 +1,5 @@
#include "CryptoEngine.h"
// FIXME, do a NRF52 version
CryptoEngine *crypto = new CryptoEngine();