frame

Basic Guidance to Driver Development

Could you provide some basic direction to how to develop drivers for your platform?  A tutorial would be a great start.
Tagged:

Comments

  • Hi @borris ;
    Do you have to develop a C driver with real time features for the RTOS?
    Otherwise, you can develop a driver as a simple python module to be included in your project as separated file of set of.
    You can have a look at the thermal printer or servo drivers they are pure python drivers.
    The file are located in the Viper installation folder compiler\drivers\...

    btw, you are right... Soon we will open a dedicated section of our blog with tutorials and guides dedicated to the development and design of projects and modules for Viper.
    D. 
    Daniele Mazzei
    Zerynth Chief System Architect
  • I happen to be a firmware developer and don't have any issues with low level or RTOS implementations.  Just looking for those bread crumbs that will save me HOURS of trying to figure out the inner workings.
  • We will have all the docs documenting the low level layers of Viper ready by the end of the year.
    Moreover, we are developing a specific toolkit for the IDE to support libraries and packages publication by the community members.
    I'll keep you posted
    D
    Daniele Mazzei
    Zerynth Chief System Architect
  • I'm ready if you are.  Looking forward to some SPI and I2C communication.  Lots of great sensors out there that need some TLC.
  • @borris,

    sorry for the late reply. You can develop drivers both from Python or Python+C. 

    An example of the first approach is the Adafruit Bluefruit library (Search for ble in the VPM) or the mlx90615 sensor library. They both use the spi or i2c Python module without any C code.

     A mixed approach can be founf in Neopixel and CC3000 libraries. Here, the needed C code is called from Python when necessary or, as in the case of CC3000, a C thread is started in the background updating the driver status without hindering the VM bytecode execution.

    After you have installed libraries, you can check their source code under ~/.viper/env/libs/official  (assuming you are on linux).  

    Documentation for low level coding and C/Python interface can be found here and here

    Don't hesitate to ask here for more info!
    Giacomo Baldi
    Zerynth Head of Software Development
Sign In or Register to comment.

ZERYNTH Community

@ 2016 Zerynth.com, all rights reserved.