mirror of
https://github.com/manuelbl/ttn-esp32.git
synced 2025-06-15 20:24:28 +02:00
add shutdown_method to ttn in order reduce power consumption while in deep sleep
This commit is contained in:
parent
e29477fa7e
commit
0803bea610
@ -72,6 +72,12 @@ public:
|
|||||||
*/
|
*/
|
||||||
void reset();
|
void reset();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Shutdown the LoRaWAN radio and reduce power consumption
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void reset();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Configures the pins used to communicate with the LoRaWAN radio chip.
|
* @brief Configures the pins used to communicate with the LoRaWAN radio chip.
|
||||||
*
|
*
|
||||||
|
@ -118,6 +118,18 @@ void TheThingsNetwork::reset()
|
|||||||
ttn_hal.leaveCriticalSection();
|
ttn_hal.leaveCriticalSection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TheThingsNetwork::shutdown()
|
||||||
|
{
|
||||||
|
ttn_hal.enterCriticalSection();
|
||||||
|
LMIC_shutdown();
|
||||||
|
waitingReason = eWaitingNone;
|
||||||
|
if (lmicEventQueue != nullptr)
|
||||||
|
{
|
||||||
|
xQueueReset(lmicEventQueue);
|
||||||
|
}
|
||||||
|
ttn_hal.leaveCriticalSection();
|
||||||
|
}
|
||||||
|
|
||||||
bool TheThingsNetwork::provision(const char *devEui, const char *appEui, const char *appKey)
|
bool TheThingsNetwork::provision(const char *devEui, const char *appEui, const char *appKey)
|
||||||
{
|
{
|
||||||
if (!provisioning.decodeKeys(devEui, appEui, appKey))
|
if (!provisioning.decodeKeys(devEui, appEui, appKey))
|
||||||
|
Loading…
Reference in New Issue
Block a user