| modm API documentation
    | 
#include <modm/driver/adc/mcp3008.hpp>
 
  
 | Public Types | |
| enum | Channel : uint8_t { Ch0 = 0b1000, Ch1 = 0b1001, Ch2 = 0b1010, Ch3 = 0b1011, Ch4 = 0b1100, Ch5 = 0b1101, Ch6 = 0b1110, Ch7 = 0b1111, Ch0Ch1Diff = 0b0000, Ch1Ch0Diff = 0b0001, Ch2Ch3Diff = 0b0010, Ch3Ch2Diff = 0b0011, Ch4Ch5Diff = 0b0100, Ch5Ch4Diff = 0b0101, Ch6Ch7Diff = 0b0110, Ch7Ch6Diff = 0b0111 } | 
| Public Member Functions | |
| Mcp3008 () = default | |
| void | initialize () | 
| Call initialize() before reading ADC. | |
| uint16_t | read (Channel channel) | 
| Read ADC channel. | |
| void | attachConfigurationHandler (Spi::ConfigurationHandler handler) | 
| Protected Member Functions | |
| bool | acquireMaster () | 
| bool | releaseMaster () | 
Simple driver for MCP3004/MCP3008 10-bit SAR SPI ADCs. Max SPI frequency 3.6 MHz at 5V, 1.36 MHz at 2.7V.
| 
 | strong | 
ADC channels For MCP3004 only channels 0-3 are valid.