Nordic Semiconductor nRF5 AirFuel SDK
version 2.2.0
|
Functions | |
uint32_t | pru_hal_init (void) |
Initialize the PRU's Hardware abstraction layer. More... | |
uint32_t | pru_hal_vrect_get (uint16_t *p_vrect) |
Read the value of VRECT. More... | |
uint32_t | pru_hal_irect_get (uint16_t *p_irect) |
Read the value of IRECT. More... | |
uint32_t | pru_hal_vout_enable_set (bool enable) |
Enable output to battery. More... | |
uint32_t | pru_hal_vout_enable_get (bool *enable) |
Get status of VOUT enable. More... | |
uint32_t | pru_hal_vout_get (uint16_t *p_vout) |
Read the voltage output to battery. More... | |
uint32_t | pru_hal_iout_get (uint16_t *p_iout) |
Read the value of IOUT. More... | |
uint32_t | pru_hal_temperature_get (int16_t *p_temperature) |
Read the temperature. More... | |
uint32_t | pru_hal_wired_charge_detect_status_get (bool *p_wired) |
Get the status of whether the PRU is charged by wire. More... | |
uint32_t | pru_hal_charge_complete_status_get (bool *p_charge_complete) |
Get the status of whether the PRU is charged. More... | |
uint32_t | pru_hal_adj_power_set (ctl_adj_power_t adj_setting) |
Limit maximum power consumed by PRU. More... | |
uint32_t | pru_hal_adj_power_get (ctl_adj_power_t *adj_setting) |
Get adjust power setting. More... | |
uint32_t | pru_hal_power_adjusted_set (bool adjusted) |
Set power adjusted value. More... | |
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 instructed by previous call to 'pru_hal_adj_power_set()'. More... | |
uint32_t pru_hal_init | ( | void | ) |
Initialize the PRU's Hardware abstraction layer.
NRF_SUCCESS | Status was read successfully. |
Definition at line 54 of file pru_hal_evkit.c.
uint32_t pru_hal_vrect_get | ( | uint16_t * | p_vrect | ) |
Read the value of VRECT.
[out] | p_vrect | Voltage at rectifier diode output [mV]. |
NRF_SUCCESS | VRECT was read successfully. |
Definition at line 71 of file pru_hal_evkit.c.
uint32_t pru_hal_irect_get | ( | uint16_t * | p_irect | ) |
Read the value of IRECT.
[out] | p_irect | Current at rectifier diode output [mA]. |
NRF_SUCCESS | IRECT was read successfully. |
Definition at line 77 of file pru_hal_evkit.c.
uint32_t pru_hal_vout_enable_set | ( | bool | enable | ) |
Enable output to battery.
[in] | enable | set to true enables output to battery. |
NRF_SUCCESS | If VOUT was enabled. |
Definition at line 83 of file pru_hal_evkit.c.
uint32_t pru_hal_vout_enable_get | ( | bool * | enable | ) |
Get status of VOUT enable.
[out] | enable | enable status of VOUT enable. |
NRF_SUCCESS | If VOUT was enabled. |
Definition at line 89 of file pru_hal_evkit.c.
uint32_t pru_hal_vout_get | ( | uint16_t * | p_vout | ) |
Read the voltage output to battery.
[out] | p_vout | Voltage at charge/battery port [mV]. |
NRF_SUCCESS | VOUT was read successfully. |
Definition at line 95 of file pru_hal_evkit.c.
uint32_t pru_hal_iout_get | ( | uint16_t * | p_iout | ) |
Read the value of IOUT.
[out] | p_iout | Current at charge/battery port [mA]. |
NRF_SUCCESS | IOUT was read successfully. |
Definition at line 101 of file pru_hal_evkit.c.
uint32_t pru_hal_temperature_get | ( | int16_t * | p_temperature | ) |
Read the temperature.
[out] | p_temperature | Temperature of PRU [Deg C]. |
NRF_SUCCESS | Temperature was read successfully. |
Definition at line 107 of file pru_hal_evkit.c.
uint32_t pru_hal_wired_charge_detect_status_get | ( | bool * | p_wired | ) |
Get the status of whether the PRU is charged by wire.
[out] | p_wired | True if PRU is connected to a wired charger, false otherwise. |
NRF_SUCCESS | Status was read successfully. |
Definition at line 113 of file pru_hal_evkit.c.
uint32_t pru_hal_charge_complete_status_get | ( | bool * | p_charge_complete | ) |
Get the status of whether the PRU is charged.
[out] | p_charge_complete | True if PRU has completed charging, false otherwise. |
NRF_SUCCESS | Status was read successfully. |
Definition at line 119 of file pru_hal_evkit.c.
uint32_t pru_hal_adj_power_set | ( | ctl_adj_power_t | adj_setting | ) |
Limit maximum power consumed by PRU.
This function is invoked by the PRU Profile when the PRU receives a power adjust command from the PTU.
Once the PRU has successfully adjusted its power consumption, it should set the power adjusted value to 'true' by invoking 'pru_hal_power_adjusted_set'.
[in] | adj_setting | specifies the maximium amount of power the PRU can consume. |
NRF_SUCCESS | Value was set successfully. |
Definition at line 125 of file pru_hal_evkit.c.
uint32_t pru_hal_adj_power_get | ( | ctl_adj_power_t * | adj_setting | ) |
Get adjust power setting.
[out] | adj_setting | Power adjust setting. |
NRF_SUCCESS | Value was returned successfully. |
Definition at line 131 of file pru_hal_evkit.c.
uint32_t pru_hal_power_adjusted_set | ( | bool | adjusted | ) |
Set power adjusted value.
When power adjusted value is set to 'true' the PRU will set its 'Adjusted Power Response' bit in the 'PRU Dynamic' characteristic to '1' for 1 second, informing the PTU that the PRU has adjusted its power draw as instructed.
The PRU profile will automatically invoke this function to set the power adjusted value to 'false' after reading it as 'true'.
Note: If 'STATIC_POWER_ADJUSTED_BIT' is defined, the PRU profile will not reset the power adjusted value as described above.
[in] | adjusted | New power adjusted value. |
NRF_SUCCESS | the value was successfully set. |
Definition at line 143 of file pru_hal_evkit.c.
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 instructed by previous call to 'pru_hal_adj_power_set()'.
When *p_adjusted is set to 'true', the PRU will set its 'Adjusted Power Response' bit in the 'PRU Dynamic' characteristic to '1' for 1 second, informing the PTU that the PRU has adjusted its power draw as instructed.
[out] | p_adjusted | Set to 'true' when power draw has been adjusted as specified by previous call to 'pru_hal_adj_power_set()'. |
NRF_SUCCESS | Value was returned successfully. |
Definition at line 137 of file pru_hal_evkit.c.