/*----------------------------------------------------------------------------- * Author: Nelso G. Jost (nelsojost@gmail.com) * License: GPLv2 * Purpose: Provide basic GPIO control commands for the REPL. *---------------------------------------------------------------------------*/ #ifndef REPL_GPIO_H #define REPL_GPIO_H #define CMD_REPL_BLINK {\ "blink", REPL_BLINK, "blink ", \ "Blink builtin led (pin 2) with given in seconds (int|float). " \ "Use \"blink 0\" to stop it."} #define CMD_REPL_DWRITE {\ "dwrite", REPL_DWRITE, "dwrite ",\ "Digital write (number|high|low) on . "} #define CMD_REPL_AREAD {\ "aread", REPL_AREAD, "aread ", \ "Read analogic pin and print out the value."} #define CMD_REPL_ALOG {\ "alog", REPL_ALOG, "alog ", \ "Start datalog on analogic pin with given interval."} #define ALLCMD_REPL_GPIO\ CMD_REPL_BLINK,\ CMD_REPL_DWRITE,\ CMD_REPL_AREAD,\ CMD_REPL_ALOG void REPL_BLINK(REPL * repl); void REPL_DWRITE(REPL * repl); void REPL_AREAD(REPL * repl); void REPL_ALOG(REPL * repl); #endif