Wirepas SDK
hardware.h
Go to the documentation of this file.
1 /* Copyright 2017 Wirepas Ltd. All Rights Reserved.
2  *
3  * See file LICENSE.txt for full license details.
4  *
5  */
6 
28 #ifndef APP_LIB_HARDWARE_H_
29 #define APP_LIB_HARDWARE_H_
30 
31 #include <stdlib.h>
32 #include <stdint.h>
33 #include <stdbool.h>
34 
35 #include "app/app.h"
36 
38 #define APP_LIB_HARDWARE_NAME 0x014eff15
39 
40 
41 #define APP_LIB_HARDWARE_VERSION 0x202
42 
52 typedef enum
53 {
57 
67 typedef enum
68 {
72 
83 typedef app_res_e
86 
97 typedef app_res_e
100 
110 typedef uint16_t
112 
120 typedef int32_t
122 
132 typedef app_res_e
134 
145 typedef app_res_e
147 
168 typedef app_res_e
170  bool * activated_p,
171  uint32_t timeout_us);
172 
173 
177 typedef struct
178 {
187 
188 #endif /* APP_LIB_HARDWARE_H_ */
app_lib_hardware_release_peripheral_f
app_res_e(* app_lib_hardware_release_peripheral_f)(app_lib_hardware_peripheral_e peripheral)
Release a reserved hardware peripheral back for stack use.
Definition: hardware.h:99
app_lib_hardware_t::reservePeripheral
app_lib_hardware_reserve_peripheral_f reservePeripheral
Definition: hardware.h:179
app_lib_hardware_activate_peripheral_f
app_res_e(* app_lib_hardware_activate_peripheral_f)(app_lib_hardware_activable_peripheral_e peripheral)
Request for peripheral activation.
Definition: hardware.h:133
APP_LIB_HARDWARE_PERIPHERAL_HFXO
@ APP_LIB_HARDWARE_PERIPHERAL_HFXO
Definition: hardware.h:70
app_lib_hardware_t::isPeripheralActivated
app_lib_hardware_is_peripheral_activated_f isPeripheralActivated
Definition: hardware.h:185
app_lib_hardware_t::readSupplyVoltage
app_lib_hardware_read_supply_voltage_f readSupplyVoltage
Definition: hardware.h:181
app_lib_hardware_t::activatePeripheral
app_lib_hardware_activate_peripheral_f activatePeripheral
Definition: hardware.h:183
app_lib_hardware_t
List of library functions.
Definition: hardware.h:177
app_lib_hardware_reserve_peripheral_f
app_res_e(* app_lib_hardware_reserve_peripheral_f)(app_lib_hardware_peripheral_e peripheral)
Reserve a hardware peripheral.
Definition: hardware.h:85
app_lib_hardware_t::readTemperature
app_lib_hardware_read_temperature_f readTemperature
Definition: hardware.h:182
app.h
APP_LIB_HARDWARE_PERIPHERAL_RESERVED
@ APP_LIB_HARDWARE_PERIPHERAL_RESERVED
Definition: hardware.h:55
app_lib_hardware_deactivate_peripheral_f
app_res_e(* app_lib_hardware_deactivate_peripheral_f)(app_lib_hardware_activable_peripheral_e peripheral)
Request for peripheral deactivation.
Definition: hardware.h:146
app_lib_hardware_read_supply_voltage_f
uint16_t(* app_lib_hardware_read_supply_voltage_f)(void)
Query voltage value.
Definition: hardware.h:111
app_lib_hardware_read_temperature_f
int32_t(* app_lib_hardware_read_temperature_f)(void)
Ask the last read chip temperature from the stack.
Definition: hardware.h:121
app_lib_hardware_t::deactivatePeripheral
app_lib_hardware_deactivate_peripheral_f deactivatePeripheral
Definition: hardware.h:184
app_lib_hardware_is_peripheral_activated_f
app_res_e(* app_lib_hardware_is_peripheral_activated_f)(app_lib_hardware_activable_peripheral_e peripheral, bool *activated_p, uint32_t timeout_us)
Request for peripheral status.
Definition: hardware.h:169
app_lib_hardware_activable_peripheral_e
app_lib_hardware_activable_peripheral_e
Hardware peripherals to activate.
Definition: hardware.h:67
app_lib_hardware_t::releasePeripheral
app_lib_hardware_release_peripheral_f releasePeripheral
Definition: hardware.h:180
app_lib_hardware_peripheral_e
app_lib_hardware_peripheral_e
Hardware peripherals to reserve.
Definition: hardware.h:52
app_res_e
app_res_e
Definition: app.h:201