feat(lib): Introduce adc_sensor library
Adds a new `adc_sensor` library to abstract reading analog values from ADC channels. The output of this library is currently simulated. This library is now used by the `modbus_server` to read the motor current and the main supply voltage, replacing the previous implementation. This change improves modularity by centralizing ADC-related code into a dedicated module. The build system has been updated to include the new library.
This commit is contained in:
16
software/lib/adc_sensor/Kconfig
Normal file
16
software/lib/adc_sensor/Kconfig
Normal file
@@ -0,0 +1,16 @@
|
||||
config ADC_SENSOR
|
||||
bool "ADC sensor library"
|
||||
default y
|
||||
help
|
||||
Enable ADC sensor library for voltage and current measurements.
|
||||
|
||||
if ADC_SENSOR
|
||||
|
||||
config ADC_SENSOR_SIMULATED
|
||||
bool "Use simulated ADC readings"
|
||||
default y
|
||||
help
|
||||
Use simulated values instead of real ADC readings.
|
||||
Voltage: 12000mV, Current: 45mA
|
||||
|
||||
endif # ADC_SENSOR
|
||||
Reference in New Issue
Block a user