Coder Social home page Coder Social logo

pranshupanwar / cyanobyte Goto Github PK

View Code? Open in Web Editor NEW

This project forked from google/cyanobyte

0.0 1.0 0.0 379 KB

Machine-readable datasheets

Home Page: https://cyanobyte.dev

License: Apache License 2.0

Python 29.15% HTML 5.24% C++ 35.83% C 29.78%

cyanobyte's Introduction

Peripheral Codegen

This project is an example of how to describe peripherals with an intermediary layer (YAML files) which can be used to generate library files for a peripheral.

It can also generate reference documentation for a periphreal, useful for embedding into datasheets.

This is not an official Google product.

Setup

Note: This project requires Python3. s pip install -r requirements.txt --user

Run Codegen

python3 src/codegen.py -t templates/doc.md -o ./build -i peripherals/MCP4725.yaml

Args

  • -t - A template file. You can provide multiple template files.
  • -i - A peripheral file. You can provide multiple input files.
  • -o - The output directory where files will be generated.
  • -d - Debug flag to print out additional information
  • -c - Clean the output directory before generating files

Clean

rm -rf ./build

Run Validator

python3 src/validator.py -i peripherals/MCP9808.yaml

Args

  • -i - A CyanoByte document. You can provide multiple input files.

Peripheral YAML file

The current spec is described in docs/cyanobyte.md. You can find all examples in the peripherals/ directory.

Test

Lint

python3 -m pylint --rcfile=test/pylintrc src/*.py python3 -m pylint --rcfile=test/pylintrc test/sampleData/*.py

Unit test

python3 -m unittest test.test_codegen

Templates

The templates directory includes a set of canonical templates which can be used with this codegen tool.

The peripherals directory includes a set of peripheral description files that have been created along with the project. It is not an exhaustive list.

License

See LICENSE

cyanobyte's People

Contributors

fleker avatar chrisfrederickson avatar tgordon555 avatar sheppardd1 avatar utnansn avatar tlentali avatar smootz6 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.