comp: A tool to write HAL boilerplate

When writing HAL modules, a large amount of boilerplate code is required to register the pins, parameters, and functions. comp (working name) is a tool to automatically generate that code.

Here is one of the simplest useful components that can be created with comp:

    component charge_pump;
    option singleton yes;
    pin out bit w;
    function update nofp;
    ;;
    MODULE_LICENSE("GPL");
    FUNCTION(update) { out = !out; }

it simply creates a bit which is toggled each time its update function is called, and can be connected to the 'charge pump' watchdog pin of the PDMX-121 and similar breakout boards.

(See 'README' inside link for more information)

Files currently attached to this page:

comp-0.1.tar.bz26.2kB


(originally posted on the AXIS blog)

Entry first conceived on 4 September 2006, 3:08 UTC, last modified on 15 January 2012, 3:46 UTC
Website Copyright © 2004-2024 Jeff Epler