Simplified LoRaWAN library.
Fork of LoRaWAN-lib-v1_0_1 by
Diff: LoRaMac.h
- Revision:
- 1:91e4e6c60d1e
- Parent:
- 0:91d1a7783bb9
- Child:
- 2:14a5d6ad92d5
diff -r 91d1a7783bb9 -r 91e4e6c60d1e LoRaMac.h --- a/LoRaMac.h Tue Oct 20 13:21:26 2015 +0000 +++ b/LoRaMac.h Mon Nov 23 10:09:43 2015 +0000 @@ -298,7 +298,7 @@ * LoRaMAC events structure * Used to notify upper layers of MAC events */ -typedef struct sLoRaMacEvent +typedef struct sLoRaMacCallbacks { /*! * MAC layer event callback prototype. @@ -307,17 +307,21 @@ * \param [IN] info Details about MAC events occurred */ void ( *MacEvent )( LoRaMacEventFlags_t *flags, LoRaMacEventInfo_t *info ); -}LoRaMacEvent_t; + /*! + * Function callback to get the current battery level + * + * \retval batteryLevel Current battery level + */ + uint8_t ( *GetBatteryLevel )( void ); +}LoRaMacCallbacks_t; /*! * LoRaMAC layer initialization * - * \param [IN] events Pointer to a structure defining the LoRaMAC + * \param [IN] callabcks Pointer to a structure defining the LoRaMAC * callback functions. - * \param [IN] getBatteryLevel Function callback to get the current - * battery level */ -void LoRaMacInit( LoRaMacEvent_t *events, uint8_t ( *getBatteryLevel )( ) ); +void LoRaMacInit( LoRaMacCallbacks_t *callabcks ); /*! * Enables/Disables the ADR (Adaptive Data Rate)