Back to Tock

README

doc/syscalls/README.md

latest8.9 KB
Original Source

Tock Syscalls

This folder contains the detailed documentation for the interfaces between userspace and the kernel. It includes details of the ABI interface, the kernel provided syscalls, and the driver specific interfaces (using allow, schedule, and command). For more information on the general syscalls, see here.

<!-- toc --> <!-- tocstop -->

Syscall Binary Interface

Details of the application binary interface.

Core Kernel Provided Syscalls

  • memop: Memory-related operations.

Capsule Provided Drivers

Each driver type that has been allocated a permanent driver number is listed in the tables below. The "2.0" column indicates whether the driver has been stabilized or not (a "✓" indicates stability) in the Tock 2.0 release.

Base

2.0Driver NumberDriverDescription
0x00000AlarmUsed for timers in userspace
0x00001ConsoleUART console
0x00002LEDControl LEDs on board
0x00003ButtonGet interrupts from buttons on the board
0x00008Low-Level DebugLow-level debugging tools

Kernel

2.0Driver NumberDriverDescription
0x00009ROSRead Only State, access system information
0x10000IPCInter-process communication
0x10001DBSDynamic Binary Storage/Process Loading
0x10002ProcessInfoInspect and control processes

Hardware Access

2.0Driver NumberDriverDescription
0x00004GPIOSet and read GPIO pins
0x00005ADCSample analog-to-digital converter pins
0x00006DACDigital to analog converter
0x00007AnalogComparatorAnalog Comparator
0x00010PWMControl PWM pins
0x20000UARTUART
0x20001SPIRaw SPI Master interface
0x20002SPI SlaveRaw SPI slave interface
0x20003I2C MasterRaw I2C Master interface
0x20004I2C SlaveRaw I2C Slave interface
0x20005USBUniversal Serial Bus interface
0x20007CANController Area Network interface

Note: GPIO is slated for re-numbering in Tock 2.0.

Networking

2.0Driver NumberDriverDescription
0x30000BLEBluetooth Low Energy
0x30001802.15.4IEEE 802.15.4
0x30002UDPUDP / 6LoWPAN Interface

Cryptography

2.0Driver NumberDriverDescription
0x40000AESAES Symmetric Key Cryptography
0x40001RNGRandom number generator
0x40002CRCCyclic Redundancy Check computation

Storage

2.0Driver NumberDriverDescription
0x50000App FlashAllow apps to write their own flash
0x50001Nonvolatile StorageGeneric interface for persistent storage
0x50002SDCardRaw block access to an SD card
0x50003Key-ValueAccess to a key-value storage database
0x50004Isolated Nonvolatile StoragePer-application nonvolatile storage

Sensors

2.0Driver NumberDriverDescription
0x60000Ambient Temp.Ambient temperature (centigrate)
0x60001HumidityHumidity Sensor (percent)
0x60002LuminanceAmbient Light Sensor (lumens)
0x60003PressurePressure sensor
0x60004NinedofVirtualized accelerometer/magnetometer/gyroscope
0x60005ProximityProximity Sensor
0x60006SoundPressureSound Pressure Sensor
0x90002TouchMulti Touch Panel
0x60009DistanceDistance Sensor

Sensor ICs

2.0Driver NumberDriverDescription
0x70000TSL2561Light sensor
0x70001TMP006Temperature sensor
0x70004LPS25HBPressure sensor
0x70005L3GD203 axis gyroscope and temperature sensor
0x70006LSM303DLHC3 axis accelerometer, magnetometer and temperature sensor

Other ICs

2.0Driver NumberDriverDescription
0x80000LTC294XBattery gauge IC
0x80001MAX17205Battery gauge IC
0x80002PCA9544AI2C address multiplexing
0x80003GPIO AsyncAsynchronous GPIO pins
0x80004nRF51822nRF serialization link to nRF51822 BLE SoC

Display

2.0Driver NumberDriverDescription
0x90001ScreenGraphic Screen
0x90003Text ScreenText Screen

Miscellaneous

2.0Driver NumberDriverDescription
0x90000BuzzerBuzzer
0x90009Servo
Servo