mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 02:27:48 +00:00
868812717f
This is important for inputs with a high input resistance. In those cases, the sample time needs to be longer.
14 lines
571 B
Go
14 lines
571 B
Go
package machine
|
|
|
|
// Hardware abstraction layer for the analog-to-digital conversion (ADC)
|
|
// peripheral.
|
|
|
|
// ADCConfig holds ADC configuration parameters. If left unspecified, the zero
|
|
// value of each parameter will use the peripheral's default settings.
|
|
type ADCConfig struct {
|
|
Reference uint32 // analog reference voltage (AREF) in millivolts
|
|
Resolution uint32 // number of bits for a single conversion (e.g., 8, 10, 12)
|
|
Samples uint32 // number of samples for a single conversion (e.g., 4, 8, 16, 32)
|
|
SampleTime uint32 // sample time, in microseconds (µs)
|
|
}
|