-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathlora_info.h
89 lines (77 loc) · 2.4 KB
/
lora_info.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/**
******************************************************************************
* @file lora_info.h
* @author MCD Application Team
* @brief To give info to the application about LoRaWAN configuration
******************************************************************************
* @attention
*
* <h2><center>© Copyright (c) 2020 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/
#ifndef __LORA_INFO_H__
#define __LORA_INFO_H__
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
/*!
* To give info to the application about LoraWAN capability
* it can depend how it has been compiled (e.g. compiled regions ...)
* Params should be better uint32_t foe easier alignment with info_table concept
*/
typedef struct
{
uint32_t ActivationMode; /*!< 1: ABP, 2 : OTAA, 3: ABP & OTAA */
uint32_t Region; /*!< Combination of regions compiled on MW */
uint32_t ClassB; /*!< 0: not compiled in Mw, 1 : compiled in MW */
uint32_t Kms; /*!< 0: not compiled in Mw, 1 : compiled in MW */
} LoraInfo_t;
/**
* @brief initialises the LoraInfo table
* @param none
* @retval none
*/
void LoraInfo_Init(void);
/**
* @brief returns the pointer to the LoraInfo capabilities table
* @param none
* @retval LoraInfo pointer
*/
LoraInfo_t *LoraInfo_GetPtr(void);
/**
* @brief callback to get the battery level in % of full charge (254 full charge, 0 no charge)
* @param none
* @return battery level
*/
uint8_t GetBatteryLevel(void);
/**
* @brief callback to get the current temperature in the MCU
* @param none
* @return temperature level
*/
uint16_t GetTemperatureLevel(void);
/**
* @brief callback to get the board 64 bits unique ID
* @param unique ID
* @return none
*/
void GetUniqueId(uint8_t *id);
/**
* @brief callback to get the board 32 bits unique ID (LSB)
* @param none
* @retval devAddr Device Address
*/
uint32_t GetDevAddr(void);
#ifdef __cplusplus
}
#endif
#endif /* __LORA_INFO_H__ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/