Nordic Semiconductor nRF5 AirFuel SDK  version 2.2.0
pru_hal.h
Go to the documentation of this file.
1 /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
2  *
3  * The information contained herein is property of Nordic Semiconductor ASA.
4  * Terms and conditions of usage are described in detail in NORDIC
5  * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
6  *
7  * Licensees are granted free, non-transferable use of the information. NO
8  * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
9  * the file.
10  *
11  */
12 
20 #ifndef __PRU_HAL_H__
21 #define __PRU_HAL_H__
22 
23 #include <stdbool.h>
24 #include <stdint.h>
25 #include "wpt.h"
26 
27 /******************************************************************************
28  * Main API
29  ******************************************************************************/
30 
35 uint32_t pru_hal_init(void);
36 
37 
44 uint32_t pru_hal_vrect_get(uint16_t * p_vrect);
45 
46 
53 uint32_t pru_hal_irect_get(uint16_t * p_irect);
54 
55 
62 uint32_t pru_hal_vout_enable_set(bool enable);
63 
64 
71 uint32_t pru_hal_vout_enable_get(bool * enable);
72 
73 
80 uint32_t pru_hal_vout_get(uint16_t * p_vout);
81 
82 
89 uint32_t pru_hal_iout_get(uint16_t * p_iout);
90 
91 
98 uint32_t pru_hal_temperature_get(int16_t * p_temperature);
99 
100 
107 uint32_t pru_hal_wired_charge_detect_status_get(bool * p_wired);
108 
109 
116 uint32_t pru_hal_charge_complete_status_get(bool * p_charge_complete);
117 
118 
132 uint32_t pru_hal_adj_power_set(ctl_adj_power_t adj_setting);
133 
134 
141 uint32_t pru_hal_adj_power_get(ctl_adj_power_t * adj_setting);
142 
143 
161 uint32_t pru_hal_power_adjusted_set(bool adjusted);
162 
175 uint32_t pru_hal_power_adjusted_get(bool * p_adjusted);
176 
177 
178 #endif /* __PRU_HAL_H__ */
179 
uint32_t pru_hal_wired_charge_detect_status_get(bool *p_wired)
Get the status of whether the PRU is charged by wire.
uint32_t pru_hal_temperature_get(int16_t *p_temperature)
Read the temperature.
uint32_t pru_hal_power_adjusted_set(bool adjusted)
Set power adjusted value.
uint32_t pru_hal_vout_get(uint16_t *p_vout)
Read the voltage output to battery.
Definition: pru_hal_evkit.c:95
uint32_t pru_hal_vrect_get(uint16_t *p_vrect)
Read the value of VRECT.
Definition: pru_hal_evkit.c:71
uint32_t pru_hal_adj_power_set(ctl_adj_power_t adj_setting)
Limit maximum power consumed by PRU.
uint32_t pru_hal_charge_complete_status_get(bool *p_charge_complete)
Get the status of whether the PRU is charged.
uint32_t pru_hal_vout_enable_get(bool *enable)
Get status of VOUT enable.
Definition: pru_hal_evkit.c:89
uint32_t pru_hal_irect_get(uint16_t *p_irect)
Read the value of IRECT.
Definition: pru_hal_evkit.c:77
uint32_t pru_hal_init(void)
Initialize the PRU's Hardware abstraction layer.
Definition: pru_hal_evkit.c:54
uint32_t pru_hal_adj_power_get(ctl_adj_power_t *adj_setting)
Get adjust power setting.
ctl_adj_power_t
Power adjust settings in control packet.
Definition: wpt.h:42
uint32_t pru_hal_vout_enable_set(bool enable)
Enable output to battery.
Definition: pru_hal_evkit.c:83
uint32_t pru_hal_iout_get(uint16_t *p_iout)
Read the value of IOUT.
uint32_t pru_hal_power_adjusted_get(bool *p_adjusted)
This function is called by the PRU profile to see if the PRU has limited its power consumption as ins...