[][src]Function esp_idf_sys::hall_sensor_read

pub unsafe extern "C" fn hall_sensor_read() -> c_int

@brief Read Hall Sensor

@note When the power switch of SARADC1, SARADC2, HALL sensor and AMP sensor is turned on, the input of GPIO36 and GPIO39 will be pulled down for about 80ns. When enabling power for any of these peripherals, ignore input from GPIO36 and GPIO39. Please refer to section 3.11 of 'ECO_and_Workarounds_for_Bugs_in_ESP32' for the description of this issue.

@note The Hall Sensor uses channels 0 and 3 of ADC1. Do not configure these channels for use as ADC channels.

@note The ADC1 module must be enabled by calling adc1_config_width() before calling hall_sensor_read(). ADC1 should be configured for 12 bit readings, as the hall sensor readings are low values and do not cover the full range of the ADC.

@return The hall sensor reading.