- Open source
- Standarized core specification
- Support any embedded platforms
- Easily extensible
Cyanobyte is a specification that defines the types of hardware configurations and functions that a hardware peripheral can have.
With a standardized representation, a codegen tool can read the intermediate representation and convert it into an executable driver in the language and platform of your choice.
Think of it as a machine-readable datasheet. By placing not just registers, but logic into a static configration, you don’t need to worry about converting a temperature sensor into Celsius, or finding the exact register values to initialize your device. All the logic is handled for you.
This is an open spec, and we’re looking for more feedback.
Just import the library and use an API. Now that’s a bright idea.
We do a Pull Request contributions workflow on GitHub. New users are always welcome!
Follow me on Twitter!
For announcement of latest features etc.
How it works
Peripherals are defined in yaml files. We've chosen yaml for the ease of readability. These peripheral specification files provide metadata, along with list of registers, fields, and relevant computational operations.
Code generation tools can take these machine-readable files and interpret them in many ways. They can be used to generate source code, documentation, or other applications.
This project includes a series of platform template files based around Python and Jinja2. Different groups may decide to use a different templating engine, but should ensure it is compatible with the peripheral spec files.
- Datasheet errata can now be represented with a file diff
- Reduce time in porting for embedded platforms
- Continuous deployment systems can patch libraries straight from source
Current StatusAt the moment Cyanobyte has support for I2C peripherals across many peripherals and embedded platforms. There is early support for other serialization protocols like SPI. As Cyanobyte provides code generation support, there is support for each peripheral on every platform.
- ADS1015 A2D Converter - BH1750FVI Light Sensor - BMP180 Temperature Sensor - BMP280 Temperature/Pressure Sensor - LSM303D IMU - MCP4725 D2A Converter - MCP9808 Temperature Sensor - TCS3472 Light Sensor
- Investigate other I2C peripherals like displays - Investigate support for new programming languages - Improve support for other serial peripherals like SPI
Help Wanted!Do you want to volunteer to help make this project come to life? There are many technologies we need help with.
- Several embedded platforms are written in C
- Several embedded platforms are written in Python
- Tests are written in Python
- Documentation is written in Markdown
- We're always exploring new avenues of exploration