snapcore / pi-gadget

Universal pi (pi2,pi3,pi4,cm3,cm4 and future) gadget snap for Ubuntu Core and classic systems.
30 stars 60 forks source link

not enough i2c interfaces in snapcraft.yaml #48

Closed ogra1 closed 2 years ago

ogra1 commented 4 years ago

when using dtoverlay lines to enable additional i2c buses via the i2c-gpio overlay, adding the following to config.txt works fine, the devices are created and functional after a reboot:

# adding /dev/i2c-4
dtoverlay=i2c-gpio,bus=4,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24
# adding /dev/i2c-3
dtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=17,i2c_gpio_scl=27

yet application snap packages can not access these devices, snapcraft.yaml only has:

i2c-0:
  interface: i2c
  path: /dev/i2c-0
i2c-1:
  interface: i2c
  path: /dev/i2c-1
i2c-2:
  interface: i2c
  path: /dev/i2c-2

additional interface declarations for /dev/i2c-3 and /dev/i2c-4 should be added here ...

jfether commented 2 years ago

There's also i2c-5 and i2c-6 on the RPi4, eg:

dtparam=i2c_arm=on,i2c_arm_baudrate=400000
dtoverlay=i2c3,pins_4_5,baudrate=400000
dtoverlay=i2c4,pins_6_7,baudrate=400000
dtoverlay=i2c5,pins_10_11,baudrate=400000
dtoverlay=i2c6,pins_22_23,baudrate=400000
waveform80 commented 2 years ago

Fixed in #83