Compare: Interfaces
Unified
Split
Showing
with
121 additions
and 5 deletions.
- +51 −0 Content-Interface.md
- +3 −0 Get-in-touch.md
- +24 −0 Interfaces.md
- +7 −0 REST-API.md
- +36 −5 Security.md
View
24
Interfaces.md
| @@ -337,6 +337,12 @@ access to GPIO hardware. | ||
| * number (slot): GPIO pin number to export and expose to consuming snaps | ||
| +Snaps that want to consume a gpio device simply `plugs: [ gpio ]` and the gpio | ||
| +device to connect is specified during interface connection. Available gpio | ||
| +devices for the system can be seen with `snap interfaces`. Once connected, | ||
| +the consuming snap can use the device via `/sys/class/gpio/gpioN` where `N` is | ||
| +the pin number specified by the connected slot. | ||
| + | ||
| ### hardware-observe | ||
| Can query hardware information from the system. | ||
| @@ -362,6 +368,12 @@ access to hardware devices. | ||
| * path (slot): path where a symlink will be created to the device | ||
| e.g. /dev/hidraw-mydevice | ||
| +Snaps that want to consume a hidraw device simply `plugs: [ hidraw ]` and | ||
| +the hidraw device to connect is specified during interface connection. Available | ||
| +hidraw devices for the system can be seen with `snap interfaces`. Once connected, | ||
| +the consuming snap can use the device via the path specified by the connected | ||
| +slot. | ||
| + | ||
| ### i2c | ||
| Can access i2c devices. This is restricted because it provides privileged | ||
| @@ -372,6 +384,12 @@ access to hardware devices. | ||
| * path (slot): path to i2c device node e.g. /dev/i2c-0 | ||
| +Snaps that want to consume an i2c device simply `plugs: [ i2c ]` and the i2c | ||
| +device to connect is specified during interface connection. Available i2c | ||
| +devices for the system can be seen with `snap interfaces`. Once connected, | ||
| +the consuming snap can use the device via the path specified by the connected | ||
| +slot. | ||
| + | ||
| ### kernel-module-control | ||
| Can insert kernel modules. This interface gives privileged access to the device. | ||
| @@ -522,6 +540,12 @@ access to configure serial port hardware. | ||
| * path (slot): path where a symlink will be created to the device | ||
| e.g. /dev/serial-port-mydevice | ||
| +Snaps that want to consume a serial port simply `plugs: [ serial-port ]` and | ||
| +the serial port to connect is specified during interface connection. Available | ||
| +serial ports for the system can be seen with `snap interfaces`. Once connected, | ||
| +the consuming snap can use the device via the path specified by the connected | ||
| +slot. | ||
| + | ||
| ### snapd-control | ||
| Can manage snaps via snapd. | ||