Closed ombhilare999 closed 3 years ago
The struct which has been calloc'ed is used only in the function characterize_adc1()
. So, rather than doing this, we can make a local struct instance. Do this and comment the rseults.
Fixed in 54f891743ec99e038edf0a5e08896fafe2f8e5c9
@laukik-hase Review this once
https://github.com/SRA-VJTI/sra-board-component/blob/a11b18b2f91b80a4b7a0e5ae5a1d5f1f89470699/src/adc.c#L50 I guess this calloc should be freed.
Code was referred from ESP32 ADC example: https://github.com/espressif/esp-idf/blob/master/examples/peripherals/adc/main/adc1_example_main.c They haven't done anything for calloc, @VedantParanjape @laukik-hase kindly check once.