Convert TTNProvisioning to C

This commit is contained in:
Manuel Bleichenbacher
2021-07-25 17:00:08 +02:00
parent 99bab17d4b
commit 973a7c41c8
4 changed files with 170 additions and 153 deletions

39
src/ttn_provisioning.h Normal file
View File

@ -0,0 +1,39 @@
/*******************************************************************************
*
* ttn-esp32 - The Things Network device library for ESP-IDF / SX127x
*
* Copyright (c) 2018-2021 Manuel Bleichenbacher
*
* Licensed under MIT License
* https://opensource.org/licenses/MIT
*
* Task listening on a UART port for provisioning commands.
*******************************************************************************/
#ifndef TTN_PROVISIONING_H
#define TTN_PROVISIONING_H
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
void ttn_provision_init(void);
bool ttn_provision_have_keys(void);
bool ttn_provision_decode_keys(const char *dev_eui, const char *app_eui, const char *app_key);
bool ttn_provision_from_mac(const char *app_eui, const char *app_key);
bool ttn_provision_save_keys(void);
bool ttn_provision_restore_keys(bool silent);
#if defined(TTN_HAS_AT_COMMANDS)
void ttn_provision_start_task(void);
#endif
#ifdef __cplusplus
}
#endif
#endif