+++
title = "Goldydocs"
linkTitle = "Goldydocs"
+++
{{< blocks/cover title="Cyanobyte: An intermediate representation for hardware peripheral I/O" image_anchor="top" height="full" color="orange" >}}
{{< /blocks/cover >}}
{{< blocks/section color="primary" >}}
{{% blocks/feature icon="fa-list" title="Cyanobyte goals:" %}}
- Open source
- Standarized
- Support any embedded platforms
- Easily extensible
{{% /blocks/feature %}}
{{% blocks/feature icon="fa-bookmark" title="TL,DR;" %}}
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.
{{% /blocks/feature %}}
{{% blocks/feature icon="fa-users" title="Open Spec" %}}
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.
{{% /blocks/feature %}}
{{< /blocks/section >}}
{{< blocks/section color="dark" >}}
{{% blocks/feature icon="fa-lightbulb" title="Bright idea!" %}}
Just import the library and use an API. Now that's a bright idea.
{{% /blocks/feature %}}
{{% blocks/feature icon="fab fa-github" title="Contributions welcome!" url="https://github.com/google/cyanobyte" %}}
We do a [Pull Request](https://github.com/google/cyanobyte/pulls) contributions workflow on **GitHub**. New users are always welcome!
{{% /blocks/feature %}}
{{% blocks/feature icon="fab fa-twitter" title="Follow me on Twitter!" url="https://twitter.com/handnf" %}}
For announcement of latest features etc.
{{% /blocks/feature %}}
{{< /blocks/section >}}
{{< blocks/section >}}
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.
Benefits
- 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
{{< /blocks/section >}}
{{< blocks/section >}}
Current Status
At 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.
{{< /blocks/section >}}
{{< blocks/section >}}
{{% blocks/feature icon="fas fa-memory" title="Supported Peripherals" %}}
- ADS1015 A2D Converter
- BH1750FVI Light Sensor
- BMP180 Temperature Sensor
- BMP280 Temperature/Pressure Sensor
- LSM303D IMU
- MCP4725 D2A Converter
- MCP9808 Temperature Sensor
- TCS3472 Light Sensor
{{% /blocks/feature %}}
{{% blocks/feature icon="fas fa-microchip" title="Embedded Platforms" %}}
- Arduino
- ESP32
- Espruino (Javascript)
- KubOS
- CircuitPython
- Micropython
- Pimoroni I2C Device
- Raspberry Pi
- Miscellaneous embedded C
- CMSIS
- LaTeX Datasheets
- Markdown documentation
- Instructional webpage
{{% /blocks/feature %}}
{{% blocks/feature icon="fas fa-clipboard-list" title="Next Goals" %}}
- Investigate other I2C peripherals like displays
- Investigate support for new programming languages
- Improve support for other serial peripherals like SPI
{{% /blocks/feature %}}
{{< /blocks/section >}}
{{< blocks/section >}}
{{< /blocks/section >}}
{{< blocks/section >}}
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
Check out
our issues list
to see areas we may be exploring
{{< /blocks/section >}}