add Tencent Cloud explorer lora demo
develop guide, see http://iwiki.oa.com/pages/viewpage.action?pageId=46342556
This commit is contained in:
@@ -21,18 +21,20 @@
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
typedef void (*mcps_indication_t)(uint8_t* data, uint8_t len);
|
||||
typedef void (*lora_recv_callback_t)(uint8_t *data, uint8_t len);
|
||||
|
||||
typedef struct lora_module_st {
|
||||
int (*init)(void);
|
||||
|
||||
int (*join)(void);
|
||||
int (*join_otaa)(const char *deveui, const char *appkey);
|
||||
|
||||
int (*join_abp)(const char *deveui, const char *devaddr, const char *nwkskey, const char *appskey);
|
||||
|
||||
int (*send)(const void *buf, size_t len);
|
||||
|
||||
int (*recv_register)(void *mcps_indication);
|
||||
|
||||
int (*close)(void);
|
||||
|
||||
lora_recv_callback_t recv_callback;
|
||||
} lora_module_t;
|
||||
|
||||
/**
|
||||
@@ -62,7 +64,16 @@ int tos_lora_module_init(void);
|
||||
*
|
||||
* @return errcode
|
||||
*/
|
||||
int tos_lora_module_join(void);
|
||||
int tos_lora_module_join_otaa(const char *deveui, const char *appkey);
|
||||
|
||||
/**
|
||||
* @brief Join a lora gateway.
|
||||
*
|
||||
* @attention None
|
||||
*
|
||||
* @return errcode
|
||||
*/
|
||||
int tos_lora_module_join_abp(const char *deveui, const char *devaddr, const char *nwkskey, const char *appskey);
|
||||
|
||||
/**
|
||||
* @brief Send data by lora module.
|
||||
@@ -85,7 +96,7 @@ int tos_lora_module_send(const void *buf, size_t len);
|
||||
*
|
||||
* @return errcode
|
||||
*/
|
||||
int tos_lora_module_recv_register(void* mcps_indication);
|
||||
int tos_lora_module_recvcb_register(lora_recv_callback_t recv_callback);
|
||||
|
||||
/**
|
||||
* @brief Close the lora module.
|
||||
|
Reference in New Issue
Block a user