219 #ifndef ti_drivers_BatteryMonitor__include 220 #define ti_drivers_BatteryMonitor__include 244 #define BatteryMonitor_STATUS_RESERVED (-32) 252 #define BatteryMonitor_STATUS_SUCCESS (0) 260 #define BatteryMonitor_STATUS_ERROR (-1) 289 uint16_t thresholdVoltage,
359 uintptr_t clientArg);
390 uintptr_t clientArg);
428 uintptr_t clientArg);
static void BatteryMonitor_getThresholdRange(BatteryMonitor_NotifyObj *notifyObject, uint16_t *thresholdHigh, uint16_t *thresholdLow)
Get the high and low threshold of a notification.
Definition: BatteryMonitor.h:504
static BatteryMonitor_NotifyFxn BatteryMonitor_getNotifyFxn(BatteryMonitor_NotifyObj *notifyObject)
Get the notifyFxn provided during registration.
Definition: BatteryMonitor.h:537
uint16_t thresholdHigh
Definition: BatteryMonitor.h:306
static uintptr_t BatteryMonitor_getClientArg(BatteryMonitor_NotifyObj *notifyObject)
Get the application-provided clientArg of a notification.
Definition: BatteryMonitor.h:522
static uint16_t BatteryMonitor_getThresholdLow(BatteryMonitor_NotifyObj *notifyObject)
Get the low threshold of a notification.
Definition: BatteryMonitor.h:480
int_fast16_t BatteryMonitor_registerNotifyRange(BatteryMonitor_NotifyObj *notifyObject, uint16_t thresholdHigh, uint16_t thresholdLow, BatteryMonitor_NotifyFxn notifyFxn, uintptr_t clientArg)
Registers a notification with both a high and low threshold.
void(* BatteryMonitor_NotifyFxn)(uint16_t currentVoltage, uint16_t thresholdVoltage, uintptr_t clientArg, BatteryMonitor_NotifyObj *notifyObject)
Function prototype for a notification callback.
Definition: BatteryMonitor.h:288
int_fast16_t BatteryMonitor_registerNotifyLow(BatteryMonitor_NotifyObj *notifyObject, uint16_t thresholdLow, BatteryMonitor_NotifyFxn notifyFxn, uintptr_t clientArg)
Registers a notification with a low threshold.
int_fast16_t BatteryMonitor_registerNotifyHigh(BatteryMonitor_NotifyObj *notifyObject, uint16_t thresholdHigh, BatteryMonitor_NotifyFxn notifyFxn, uintptr_t clientArg)
Registers a notification with a high threshold.
uint16_t thresholdLow
Definition: BatteryMonitor.h:307
void BatteryMonitor_init(void)
This function initializes the Battery Monitor driver.
uint16_t BatteryMonitor_getVoltage(void)
Gets the current supply voltage in millivolts.
uintptr_t clientArg
Definition: BatteryMonitor.h:308
List_Elem link
Definition: BatteryMonitor.h:304
Battery Monitor notify object structure.
Definition: BatteryMonitor.h:302
bool isRegistered
Definition: BatteryMonitor.h:309
BatteryMonitor_NotifyFxn notifyFxn
Definition: BatteryMonitor.h:305
int_fast16_t BatteryMonitor_unregisterNotify(BatteryMonitor_NotifyObj *notifyObject)
Unregisters a currently registered notification.
Linked List interface for use in drivers.
static uint16_t BatteryMonitor_getThresholdHigh(BatteryMonitor_NotifyObj *notifyObject)
Get the high threshold of a notification.
Definition: BatteryMonitor.h:461