mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-25 17:42:48 +00:00
new sending kinda works
This commit is contained in:
parent
fce31560c6
commit
3c3e722181
@ -8,6 +8,7 @@ Minimum items needed to make sure hardware is good.
|
|||||||
- DONE get old radio driver working on NRF52
|
- DONE get old radio driver working on NRF52
|
||||||
- DONE basic test of BLE
|
- DONE basic test of BLE
|
||||||
- DONE get a debug 'serial' console working via the ICE passthrough feature
|
- DONE get a debug 'serial' console working via the ICE passthrough feature
|
||||||
|
- add a hard fault handler
|
||||||
- switch to RadioLab? test it with current radio. https://github.com/jgromes/RadioLib
|
- switch to RadioLab? test it with current radio. https://github.com/jgromes/RadioLib
|
||||||
- use "variants" to get all gpio bindings
|
- use "variants" to get all gpio bindings
|
||||||
- plug in correct variants for the real board
|
- plug in correct variants for the real board
|
||||||
|
@ -17,7 +17,7 @@ static inline void debugger_break(void)
|
|||||||
void __attribute__((noreturn)) __assert_func(const char *file, int line, const char *func, const char *failedexpr)
|
void __attribute__((noreturn)) __assert_func(const char *file, int line, const char *func, const char *failedexpr)
|
||||||
{
|
{
|
||||||
DEBUG_MSG("assert failed %s: %d, %s, test=%s\n", file, line, func, failedexpr);
|
DEBUG_MSG("assert failed %s: %d, %s, test=%s\n", file, line, func, failedexpr);
|
||||||
debugger_break();
|
// debugger_break(); FIXME doesn't work, possibly not for segger
|
||||||
while (1)
|
while (1)
|
||||||
; // FIXME, reboot!
|
; // FIXME, reboot!
|
||||||
}
|
}
|
||||||
|
@ -91,6 +91,8 @@ void RadioLibInterface::loop()
|
|||||||
if (wasPending) {
|
if (wasPending) {
|
||||||
pending = ISR_NONE; // If the flag was set, it is _guaranteed_ the ISR won't be running, because it masked itself
|
pending = ISR_NONE; // If the flag was set, it is _guaranteed_ the ISR won't be running, because it masked itself
|
||||||
|
|
||||||
|
DEBUG_MSG("Handling a LORA interrupt %d!\n", wasPending);
|
||||||
|
|
||||||
if (wasPending == ISR_TX)
|
if (wasPending == ISR_TX)
|
||||||
handleTransmitInterrupt();
|
handleTransmitInterrupt();
|
||||||
else if (wasPending == ISR_RX)
|
else if (wasPending == ISR_RX)
|
||||||
@ -193,7 +195,7 @@ void RadioLibInterface::startSend(MeshPacket *txp)
|
|||||||
size_t numbytes = beginSending(txp);
|
size_t numbytes = beginSending(txp);
|
||||||
|
|
||||||
int res = iface.startTransmit(radiobuf, numbytes);
|
int res = iface.startTransmit(radiobuf, numbytes);
|
||||||
assert(res);
|
assert(res == ERR_NONE);
|
||||||
|
|
||||||
// Must be done AFTER, starting transmit, because startTransmit clears (possibly stale) interrupt pending register bits
|
// Must be done AFTER, starting transmit, because startTransmit clears (possibly stale) interrupt pending register bits
|
||||||
enableInterrupt(isrTxLevel0);
|
enableInterrupt(isrTxLevel0);
|
||||||
|
@ -27,7 +27,7 @@ bool SX1262Interface::init()
|
|||||||
int res = lora.begin(freq, bw, sf, cr, syncWord, power, currentLimit, preambleLength, tcxoVoltage, useRegulatorLDO);
|
int res = lora.begin(freq, bw, sf, cr, syncWord, power, currentLimit, preambleLength, tcxoVoltage, useRegulatorLDO);
|
||||||
DEBUG_MSG("LORA init result %d\n", res);
|
DEBUG_MSG("LORA init result %d\n", res);
|
||||||
|
|
||||||
if (res != ERR_NONE)
|
if (res == ERR_NONE)
|
||||||
res = lora.setCRC(SX126X_LORA_CRC_ON);
|
res = lora.setCRC(SX126X_LORA_CRC_ON);
|
||||||
|
|
||||||
return res == ERR_NONE;
|
return res == ERR_NONE;
|
||||||
|
Loading…
Reference in New Issue
Block a user