Handle service events.
672 if (new_reg_item_p != NULL)
686 switch(p_wpts_c_evt->
type)
698 if(!m_pctl_status.pending_power_adjust)
701 if(m_pctl_status.available_power < 0)
711 else if(m_pctl_status.prus_waiting)
union ble_wpts_c_evt_t::@1 data
uint8_t adjust_power_response
static void m_handle_new_device(ptu_reg_item_t *reg_item_p)
Handle the power sharing of a new PRU.
uint8_t pending_ctl_write
static bool m_pru_decrease_power()
Search for PRUs having "adjust power" capability and send control packet instructing the PRU to reduc...
static bool m_pru_deny_power()
Search for PRUs being permitted to enable charge output and send control packet denying the PRU to do...
ble_wpts_c_evt_type_t type
static bool m_pru_increase_power()
Search for PRUs having "adjust power" capability and send control packet allowing the PRU to increase...
static bool m_pru_allow_power()
Search for PRUs not being permitted to enable charge output and send control packet allowing the PRU ...
ptu_reg_item_t * ptu_reg_item_get_from_conn_handle(uint16_t conn_handle)
Get registry item from connection handle.
pru_dynamic_t pru_dynamic
static void m_update_pru_p_adj_status(void)
Update cooldown values for all PRUs which has received a power adjust command recently. Also checks for PRUs that does not respond with power adjust bit correctly after being sent a power adjust command.
static void m_charge_complete_update(ptu_reg_item_t *p_reg_item, ble_wpts_c_evt_t *const p_wpts_c_evt)
Check if all PRUs are done charging, in which case all will be disabled.
static void m_status_update(void)
Collect status information from all PRUs and update m_pctl_status.
ptu_reg_item_state_t state