ext_adi_potentiometer_init

Function ext_adi_potentiometer_init 

Source
pub unsafe extern "C" fn ext_adi_potentiometer_init(
    smart_port: u8,
    adi_port: u8,
    potentiometer_type: adi_potentiometer_type_e_t,
) -> ext_adi_potentiometer_t
Expand description

Initializes a potentiometer on the given port.

This function uses the following values of errno when an error state is reached: ENXIO - The given value is not within the range of ADI Ports EADDRINUSE - The port is not configured as a potentiometer

\param smart_port The smart port with the adi expander (1-21) \param adi_port The ADI port to initialize as a gyro (from 1-8, ‘a’-‘h’, ‘A’-‘H’) \param potentiometer_type An adi_potentiometer_type_e_t enum value specifying the potentiometer version type

\return An adi_potentiometer_t object containing the given port, or PROS_ERR if the initialization failed.