Skip to content
  • Scott Ellis's avatar
    523697e5
    Add overlay for mcp3008 adc (#1818) · 523697e5
    Scott Ellis authored
    Some example usage:
    
    SPI0.0
    dtparam=spi=on
    dtoverlay=mcp3008:spi0-0-present
    
    SPI0.1
    dtparam=spi=on
    dtoverlay=mcp3008:spi0-1-present
    
    SPI0.0 and SPI0.1
    dtparam=spi=on
    dtoverlay=mcp3008:spi0-0-present,spi0-1-present
    
    SPI1.0
    dtparam=spi=on
    dtoverlay=spi1-1cs
    dtoverlay=mcp3008:spi1-0-present
    
    SPI1.2
    dtparam=spi=on
    dtoverlay=spi1-1cs:cs0_pin=16
    dtoverlay=mcp3008:spi1-0-present
    
    SPI1.0 and SPI1.1
    dtoverlay=spi1-2cs
    dtoverlay=mcp3008:spi1-0-present,spi1-1-present
    
    Changing the speed
    
    SPI0.0
    dtparam=spi=on
    dtoverlay=mcp3008:spi0-0-present,spi0-0-speed=2000000
    523697e5
    Add overlay for mcp3008 adc (#1818)
    Scott Ellis authored
    Some example usage:
    
    SPI0.0
    dtparam=spi=on
    dtoverlay=mcp3008:spi0-0-present
    
    SPI0.1
    dtparam=spi=on
    dtoverlay=mcp3008:spi0-1-present
    
    SPI0.0 and SPI0.1
    dtparam=spi=on
    dtoverlay=mcp3008:spi0-0-present,spi0-1-present
    
    SPI1.0
    dtparam=spi=on
    dtoverlay=spi1-1cs
    dtoverlay=mcp3008:spi1-0-present
    
    SPI1.2
    dtparam=spi=on
    dtoverlay=spi1-1cs:cs0_pin=16
    dtoverlay=mcp3008:spi1-0-present
    
    SPI1.0 and SPI1.1
    dtoverlay=spi1-2cs
    dtoverlay=mcp3008:spi1-0-present,spi1-1-present
    
    Changing the speed
    
    SPI0.0
    dtparam=spi=on
    dtoverlay=mcp3008:spi0-0-present,spi0-0-speed=2000000
Loading