|
USB EPROM/Flash Programmer
|
Pico ADC Class. More...
#include <adc.hpp>
Public Member Functions | |
| Adc () | |
| Constructor. More... | |
| Adc (float vref) | |
| Constructor. More... | |
| float | capture (uint channel) |
| Captures one sample from the ADC. More... | |
| float | capture (uint channel, size_t size) |
| Captures multiple samples from the ADC. More... | |
| float | capture (uint channel, float *buf, size_t size) |
| Captures multiple samples from the ADC. More... | |
Static Public Attributes | |
| static constexpr float | kAdcDefaultVRef = 3.3f |
| Default reference voltage, in Volts. More... | |
Pico ADC Class.
The purpose of this class is to manipulate the ADC on the board.
| Adc | ( | ) |
Constructor.
As default, the reference voltage is set to kAdcDefaultVRef value.
|
explicit |
Constructor.
| vref | Reference voltage of the ADC, in Volts. |
| float capture | ( | uint | channel | ) |
Captures one sample from the ADC.
Captures and returns one sample. The valid channels are 0 to 3.
| channel | Number of the ADC channel (0 to 3). |
| float capture | ( | uint | channel, |
| size_t | size | ||
| ) |
Captures multiple samples from the ADC.
Uses FIFO to capture samples from ADC. The valid channels are 0 to 3.
| channel | Number of the ADC channel (0 to 3). |
| size | Number of samples to capture. |
| float capture | ( | uint | channel, |
| float * | buf, | ||
| size_t | size | ||
| ) |
Captures multiple samples from the ADC.
Uses FIFO to capture samples from ADC. The valid channels are 0 to 3.
| channel | Number of the ADC channel (0 to 3). |
| buf | Pointer to buffer that receive the captured samples. |
| size | Number of samples to capture. |
|
staticconstexpr |
Default reference voltage, in Volts.