controller_get_battery_capacity

Function controller_get_battery_capacity 

Source
pub unsafe extern "C" fn controller_get_battery_capacity(
    id: controller_id_e_t,
) -> i32
Expand description

Gets the battery capacity of the given controller.

This function uses the following values of errno when an error state is reached: EINVAL - A value other than E_CONTROLLER_MASTER or E_CONTROLLER_PARTNER is given. EACCES - Another resource is currently trying to access the controller port.

\param id The ID of the controller (e.g. the master or partner controller). Must be one of E_CONTROLLER_MASTER or E_CONTROLLER_PARTNER

\return The controller’s battery capacity