From d72cfe383322876cdd82a3af957a6a351aa4eac1 Mon Sep 17 00:00:00 2001 From: David Johnson-Davies Date: Thu, 15 Sep 2022 19:00:44 +0100 Subject: [PATCH] Version 4.3 - 15th September 2022 Built-in documentation. --- ulisp-arm.ino | 2496 ++++++++++++++++++++++++++++++------------------- 1 file changed, 1543 insertions(+), 953 deletions(-) diff --git a/ulisp-arm.ino b/ulisp-arm.ino index d4d109f..73b091e 100644 --- a/ulisp-arm.ino +++ b/ulisp-arm.ino @@ -1,5 +1,5 @@ -/* uLisp ARM Version 4.2 - www.ulisp.com - David Johnson-Davies - www.technoblogy.com - 19th August 2022 +/* uLisp ARM Version 4.3 - www.ulisp.com + David Johnson-Davies - www.technoblogy.com - 15th September 2022 Licensed under the MIT license: https://opensource.org/licenses/MIT */ @@ -287,6 +287,7 @@ typedef const struct { const char *string; fn_ptr_type fptr; uint8_t minmax; + const char *doc; } tbl_entry_t; typedef int (*gfun_t)(); @@ -296,21 +297,22 @@ enum builtin_t { NIL, TEE, NOTHING, OPTIONAL, INITIALELEMENT, ELEMENTTYPE, BIT, LETSTAR, CLOSURE, PSTAR, SPECIAL_FORMS, QUOTE, OR, DEFUN, DEFVAR, SETQ, LOOP, RETURN, PUSH, POP, INCF, DECF, SETF, DOLIST, DOTIMES, TRACE, UNTRACE, FORMILLIS, TIME, WITHOUTPUTTOSTRING, WITHSERIAL, WITHI2C, WITHSPI, WITHSDCARD, WITHGFX, WITHCLIENT, DEFCODE, TAIL_FORMS, PROGN, IF, COND, WHEN, UNLESS, CASE, AND, -FUNCTIONS, NOT, NULLFN, CONS, ATOM, LISTP, CONSP, SYMBOLP, ARRAYP, BOUNDP, SETFN, STREAMP, EQ, CAR, FIRST, -CDR, REST, CAAR, CADR, SECOND, CDAR, CDDR, CAAAR, CAADR, CADAR, CADDR, THIRD, CDAAR, CDADR, CDDAR, CDDDR, -LENGTH, ARRAYDIMENSIONS, LIST, MAKEARRAY, REVERSE, NTH, AREF, ASSOC, MEMBER, APPLY, FUNCALL, APPEND, MAPC, -MAPCAR, MAPCAN, ADD, SUBTRACT, MULTIPLY, DIVIDE, MOD, ONEPLUS, ONEMINUS, ABS, RANDOM, MAXFN, MINFN, NOTEQ, -NUMEQ, LESS, LESSEQ, GREATER, GREATEREQ, PLUSP, MINUSP, ZEROP, ODDP, EVENP, INTEGERP, NUMBERP, FLOATFN, -FLOATP, SIN, COS, TAN, ASIN, ACOS, ATAN, SINH, COSH, TANH, EXP, SQRT, LOG, EXPT, CEILING, FLOOR, TRUNCATE, -ROUND, CHAR, CHARCODE, CODECHAR, CHARACTERP, STRINGP, STRINGEQ, STRINGLESS, STRINGGREATER, SORT, STRINGFN, -CONCATENATE, SUBSEQ, READFROMSTRING, PRINCTOSTRING, PRIN1TOSTRING, LOGAND, LOGIOR, LOGXOR, LOGNOT, ASH, -LOGBITP, EVAL, GLOBALS, LOCALS, MAKUNBOUND, BREAK, READ, PRIN1, PRINT, PRINC, TERPRI, READBYTE, READLINE, -WRITEBYTE, WRITESTRING, WRITELINE, RESTARTI2C, GC, ROOM, SAVEIMAGE, LOADIMAGE, CLS, PINMODE, DIGITALREAD, -DIGITALWRITE, ANALOGREAD, ANALOGREFERENCE, ANALOGREADRESOLUTION, ANALOGWRITE, ANALOGWRITERESOLUTION, -DELAY, MILLIS, SLEEP, NOTE, REGISTER, EDIT, PPRINT, PPRINTALL, FORMAT, REQUIRE, LISTLIBRARY, AVAILABLE, -WIFISERVER, WIFISOFTAP, CONNECTED, WIFILOCALIP, WIFICONNECT, DRAWPIXEL, DRAWLINE, DRAWRECT, FILLRECT, -DRAWCIRCLE, FILLCIRCLE, DRAWROUNDRECT, FILLROUNDRECT, DRAWTRIANGLE, FILLTRIANGLE, DRAWCHAR, SETCURSOR, -SETTEXTCOLOR, SETTEXTSIZE, SETTEXTWRAP, FILLSCREEN, SETROTATION, INVERTDISPLAY, KEYWORDS, +HELP, FUNCTIONS, NOT, NULLFN, CONS, ATOM, LISTP, CONSP, SYMBOLP, ARRAYP, BOUNDP, SETFN, STREAMP, EQ, CAR, +FIRST, CDR, REST, CAAR, CADR, SECOND, CDAR, CDDR, CAAAR, CAADR, CADAR, CADDR, THIRD, CDAAR, CDADR, CDDAR, +CDDDR, LENGTH, ARRAYDIMENSIONS, LIST, MAKEARRAY, REVERSE, NTH, AREF, ASSOC, MEMBER, APPLY, FUNCALL, +APPEND, MAPC, MAPCAR, MAPCAN, ADD, SUBTRACT, MULTIPLY, DIVIDE, MOD, ONEPLUS, ONEMINUS, ABS, RANDOM, MAXFN, +MINFN, NOTEQ, NUMEQ, LESS, LESSEQ, GREATER, GREATEREQ, PLUSP, MINUSP, ZEROP, ODDP, EVENP, INTEGERP, +NUMBERP, FLOATFN, FLOATP, SIN, COS, TAN, ASIN, ACOS, ATAN, SINH, COSH, TANH, EXP, SQRT, LOG, EXPT, +CEILING, FLOOR, TRUNCATE, ROUND, CHAR, CHARCODE, CODECHAR, CHARACTERP, STRINGP, STRINGEQ, STRINGLESS, +STRINGGREATER, SORT, STRINGFN, CONCATENATE, SUBSEQ, READFROMSTRING, PRINCTOSTRING, PRIN1TOSTRING, LOGAND, +LOGIOR, LOGXOR, LOGNOT, ASH, LOGBITP, EVAL, GLOBALS, LOCALS, MAKUNBOUND, BREAK, READ, PRIN1, PRINT, PRINC, +TERPRI, READBYTE, READLINE, WRITEBYTE, WRITESTRING, WRITELINE, RESTARTI2C, GC, ROOM, SAVEIMAGE, LOADIMAGE, +CLS, PINMODE, DIGITALREAD, DIGITALWRITE, ANALOGREAD, ANALOGREFERENCE, ANALOGREADRESOLUTION, ANALOGWRITE, +ANALOGWRITERESOLUTION, DELAY, MILLIS, SLEEP, NOTE, REGISTER, EDIT, PPRINT, PPRINTALL, FORMAT, REQUIRE, +LISTLIBRARY, DOCUMENTATION, AVAILABLE, WIFISERVER, WIFISOFTAP, CONNECTED, WIFILOCALIP, WIFICONNECT, +DRAWPIXEL, DRAWLINE, DRAWRECT, FILLRECT, DRAWCIRCLE, FILLCIRCLE, DRAWROUNDRECT, FILLROUNDRECT, +DRAWTRIANGLE, FILLTRIANGLE, DRAWCHAR, SETCURSOR, SETTEXTCOLOR, SETTEXTSIZE, SETTEXTWRAP, FILLSCREEN, +SETROTATION, INVERTDISPLAY, KEYWORDS, K_LED_BUILTIN, K_HIGH, K_LOW, #if defined(CPU_ATSAMD21) K_INPUT, K_INPUT_PULLUP, K_INPUT_PULLDOWN, K_OUTPUT, K_AR_DEFAULT, K_AR_INTERNAL1V0, K_AR_INTERNAL1V65, @@ -356,7 +358,7 @@ RAMFUNC uint8_t MyCode[CODESIZE] WORDALIGNED; jmp_buf exception; unsigned int Freespace = 0; object *Freelist; -unsigned int I2CCount; +unsigned int I2Ccount; unsigned int TraceFn[TRACEMAX]; unsigned int TraceDepth[TRACEMAX]; @@ -411,6 +413,15 @@ void error2 (builtin_t fname, PGM_P string) { void errorend () { pln(pserial); GCStack = NULL; longjmp(exception, 1); } +void formaterr (object *formatstr, PGM_P string, uint8_t p) { + pln(pserial); indent(4, ' ', pserial); printstring(formatstr, pserial); pln(pserial); + indent(p+5, ' ', pserial); pserial('^'); + error2(FORMAT, string); + pln(pserial); + GCStack = NULL; + longjmp(exception, 1); +} + // Save space as these are used multiple times const char notanumber[] PROGMEM = "argument is not a number"; const char notaninteger[] PROGMEM = "argument is not an integer"; @@ -1256,6 +1267,90 @@ int listlength (builtin_t name, object *list) { return length; } +// Mathematical helper functions + +object *add_floats (object *args, float fresult) { + while (args != NULL) { + object *arg = car(args); + fresult = fresult + checkintfloat(ADD, arg); + args = cdr(args); + } + return makefloat(fresult); +} + +object *subtract_floats (object *args, float fresult) { + while (args != NULL) { + object *arg = car(args); + fresult = fresult - checkintfloat(SUBTRACT, arg); + args = cdr(args); + } + return makefloat(fresult); +} + +object *negate (object *arg) { + if (integerp(arg)) { + int result = arg->integer; + if (result == INT_MIN) return makefloat(-result); + else return number(-result); + } else if (floatp(arg)) return makefloat(-(arg->single_float)); + else error(SUBTRACT, notanumber, arg); + return nil; +} + +object *multiply_floats (object *args, float fresult) { + while (args != NULL) { + object *arg = car(args); + fresult = fresult * checkintfloat(MULTIPLY, arg); + args = cdr(args); + } + return makefloat(fresult); +} + +object *divide_floats (object *args, float fresult) { + while (args != NULL) { + object *arg = car(args); + float f = checkintfloat(DIVIDE, arg); + if (f == 0.0) error2(DIVIDE, divisionbyzero); + fresult = fresult / f; + args = cdr(args); + } + return makefloat(fresult); +} + +int myround (float number) { + return (number >= 0) ? (int)(number + 0.5) : (int)(number - 0.5); +} + +object *compare (builtin_t name, object *args, bool lt, bool gt, bool eq) { + object *arg1 = first(args); + args = cdr(args); + while (args != NULL) { + object *arg2 = first(args); + if (integerp(arg1) && integerp(arg2)) { + if (!lt && ((arg1->integer) < (arg2->integer))) return nil; + if (!eq && ((arg1->integer) == (arg2->integer))) return nil; + if (!gt && ((arg1->integer) > (arg2->integer))) return nil; + } else { + if (!lt && (checkintfloat(name, arg1) < checkintfloat(name, arg2))) return nil; + if (!eq && (checkintfloat(name, arg1) == checkintfloat(name, arg2))) return nil; + if (!gt && (checkintfloat(name, arg1) > checkintfloat(name, arg2))) return nil; + } + arg1 = arg2; + args = cdr(args); + } + return tee; +} + +int intpower (int base, int exp) { + int result = 1; + while (exp) { + if (exp & 1) result = result * base; + exp = exp / 2; + base = base * base; + } + return result; +} + // Association lists object *assoc (object *key, object *list) { @@ -1313,7 +1408,10 @@ object *makearray (builtin_t name, object *dims, object *def, bool bitp) { dims = cdr(dims); } // Bit array identified by making first dimension negative - if (bitp) { size = (size + 31)/32; car(dimensions) = number(-(car(dimensions)->integer)); } + if (bitp) { + size = (size + sizeof(int)*8 - 1)/(sizeof(int)*8); + car(dimensions) = number(-(car(dimensions)->integer)); + } object *ptr = myalloc(); ptr->type = ARRAY; object *tree = nil; @@ -1349,8 +1447,9 @@ object **getarray (builtin_t name, object *array, object *subs, object *env, int if (dims != NULL) error2(name, PSTR("too few subscripts")); if (subs != NULL) error2(name, PSTR("too many subscripts")); if (bitp) { - size = (size + 31)/32; - *bit = index & 0x1F; index = index>>5; + size = (size + sizeof(int)*8 - 1)/(sizeof(int)*8); + *bit = index & (sizeof(int)==4 ? 0x1F : 0x0F); + index = index>>(sizeof(int)==4 ? 5 : 4); } return arrayref(array, index, size); } @@ -1400,11 +1499,11 @@ object *readbitarray (gfun_t gfun) { LastChar = ch; int size = listlength(NIL, head); object *array = makearray(NIL, cons(number(size), NULL), 0, true); - size = (size + 31) / 32; + size = (size + sizeof(int)*8 - 1)/(sizeof(int)*8); int index = 0; while (head != NULL) { - object **loc = arrayref(array, index>>5, size); - int bit = index & 0x1F; + object **loc = arrayref(array, index>>(sizeof(int)==4 ? 5 : 4), size); + int bit = index & (sizeof(int)==4 ? 0x1F : 0x0F); *loc = number((((*loc)->integer) & ~(1<integer)<>5, size))->integer)>>(index & 0x1f) & 1, pfun); + if (bitp) pint(((*arrayref(array, index>>(sizeof(int)==4 ? 5 : 4), size))->integer)>> + (index & (sizeof(int)==4 ? 0x1F : 0x0F)) & 1, pfun); else printobject(*arrayref(array, index, size), pfun); } else { pfun('('); pslice(array, size, index, cdr(dims), pfun, bitp); pfun(')'); } } @@ -1438,7 +1538,7 @@ void printarray (object *array, pfun_t pfun) { size = size * d; dims = cdr(dims); n++; } - if (bitp) size = (size+31)/32; + if (bitp) size = (size + sizeof(int)*8 - 1)/(sizeof(int)*8); pfun('#'); if (n == 1 && bitp) { pfun('*'); pslice(array, size, -1, dimensions, pfun, bitp); } else { @@ -1557,9 +1657,41 @@ object *lispstring (char *s) { return obj; } -char *cstring (object *form, char *buffer, int buflen) { +bool stringcompare (builtin_t name, object *args, bool lt, bool gt, bool eq) { + object *arg1 = checkstring(name, first(args)); + object *arg2 = checkstring(name, second(args)); + arg1 = cdr(arg1); + arg2 = cdr(arg2); + while ((arg1 != NULL) || (arg2 != NULL)) { + if (arg1 == NULL) return lt; + if (arg2 == NULL) return gt; + if (arg1->chars < arg2->chars) return lt; + if (arg1->chars > arg2->chars) return gt; + arg1 = car(arg1); + arg2 = car(arg2); + } + return eq; +} + +object *documentation (builtin_t name, object *arg, object *env) { + if (!symbolp(arg)) error(name, notasymbol, arg); + object *pair = findpair(arg, env); + if (pair != NULL) { + object *val = cdr(pair); + if (listp(val) && first(val)->name == sym(LAMBDA) && cdr(val) != NULL && cddr(val) != NULL) { + if (stringp(third(val))) return third(val); + } + } + symbol_t docname = arg->name; + if (!builtinp(docname)) return nil; + char *docstring = lookupdoc(builtin(docname)); + if (docstring == NULL) return nil; + return lispstring(docstring); +} + +char *cstring (builtin_t name, object *form, char *buffer, int buflen) { + form = cdr(checkstring(name, form)); int index = 0; - form = cdr(form); while (form != NULL) { int chars = form->integer; for (int i=(sizeof(int)-1)*8; i>=0; i=i-8) { @@ -1575,6 +1707,25 @@ char *cstring (object *form, char *buffer, int buflen) { return buffer; } +IPAddress ipstring (builtin_t name, object *form) { + form = cdr(checkstring(name, form)); + int p = 0; + union { uint32_t ipaddress; uint8_t ipbytes[4]; } ; + ipaddress = 0; + while (form != NULL) { + int chars = form->integer; + for (int i=(sizeof(int)-1)*8; i>=0; i=i-8) { + char ch = chars>>i & 0xFF; + if (ch) { + if (ch == '.') { p++; if (p > 3) error2(name, PSTR("illegal IP address")); } + else ipbytes[p] = (ipbytes[p] * 10) + ch - '0'; + } + } + form = car(form); + } + return ipaddress; +} + // Lookup variable in environment object *value (symbol_t n, object *env) { @@ -1586,18 +1737,20 @@ object *value (symbol_t n, object *env) { return nil; } -bool boundp (object *var, object *env) { - symbol_t varname = var->name; - if (value(varname, env) != NULL) return true; - if (value(varname, GlobalEnv) != NULL) return true; - return false; +object *findpair (object *var, object *env) { + symbol_t name = var->name; + object *pair = value(name, env); + if (pair == NULL) pair = value(name, GlobalEnv); + return pair; } -object *findvalue (object *var, object *env) { - symbol_t varname = var->name; - object *pair = value(varname, env); - if (pair == NULL) pair = value(varname, GlobalEnv); - if (pair == NULL) error(NIL, PSTR("unknown variable"), var); +bool boundp (object *var, object *env) { + return (findpair(var, env) != NULL); +} + +object *findvalue (builtin_t name, object *var, object *env) { + object *pair = findpair(var, env); + if (pair == NULL) error(name, PSTR("unknown variable"), var); return pair; } @@ -1692,7 +1845,7 @@ object *apply (builtin_t name, object *function, object *args, object *env) { object **place (builtin_t name, object *args, object *env, int *bit) { *bit = -1; - if (atom(args)) return &cdr(findvalue(args, env)); + if (atom(args)) return &cdr(findvalue(name, args, env)); object* function = first(args); if (symbolp(function)) { symbol_t sname = function->name; @@ -1741,7 +1894,61 @@ object *cdrx (object *arg) { return cdr(arg); } -// I2C interface for up to two ports +object *cxxxr (object *args, uint8_t pattern) { + object *arg = first(args); + while (pattern != 1) { + if ((pattern & 1) == 0) arg = carx(arg); else arg = cdrx(arg); + pattern = pattern>>1; + } + return arg; +} + +// Mapping helper functions + +void mapcarfun (object *result, object **tail) { + object *obj = cons(result,NULL); + cdr(*tail) = obj; *tail = obj; +} + +void mapcanfun (object *result, object **tail) { + if (cdr(*tail) != NULL) error(MAPCAN, notproper, *tail); + while (consp(result)) { + cdr(*tail) = result; *tail = result; + result = cdr(result); + } +} + +object *mapcarcan (builtin_t name, object *args, object *env, mapfun_t fun) { + object *function = first(args); + args = cdr(args); + object *params = cons(NULL, NULL); + push(params,GCStack); + object *head = cons(NULL, NULL); + push(head,GCStack); + object *tail = head; + // Make parameters + while (true) { + object *tailp = params; + object *lists = args; + while (lists != NULL) { + object *list = car(lists); + if (list == NULL) { + pop(GCStack); + pop(GCStack); + return cdr(head); + } + if (improperp(list)) error(name, notproper, list); + object *obj = cons(first(list),NULL); + car(lists) = cdr(list); + cdr(tailp) = obj; tailp = obj; + lists = cdr(lists); + } + object *result = apply(name, function, cdr(params), env); + fun(result, &tail); + } +} + +// I2C interface for up to two ports, using Arduino Wire void I2Cinit (TwoWire *port, bool enablePullup) { (void) enablePullup; @@ -1763,14 +1970,14 @@ bool I2Cstart (TwoWire *port, uint8_t address, uint8_t read) { ok = (port->endTransmission(true) == 0); port->beginTransmission(address); } - else port->requestFrom(address, I2CCount); + else port->requestFrom(address, I2Ccount); return ok; } bool I2Crestart (TwoWire *port, uint8_t address, uint8_t read) { int error = (port->endTransmission(false) != 0); if (read == 0) port->beginTransmission(address); - else port->requestFrom(address, I2CCount); + else port->requestFrom(address, I2Ccount); return error ? false : true; } @@ -2227,10 +2434,10 @@ void superprint (object *form, int lm, pfun_t pfun) { else supersub(form, lm + PPINDENT, 1, pfun); } -const int ppspecials = 19; +const int ppspecials = 20; const char ppspecial[ppspecials] PROGMEM = - { DOTIMES, DOLIST, IF, SETQ, TEE, LET, LETSTAR, LAMBDA, WHEN, UNLESS, WITHI2C, WITHSERIAL, WITHSPI, WITHSDCARD, - WITHGFX, WITHOUTPUTTOSTRING, FORMILLIS, DEFVAR, CASE }; + { DOTIMES, DOLIST, IF, SETQ, TEE, LET, LETSTAR, LAMBDA, WHEN, UNLESS, WITHI2C, WITHSERIAL, WITHSPI, WITHSDCARD, FORMILLIS, + WITHOUTPUTTOSTRING, DEFVAR, CASE, WITHGFX, WITHCLIENT }; void supersub (object *form, int lm, int super, pfun_t pfun) { int special = 0, separate = 1; @@ -2254,6 +2461,23 @@ void supersub (object *form, int lm, int super, pfun_t pfun) { pfun(')'); return; } +object *edit (object *fun) { + while (1) { + if (tstflag(EXITEDITOR)) return fun; + char c = gserial(); + if (c == 'q') setflag(EXITEDITOR); + else if (c == 'b') return fun; + else if (c == 'r') fun = read(gserial); + else if (c == '\n') { pfl(pserial); superprint(fun, 0, pserial); pln(pserial); } + else if (c == 'c') fun = cons(read(gserial), fun); + else if (atom(fun)) pserial('!'); + else if (c == 'd') fun = cons(car(fun), edit(cdr(fun))); + else if (c == 'a') fun = cons(edit(car(fun)), cdr(fun)); + else if (c == 'x') fun = cdr(fun); + else pserial('?'); + } +} + // Assembler object *call (int entry, int nargs, object *args, object *env) { @@ -2297,7 +2521,7 @@ int assemble (int pass, int origin, object *entries, object *env, object *pcpair printobject(arg, pserial); pln(pserial); #endif } else { - object *pair = findvalue(arg, env); + object *pair = findvalue(DEFCODE, arg, env); cdr(pair) = number(pc); } } else { @@ -2357,7 +2581,7 @@ object *sp_defun (object *args, object *env) { object *var = first(args); if (!symbolp(var)) error(DEFUN, notasymbol, var); object *val = cons(bsymbol(LAMBDA), cdr(args)); - object *pair = value(var->name,GlobalEnv); + object *pair = value(var->name, GlobalEnv); if (pair != NULL) cdr(pair) = val; else push(cons(var, val), GlobalEnv); return var; @@ -2380,7 +2604,7 @@ object *sp_setq (object *args, object *env) { object *arg = nil; while (args != NULL) { if (cdr(args) == NULL) error2(SETQ, oddargs); - object *pair = findvalue(first(args), env); + object *pair = findvalue(SETQ, first(args), env); arg = eval(second(args), env); cdr(pair) = arg; args = cddr(args); @@ -2702,10 +2926,10 @@ object *sp_withi2c (object *args, object *env) { params = cdr(params); } int read = 0; // Write - I2CCount = 0; + I2Ccount = 0; if (params != NULL) { object *rw = eval(first(params), env); - if (integerp(rw)) I2CCount = rw->integer; + if (integerp(rw)) I2Ccount = rw->integer; read = (rw != NULL); } // Top bit of address is I2C port @@ -2831,7 +3055,7 @@ object *sp_withclient (object *args, object *env) { object *address = eval(first(params), env); object *port = eval(second(params), env); int success; - if (stringp(address)) success = client.connect(cstring(address, buffer, BUFFERSIZE), checkinteger(WITHCLIENT, port)); + if (stringp(address)) success = client.connect(cstring(WITHCLIENT, address, buffer, BUFFERSIZE), checkinteger(WITHCLIENT, port)); else if (integerp(address)) success = client.connect(address->integer, checkinteger(WITHCLIENT, port)); else error2(WITHCLIENT, PSTR("invalid address")); if (!success) return nil; @@ -3033,6 +3257,18 @@ object *tf_and (object *args, object *env) { return car(args); } +object *tf_help (object *args, object *env) { + if (args == NULL) error2(HELP, noargument); + object *docstring = documentation(HELP, first(args), env); + if (docstring) { + char temp = Flags; + clrflag(PRINTREADABLY); + printstring(docstring, pserial); + Flags = temp; + } + return bsymbol(NOTHING); +} + // Core functions object *fn_not (object *args, object *env) { @@ -3082,7 +3318,7 @@ object *fn_setfn (object *args, object *env) { object *arg = nil; while (args != NULL) { if (cdr(args) == NULL) error2(SETFN, oddargs); - object *pair = findvalue(first(args), env); + object *pair = findvalue(SETFN, first(args), env); arg = second(args); cdr(pair) = arg; args = cddr(args); @@ -3113,15 +3349,6 @@ object *fn_cdr (object *args, object *env) { return cdrx(first(args)); } -object *cxxxr (object *args, uint8_t pattern) { - object *arg = first(args); - while (pattern != 1) { - if ((pattern & 1) == 0) arg = carx(arg); else arg = cdrx(arg); - pattern = pattern>>1; - } - return arg; -} - object *fn_caar (object *args, object *env) { (void) env; return cxxxr(args, 0b100); @@ -3344,49 +3571,6 @@ object *fn_mapc (object *args, object *env) { } } -void mapcarfun (object *result, object **tail) { - object *obj = cons(result,NULL); - cdr(*tail) = obj; *tail = obj; -} - -void mapcanfun (object *result, object **tail) { - if (cdr(*tail) != NULL) error(MAPCAN, notproper, *tail); - while (consp(result)) { - cdr(*tail) = result; *tail = result; - result = cdr(result); - } -} - -object *mapcarcan (builtin_t name, object *args, object *env, mapfun_t fun) { - object *function = first(args); - args = cdr(args); - object *params = cons(NULL, NULL); - push(params,GCStack); - object *head = cons(NULL, NULL); - push(head,GCStack); - object *tail = head; - // Make parameters - while (true) { - object *tailp = params; - object *lists = args; - while (lists != NULL) { - object *list = car(lists); - if (list == NULL) { - pop(GCStack); - pop(GCStack); - return cdr(head); - } - if (improperp(list)) error(name, notproper, list); - object *obj = cons(first(list),NULL); - car(lists) = cdr(list); - cdr(tailp) = obj; tailp = obj; - lists = cdr(lists); - } - object *result = apply(name, function, cdr(params), env); - fun(result, &tail); - } -} - object *fn_mapcar (object *args, object *env) { return mapcarcan(MAPCAR, args, env, mapcarfun); } @@ -3397,15 +3581,6 @@ object *fn_mapcan (object *args, object *env) { // Arithmetic functions -object *add_floats (object *args, float fresult) { - while (args != NULL) { - object *arg = car(args); - fresult = fresult + checkintfloat(ADD, arg); - args = cdr(args); - } - return makefloat(fresult); -} - object *fn_add (object *args, object *env) { (void) env; int result = 0; @@ -3423,25 +3598,6 @@ object *fn_add (object *args, object *env) { return number(result); } -object *subtract_floats (object *args, float fresult) { - while (args != NULL) { - object *arg = car(args); - fresult = fresult - checkintfloat(SUBTRACT, arg); - args = cdr(args); - } - return makefloat(fresult); -} - -object *negate (object *arg) { - if (integerp(arg)) { - int result = arg->integer; - if (result == INT_MIN) return makefloat(-result); - else return number(-result); - } else if (floatp(arg)) return makefloat(-(arg->single_float)); - else error(SUBTRACT, notanumber, arg); - return nil; -} - object *fn_subtract (object *args, object *env) { (void) env; object *arg = car(args); @@ -3466,15 +3622,6 @@ object *fn_subtract (object *args, object *env) { return nil; } -object *multiply_floats (object *args, float fresult) { - while (args != NULL) { - object *arg = car(args); - fresult = fresult * checkintfloat(MULTIPLY, arg); - args = cdr(args); - } - return makefloat(fresult); -} - object *fn_multiply (object *args, object *env) { (void) env; int result = 1; @@ -3491,17 +3638,6 @@ object *fn_multiply (object *args, object *env) { return number(result); } -object *divide_floats (object *args, float fresult) { - while (args != NULL) { - object *arg = car(args); - float f = checkintfloat(DIVIDE, arg); - if (f == 0.0) error2(DIVIDE, divisionbyzero); - fresult = fresult / f; - args = cdr(args); - } - return makefloat(fresult); -} - object *fn_divide (object *args, object *env) { (void) env; object* arg = first(args); @@ -3655,26 +3791,6 @@ object *fn_noteq (object *args, object *env) { return tee; } -object *compare (builtin_t name, object *args, bool lt, bool gt, bool eq) { - object *arg1 = first(args); - args = cdr(args); - while (args != NULL) { - object *arg2 = first(args); - if (integerp(arg1) && integerp(arg2)) { - if (!lt && ((arg1->integer) < (arg2->integer))) return nil; - if (!eq && ((arg1->integer) == (arg2->integer))) return nil; - if (!gt && ((arg1->integer) > (arg2->integer))) return nil; - } else { - if (!lt && (checkintfloat(name, arg1) < checkintfloat(name, arg2))) return nil; - if (!eq && (checkintfloat(name, arg1) == checkintfloat(name, arg2))) return nil; - if (!gt && (checkintfloat(name, arg1) > checkintfloat(name, arg2))) return nil; - } - arg1 = arg2; - args = cdr(args); - } - return tee; -} - object *fn_numeq (object *args, object *env) { (void) env; return compare(NUMEQ, args, false, false, true); @@ -3833,16 +3949,6 @@ object *fn_log (object *args, object *env) { else return makefloat(fresult / log(checkintfloat(LOG, first(args)))); } -int intpower (int base, int exp) { - int result = 1; - while (exp) { - if (exp & 1) result = result * base; - exp = exp / 2; - base = base * base; - } - return result; -} - object *fn_expt (object *args, object *env) { (void) env; object *arg1 = first(args); object *arg2 = second(args); @@ -3881,10 +3987,6 @@ object *fn_truncate (object *args, object *env) { else return number((int)(checkintfloat(TRUNCATE, arg))); } -int myround (float number) { - return (number >= 0) ? (int)(number + 0.5) : (int)(number - 0.5); -} - object *fn_round (object *args, object *env) { (void) env; object *arg = first(args); @@ -3899,8 +4001,9 @@ object *fn_char (object *args, object *env) { (void) env; object *arg = first(args); if (!stringp(arg)) error(CHAR, notastring, arg); - char c = nthchar(arg, checkinteger(CHAR, second(args))); - if (c == 0) error2(CHAR, indexrange); + object *n = second(args); + char c = nthchar(arg, checkinteger(CHAR, n)); + if (c == 0) error(CHAR, indexrange, n); return character(c); } @@ -3926,22 +4029,6 @@ object *fn_stringp (object *args, object *env) { return stringp(first(args)) ? tee : nil; } -bool stringcompare (builtin_t name, object *args, bool lt, bool gt, bool eq) { - object *arg1 = checkstring(name, first(args)); - object *arg2 = checkstring(name, second(args)); - arg1 = cdr(arg1); - arg2 = cdr(arg2); - while ((arg1 != NULL) || (arg2 != NULL)) { - if (arg1 == NULL) return lt; - if (arg2 == NULL) return gt; - if (arg1->chars < arg2->chars) return lt; - if (arg1->chars > arg2->chars) return gt; - arg1 = car(arg1); - arg2 = car(arg2); - } - return eq; -} - object *fn_stringeq (object *args, object *env) { (void) env; return stringcompare(STRINGEQ, args, false, false, true) ? tee : nil; @@ -4229,10 +4316,10 @@ object *fn_restarti2c (object *args, object *env) { int stream = first(args)->integer; args = cdr(args); int read = 0; // Write - I2CCount = 0; + I2Ccount = 0; if (args != NULL) { object *rw = first(args); - if (integerp(rw)) I2CCount = rw->integer; + if (integerp(rw)) I2Ccount = rw->integer; read = (rw != NULL); } int address = stream & 0xFF; @@ -4423,30 +4510,13 @@ object *fn_register (object *args, object *env) { object *fn_edit (object *args, object *env) { object *fun = first(args); - object *pair = findvalue(fun, env); + object *pair = findvalue(EDIT, fun, env); clrflag(EXITEDITOR); object *arg = edit(eval(fun, env)); cdr(pair) = arg; return arg; } -object *edit (object *fun) { - while (1) { - if (tstflag(EXITEDITOR)) return fun; - char c = gserial(); - if (c == 'q') setflag(EXITEDITOR); - else if (c == 'b') return fun; - else if (c == 'r') fun = read(gserial); - else if (c == '\n') { pfl(pserial); superprint(fun, 0, pserial); pln(pserial); } - else if (c == 'c') fun = cons(read(gserial), fun); - else if (atom(fun)) pserial('!'); - else if (c == 'd') fun = cons(car(fun), edit(cdr(fun))); - else if (c == 'a') fun = cons(edit(car(fun)), cdr(fun)); - else if (c == 'x') fun = cdr(fun); - else pserial('?'); - } -} - // Pretty printer object *fn_pprint (object *args, object *env) { @@ -4491,15 +4561,6 @@ object *fn_pprintall (object *args, object *env) { // Format -void formaterr (object *formatstr, PGM_P string, uint8_t p) { - pln(pserial); indent(4, ' ', pserial); printstring(formatstr, pserial); pln(pserial); - indent(p+5, ' ', pserial); pserial('^'); - error2(FORMAT, string); - pln(pserial); - GCStack = NULL; - longjmp(exception, 1); -} - object *fn_format (object *args, object *env) { (void) env; pfun_t pfun = pserial; @@ -4616,6 +4677,12 @@ object *fn_listlibrary (object *args, object *env) { return bsymbol(NOTHING); } +// Documentation + +object *fn_documentation (object *args, object *env) { + return documentation(DOCUMENTATION, first(args), env); +} + // Wi-fi object *fn_available (object *args, object *env) { @@ -4647,7 +4714,7 @@ object *fn_wifisoftap (object *args, object *env) { (void) env; char ssid[33], pass[65]; object *first = first(args); args = cdr(args); - if (args == NULL) WiFi.beginAP(cstring(first, ssid, 33)); + if (args == NULL) WiFi.beginAP(cstring(WIFISOFTAP, first, ssid, 33)); else { object *second = first(args); args = cdr(args); @@ -4656,7 +4723,7 @@ object *fn_wifisoftap (object *args, object *env) { channel = checkinteger(WIFISOFTAP, first(args)); args = cdr(args); } - WiFi.beginAP(cstring(first, ssid, 33), cstring(second, pass, 65), channel); + WiFi.beginAP(cstring(WIFISOFTAP, first, ssid, 33), cstring(WIFISOFTAP, second, pass, 65), channel); } return lispstring((char*)"192.168.4.1"); #else @@ -4694,8 +4761,11 @@ object *fn_wificonnect (object *args, object *env) { (void) env; char ssid[33], pass[65]; if (args == NULL) { WiFi.disconnect(); return nil; } - if (cdr(args) == NULL) WiFi.begin(cstring(first(args), ssid, 33)); - else WiFi.begin(cstring(first(args), ssid, 33), cstring(second(args), pass, 65)); + if (cdr(args) == NULL) WiFi.begin(cstring(WIFICONNECT, first(args), ssid, 33)); + else { + if (cddr(args) != NULL) WiFi.config(ipstring(WIFICONNECT, third(args))); + WiFi.begin(cstring(WIFICONNECT, first(args), ssid, 33), cstring(WIFICONNECT, second(args), pass, 65)); + } int result = WiFi.waitForConnectResult(); if (result == WL_CONNECTED) return lispstring((char*)WiFi.localIP().toString().c_str()); else if (result == WL_NO_SSID_AVAIL) error2(WIFICONNECT, PSTR("network not found")); @@ -4986,742 +5056,1258 @@ const char string44[] PROGMEM = "when"; const char string45[] PROGMEM = "unless"; const char string46[] PROGMEM = "case"; const char string47[] PROGMEM = "and"; -const char string48[] PROGMEM = ""; -const char string49[] PROGMEM = "not"; -const char string50[] PROGMEM = "null"; -const char string51[] PROGMEM = "cons"; -const char string52[] PROGMEM = "atom"; -const char string53[] PROGMEM = "listp"; -const char string54[] PROGMEM = "consp"; -const char string55[] PROGMEM = "symbolp"; -const char string56[] PROGMEM = "arrayp"; -const char string57[] PROGMEM = "boundp"; -const char string58[] PROGMEM = "set"; -const char string59[] PROGMEM = "streamp"; -const char string60[] PROGMEM = "eq"; -const char string61[] PROGMEM = "car"; -const char string62[] PROGMEM = "first"; -const char string63[] PROGMEM = "cdr"; -const char string64[] PROGMEM = "rest"; -const char string65[] PROGMEM = "caar"; -const char string66[] PROGMEM = "cadr"; -const char string67[] PROGMEM = "second"; -const char string68[] PROGMEM = "cdar"; -const char string69[] PROGMEM = "cddr"; -const char string70[] PROGMEM = "caaar"; -const char string71[] PROGMEM = "caadr"; -const char string72[] PROGMEM = "cadar"; -const char string73[] PROGMEM = "caddr"; -const char string74[] PROGMEM = "third"; -const char string75[] PROGMEM = "cdaar"; -const char string76[] PROGMEM = "cdadr"; -const char string77[] PROGMEM = "cddar"; -const char string78[] PROGMEM = "cdddr"; -const char string79[] PROGMEM = "length"; -const char string80[] PROGMEM = "array-dimensions"; -const char string81[] PROGMEM = "list"; -const char string82[] PROGMEM = "make-array"; -const char string83[] PROGMEM = "reverse"; -const char string84[] PROGMEM = "nth"; -const char string85[] PROGMEM = "aref"; -const char string86[] PROGMEM = "assoc"; -const char string87[] PROGMEM = "member"; -const char string88[] PROGMEM = "apply"; -const char string89[] PROGMEM = "funcall"; -const char string90[] PROGMEM = "append"; -const char string91[] PROGMEM = "mapc"; -const char string92[] PROGMEM = "mapcar"; -const char string93[] PROGMEM = "mapcan"; -const char string94[] PROGMEM = "+"; -const char string95[] PROGMEM = "-"; -const char string96[] PROGMEM = "*"; -const char string97[] PROGMEM = "/"; -const char string98[] PROGMEM = "mod"; -const char string99[] PROGMEM = "1+"; -const char string100[] PROGMEM = "1-"; -const char string101[] PROGMEM = "abs"; -const char string102[] PROGMEM = "random"; -const char string103[] PROGMEM = "max"; -const char string104[] PROGMEM = "min"; -const char string105[] PROGMEM = "/="; -const char string106[] PROGMEM = "="; -const char string107[] PROGMEM = "<"; -const char string108[] PROGMEM = "<="; -const char string109[] PROGMEM = ">"; -const char string110[] PROGMEM = ">="; -const char string111[] PROGMEM = "plusp"; -const char string112[] PROGMEM = "minusp"; -const char string113[] PROGMEM = "zerop"; -const char string114[] PROGMEM = "oddp"; -const char string115[] PROGMEM = "evenp"; -const char string116[] PROGMEM = "integerp"; -const char string117[] PROGMEM = "numberp"; -const char string118[] PROGMEM = "float"; -const char string119[] PROGMEM = "floatp"; -const char string120[] PROGMEM = "sin"; -const char string121[] PROGMEM = "cos"; -const char string122[] PROGMEM = "tan"; -const char string123[] PROGMEM = "asin"; -const char string124[] PROGMEM = "acos"; -const char string125[] PROGMEM = "atan"; -const char string126[] PROGMEM = "sinh"; -const char string127[] PROGMEM = "cosh"; -const char string128[] PROGMEM = "tanh"; -const char string129[] PROGMEM = "exp"; -const char string130[] PROGMEM = "sqrt"; -const char string131[] PROGMEM = "log"; -const char string132[] PROGMEM = "expt"; -const char string133[] PROGMEM = "ceiling"; -const char string134[] PROGMEM = "floor"; -const char string135[] PROGMEM = "truncate"; -const char string136[] PROGMEM = "round"; -const char string137[] PROGMEM = "char"; -const char string138[] PROGMEM = "char-code"; -const char string139[] PROGMEM = "code-char"; -const char string140[] PROGMEM = "characterp"; -const char string141[] PROGMEM = "stringp"; -const char string142[] PROGMEM = "string="; -const char string143[] PROGMEM = "string<"; -const char string144[] PROGMEM = "string>"; -const char string145[] PROGMEM = "sort"; -const char string146[] PROGMEM = "string"; -const char string147[] PROGMEM = "concatenate"; -const char string148[] PROGMEM = "subseq"; -const char string149[] PROGMEM = "read-from-string"; -const char string150[] PROGMEM = "princ-to-string"; -const char string151[] PROGMEM = "prin1-to-string"; -const char string152[] PROGMEM = "logand"; -const char string153[] PROGMEM = "logior"; -const char string154[] PROGMEM = "logxor"; -const char string155[] PROGMEM = "lognot"; -const char string156[] PROGMEM = "ash"; -const char string157[] PROGMEM = "logbitp"; -const char string158[] PROGMEM = "eval"; -const char string159[] PROGMEM = "globals"; -const char string160[] PROGMEM = "locals"; -const char string161[] PROGMEM = "makunbound"; -const char string162[] PROGMEM = "break"; -const char string163[] PROGMEM = "read"; -const char string164[] PROGMEM = "prin1"; -const char string165[] PROGMEM = "print"; -const char string166[] PROGMEM = "princ"; -const char string167[] PROGMEM = "terpri"; -const char string168[] PROGMEM = "read-byte"; -const char string169[] PROGMEM = "read-line"; -const char string170[] PROGMEM = "write-byte"; -const char string171[] PROGMEM = "write-string"; -const char string172[] PROGMEM = "write-line"; -const char string173[] PROGMEM = "restart-i2c"; -const char string174[] PROGMEM = "gc"; -const char string175[] PROGMEM = "room"; -const char string176[] PROGMEM = "save-image"; -const char string177[] PROGMEM = "load-image"; -const char string178[] PROGMEM = "cls"; -const char string179[] PROGMEM = "pinmode"; -const char string180[] PROGMEM = "digitalread"; -const char string181[] PROGMEM = "digitalwrite"; -const char string182[] PROGMEM = "analogread"; -const char string183[] PROGMEM = "analogreference"; -const char string184[] PROGMEM = "analogreadresolution"; -const char string185[] PROGMEM = "analogwrite"; -const char string186[] PROGMEM = "analogwriteresolution"; -const char string187[] PROGMEM = "delay"; -const char string188[] PROGMEM = "millis"; -const char string189[] PROGMEM = "sleep"; -const char string190[] PROGMEM = "note"; -const char string191[] PROGMEM = "register"; -const char string192[] PROGMEM = "edit"; -const char string193[] PROGMEM = "pprint"; -const char string194[] PROGMEM = "pprintall"; -const char string195[] PROGMEM = "format"; -const char string196[] PROGMEM = "require"; -const char string197[] PROGMEM = "list-library"; -const char string198[] PROGMEM = "available"; -const char string199[] PROGMEM = "wifi-server"; -const char string200[] PROGMEM = "wifi-softap"; -const char string201[] PROGMEM = "connected"; -const char string202[] PROGMEM = "wifi-localip"; -const char string203[] PROGMEM = "wifi-connect"; -const char string204[] PROGMEM = "draw-pixel"; -const char string205[] PROGMEM = "draw-line"; -const char string206[] PROGMEM = "draw-rect"; -const char string207[] PROGMEM = "fill-rect"; -const char string208[] PROGMEM = "draw-circle"; -const char string209[] PROGMEM = "fill-circle"; -const char string210[] PROGMEM = "draw-round-rect"; -const char string211[] PROGMEM = "fill-round-rect"; -const char string212[] PROGMEM = "draw-triangle"; -const char string213[] PROGMEM = "fill-triangle"; -const char string214[] PROGMEM = "draw-char"; -const char string215[] PROGMEM = "set-cursor"; -const char string216[] PROGMEM = "set-text-color"; -const char string217[] PROGMEM = "set-text-size"; -const char string218[] PROGMEM = "set-text-wrap"; -const char string219[] PROGMEM = "fill-screen"; -const char string220[] PROGMEM = "set-rotation"; -const char string221[] PROGMEM = "invert-display"; -const char string222[] PROGMEM = ""; -const char string223[] PROGMEM = ":led-builtin"; -const char string224[] PROGMEM = ":high"; -const char string225[] PROGMEM = ":low"; +const char string48[] PROGMEM = "?"; +const char string49[] PROGMEM = ""; +const char string50[] PROGMEM = "not"; +const char string51[] PROGMEM = "null"; +const char string52[] PROGMEM = "cons"; +const char string53[] PROGMEM = "atom"; +const char string54[] PROGMEM = "listp"; +const char string55[] PROGMEM = "consp"; +const char string56[] PROGMEM = "symbolp"; +const char string57[] PROGMEM = "arrayp"; +const char string58[] PROGMEM = "boundp"; +const char string59[] PROGMEM = "set"; +const char string60[] PROGMEM = "streamp"; +const char string61[] PROGMEM = "eq"; +const char string62[] PROGMEM = "car"; +const char string63[] PROGMEM = "first"; +const char string64[] PROGMEM = "cdr"; +const char string65[] PROGMEM = "rest"; +const char string66[] PROGMEM = "caar"; +const char string67[] PROGMEM = "cadr"; +const char string68[] PROGMEM = "second"; +const char string69[] PROGMEM = "cdar"; +const char string70[] PROGMEM = "cddr"; +const char string71[] PROGMEM = "caaar"; +const char string72[] PROGMEM = "caadr"; +const char string73[] PROGMEM = "cadar"; +const char string74[] PROGMEM = "caddr"; +const char string75[] PROGMEM = "third"; +const char string76[] PROGMEM = "cdaar"; +const char string77[] PROGMEM = "cdadr"; +const char string78[] PROGMEM = "cddar"; +const char string79[] PROGMEM = "cdddr"; +const char string80[] PROGMEM = "length"; +const char string81[] PROGMEM = "array-dimensions"; +const char string82[] PROGMEM = "list"; +const char string83[] PROGMEM = "make-array"; +const char string84[] PROGMEM = "reverse"; +const char string85[] PROGMEM = "nth"; +const char string86[] PROGMEM = "aref"; +const char string87[] PROGMEM = "assoc"; +const char string88[] PROGMEM = "member"; +const char string89[] PROGMEM = "apply"; +const char string90[] PROGMEM = "funcall"; +const char string91[] PROGMEM = "append"; +const char string92[] PROGMEM = "mapc"; +const char string93[] PROGMEM = "mapcar"; +const char string94[] PROGMEM = "mapcan"; +const char string95[] PROGMEM = "+"; +const char string96[] PROGMEM = "-"; +const char string97[] PROGMEM = "*"; +const char string98[] PROGMEM = "/"; +const char string99[] PROGMEM = "mod"; +const char string100[] PROGMEM = "1+"; +const char string101[] PROGMEM = "1-"; +const char string102[] PROGMEM = "abs"; +const char string103[] PROGMEM = "random"; +const char string104[] PROGMEM = "max"; +const char string105[] PROGMEM = "min"; +const char string106[] PROGMEM = "/="; +const char string107[] PROGMEM = "="; +const char string108[] PROGMEM = "<"; +const char string109[] PROGMEM = "<="; +const char string110[] PROGMEM = ">"; +const char string111[] PROGMEM = ">="; +const char string112[] PROGMEM = "plusp"; +const char string113[] PROGMEM = "minusp"; +const char string114[] PROGMEM = "zerop"; +const char string115[] PROGMEM = "oddp"; +const char string116[] PROGMEM = "evenp"; +const char string117[] PROGMEM = "integerp"; +const char string118[] PROGMEM = "numberp"; +const char string119[] PROGMEM = "float"; +const char string120[] PROGMEM = "floatp"; +const char string121[] PROGMEM = "sin"; +const char string122[] PROGMEM = "cos"; +const char string123[] PROGMEM = "tan"; +const char string124[] PROGMEM = "asin"; +const char string125[] PROGMEM = "acos"; +const char string126[] PROGMEM = "atan"; +const char string127[] PROGMEM = "sinh"; +const char string128[] PROGMEM = "cosh"; +const char string129[] PROGMEM = "tanh"; +const char string130[] PROGMEM = "exp"; +const char string131[] PROGMEM = "sqrt"; +const char string132[] PROGMEM = "log"; +const char string133[] PROGMEM = "expt"; +const char string134[] PROGMEM = "ceiling"; +const char string135[] PROGMEM = "floor"; +const char string136[] PROGMEM = "truncate"; +const char string137[] PROGMEM = "round"; +const char string138[] PROGMEM = "char"; +const char string139[] PROGMEM = "char-code"; +const char string140[] PROGMEM = "code-char"; +const char string141[] PROGMEM = "characterp"; +const char string142[] PROGMEM = "stringp"; +const char string143[] PROGMEM = "string="; +const char string144[] PROGMEM = "string<"; +const char string145[] PROGMEM = "string>"; +const char string146[] PROGMEM = "sort"; +const char string147[] PROGMEM = "string"; +const char string148[] PROGMEM = "concatenate"; +const char string149[] PROGMEM = "subseq"; +const char string150[] PROGMEM = "read-from-string"; +const char string151[] PROGMEM = "princ-to-string"; +const char string152[] PROGMEM = "prin1-to-string"; +const char string153[] PROGMEM = "logand"; +const char string154[] PROGMEM = "logior"; +const char string155[] PROGMEM = "logxor"; +const char string156[] PROGMEM = "lognot"; +const char string157[] PROGMEM = "ash"; +const char string158[] PROGMEM = "logbitp"; +const char string159[] PROGMEM = "eval"; +const char string160[] PROGMEM = "globals"; +const char string161[] PROGMEM = "locals"; +const char string162[] PROGMEM = "makunbound"; +const char string163[] PROGMEM = "break"; +const char string164[] PROGMEM = "read"; +const char string165[] PROGMEM = "prin1"; +const char string166[] PROGMEM = "print"; +const char string167[] PROGMEM = "princ"; +const char string168[] PROGMEM = "terpri"; +const char string169[] PROGMEM = "read-byte"; +const char string170[] PROGMEM = "read-line"; +const char string171[] PROGMEM = "write-byte"; +const char string172[] PROGMEM = "write-string"; +const char string173[] PROGMEM = "write-line"; +const char string174[] PROGMEM = "restart-i2c"; +const char string175[] PROGMEM = "gc"; +const char string176[] PROGMEM = "room"; +const char string177[] PROGMEM = "save-image"; +const char string178[] PROGMEM = "load-image"; +const char string179[] PROGMEM = "cls"; +const char string180[] PROGMEM = "pinmode"; +const char string181[] PROGMEM = "digitalread"; +const char string182[] PROGMEM = "digitalwrite"; +const char string183[] PROGMEM = "analogread"; +const char string184[] PROGMEM = "analogreference"; +const char string185[] PROGMEM = "analogreadresolution"; +const char string186[] PROGMEM = "analogwrite"; +const char string187[] PROGMEM = "analogwriteresolution"; +const char string188[] PROGMEM = "delay"; +const char string189[] PROGMEM = "millis"; +const char string190[] PROGMEM = "sleep"; +const char string191[] PROGMEM = "note"; +const char string192[] PROGMEM = "register"; +const char string193[] PROGMEM = "edit"; +const char string194[] PROGMEM = "pprint"; +const char string195[] PROGMEM = "pprintall"; +const char string196[] PROGMEM = "format"; +const char string197[] PROGMEM = "require"; +const char string198[] PROGMEM = "list-library"; +const char string199[] PROGMEM = "documentation"; +const char string200[] PROGMEM = "available"; +const char string201[] PROGMEM = "wifi-server"; +const char string202[] PROGMEM = "wifi-softap"; +const char string203[] PROGMEM = "connected"; +const char string204[] PROGMEM = "wifi-localip"; +const char string205[] PROGMEM = "wifi-connect"; +const char string206[] PROGMEM = "draw-pixel"; +const char string207[] PROGMEM = "draw-line"; +const char string208[] PROGMEM = "draw-rect"; +const char string209[] PROGMEM = "fill-rect"; +const char string210[] PROGMEM = "draw-circle"; +const char string211[] PROGMEM = "fill-circle"; +const char string212[] PROGMEM = "draw-round-rect"; +const char string213[] PROGMEM = "fill-round-rect"; +const char string214[] PROGMEM = "draw-triangle"; +const char string215[] PROGMEM = "fill-triangle"; +const char string216[] PROGMEM = "draw-char"; +const char string217[] PROGMEM = "set-cursor"; +const char string218[] PROGMEM = "set-text-color"; +const char string219[] PROGMEM = "set-text-size"; +const char string220[] PROGMEM = "set-text-wrap"; +const char string221[] PROGMEM = "fill-screen"; +const char string222[] PROGMEM = "set-rotation"; +const char string223[] PROGMEM = "invert-display"; +const char string224[] PROGMEM = ""; +const char string225[] PROGMEM = ":led-builtin"; +const char string226[] PROGMEM = ":high"; +const char string227[] PROGMEM = ":low"; #if defined(CPU_ATSAMD21) -const char string226[] PROGMEM = ":input"; -const char string227[] PROGMEM = ":input-pullup"; -const char string228[] PROGMEM = ":input-pulldown"; -const char string229[] PROGMEM = ":output"; -const char string230[] PROGMEM = ":ar-default"; -const char string231[] PROGMEM = ":ar-internal1v0"; -const char string232[] PROGMEM = ":ar-internal1v65"; -const char string233[] PROGMEM = ":ar-internal2v23"; -const char string234[] PROGMEM = ":ar-external"; -const char string235[] PROGMEM = ":pa-dir"; -const char string236[] PROGMEM = ":pa-dirclr"; -const char string237[] PROGMEM = ":pa-dirset"; -const char string238[] PROGMEM = ":pa-dirtgl"; -const char string239[] PROGMEM = ":pa-out"; -const char string240[] PROGMEM = ":pa-outclr"; -const char string241[] PROGMEM = ":pa-outset"; -const char string242[] PROGMEM = ":pa-outtgl"; -const char string243[] PROGMEM = ":pa-in"; -const char string244[] PROGMEM = ":pb-dir"; -const char string245[] PROGMEM = ":pb-dirclr"; -const char string246[] PROGMEM = ":pb-dirset"; -const char string247[] PROGMEM = ":pb-dirtgl"; -const char string248[] PROGMEM = ":pb-out"; -const char string249[] PROGMEM = ":pb-outclr"; -const char string250[] PROGMEM = ":pb-outset"; -const char string251[] PROGMEM = ":pb-outtgl"; -const char string252[] PROGMEM = ":pb-in"; -const char string253[] PROGMEM = ""; +const char string228[] PROGMEM = ":input"; +const char string229[] PROGMEM = ":input-pullup"; +const char string230[] PROGMEM = ":input-pulldown"; +const char string231[] PROGMEM = ":output"; +const char string232[] PROGMEM = ":ar-default"; +const char string233[] PROGMEM = ":ar-internal1v0"; +const char string234[] PROGMEM = ":ar-internal1v65"; +const char string235[] PROGMEM = ":ar-internal2v23"; +const char string236[] PROGMEM = ":ar-external"; +const char string237[] PROGMEM = ":pa-dir"; +const char string238[] PROGMEM = ":pa-dirclr"; +const char string239[] PROGMEM = ":pa-dirset"; +const char string240[] PROGMEM = ":pa-dirtgl"; +const char string241[] PROGMEM = ":pa-out"; +const char string242[] PROGMEM = ":pa-outclr"; +const char string243[] PROGMEM = ":pa-outset"; +const char string244[] PROGMEM = ":pa-outtgl"; +const char string245[] PROGMEM = ":pa-in"; +const char string246[] PROGMEM = ":pb-dir"; +const char string247[] PROGMEM = ":pb-dirclr"; +const char string248[] PROGMEM = ":pb-dirset"; +const char string249[] PROGMEM = ":pb-dirtgl"; +const char string250[] PROGMEM = ":pb-out"; +const char string251[] PROGMEM = ":pb-outclr"; +const char string252[] PROGMEM = ":pb-outset"; +const char string253[] PROGMEM = ":pb-outtgl"; +const char string254[] PROGMEM = ":pb-in"; +const char string255[] PROGMEM = ""; #elif defined(CPU_ATSAMD51) -const char string226[] PROGMEM = ":input"; -const char string227[] PROGMEM = ":input-pullup"; -const char string228[] PROGMEM = ":input-pulldown"; -const char string229[] PROGMEM = ":output"; -const char string230[] PROGMEM = ":ar-default"; -const char string231[] PROGMEM = ":ar-internal1v0"; -const char string232[] PROGMEM = ":ar-internal1v1"; -const char string233[] PROGMEM = ":ar-internal1v2"; -const char string234[] PROGMEM = ":ar-internal1v25"; -const char string235[] PROGMEM = ":ar-internal1v65"; -const char string236[] PROGMEM = ":ar-internal2v0"; -const char string237[] PROGMEM = ":ar-internal2v2"; -const char string238[] PROGMEM = ":ar-internal2v23"; -const char string239[] PROGMEM = ":ar-internal2v4"; -const char string240[] PROGMEM = ":ar-internal2v5"; -const char string241[] PROGMEM = ":ar-external"; -const char string242[] PROGMEM = ":pa-dir"; -const char string243[] PROGMEM = ":pa-dirclr"; -const char string244[] PROGMEM = ":pa-dirset"; -const char string245[] PROGMEM = ":pa-dirtgl"; -const char string246[] PROGMEM = ":pa-out"; -const char string247[] PROGMEM = ":pa-outclr"; -const char string248[] PROGMEM = ":pa-outset"; -const char string249[] PROGMEM = ":pa-outtgl"; -const char string250[] PROGMEM = ":pa-in"; -const char string251[] PROGMEM = ":pb-dir"; -const char string252[] PROGMEM = ":pb-dirclr"; -const char string253[] PROGMEM = ":pb-dirset"; -const char string254[] PROGMEM = ":pb-dirtgl"; -const char string255[] PROGMEM = ":pb-out"; -const char string256[] PROGMEM = ":pb-outclr"; -const char string257[] PROGMEM = ":pb-outset"; -const char string258[] PROGMEM = ":pb-outtgl"; -const char string259[] PROGMEM = ":pb-in"; -const char string260[] PROGMEM = ""; +const char string228[] PROGMEM = ":input"; +const char string229[] PROGMEM = ":input-pullup"; +const char string230[] PROGMEM = ":input-pulldown"; +const char string231[] PROGMEM = ":output"; +const char string232[] PROGMEM = ":ar-default"; +const char string233[] PROGMEM = ":ar-internal1v0"; +const char string234[] PROGMEM = ":ar-internal1v1"; +const char string235[] PROGMEM = ":ar-internal1v2"; +const char string236[] PROGMEM = ":ar-internal1v25"; +const char string237[] PROGMEM = ":ar-internal1v65"; +const char string238[] PROGMEM = ":ar-internal2v0"; +const char string239[] PROGMEM = ":ar-internal2v2"; +const char string240[] PROGMEM = ":ar-internal2v23"; +const char string241[] PROGMEM = ":ar-internal2v4"; +const char string242[] PROGMEM = ":ar-internal2v5"; +const char string243[] PROGMEM = ":ar-external"; +const char string244[] PROGMEM = ":pa-dir"; +const char string245[] PROGMEM = ":pa-dirclr"; +const char string246[] PROGMEM = ":pa-dirset"; +const char string247[] PROGMEM = ":pa-dirtgl"; +const char string248[] PROGMEM = ":pa-out"; +const char string249[] PROGMEM = ":pa-outclr"; +const char string250[] PROGMEM = ":pa-outset"; +const char string251[] PROGMEM = ":pa-outtgl"; +const char string252[] PROGMEM = ":pa-in"; +const char string253[] PROGMEM = ":pb-dir"; +const char string254[] PROGMEM = ":pb-dirclr"; +const char string255[] PROGMEM = ":pb-dirset"; +const char string256[] PROGMEM = ":pb-dirtgl"; +const char string257[] PROGMEM = ":pb-out"; +const char string258[] PROGMEM = ":pb-outclr"; +const char string259[] PROGMEM = ":pb-outset"; +const char string260[] PROGMEM = ":pb-outtgl"; +const char string261[] PROGMEM = ":pb-in"; +const char string262[] PROGMEM = ""; #elif defined(CPU_NRF51822) -const char string226[] PROGMEM = ":input"; -const char string227[] PROGMEM = ":input-pullup"; -const char string228[] PROGMEM = ":input-pulldown"; -const char string229[] PROGMEM = ":output"; -const char string230[] PROGMEM = ":ar-default"; -const char string231[] PROGMEM = ":ar-vbg"; -const char string232[] PROGMEM = ":ar-supply-one-half"; -const char string233[] PROGMEM = ":ar-supply-one-third"; -const char string234[] PROGMEM = ":ar-ext0"; -const char string235[] PROGMEM = ":ar-ext1"; -const char string236[] PROGMEM = ":p0-out"; -const char string237[] PROGMEM = ":p0-outset"; -const char string238[] PROGMEM = ":p0-outclr"; -const char string239[] PROGMEM = ":p0-in"; -const char string240[] PROGMEM = ":p0-dir"; -const char string241[] PROGMEM = ":p0-dirset"; -const char string242[] PROGMEM = ":p0-dirclr"; -const char string243[] PROGMEM = ""; +const char string228[] PROGMEM = ":input"; +const char string229[] PROGMEM = ":input-pullup"; +const char string230[] PROGMEM = ":input-pulldown"; +const char string231[] PROGMEM = ":output"; +const char string232[] PROGMEM = ":ar-default"; +const char string233[] PROGMEM = ":ar-vbg"; +const char string234[] PROGMEM = ":ar-supply-one-half"; +const char string235[] PROGMEM = ":ar-supply-one-third"; +const char string236[] PROGMEM = ":ar-ext0"; +const char string237[] PROGMEM = ":ar-ext1"; +const char string238[] PROGMEM = ":p0-out"; +const char string239[] PROGMEM = ":p0-outset"; +const char string240[] PROGMEM = ":p0-outclr"; +const char string241[] PROGMEM = ":p0-in"; +const char string242[] PROGMEM = ":p0-dir"; +const char string243[] PROGMEM = ":p0-dirset"; +const char string244[] PROGMEM = ":p0-dirclr"; +const char string245[] PROGMEM = ""; #elif defined(CPU_NRF52840) -const char string226[] PROGMEM = ":input"; -const char string227[] PROGMEM = ":input-pullup"; -const char string228[] PROGMEM = ":input-pulldown"; -const char string229[] PROGMEM = ":output"; -const char string230[] PROGMEM = ":ar-default"; -const char string231[] PROGMEM = ":ar-internal"; -const char string232[] PROGMEM = ":ar-internal-3-0"; -const char string233[] PROGMEM = ":ar-internal-2-4"; -const char string234[] PROGMEM = ":ar-internal-1-8"; -const char string235[] PROGMEM = ":ar-internal-1-2"; -const char string236[] PROGMEM = ":ar-vdd4"; -const char string237[] PROGMEM = ":p0-out"; -const char string238[] PROGMEM = ":p0-outset"; -const char string239[] PROGMEM = ":p0-outclr"; -const char string240[] PROGMEM = ":p0-in"; -const char string241[] PROGMEM = ":p0-dir"; -const char string242[] PROGMEM = ":p0-dirset"; -const char string243[] PROGMEM = ":p0-dirclr"; -const char string244[] PROGMEM = ":p1-out"; -const char string245[] PROGMEM = ":p1-outset"; -const char string246[] PROGMEM = ":p1-outclr"; -const char string247[] PROGMEM = ":p1-in"; -const char string248[] PROGMEM = ":p1-dir"; -const char string249[] PROGMEM = ":p1-dirset"; -const char string250[] PROGMEM = ":p1-dirclr"; -const char string251[] PROGMEM = ""; +const char string228[] PROGMEM = ":input"; +const char string229[] PROGMEM = ":input-pullup"; +const char string230[] PROGMEM = ":input-pulldown"; +const char string231[] PROGMEM = ":output"; +const char string232[] PROGMEM = ":ar-default"; +const char string233[] PROGMEM = ":ar-internal"; +const char string234[] PROGMEM = ":ar-internal-3-0"; +const char string235[] PROGMEM = ":ar-internal-2-4"; +const char string236[] PROGMEM = ":ar-internal-1-8"; +const char string237[] PROGMEM = ":ar-internal-1-2"; +const char string238[] PROGMEM = ":ar-vdd4"; +const char string239[] PROGMEM = ":p0-out"; +const char string240[] PROGMEM = ":p0-outset"; +const char string241[] PROGMEM = ":p0-outclr"; +const char string242[] PROGMEM = ":p0-in"; +const char string243[] PROGMEM = ":p0-dir"; +const char string244[] PROGMEM = ":p0-dirset"; +const char string245[] PROGMEM = ":p0-dirclr"; +const char string246[] PROGMEM = ":p1-out"; +const char string247[] PROGMEM = ":p1-outset"; +const char string248[] PROGMEM = ":p1-outclr"; +const char string249[] PROGMEM = ":p1-in"; +const char string250[] PROGMEM = ":p1-dir"; +const char string251[] PROGMEM = ":p1-dirset"; +const char string252[] PROGMEM = ":p1-dirclr"; +const char string253[] PROGMEM = ""; #elif defined(CPU_NRF52833) -const char string226[] PROGMEM = ":input"; -const char string227[] PROGMEM = ":input-pullup"; -const char string228[] PROGMEM = ":input-pulldown"; -const char string229[] PROGMEM = ":output"; -const char string230[] PROGMEM = ":ar-default"; -const char string231[] PROGMEM = ":ar-internal"; -const char string232[] PROGMEM = ":ar-vdd4"; -const char string233[] PROGMEM = ":p0-out"; -const char string234[] PROGMEM = ":p0-outset"; -const char string235[] PROGMEM = ":p0-outclr"; -const char string236[] PROGMEM = ":p0-in"; -const char string237[] PROGMEM = ":p0-dir"; -const char string238[] PROGMEM = ":p0-dirset"; -const char string239[] PROGMEM = ":p0-dirclr"; -const char string240[] PROGMEM = ":p1-out"; -const char string241[] PROGMEM = ":p1-outset"; -const char string242[] PROGMEM = ":p1-outclr"; -const char string243[] PROGMEM = ":p1-in"; -const char string244[] PROGMEM = ":p1-dir"; -const char string245[] PROGMEM = ":p1-dirset"; -const char string246[] PROGMEM = ":p1-dirclr"; -const char string247[] PROGMEM = ""; +const char string228[] PROGMEM = ":input"; +const char string229[] PROGMEM = ":input-pullup"; +const char string230[] PROGMEM = ":input-pulldown"; +const char string231[] PROGMEM = ":output"; +const char string232[] PROGMEM = ":ar-default"; +const char string233[] PROGMEM = ":ar-internal"; +const char string234[] PROGMEM = ":ar-vdd4"; +const char string235[] PROGMEM = ":p0-out"; +const char string236[] PROGMEM = ":p0-outset"; +const char string237[] PROGMEM = ":p0-outclr"; +const char string238[] PROGMEM = ":p0-in"; +const char string239[] PROGMEM = ":p0-dir"; +const char string240[] PROGMEM = ":p0-dirset"; +const char string241[] PROGMEM = ":p0-dirclr"; +const char string242[] PROGMEM = ":p1-out"; +const char string243[] PROGMEM = ":p1-outset"; +const char string244[] PROGMEM = ":p1-outclr"; +const char string245[] PROGMEM = ":p1-in"; +const char string246[] PROGMEM = ":p1-dir"; +const char string247[] PROGMEM = ":p1-dirset"; +const char string248[] PROGMEM = ":p1-dirclr"; +const char string249[] PROGMEM = ""; #elif defined(CPU_iMXRT1062) -const char string226[] PROGMEM = ":input"; -const char string227[] PROGMEM = ":input-pullup"; -const char string228[] PROGMEM = ":input-pulldown"; -const char string229[] PROGMEM = ":output"; -const char string230[] PROGMEM = ":output-opendrain"; -const char string231[] PROGMEM = ""; +const char string228[] PROGMEM = ":input"; +const char string229[] PROGMEM = ":input-pullup"; +const char string230[] PROGMEM = ":input-pulldown"; +const char string231[] PROGMEM = ":output"; +const char string232[] PROGMEM = ":output-opendrain"; +const char string233[] PROGMEM = ""; #elif defined(CPU_MAX32620) -const char string226[] PROGMEM = ":input"; -const char string227[] PROGMEM = ":input-pullup"; -const char string228[] PROGMEM = ":output"; -const char string229[] PROGMEM = ":default"; -const char string230[] PROGMEM = ":external"; -const char string231[] PROGMEM = ""; +const char string228[] PROGMEM = ":input"; +const char string229[] PROGMEM = ":input-pullup"; +const char string230[] PROGMEM = ":output"; +const char string231[] PROGMEM = ":default"; +const char string232[] PROGMEM = ":external"; +const char string233[] PROGMEM = ""; #elif defined(CPU_RP2040) -const char string226[] PROGMEM = ":input"; -const char string227[] PROGMEM = ":input-pullup"; -const char string228[] PROGMEM = ":input-pulldown"; -const char string229[] PROGMEM = ":output"; -const char string230[] PROGMEM = ":gpio-in"; -const char string231[] PROGMEM = ":gpio-out"; -const char string232[] PROGMEM = ":gpio-out-set"; -const char string233[] PROGMEM = ":gpio-out-clr"; -const char string234[] PROGMEM = ":gpio-out-xor"; -const char string235[] PROGMEM = ":gpio-oe"; -const char string236[] PROGMEM = ":gpio-oe-set"; -const char string237[] PROGMEM = ":gpio-oe-clr"; -const char string238[] PROGMEM = ":gpio-oe-xor"; -const char string239[] PROGMEM = ""; +const char string228[] PROGMEM = ":input"; +const char string229[] PROGMEM = ":input-pullup"; +const char string230[] PROGMEM = ":input-pulldown"; +const char string231[] PROGMEM = ":output"; +const char string232[] PROGMEM = ":gpio-in"; +const char string233[] PROGMEM = ":gpio-out"; +const char string234[] PROGMEM = ":gpio-out-set"; +const char string235[] PROGMEM = ":gpio-out-clr"; +const char string236[] PROGMEM = ":gpio-out-xor"; +const char string237[] PROGMEM = ":gpio-oe"; +const char string238[] PROGMEM = ":gpio-oe-set"; +const char string239[] PROGMEM = ":gpio-oe-clr"; +const char string240[] PROGMEM = ":gpio-oe-xor"; +const char string241[] PROGMEM = ""; #endif // Insert your own function names here +// Documentation strings +const char doc0[] PROGMEM = "nil\n" +"A symbol equivalent to the empty list (). Also represents false."; +const char doc1[] PROGMEM = "t\n" +"A symbol representing true."; +const char doc2[] PROGMEM = "nothing\n" +"A symbol with no value.\n" +"It is useful if you want to suppress printing the result of evaluating a function."; +const char doc3[] PROGMEM = "&optional\n" +"Can be followed by one or more optional parameters in a lambda or defun parameter list."; +const char doc7[] PROGMEM = "&rest\n" +"Can be followed by a parameter in a lambda or defun parameter list,\n" +"and is assigned a list of the corresponding arguments."; +const char doc8[] PROGMEM = "(lambda (parameter*) form*)\n" +"Creates an unnamed function with parameters. The body is evaluated with the parameters as local variables\n" +"whose initial values are defined by the values of the forms after the lambda form."; +const char doc9[] PROGMEM = "(let ((var value) ... ) forms*)\n" +"Declares local variables with values, and evaluates the forms with those local variables."; +const char doc10[] PROGMEM = "(let* ((var value) ... ) forms*)\n" +"Declares local variables with values, and evaluates the forms with those local variables.\n" +"Each declaration can refer to local variables that have been defined earlier in the let*."; +const char doc15[] PROGMEM = "(or item*)\n" +"Evaluates its arguments until one returns non-nil, and returns its value."; +const char doc16[] PROGMEM = "(defun name (parameters) form*)\n" +"Defines a function."; +const char doc17[] PROGMEM = "(defvar variable form)\n" +"Defines a global variable."; +const char doc18[] PROGMEM = "(setq symbol value [symbol value]*)\n" +"For each pair of arguments assigns the value of the second argument\n" +"to the variable specified in the first argument."; +const char doc19[] PROGMEM = "(loop forms*)\n" +"Executes its arguments repeatedly until one of the arguments calls (return),\n" +"which then causes an exit from the loop."; +const char doc20[] PROGMEM = "(return [value])\n" +"Exits from a (dotimes ...), (dolist ...), or (loop ...) loop construct and returns value."; +const char doc21[] PROGMEM = "(push item place)\n" +"Modifies the value of place, which should be a list, to add item onto the front of the list,\n" +"and returns the new list."; +const char doc22[] PROGMEM = "(pop place)\n" +"Modifies the value of place, which should be a list, to remove its first item, and returns that item."; +const char doc23[] PROGMEM = "(incf place [number])\n" +"Increments a place, which should have an numeric value, and returns the result.\n" +"The third argument is an optional increment which defaults to 1."; +const char doc24[] PROGMEM = "(decf place [number])\n" +"Decrements a place, which should have an numeric value, and returns the result.\n" +"The third argument is an optional decrement which defaults to 1."; +const char doc25[] PROGMEM = "(setf place value [place value]*)\n" +"For each pair of arguments modifies a place to the result of evaluating value."; +const char doc26[] PROGMEM = "(dolist (var list [result]) form*)\n" +"Sets the local variable var to each element of list in turn, and executes the forms.\n" +"It then returns result, or nil if result is omitted."; +const char doc27[] PROGMEM = "(dotimes (var number [result]) form*)\n" +"Executes the forms number times, with the local variable var set to each integer from 0 to number-1 in turn.\n" +"It then returns result, or nil if result is omitted."; +const char doc28[] PROGMEM = "(trace [function]*)\n" +"Turns on tracing of up to TRACEMAX user-defined functions,\n" +"and returns a list of the functions currently being traced."; +const char doc29[] PROGMEM = "(untrace [function]*)\n" +"Turns off tracing of up to TRACEMAX user-defined functions, and returns a list of the functions untraced.\n" +"If no functions are specified it untraces all functions."; +const char doc30[] PROGMEM = "(for-millis ([number]) form*)\n" +"Executes the forms and then waits until a total of number milliseconds have elapsed.\n" +"Returns the total number of milliseconds taken."; +const char doc31[] PROGMEM = "(time form)\n" +"Prints the value returned by the form, and the time taken to evaluate the form\n" +"in milliseconds or seconds."; +const char doc32[] PROGMEM = "(with-output-to-string (str) form*)\n" +"Returns a string containing the output to the stream variable str."; +const char doc33[] PROGMEM = "(with-serial (str port [baud]) form*)\n" +"Evaluates the forms with str bound to a serial-stream using port.\n" +"The optional baud gives the baud rate divided by 100, default 96."; +const char doc34[] PROGMEM = "(with-i2c (str [port] address [read-p]) form*)\n" +"Evaluates the forms with str bound to an i2c-stream defined by address.\n" +"If read-p is nil or omitted the stream is written to, otherwise it specifies the number of bytes\n" +"to be read from the stream. If port is omitted it defaults to 0, otherwise it specifies the port, 0 or 1."; +const char doc35[] PROGMEM = "(with-spi (str pin [clock] [bitorder] [mode] [port]) form*)\n" +"Evaluates the forms with str bound to an spi-stream.\n" +"The parameters specify the enable pin, clock in kHz (default 4000),\n" +"bitorder 0 for LSBFIRST and 1 for MSBFIRST (default 1), SPI mode (default 0), and port 0 or 1 (default 0)."; +const char doc36[] PROGMEM = "(with-sd-card (str filename [mode]) form*)\n" +"Evaluates the forms with str bound to an sd-stream reading from or writing to the file filename.\n" +"If mode is omitted the file is read, otherwise 0 means read, 1 write-append, or 2 write-overwrite."; +const char doc37[] PROGMEM = "(with-gfx (str) form*)\n" +"Evaluates the forms with str bound to an gfx-stream so you can print text\n" +"to the graphics display using the standard uLisp print commands."; +const char doc38[] PROGMEM = "(with-client (str [address port]) form*)\n" +"Evaluates the forms with str bound to a wifi-stream."; +const char doc39[] PROGMEM = "(defcode name (parameters) form*)\n" +"Creates a machine-code function called name from a series of 16-bit integers given in the body of the form.\n" +"These are written into RAM, and can be executed by calling the function in the same way as a normal Lisp function."; +const char doc41[] PROGMEM = "(progn form*)\n" +"Evaluates several forms grouped together into a block, and returns the result of evaluating the last form."; +const char doc42[] PROGMEM = "(if test then [else])\n" +"Evaluates test. If it's non-nil the form then is evaluated and returned;\n" +"otherwise the form else is evaluated and returned."; +const char doc43[] PROGMEM = "(cond ((test form*) (test form*) ... ))\n" +"Each argument is a list consisting of a test optionally followed by one or more forms.\n" +"If the test evaluates to non-nil the forms are evaluated, and the last value is returned as the result of the cond.\n" +"If the test evaluates to nil, none of the forms are evaluated, and the next argument is processed in the same way."; +const char doc44[] PROGMEM = "(when test form*)\n" +"Evaluates the test. If it's non-nil the forms are evaluated and the last value is returned."; +const char doc45[] PROGMEM = "(unless test form*)\n" +"Evaluates the test. If it's nil the forms are evaluated and the last value is returned."; +const char doc46[] PROGMEM = "(case keyform ((key form*) (key form*) ... ))\n" +"Evaluates a keyform to produce a test key, and then tests this against a series of arguments,\n" +"each of which is a list containing a key optionally followed by one or more forms."; +const char doc47[] PROGMEM = "(and item*)\n" +"Evaluates its arguments until one returns nil, and returns the last value."; +const char doc48[] PROGMEM = "(? item)\n" +"Prints the documentation string of a built-in or user-defined function."; +const char doc50[] PROGMEM = "(not item)\n" +"Returns t if its argument is nil, or nil otherwise. Equivalent to null."; +const char doc52[] PROGMEM = "(cons item item)\n" +"If the second argument is a list, cons returns a new list with item added to the front of the list.\n" +"If the second argument isn't a list cons returns a dotted pair."; +const char doc53[] PROGMEM = "(atom item)\n" +"Returns t if its argument is a single number, symbol, or nil."; +const char doc54[] PROGMEM = "(listp item)\n" +"Returns t if its argument is a list."; +const char doc55[] PROGMEM = "(consp item)\n" +"Returns t if its argument is a non-null list."; +const char doc56[] PROGMEM = "(symbolp item)\n" +"Returns t if its argument is a symbol."; +const char doc57[] PROGMEM = "(arrayp item)\n" +"Returns t if its argument is an array."; +const char doc58[] PROGMEM = "(boundp item)\n" +"Returns t if its argument is a symbol with a value."; +const char doc59[] PROGMEM = "(set symbol value [symbol value]*)\n" +"For each pair of arguments, assigns the value of the second argument to the value of the first argument."; +const char doc60[] PROGMEM = "(streamp item)\n" +"Returns t if its argument is a stream."; +const char doc61[] PROGMEM = "(eq item item)\n" +"Tests whether the two arguments are the same symbol, same character, equal numbers,\n" +"or point to the same cons, and returns t or nil as appropriate."; +const char doc62[] PROGMEM = "(car list)\n" +"Returns the first item in a list."; +const char doc64[] PROGMEM = "(cdr list)\n" +"Returns a list with the first item removed."; +const char doc66[] PROGMEM = "(caar list)"; +const char doc67[] PROGMEM = "(cadr list)"; +const char doc69[] PROGMEM = "(cdar list)\n" +"Equivalent to (cdr (car list))."; +const char doc70[] PROGMEM = "(cddr list)\n" +"Equivalent to (cdr (cdr list))."; +const char doc71[] PROGMEM = "(caaar list)\n" +"Equivalent to (car (car (car list)))."; +const char doc72[] PROGMEM = "(caadr list)\n" +"Equivalent to (car (car (cdar list)))."; +const char doc73[] PROGMEM = "(cadar list)\n" +"Equivalent to (car (cdr (car list)))."; +const char doc74[] PROGMEM = "(caddr list)\n" +"Equivalent to (car (cdr (cdr list)))."; +const char doc76[] PROGMEM = "(cdaar list)\n" +"Equivalent to (cdar (car (car list)))."; +const char doc77[] PROGMEM = "(cdadr list)\n" +"Equivalent to (cdr (car (cdr list)))."; +const char doc78[] PROGMEM = "(cddar list)\n" +"Equivalent to (cdr (cdr (car list)))."; +const char doc79[] PROGMEM = "(cdddr list)\n" +"Equivalent to (cdr (cdr (cdr list)))."; +const char doc80[] PROGMEM = "(length item)\n" +"Returns the number of items in a list, the length of a string, or the length of a one-dimensional array."; +const char doc81[] PROGMEM = "(array-dimensions item)\n" +"Returns a list of the dimensions of an array."; +const char doc82[] PROGMEM = "(list item*)\n" +"Returns a list of the values of its arguments."; +const char doc83[] PROGMEM = "(make-array size [:initial-element element] [:element-type 'bit])\n" +"If size is an integer it creates a one-dimensional array with elements from 0 to size-1.\n" +"If size is a list of n integers it creates an n-dimensional array with those dimensions.\n" +"If :element-type 'bit is specified the array is a bit array."; +const char doc84[] PROGMEM = "(reverse list)\n" +"Returns a list with the elements of list in reverse order."; +const char doc85[] PROGMEM = "(nth number list)\n" +"Returns the nth item in list, counting from zero."; +const char doc86[] PROGMEM = "(aref array index [index*])\n" +"Returns an element from the specified array."; +const char doc87[] PROGMEM = "(assoc key list)\n" +"Looks up a key in an association list of (key . value) pairs,\n" +"and returns the matching pair, or nil if no pair is found."; +const char doc88[] PROGMEM = "(member item list)\n" +"Searches for an item in a list, using eq, and returns the list starting from the first occurrence of the item,\n" +"or nil if it is not found."; +const char doc89[] PROGMEM = "(apply function list)\n" +"Returns the result of evaluating function, with the list of arguments specified by the second parameter."; +const char doc90[] PROGMEM = "(funcall function argument*)\n" +"Evaluates function with the specified arguments."; +const char doc91[] PROGMEM = "(append list*)\n" +"Joins its arguments, which should be lists, into a single list."; +const char doc92[] PROGMEM = "(mapc function list1 [list]*)\n" +"Applies the function to each element in one or more lists, ignoring the results.\n" +"It returns the first list argument."; +const char doc93[] PROGMEM = "(mapcar function list1 [list]*)\n" +"Applies the function to each element in one or more lists, and returns the resulting list."; +const char doc94[] PROGMEM = "(mapcan function list1 [list]*)\n" +"Applies the function to each element in one or more lists. The results should be lists,\n" +"and these are appended together to give the value returned."; +const char doc95[] PROGMEM = "(+ number*)\n" +"Adds its arguments together.\n" +"If each argument is an integer, and the running total doesn't overflow, the result is an integer,\n" +"otherwise a floating-point number."; +const char doc96[] PROGMEM = "(- number*)\n" +"If there is one argument, negates the argument.\n" +"If there are two or more arguments, subtracts the second and subsequent arguments from the first argument.\n" +"If each argument is an integer, and the running total doesn't overflow, returns the result as an integer,\n" +"otherwise a floating-point number."; +const char doc97[] PROGMEM = "(* number*)\n" +"Multiplies its arguments together.\n" +"If each argument is an integer, and the running total doesn't overflow, the result is an integer,\n" +"otherwise it's a floating-point number."; +const char doc98[] PROGMEM = "(/ number*)\n" +"Divides the first argument by the second and subsequent arguments.\n" +"If each argument is an integer, and each division produces an exact result, the result is an integer;\n" +"otherwise it's a floating-point number."; +const char doc99[] PROGMEM = "(mod number number)\n" +"Returns its first argument modulo the second argument.\n" +"If both arguments are integers the result is an integer; otherwise it's a floating-point number."; +const char doc100[] PROGMEM = "(1+ number)\n" +"Adds one to its argument and returns it.\n" +"If the argument is an integer the result is an integer if possible;\n" +"otherwise it's a floating-point number."; +const char doc101[] PROGMEM = "(1- number)\n" +"Subtracts one from its argument and returns it.\n" +"If the argument is an integer the result is an integer if possible;\n" +"otherwise it's a floating-point number."; +const char doc102[] PROGMEM = "(abs number)\n" +"Returns the absolute, positive value of its argument.\n" +"If the argument is an integer the result will be returned as an integer if possible,\n" +"otherwise a floating-point number."; +const char doc103[] PROGMEM = "(random number)\n" +"If number is an integer returns a random number between 0 and one less than its argument.\n" +"Otherwise returns a floating-point number between zero and number."; +const char doc104[] PROGMEM = "(max number*)\n" +"Returns the maximum of one or more arguments."; +const char doc105[] PROGMEM = "(min number*)\n" +"Returns the minimum of one or more arguments."; +const char doc106[] PROGMEM = "(/= number*)\n" +"Returns t if none of the arguments are equal, or nil if two or more arguments are equal."; +const char doc107[] PROGMEM = "(= number*)\n" +"Returns t if all the arguments, which must be numbers, are numerically equal, and nil otherwise."; +const char doc108[] PROGMEM = "(< number*)\n" +"Returns t if each argument is less than the next argument, and nil otherwise."; +const char doc109[] PROGMEM = "(<= number*)\n" +"Returns t if each argument is less than or equal to the next argument, and nil otherwise."; +const char doc110[] PROGMEM = "(> number*)\n" +"Returns t if each argument is greater than the next argument, and nil otherwise."; +const char doc111[] PROGMEM = "(>= number*)\n" +"Returns t if each argument is greater than or equal to the next argument, and nil otherwise."; +const char doc112[] PROGMEM = "(plusp number)\n" +"Returns t if the argument is greater than zero, or nil otherwise."; +const char doc113[] PROGMEM = "(minusp number)\n" +"Returns t if the argument is less than zero, or nil otherwise."; +const char doc114[] PROGMEM = "(zerop number)\n" +"Returns t if the argument is zero."; +const char doc115[] PROGMEM = "(oddp number)\n" +"Returns t if the integer argument is odd."; +const char doc116[] PROGMEM = "(evenp number)\n" +"Returns t if the integer argument is even."; +const char doc117[] PROGMEM = "(integerp number)\n" +"Returns t if the argument is an integer."; +const char doc118[] PROGMEM = "(numberp number)\n" +"Returns t if the argument is a number."; +const char doc119[] PROGMEM = "(float number)\n" +"Returns its argument converted to a floating-point number."; +const char doc120[] PROGMEM = "(floatp number)\n" +"Returns t if the argument is a floating-point number."; +const char doc121[] PROGMEM = "(sin number)\n" +"Returns sin(number)."; +const char doc122[] PROGMEM = "(cos number)\n" +"Returns cos(number)."; +const char doc123[] PROGMEM = "(tan number)\n" +"Returns tan(number)."; +const char doc124[] PROGMEM = "(asin number)\n" +"Returns asin(number)."; +const char doc125[] PROGMEM = "(acos number)\n" +"Returns acos(number)."; +const char doc126[] PROGMEM = "(atan number1 [number2])\n" +"Returns the arc tangent of number1/number2, in radians. If number2 is omitted it defaults to 1."; +const char doc127[] PROGMEM = "(sinh number)\n" +"Returns sinh(number)."; +const char doc128[] PROGMEM = "(cosh number)\n" +"Returns cosh(number)."; +const char doc129[] PROGMEM = "(tanh number)\n" +"Returns tanh(number)."; +const char doc130[] PROGMEM = "(exp number)\n" +"Returns exp(number)."; +const char doc131[] PROGMEM = "(sqrt number)\n" +"Returns sqrt(number)."; +const char doc132[] PROGMEM = "(number [base])\n" +"Returns the logarithm of number to the specified base. If base is omitted it defaults to e."; +const char doc133[] PROGMEM = "(expt number power)\n" +"Returns number raised to the specified power.\n" +"Returns the result as an integer if the arguments are integers and the result will be within range,\n" +"otherwise a floating-point number."; +const char doc134[] PROGMEM = "(ceiling number [divisor])\n" +"Returns ceil(number/divisor). If omitted, divisor is 1."; +const char doc135[] PROGMEM = "(floor number [divisor])\n" +"Returns floor(number/divisor). If omitted, divisor is 1."; +const char doc136[] PROGMEM = "(truncate number)\n" +"Returns t if the argument is a floating-point number."; +const char doc137[] PROGMEM = "(round number)\n" +"Returns t if the argument is a floating-point number."; +const char doc138[] PROGMEM = "(char string n)\n" +"Returns the nth character in a string, counting from zero."; +const char doc139[] PROGMEM = "(char-code character)\n" +"Returns the ASCII code for a character, as an integer."; +const char doc140[] PROGMEM = "(code-char integer)\n" +"Returns the character for the specified ASCII code."; +const char doc141[] PROGMEM = "(characterp item)\n" +"Returns t if the argument is a character and nil otherwise."; +const char doc142[] PROGMEM = "(stringp item)\n" +"Returns t if the argument is a string and nil otherwise."; +const char doc143[] PROGMEM = "(string= string string)\n" +"Tests whether two strings are the same."; +const char doc144[] PROGMEM = "(string< string string)\n" +"Returns t if the first string is alphabetically less than the second string, and nil otherwise. For example:"; +const char doc145[] PROGMEM = "(string> string string)\n" +"Returns t if the first string is alphabetically greater than the second string, and nil otherwise."; +const char doc146[] PROGMEM = "(sort list test)\n" +"Destructively sorts list according to the test function, using an insertion sort, and returns the sorted list."; +const char doc147[] PROGMEM = "(string item)\n" +"Converts its argument to a string."; +const char doc148[] PROGMEM = "(concatenate 'string string*)\n" +"Joins together the strings given in the second and subsequent arguments, and returns a single string."; +const char doc149[] PROGMEM = "(subseq string start [end])\n" +"Returns a substring from a string, from character start to character end-1:"; +const char doc150[] PROGMEM = "(read-from-string string)\n" +"Reads an atom or list from the specified string and returns it."; +const char doc151[] PROGMEM = "(princ-to-string item)\n" +"Prints its argument to a string, and returns the string.\n" +"Characters and strings are printed without quotation marks or escape characters."; +const char doc152[] PROGMEM = "(prin1-to-string item [stream])\n" +"Prints its argument to a string, and returns the string.\n" +"Characters and strings are printed with quotation marks and escape characters,\n" +"in a format that will be suitable for read-from-string."; +const char doc153[] PROGMEM = "(logand [value*])\n" +"Returns the bitwise & of the values."; +const char doc154[] PROGMEM = "(logior [value*])\n" +"Returns the bitwise | of the values."; +const char doc155[] PROGMEM = "(logxor [value*])\n" +"Returns the bitwise ^ of the values."; +const char doc156[] PROGMEM = "(prin1-to-string item [stream])\n" +"Prints its argument to a string, and returns the string.\n" +"Characters and strings are printed with quotation marks and escape characters,\n" +"in a format that will be suitable for read-from-string."; +const char doc157[] PROGMEM = "(ash value shift)\n" +"Returns the result of bitwise shifting value by shift bits. If shift is positive, value is shifted to the left."; +const char doc158[] PROGMEM = "(logbitp bit value)\n" +"Returns t if bit number bit in value is a '1', and nil if it is a '0'."; +const char doc159[] PROGMEM = "(eval form*)\n" +"Evaluates its argument an extra time."; +const char doc160[] PROGMEM = "(globals)\n" +"Returns an association list of global variables and their values."; +const char doc161[] PROGMEM = "(locals)\n" +"Returns an association list of local variables and their values."; +const char doc162[] PROGMEM = "(makunbound symbol)\n" +"Removes the value of the symbol from GlobalEnv and returns the symbol."; +const char doc163[] PROGMEM = "(break)\n" +"Inserts a breakpoint in the program. When evaluated prints Break! and reenters the REPL."; +const char doc164[] PROGMEM = "(read [stream])\n" +"Reads an atom or list from the serial input and returns it.\n" +"If stream is specified the item is read from the specified stream."; +const char doc165[] PROGMEM = "(prin1 item [stream])\n" +"Prints its argument, and returns its value.\n" +"Strings are printed with quotation marks and escape characters."; +const char doc166[] PROGMEM = "(print item [stream])\n" +"Prints its argument with quotation marks and escape characters, on a new line, and followed by a space.\n" +"If stream is specified the argument is printed to the specified stream."; +const char doc167[] PROGMEM = "(princ item [stream])\n" +"Prints its argument, and returns its value.\n" +"Characters and strings are printed without quotation marks or escape characters."; +const char doc168[] PROGMEM = "(terpri [stream])\n" +"Prints a new line, and returns nil.\n" +"If stream is specified the new line is written to the specified stream."; +const char doc169[] PROGMEM = "(read-byte stream)\n" +"Reads a byte from a stream and returns it."; +const char doc170[] PROGMEM = "(read-line [stream])\n" +"Reads characters from the serial input up to a newline character, and returns them as a string, excluding the newline.\n" +"If stream is specified the line is read from the specified stream."; +const char doc171[] PROGMEM = "(write-byte number [stream])\n" +"Writes a byte to a stream."; +const char doc172[] PROGMEM = "(write-string string [stream])\n" +"Writes a string. If stream is specified the string is written to the stream."; +const char doc173[] PROGMEM = "(write-line string [stream])\n" +"Writes a string terminated by a newline character. If stream is specified the string is written to the stream."; +const char doc174[] PROGMEM = "(restart-i2c stream [read-p])\n" +"Restarts an i2c-stream.\n" +"If read-p is nil or omitted the stream is written to.\n" +"If read-p is an integer it specifies the number of bytes to be read from the stream."; +const char doc175[] PROGMEM = "(gc)\n" +"Forces a garbage collection and prints the number of objects collected, and the time taken."; +const char doc176[] PROGMEM = "(room)\n" +"Returns the number of free Lisp cells remaining."; +const char doc177[] PROGMEM = "(save-image [symbol])\n" +"Saves the current uLisp image to non-volatile memory or SD card so it can be loaded using load-image."; +const char doc178[] PROGMEM = "(load-image [filename])\n" +"Loads a saved uLisp image from non-volatile memory or SD card."; +const char doc179[] PROGMEM = "(cls)\n" +"Prints a clear-screen character."; +const char doc180[] PROGMEM = "(pinmode pin mode)\n" +"Sets the input/output mode of an Arduino pin number, and returns nil.\n" +"The mode parameter can be an integer, a keyword, or t or nil."; +const char doc181[] PROGMEM = "(digitalread pin)\n" +"Reads the state of the specified Arduino pin number and returns t (high) or nil (low)."; +const char doc182[] PROGMEM = "(digitalwrite pin state)\n" +"Sets the state of the specified Arduino pin number."; +const char doc183[] PROGMEM = "(analogread pin)\n" +"Reads the specified Arduino analogue pin number and returns the value."; +const char doc184[] PROGMEM = "(analogreference keyword)\n" +"Specifies a keyword to set the analogue reference voltage used for analogue input."; +const char doc185[] PROGMEM = "(analogreadresolution bits)\n" +"Specifies the resolution for the analogue inputs on platforms that support it.\n" +"The default resolution on all platforms is 10 bits."; +const char doc186[] PROGMEM = "(analogwrite pin value)\n" +"Writes the value to the specified Arduino pin number."; +const char doc187[] PROGMEM = "(analogwrite pin value)\n" +"Sets the analogue write resolution."; +const char doc188[] PROGMEM = "(delay number)\n" +"Delays for a specified number of milliseconds."; +const char doc189[] PROGMEM = "(millis)\n" +"Returns the time in milliseconds that uLisp has been running."; +const char doc190[] PROGMEM = "(sleep secs)\n" +"Puts the processor into a low-power sleep mode for secs.\n" +"Only supported on some platforms. On other platforms it does delay(1000*secs)."; +const char doc191[] PROGMEM = "(note [pin] [note] [octave])\n" +"Generates a square wave on pin.\n" +"The argument note represents the note in the well-tempered scale, from 0 to 11,\n" +"where 0 represents C, 1 represents C#, and so on.\n" +"The argument octave can be from 3 to 6. If omitted it defaults to 0."; +const char doc192[] PROGMEM = "(register address [value])\n" +"Reads or writes the value of a peripheral register.\n" +"If value is not specified the function returns the value of the register at address.\n" +"If value is specified the value is written to the register at address and the function returns value."; +const char doc193[] PROGMEM = "(edit 'function)\n" +"Calls the Lisp tree editor to allow you to edit a function definition."; +const char doc194[] PROGMEM = "(pprint item [str])\n" +"Prints its argument, using the pretty printer, to display it formatted in a structured way.\n" +"If str is specified it prints to the specified stream. It returns no value."; +const char doc195[] PROGMEM = "(pprintall [str])\n" +"Pretty-prints the definition of every function and variable defined in the uLisp workspace.\n" +"Is str is specified it prints to the specified stream. It returns no value."; +const char doc196[] PROGMEM = "(format output controlstring arguments*)\n" +"Outputs its arguments formatted according to the format directives in controlstring."; +const char doc197[] PROGMEM = "(require 'symbol)\n" +"Loads the definition of a function defined with defun, or a variable defined with defvar, from the Lisp Library.\n" +"It returns t if it was loaded, or nil if the symbol is already defined or isn't defined in the Lisp Library."; +const char doc198[] PROGMEM = "(list-library)\n" +"Prints a list of the functions defined in the List Library."; +const char doc199[] PROGMEM = "(documentation 'symbol [type])\n" +"Returns the documentation string of a built-in or user-defined function. The type argument is ignored."; +const char doc200[] PROGMEM = "(available stream)\n" +"Returns the number of bytes available for reading from the wifi-stream, or zero if no bytes are available."; +const char doc201[] PROGMEM = "(wifi-server)\n" +"Starts a Wi-Fi server running. It returns nil."; +const char doc202[] PROGMEM = "(wifi-softap ssid [password channel hidden])\n" +"Set up a soft access point to establish a Wi-Fi network.\n" +"Returns the IP address as a string or nil if unsuccessful."; +const char doc203[] PROGMEM = "(connected stream)\n" +"Returns t or nil to indicate if the client on stream is connected."; +const char doc204[] PROGMEM = "(wifi-localip)\n" +"Returns the IP address of the local network as a string."; +const char doc205[] PROGMEM = "(wifi-connect [ssid pass])\n" +"Connects to the Wi-Fi network ssid using password pass. It returns the IP address as a string."; +const char doc206[] PROGMEM = "(draw-pixel x y [colour])\n" +"Draws a pixel at coordinates (x,y) in colour, or white if omitted."; +const char doc207[] PROGMEM = "(draw-line x0 y0 x1 y1 [colour])\n" +"Draws a line from (x0,y0) to (x1,y1) in colour, or white if omitted."; +const char doc208[] PROGMEM = "(draw-rect x y w h [colour])\n" +"Draws an outline rectangle with its top left corner at (x,y), with width w,\n" +"and with height h. The outline is drawn in colour, or white if omitted."; +const char doc209[] PROGMEM = "(fill-rect x y w h [colour])\n" +"Draws a filled rectangle with its top left corner at (x,y), with width w,\n" +"and with height h. The outline is drawn in colour, or white if omitted."; +const char doc210[] PROGMEM = "(draw-circle x y r [colour])\n" +"Draws an outline circle with its centre at (x, y) and with radius r.\n" +"The circle is drawn in colour, or white if omitted."; +const char doc211[] PROGMEM = "(fill-circle x y r [colour])\n" +"Draws a filled circle with its centre at (x, y) and with radius r.\n" +"The circle is drawn in colour, or white if omitted."; +const char doc212[] PROGMEM = "(draw-round-rect x y w h radius [colour])\n" +"Draws an outline rounded rectangle with its top left corner at (x,y), with width w,\n" +"height h, and corner radius radius. The outline is drawn in colour, or white if omitted."; +const char doc213[] PROGMEM = "(fill-round-rect x y w h radius [colour])\n" +"Draws a filled rounded rectangle with its top left corner at (x,y), with width w,\n" +"height h, and corner radius radius. The outline is drawn in colour, or white if omitted."; +const char doc214[] PROGMEM = "(draw-triangle x0 y0 x1 y1 x2 y2 [colour])\n" +"Draws an outline triangle between (x1,y1), (x2,y2), and (x3,y3).\n" +"The outline is drawn in colour, or white if omitted."; +const char doc215[] PROGMEM = "(fill-triangle x0 y0 x1 y1 x2 y2 [colour])\n" +"Draws a filled triangle between (x1,y1), (x2,y2), and (x3,y3).\n" +"The outline is drawn in colour, or white if omitted."; +const char doc216[] PROGMEM = "(draw-char x y char [colour background size])\n" +"Draws the character char with its top left corner at (x,y).\n" +"The character is drawn in a 5 x 7 pixel font in colour against background,\n" +"which default to white and black respectively.\n" +"The character can optionally be scaled by size."; +const char doc217[] PROGMEM = "(set-cursor x y)\n" +"Sets the start point for text plotting to (x, y)."; +const char doc218[] PROGMEM = "(set-text-color colour [background])\n" +"Sets the text colour for text plotted using (with-gfx ...)."; +const char doc219[] PROGMEM = "(set-text-size scale)\n" +"Scales text by the specified size, default 1."; +const char doc220[] PROGMEM = "(set-text-wrap boolean)\n" +"Specified whether text wraps at the right-hand edge of the display; the default is t."; +const char doc221[] PROGMEM = "(fill-screen [colour])\n" +"Fills or clears the screen with colour, default black."; +const char doc222[] PROGMEM = "(set-rotation option)\n" +"Sets the display orientation for subsequent graphics commands; values are 0, 1, 2, or 3."; +const char doc223[] PROGMEM = "(invert-display boolean)\n" +"Mirror-images the display."; + +// Insert your own function documentation here + // Built-in symbol lookup table const tbl_entry_t lookup_table[] PROGMEM = { - { string0, NULL, 0x00 }, - { string1, NULL, 0x00 }, - { string2, NULL, 0x00 }, - { string3, NULL, 0x00 }, - { string4, NULL, 0x00 }, - { string5, NULL, 0x00 }, - { string6, NULL, 0x00 }, - { string7, NULL, 0x00 }, - { string8, NULL, 0x0F }, - { string9, NULL, 0x0F }, - { string10, NULL, 0x0F }, - { string11, NULL, 0x0F }, - { string12, NULL, 0x0F }, - { string13, NULL, 0x00 }, - { string14, sp_quote, 0x11 }, - { string15, sp_or, 0x0F }, - { string16, sp_defun, 0x2F }, - { string17, sp_defvar, 0x13 }, - { string18, sp_setq, 0x2F }, - { string19, sp_loop, 0x0F }, - { string20, sp_return, 0x0F }, - { string21, sp_push, 0x22 }, - { string22, sp_pop, 0x11 }, - { string23, sp_incf, 0x12 }, - { string24, sp_decf, 0x12 }, - { string25, sp_setf, 0x2F }, - { string26, sp_dolist, 0x1F }, - { string27, sp_dotimes, 0x1F }, - { string28, sp_trace, 0x01 }, - { string29, sp_untrace, 0x01 }, - { string30, sp_formillis, 0x1F }, - { string31, sp_time, 0x11 }, - { string32, sp_withoutputtostring, 0x1F }, - { string33, sp_withserial, 0x1F }, - { string34, sp_withi2c, 0x1F }, - { string35, sp_withspi, 0x1F }, - { string36, sp_withsdcard, 0x2F }, - { string37, sp_withgfx, 0x1F }, - { string38, sp_withclient, 0x12 }, - { string39, sp_defcode, 0x0F }, - { string40, NULL, 0x00 }, - { string41, tf_progn, 0x0F }, - { string42, tf_if, 0x23 }, - { string43, tf_cond, 0x0F }, - { string44, tf_when, 0x1F }, - { string45, tf_unless, 0x1F }, - { string46, tf_case, 0x1F }, - { string47, tf_and, 0x0F }, - { string48, NULL, 0x00 }, - { string49, fn_not, 0x11 }, - { string50, fn_not, 0x11 }, - { string51, fn_cons, 0x22 }, - { string52, fn_atom, 0x11 }, - { string53, fn_listp, 0x11 }, - { string54, fn_consp, 0x11 }, - { string55, fn_symbolp, 0x11 }, - { string56, fn_arrayp, 0x11 }, - { string57, fn_boundp, 0x11 }, - { string58, fn_setfn, 0x2F }, - { string59, fn_streamp, 0x11 }, - { string60, fn_eq, 0x22 }, - { string61, fn_car, 0x11 }, - { string62, fn_car, 0x11 }, - { string63, fn_cdr, 0x11 }, - { string64, fn_cdr, 0x11 }, - { string65, fn_caar, 0x11 }, - { string66, fn_cadr, 0x11 }, - { string67, fn_cadr, 0x11 }, - { string68, fn_cdar, 0x11 }, - { string69, fn_cddr, 0x11 }, - { string70, fn_caaar, 0x11 }, - { string71, fn_caadr, 0x11 }, - { string72, fn_cadar, 0x11 }, - { string73, fn_caddr, 0x11 }, - { string74, fn_caddr, 0x11 }, - { string75, fn_cdaar, 0x11 }, - { string76, fn_cdadr, 0x11 }, - { string77, fn_cddar, 0x11 }, - { string78, fn_cdddr, 0x11 }, - { string79, fn_length, 0x11 }, - { string80, fn_arraydimensions, 0x11 }, - { string81, fn_list, 0x0F }, - { string82, fn_makearray, 0x15 }, - { string83, fn_reverse, 0x11 }, - { string84, fn_nth, 0x22 }, - { string85, fn_aref, 0x2F }, - { string86, fn_assoc, 0x22 }, - { string87, fn_member, 0x22 }, - { string88, fn_apply, 0x2F }, - { string89, fn_funcall, 0x1F }, - { string90, fn_append, 0x0F }, - { string91, fn_mapc, 0x2F }, - { string92, fn_mapcar, 0x2F }, - { string93, fn_mapcan, 0x2F }, - { string94, fn_add, 0x0F }, - { string95, fn_subtract, 0x1F }, - { string96, fn_multiply, 0x0F }, - { string97, fn_divide, 0x1F }, - { string98, fn_mod, 0x22 }, - { string99, fn_oneplus, 0x11 }, - { string100, fn_oneminus, 0x11 }, - { string101, fn_abs, 0x11 }, - { string102, fn_random, 0x11 }, - { string103, fn_maxfn, 0x1F }, - { string104, fn_minfn, 0x1F }, - { string105, fn_noteq, 0x1F }, - { string106, fn_numeq, 0x1F }, - { string107, fn_less, 0x1F }, - { string108, fn_lesseq, 0x1F }, - { string109, fn_greater, 0x1F }, - { string110, fn_greatereq, 0x1F }, - { string111, fn_plusp, 0x11 }, - { string112, fn_minusp, 0x11 }, - { string113, fn_zerop, 0x11 }, - { string114, fn_oddp, 0x11 }, - { string115, fn_evenp, 0x11 }, - { string116, fn_integerp, 0x11 }, - { string117, fn_numberp, 0x11 }, - { string118, fn_floatfn, 0x11 }, - { string119, fn_floatp, 0x11 }, - { string120, fn_sin, 0x11 }, - { string121, fn_cos, 0x11 }, - { string122, fn_tan, 0x11 }, - { string123, fn_asin, 0x11 }, - { string124, fn_acos, 0x11 }, - { string125, fn_atan, 0x12 }, - { string126, fn_sinh, 0x11 }, - { string127, fn_cosh, 0x11 }, - { string128, fn_tanh, 0x11 }, - { string129, fn_exp, 0x11 }, - { string130, fn_sqrt, 0x11 }, - { string131, fn_log, 0x12 }, - { string132, fn_expt, 0x22 }, - { string133, fn_ceiling, 0x12 }, - { string134, fn_floor, 0x12 }, - { string135, fn_truncate, 0x12 }, - { string136, fn_round, 0x12 }, - { string137, fn_char, 0x22 }, - { string138, fn_charcode, 0x11 }, - { string139, fn_codechar, 0x11 }, - { string140, fn_characterp, 0x11 }, - { string141, fn_stringp, 0x11 }, - { string142, fn_stringeq, 0x22 }, - { string143, fn_stringless, 0x22 }, - { string144, fn_stringgreater, 0x22 }, - { string145, fn_sort, 0x22 }, - { string146, fn_stringfn, 0x11 }, - { string147, fn_concatenate, 0x1F }, - { string148, fn_subseq, 0x23 }, - { string149, fn_readfromstring, 0x11 }, - { string150, fn_princtostring, 0x11 }, - { string151, fn_prin1tostring, 0x11 }, - { string152, fn_logand, 0x0F }, - { string153, fn_logior, 0x0F }, - { string154, fn_logxor, 0x0F }, - { string155, fn_lognot, 0x11 }, - { string156, fn_ash, 0x22 }, - { string157, fn_logbitp, 0x22 }, - { string158, fn_eval, 0x11 }, - { string159, fn_globals, 0x00 }, - { string160, fn_locals, 0x00 }, - { string161, fn_makunbound, 0x11 }, - { string162, fn_break, 0x00 }, - { string163, fn_read, 0x01 }, - { string164, fn_prin1, 0x12 }, - { string165, fn_print, 0x12 }, - { string166, fn_princ, 0x12 }, - { string167, fn_terpri, 0x01 }, - { string168, fn_readbyte, 0x02 }, - { string169, fn_readline, 0x01 }, - { string170, fn_writebyte, 0x12 }, - { string171, fn_writestring, 0x12 }, - { string172, fn_writeline, 0x12 }, - { string173, fn_restarti2c, 0x12 }, - { string174, fn_gc, 0x00 }, - { string175, fn_room, 0x00 }, - { string176, fn_saveimage, 0x01 }, - { string177, fn_loadimage, 0x01 }, - { string178, fn_cls, 0x00 }, - { string179, fn_pinmode, 0x22 }, - { string180, fn_digitalread, 0x11 }, - { string181, fn_digitalwrite, 0x22 }, - { string182, fn_analogread, 0x11 }, - { string183, fn_analogreference, 0x11 }, - { string184, fn_analogreadresolution, 0x11 }, - { string185, fn_analogwrite, 0x22 }, - { string186, fn_analogwriteresolution, 0x11 }, - { string187, fn_delay, 0x11 }, - { string188, fn_millis, 0x00 }, - { string189, fn_sleep, 0x11 }, - { string190, fn_note, 0x03 }, - { string191, fn_register, 0x12 }, - { string192, fn_edit, 0x11 }, - { string193, fn_pprint, 0x12 }, - { string194, fn_pprintall, 0x01 }, - { string195, fn_format, 0x2F }, - { string196, fn_require, 0x11 }, - { string197, fn_listlibrary, 0x00 }, - { string198, fn_available, 0x11 }, - { string199, fn_wifiserver, 0x00 }, - { string200, fn_wifisoftap, 0x04 }, - { string201, fn_connected, 0x11 }, - { string202, fn_wifilocalip, 0x00 }, - { string203, fn_wificonnect, 0x02 }, - { string204, fn_drawpixel, 0x23 }, - { string205, fn_drawline, 0x45 }, - { string206, fn_drawrect, 0x45 }, - { string207, fn_fillrect, 0x45 }, - { string208, fn_drawcircle, 0x34 }, - { string209, fn_fillcircle, 0x34 }, - { string210, fn_drawroundrect, 0x56 }, - { string211, fn_fillroundrect, 0x56 }, - { string212, fn_drawtriangle, 0x67 }, - { string213, fn_filltriangle, 0x67 }, - { string214, fn_drawchar, 0x36 }, - { string215, fn_setcursor, 0x22 }, - { string216, fn_settextcolor, 0x12 }, - { string217, fn_settextsize, 0x11 }, - { string218, fn_settextwrap, 0x11 }, - { string219, fn_fillscreen, 0x01 }, - { string220, fn_setrotation, 0x11 }, - { string221, fn_invertdisplay, 0x11 }, - { string222, NULL, 0x00 }, - { string223, (fn_ptr_type)LED_BUILTIN, 0 }, - { string224, (fn_ptr_type)HIGH, DIGITALWRITE }, - { string225, (fn_ptr_type)LOW, DIGITALWRITE }, + { string0, NULL, 0x00, doc0 }, + { string1, NULL, 0x00, doc1 }, + { string2, NULL, 0x00, doc2 }, + { string3, NULL, 0x00, doc3 }, + { string4, NULL, 0x00, NULL }, + { string5, NULL, 0x00, NULL }, + { string6, NULL, 0x00, NULL }, + { string7, NULL, 0x00, doc7 }, + { string8, NULL, 0x0F, doc8 }, + { string9, NULL, 0x0F, doc9 }, + { string10, NULL, 0x0F, doc10 }, + { string11, NULL, 0x0F, NULL }, + { string12, NULL, 0x0F, NULL }, + { string13, NULL, 0x00, NULL }, + { string14, sp_quote, 0x11, NULL }, + { string15, sp_or, 0x0F, doc15 }, + { string16, sp_defun, 0x2F, doc16 }, + { string17, sp_defvar, 0x13, doc17 }, + { string18, sp_setq, 0x2F, doc18 }, + { string19, sp_loop, 0x0F, doc19 }, + { string20, sp_return, 0x0F, doc20 }, + { string21, sp_push, 0x22, doc21 }, + { string22, sp_pop, 0x11, doc22 }, + { string23, sp_incf, 0x12, doc23 }, + { string24, sp_decf, 0x12, doc24 }, + { string25, sp_setf, 0x2F, doc25 }, + { string26, sp_dolist, 0x1F, doc26 }, + { string27, sp_dotimes, 0x1F, doc27 }, + { string28, sp_trace, 0x01, doc28 }, + { string29, sp_untrace, 0x01, doc29 }, + { string30, sp_formillis, 0x1F, doc30 }, + { string31, sp_time, 0x11, doc31 }, + { string32, sp_withoutputtostring, 0x1F, doc32 }, + { string33, sp_withserial, 0x1F, doc33 }, + { string34, sp_withi2c, 0x1F, doc34 }, + { string35, sp_withspi, 0x1F, doc35 }, + { string36, sp_withsdcard, 0x2F, doc36 }, + { string37, sp_withgfx, 0x1F, doc37 }, + { string38, sp_withclient, 0x12, doc38 }, + { string39, sp_defcode, 0x0F, doc39 }, + { string40, NULL, 0x00, NULL }, + { string41, tf_progn, 0x0F, doc41 }, + { string42, tf_if, 0x23, doc42 }, + { string43, tf_cond, 0x0F, doc43 }, + { string44, tf_when, 0x1F, doc44 }, + { string45, tf_unless, 0x1F, doc45 }, + { string46, tf_case, 0x1F, doc46 }, + { string47, tf_and, 0x0F, doc47 }, + { string48, tf_help, 0x11, doc48 }, + { string49, NULL, 0x00, NULL }, + { string50, fn_not, 0x11, doc50 }, + { string51, fn_not, 0x11, NULL }, + { string52, fn_cons, 0x22, doc52 }, + { string53, fn_atom, 0x11, doc53 }, + { string54, fn_listp, 0x11, doc54 }, + { string55, fn_consp, 0x11, doc55 }, + { string56, fn_symbolp, 0x11, doc56 }, + { string57, fn_arrayp, 0x11, doc57 }, + { string58, fn_boundp, 0x11, doc58 }, + { string59, fn_setfn, 0x2F, doc59 }, + { string60, fn_streamp, 0x11, doc60 }, + { string61, fn_eq, 0x22, doc61 }, + { string62, fn_car, 0x11, doc62 }, + { string63, fn_car, 0x11, NULL }, + { string64, fn_cdr, 0x11, doc64 }, + { string65, fn_cdr, 0x11, NULL }, + { string66, fn_caar, 0x11, doc66 }, + { string67, fn_cadr, 0x11, doc67 }, + { string68, fn_cadr, 0x11, NULL }, + { string69, fn_cdar, 0x11, doc69 }, + { string70, fn_cddr, 0x11, doc70 }, + { string71, fn_caaar, 0x11, doc71 }, + { string72, fn_caadr, 0x11, doc72 }, + { string73, fn_cadar, 0x11, doc73 }, + { string74, fn_caddr, 0x11, doc74 }, + { string75, fn_caddr, 0x11, NULL }, + { string76, fn_cdaar, 0x11, doc76 }, + { string77, fn_cdadr, 0x11, doc77 }, + { string78, fn_cddar, 0x11, doc78 }, + { string79, fn_cdddr, 0x11, doc79 }, + { string80, fn_length, 0x11, doc80 }, + { string81, fn_arraydimensions, 0x11, doc81 }, + { string82, fn_list, 0x0F, doc82 }, + { string83, fn_makearray, 0x15, doc83 }, + { string84, fn_reverse, 0x11, doc84 }, + { string85, fn_nth, 0x22, doc85 }, + { string86, fn_aref, 0x2F, doc86 }, + { string87, fn_assoc, 0x22, doc87 }, + { string88, fn_member, 0x22, doc88 }, + { string89, fn_apply, 0x2F, doc89 }, + { string90, fn_funcall, 0x1F, doc90 }, + { string91, fn_append, 0x0F, doc91 }, + { string92, fn_mapc, 0x2F, doc92 }, + { string93, fn_mapcar, 0x2F, doc93 }, + { string94, fn_mapcan, 0x2F, doc94 }, + { string95, fn_add, 0x0F, doc95 }, + { string96, fn_subtract, 0x1F, doc96 }, + { string97, fn_multiply, 0x0F, doc97 }, + { string98, fn_divide, 0x1F, doc98 }, + { string99, fn_mod, 0x22, doc99 }, + { string100, fn_oneplus, 0x11, doc100 }, + { string101, fn_oneminus, 0x11, doc101 }, + { string102, fn_abs, 0x11, doc102 }, + { string103, fn_random, 0x11, doc103 }, + { string104, fn_maxfn, 0x1F, doc104 }, + { string105, fn_minfn, 0x1F, doc105 }, + { string106, fn_noteq, 0x1F, doc106 }, + { string107, fn_numeq, 0x1F, doc107 }, + { string108, fn_less, 0x1F, doc108 }, + { string109, fn_lesseq, 0x1F, doc109 }, + { string110, fn_greater, 0x1F, doc110 }, + { string111, fn_greatereq, 0x1F, doc111 }, + { string112, fn_plusp, 0x11, doc112 }, + { string113, fn_minusp, 0x11, doc113 }, + { string114, fn_zerop, 0x11, doc114 }, + { string115, fn_oddp, 0x11, doc115 }, + { string116, fn_evenp, 0x11, doc116 }, + { string117, fn_integerp, 0x11, doc117 }, + { string118, fn_numberp, 0x11, doc118 }, + { string119, fn_floatfn, 0x11, doc119 }, + { string120, fn_floatp, 0x11, doc120 }, + { string121, fn_sin, 0x11, doc121 }, + { string122, fn_cos, 0x11, doc122 }, + { string123, fn_tan, 0x11, doc123 }, + { string124, fn_asin, 0x11, doc124 }, + { string125, fn_acos, 0x11, doc125 }, + { string126, fn_atan, 0x12, doc126 }, + { string127, fn_sinh, 0x11, doc127 }, + { string128, fn_cosh, 0x11, doc128 }, + { string129, fn_tanh, 0x11, doc129 }, + { string130, fn_exp, 0x11, doc130 }, + { string131, fn_sqrt, 0x11, doc131 }, + { string132, fn_log, 0x12, doc132 }, + { string133, fn_expt, 0x22, doc133 }, + { string134, fn_ceiling, 0x12, doc134 }, + { string135, fn_floor, 0x12, doc135 }, + { string136, fn_truncate, 0x12, doc136 }, + { string137, fn_round, 0x12, doc137 }, + { string138, fn_char, 0x22, doc138 }, + { string139, fn_charcode, 0x11, doc139 }, + { string140, fn_codechar, 0x11, doc140 }, + { string141, fn_characterp, 0x11, doc141 }, + { string142, fn_stringp, 0x11, doc142 }, + { string143, fn_stringeq, 0x22, doc143 }, + { string144, fn_stringless, 0x22, doc144 }, + { string145, fn_stringgreater, 0x22, doc145 }, + { string146, fn_sort, 0x22, doc146 }, + { string147, fn_stringfn, 0x11, doc147 }, + { string148, fn_concatenate, 0x1F, doc148 }, + { string149, fn_subseq, 0x23, doc149 }, + { string150, fn_readfromstring, 0x11, doc150 }, + { string151, fn_princtostring, 0x11, doc151 }, + { string152, fn_prin1tostring, 0x11, doc152 }, + { string153, fn_logand, 0x0F, doc153 }, + { string154, fn_logior, 0x0F, doc154 }, + { string155, fn_logxor, 0x0F, doc155 }, + { string156, fn_lognot, 0x11, doc156 }, + { string157, fn_ash, 0x22, doc157 }, + { string158, fn_logbitp, 0x22, doc158 }, + { string159, fn_eval, 0x11, doc159 }, + { string160, fn_globals, 0x00, doc160 }, + { string161, fn_locals, 0x00, doc161 }, + { string162, fn_makunbound, 0x11, doc162 }, + { string163, fn_break, 0x00, doc163 }, + { string164, fn_read, 0x01, doc164 }, + { string165, fn_prin1, 0x12, doc165 }, + { string166, fn_print, 0x12, doc166 }, + { string167, fn_princ, 0x12, doc167 }, + { string168, fn_terpri, 0x01, doc168 }, + { string169, fn_readbyte, 0x02, doc169 }, + { string170, fn_readline, 0x01, doc170 }, + { string171, fn_writebyte, 0x12, doc171 }, + { string172, fn_writestring, 0x12, doc172 }, + { string173, fn_writeline, 0x12, doc173 }, + { string174, fn_restarti2c, 0x12, doc174 }, + { string175, fn_gc, 0x00, doc175 }, + { string176, fn_room, 0x00, doc176 }, + { string177, fn_saveimage, 0x01, doc177 }, + { string178, fn_loadimage, 0x01, doc178 }, + { string179, fn_cls, 0x00, doc179 }, + { string180, fn_pinmode, 0x22, doc180 }, + { string181, fn_digitalread, 0x11, doc181 }, + { string182, fn_digitalwrite, 0x22, doc182 }, + { string183, fn_analogread, 0x11, doc183 }, + { string184, fn_analogreference, 0x11, doc184 }, + { string185, fn_analogreadresolution, 0x11, doc185 }, + { string186, fn_analogwrite, 0x22, doc186 }, + { string187, fn_analogwriteresolution, 0x11, doc187 }, + { string188, fn_delay, 0x11, doc188 }, + { string189, fn_millis, 0x00, doc189 }, + { string190, fn_sleep, 0x11, doc190 }, + { string191, fn_note, 0x03, doc191 }, + { string192, fn_register, 0x12, doc192 }, + { string193, fn_edit, 0x11, doc193 }, + { string194, fn_pprint, 0x12, doc194 }, + { string195, fn_pprintall, 0x01, doc195 }, + { string196, fn_format, 0x2F, doc196 }, + { string197, fn_require, 0x11, doc197 }, + { string198, fn_listlibrary, 0x00, doc198 }, + { string199, fn_documentation, 0x12, doc199 }, + { string200, fn_available, 0x11, doc200 }, + { string201, fn_wifiserver, 0x00, doc201 }, + { string202, fn_wifisoftap, 0x04, doc202 }, + { string203, fn_connected, 0x11, doc203 }, + { string204, fn_wifilocalip, 0x00, doc204 }, + { string205, fn_wificonnect, 0x03, doc205 }, + { string206, fn_drawpixel, 0x23, doc206 }, + { string207, fn_drawline, 0x45, doc207 }, + { string208, fn_drawrect, 0x45, doc208 }, + { string209, fn_fillrect, 0x45, doc209 }, + { string210, fn_drawcircle, 0x34, doc210 }, + { string211, fn_fillcircle, 0x34, doc211 }, + { string212, fn_drawroundrect, 0x56, doc212 }, + { string213, fn_fillroundrect, 0x56, doc213 }, + { string214, fn_drawtriangle, 0x67, doc214 }, + { string215, fn_filltriangle, 0x67, doc215 }, + { string216, fn_drawchar, 0x36, doc216 }, + { string217, fn_setcursor, 0x22, doc217 }, + { string218, fn_settextcolor, 0x12, doc218 }, + { string219, fn_settextsize, 0x11, doc219 }, + { string220, fn_settextwrap, 0x11, doc220 }, + { string221, fn_fillscreen, 0x01, doc221 }, + { string222, fn_setrotation, 0x11, doc222 }, + { string223, fn_invertdisplay, 0x11, doc223 }, + { string224, NULL, 0x00, NULL }, + { string225, (fn_ptr_type)LED_BUILTIN, 0, NULL }, + { string226, (fn_ptr_type)HIGH, DIGITALWRITE, NULL }, + { string227, (fn_ptr_type)LOW, DIGITALWRITE, NULL }, #if defined(CPU_ATSAMD21) - { string226, (fn_ptr_type)INPUT, PINMODE }, - { string227, (fn_ptr_type)INPUT_PULLUP, PINMODE }, - { string228, (fn_ptr_type)INPUT_PULLDOWN, PINMODE }, - { string229, (fn_ptr_type)OUTPUT, PINMODE }, - { string230, (fn_ptr_type)AR_DEFAULT, ANALOGREFERENCE }, - { string231, (fn_ptr_type)AR_INTERNAL1V0, ANALOGREFERENCE }, - { string232, (fn_ptr_type)AR_INTERNAL1V65, ANALOGREFERENCE }, - { string233, (fn_ptr_type)AR_INTERNAL2V23, ANALOGREFERENCE }, - { string234, (fn_ptr_type)AR_EXTERNAL, ANALOGREFERENCE }, - { string235, (fn_ptr_type)&PORT->Group[0].DIR.reg, REGISTER }, - { string236, (fn_ptr_type)&PORT->Group[0].DIRCLR.reg, REGISTER }, - { string237, (fn_ptr_type)&PORT->Group[0].DIRSET.reg, REGISTER }, - { string238, (fn_ptr_type)&PORT->Group[0].DIRTGL.reg, REGISTER }, - { string239, (fn_ptr_type)&PORT->Group[0].OUT.reg, REGISTER }, - { string240, (fn_ptr_type)&PORT->Group[0].OUTCLR.reg, REGISTER }, - { string241, (fn_ptr_type)&PORT->Group[0].OUTSET.reg, REGISTER }, - { string242, (fn_ptr_type)&PORT->Group[0].OUTTGL.reg, REGISTER }, - { string243, (fn_ptr_type)&PORT->Group[0].IN.reg, REGISTER }, - { string244, (fn_ptr_type)&PORT->Group[1].DIR.reg, REGISTER }, - { string245, (fn_ptr_type)&PORT->Group[1].DIRCLR.reg, REGISTER }, - { string246, (fn_ptr_type)&PORT->Group[1].DIRSET.reg, REGISTER }, - { string247, (fn_ptr_type)&PORT->Group[1].DIRTGL.reg, REGISTER }, - { string248, (fn_ptr_type)&PORT->Group[1].OUT.reg, REGISTER }, - { string249, (fn_ptr_type)&PORT->Group[1].OUTCLR.reg, REGISTER }, - { string250, (fn_ptr_type)&PORT->Group[1].OUTSET.reg, REGISTER }, - { string251, (fn_ptr_type)&PORT->Group[1].OUTTGL.reg, REGISTER }, - { string252, (fn_ptr_type)&PORT->Group[1].IN.reg, REGISTER }, - { string253, NULL, 0x00 }, + { string228, (fn_ptr_type)INPUT, PINMODE, NULL }, + { string229, (fn_ptr_type)INPUT_PULLUP, PINMODE, NULL }, + { string230, (fn_ptr_type)INPUT_PULLDOWN, PINMODE, NULL }, + { string231, (fn_ptr_type)OUTPUT, PINMODE, NULL }, + { string232, (fn_ptr_type)AR_DEFAULT, ANALOGREFERENCE, NULL }, + { string233, (fn_ptr_type)AR_INTERNAL1V0, ANALOGREFERENCE, NULL }, + { string234, (fn_ptr_type)AR_INTERNAL1V65, ANALOGREFERENCE, NULL }, + { string235, (fn_ptr_type)AR_INTERNAL2V23, ANALOGREFERENCE, NULL }, + { string236, (fn_ptr_type)AR_EXTERNAL, ANALOGREFERENCE, NULL }, + { string237, (fn_ptr_type)&PORT->Group[0].DIR.reg, REGISTER, NULL }, + { string238, (fn_ptr_type)&PORT->Group[0].DIRCLR.reg, REGISTER, NULL }, + { string239, (fn_ptr_type)&PORT->Group[0].DIRSET.reg, REGISTER, NULL }, + { string240, (fn_ptr_type)&PORT->Group[0].DIRTGL.reg, REGISTER, NULL }, + { string241, (fn_ptr_type)&PORT->Group[0].OUT.reg, REGISTER, NULL }, + { string242, (fn_ptr_type)&PORT->Group[0].OUTCLR.reg, REGISTER, NULL }, + { string243, (fn_ptr_type)&PORT->Group[0].OUTSET.reg, REGISTER, NULL }, + { string244, (fn_ptr_type)&PORT->Group[0].OUTTGL.reg, REGISTER, NULL }, + { string245, (fn_ptr_type)&PORT->Group[0].IN.reg, REGISTER, NULL }, + { string246, (fn_ptr_type)&PORT->Group[1].DIR.reg, REGISTER, NULL }, + { string247, (fn_ptr_type)&PORT->Group[1].DIRCLR.reg, REGISTER, NULL }, + { string248, (fn_ptr_type)&PORT->Group[1].DIRSET.reg, REGISTER, NULL }, + { string249, (fn_ptr_type)&PORT->Group[1].DIRTGL.reg, REGISTER, NULL }, + { string250, (fn_ptr_type)&PORT->Group[1].OUT.reg, REGISTER, NULL }, + { string251, (fn_ptr_type)&PORT->Group[1].OUTCLR.reg, REGISTER, NULL }, + { string252, (fn_ptr_type)&PORT->Group[1].OUTSET.reg, REGISTER, NULL }, + { string253, (fn_ptr_type)&PORT->Group[1].OUTTGL.reg, REGISTER, NULL }, + { string254, (fn_ptr_type)&PORT->Group[1].IN.reg, REGISTER, NULL }, + { string255, NULL, 0x00, NULL }, #elif defined(CPU_ATSAMD51) - { string226, (fn_ptr_type)INPUT, PINMODE }, - { string227, (fn_ptr_type)INPUT_PULLUP, PINMODE }, - { string228, (fn_ptr_type)INPUT_PULLDOWN, PINMODE }, - { string229, (fn_ptr_type)OUTPUT, PINMODE }, - { string230, (fn_ptr_type)AR_DEFAULT, ANALOGREFERENCE }, - { string231, (fn_ptr_type)AR_INTERNAL1V0, ANALOGREFERENCE }, - { string232, (fn_ptr_type)AR_INTERNAL1V1, ANALOGREFERENCE }, - { string233, (fn_ptr_type)AR_INTERNAL1V2, ANALOGREFERENCE }, - { string234, (fn_ptr_type)AR_INTERNAL1V25, ANALOGREFERENCE }, - { string235, (fn_ptr_type)AR_INTERNAL1V65, ANALOGREFERENCE }, - { string236, (fn_ptr_type)AR_INTERNAL2V0, ANALOGREFERENCE }, - { string237, (fn_ptr_type)AR_INTERNAL2V2, ANALOGREFERENCE }, - { string238, (fn_ptr_type)AR_INTERNAL2V23, ANALOGREFERENCE }, - { string239, (fn_ptr_type)AR_INTERNAL2V4, ANALOGREFERENCE }, - { string240, (fn_ptr_type)AR_INTERNAL2V5, ANALOGREFERENCE }, - { string241, (fn_ptr_type)AR_EXTERNAL, ANALOGREFERENCE }, - { string242, (fn_ptr_type)&PORT->Group[0].DIR.reg, REGISTER }, - { string243, (fn_ptr_type)&PORT->Group[0].DIRCLR.reg, REGISTER }, - { string244, (fn_ptr_type)&PORT->Group[0].DIRSET.reg, REGISTER }, - { string245, (fn_ptr_type)&PORT->Group[0].DIRTGL.reg, REGISTER }, - { string246, (fn_ptr_type)&PORT->Group[0].OUT.reg, REGISTER }, - { string247, (fn_ptr_type)&PORT->Group[0].OUTCLR.reg, REGISTER }, - { string248, (fn_ptr_type)&PORT->Group[0].OUTSET.reg, REGISTER }, - { string249, (fn_ptr_type)&PORT->Group[0].OUTTGL.reg, REGISTER }, - { string250, (fn_ptr_type)&PORT->Group[0].IN.reg, REGISTER }, - { string251, (fn_ptr_type)&PORT->Group[1].DIR.reg, REGISTER }, - { string252, (fn_ptr_type)&PORT->Group[1].DIRCLR.reg, REGISTER }, - { string253, (fn_ptr_type)&PORT->Group[1].DIRSET.reg, REGISTER }, - { string254, (fn_ptr_type)&PORT->Group[1].DIRTGL.reg, REGISTER }, - { string255, (fn_ptr_type)&PORT->Group[1].OUT.reg, REGISTER }, - { string256, (fn_ptr_type)&PORT->Group[1].OUTCLR.reg, REGISTER }, - { string257, (fn_ptr_type)&PORT->Group[1].OUTSET.reg, REGISTER }, - { string258, (fn_ptr_type)&PORT->Group[1].OUTTGL.reg, REGISTER }, - { string259, (fn_ptr_type)&PORT->Group[1].IN.reg, REGISTER }, - { string260, NULL, 0x00 }, + { string228, (fn_ptr_type)INPUT, PINMODE, NULL }, + { string229, (fn_ptr_type)INPUT_PULLUP, PINMODE, NULL }, + { string230, (fn_ptr_type)INPUT_PULLDOWN, PINMODE, NULL }, + { string231, (fn_ptr_type)OUTPUT, PINMODE, NULL }, + { string232, (fn_ptr_type)AR_DEFAULT, ANALOGREFERENCE, NULL }, + { string233, (fn_ptr_type)AR_INTERNAL1V0, ANALOGREFERENCE, NULL }, + { string234, (fn_ptr_type)AR_INTERNAL1V1, ANALOGREFERENCE, NULL }, + { string235, (fn_ptr_type)AR_INTERNAL1V2, ANALOGREFERENCE, NULL }, + { string236, (fn_ptr_type)AR_INTERNAL1V25, ANALOGREFERENCE, NULL }, + { string237, (fn_ptr_type)AR_INTERNAL1V65, ANALOGREFERENCE, NULL }, + { string238, (fn_ptr_type)AR_INTERNAL2V0, ANALOGREFERENCE, NULL }, + { string239, (fn_ptr_type)AR_INTERNAL2V2, ANALOGREFERENCE, NULL }, + { string240, (fn_ptr_type)AR_INTERNAL2V23, ANALOGREFERENCE, NULL }, + { string241, (fn_ptr_type)AR_INTERNAL2V4, ANALOGREFERENCE, NULL }, + { string242, (fn_ptr_type)AR_INTERNAL2V5, ANALOGREFERENCE, NULL }, + { string243, (fn_ptr_type)AR_EXTERNAL, ANALOGREFERENCE, NULL }, + { string244, (fn_ptr_type)&PORT->Group[0].DIR.reg, REGISTER, NULL }, + { string245, (fn_ptr_type)&PORT->Group[0].DIRCLR.reg, REGISTER, NULL }, + { string246, (fn_ptr_type)&PORT->Group[0].DIRSET.reg, REGISTER, NULL }, + { string247, (fn_ptr_type)&PORT->Group[0].DIRTGL.reg, REGISTER, NULL }, + { string248, (fn_ptr_type)&PORT->Group[0].OUT.reg, REGISTER, NULL }, + { string249, (fn_ptr_type)&PORT->Group[0].OUTCLR.reg, REGISTER, NULL }, + { string250, (fn_ptr_type)&PORT->Group[0].OUTSET.reg, REGISTER, NULL }, + { string251, (fn_ptr_type)&PORT->Group[0].OUTTGL.reg, REGISTER, NULL }, + { string252, (fn_ptr_type)&PORT->Group[0].IN.reg, REGISTER, NULL }, + { string253, (fn_ptr_type)&PORT->Group[1].DIR.reg, REGISTER, NULL }, + { string254, (fn_ptr_type)&PORT->Group[1].DIRCLR.reg, REGISTER, NULL }, + { string255, (fn_ptr_type)&PORT->Group[1].DIRSET.reg, REGISTER, NULL }, + { string256, (fn_ptr_type)&PORT->Group[1].DIRTGL.reg, REGISTER, NULL }, + { string257, (fn_ptr_type)&PORT->Group[1].OUT.reg, REGISTER, NULL }, + { string258, (fn_ptr_type)&PORT->Group[1].OUTCLR.reg, REGISTER, NULL }, + { string259, (fn_ptr_type)&PORT->Group[1].OUTSET.reg, REGISTER, NULL }, + { string260, (fn_ptr_type)&PORT->Group[1].OUTTGL.reg, REGISTER, NULL }, + { string261, (fn_ptr_type)&PORT->Group[1].IN.reg, REGISTER, NULL }, + { string262, NULL, 0x00, NULL }, #elif defined(CPU_NRF51822) - { string226, (fn_ptr_type)INPUT, PINMODE }, - { string227, (fn_ptr_type)INPUT_PULLUP, PINMODE }, - { string228, (fn_ptr_type)INPUT_PULLDOWN, PINMODE }, - { string229, (fn_ptr_type)OUTPUT, PINMODE }, - { string230, (fn_ptr_type)AR_DEFAULT, ANALOGREFERENCE }, - { string231, (fn_ptr_type)AR_VBG, ANALOGREFERENCE }, - { string232, (fn_ptr_type)AR_SUPPLY_ONE_HALF, ANALOGREFERENCE }, - { string233, (fn_ptr_type)AR_SUPPLY_ONE_THIRD, ANALOGREFERENCE }, - { string234, (fn_ptr_type)AR_EXT0, ANALOGREFERENCE }, - { string235, (fn_ptr_type)AR_EXT1, ANALOGREFERENCE }, - { string236, (fn_ptr_type)&NRF_GPIO->OUT, REGISTER }, - { string237, (fn_ptr_type)&NRF_GPIO->OUTSET, REGISTER }, - { string238, (fn_ptr_type)&NRF_GPIO->OUTCLR, REGISTER }, - { string239, (fn_ptr_type)&NRF_GPIO->IN, REGISTER }, - { string240, (fn_ptr_type)&NRF_GPIO->DIR, REGISTER }, - { string241, (fn_ptr_type)&NRF_GPIO->DIRSET, REGISTER }, - { string242, (fn_ptr_type)&NRF_GPIO->DIRCLR, REGISTER }, - { string243, NULL, 0x00 }, + { string228, (fn_ptr_type)INPUT, PINMODE, NULL }, + { string229, (fn_ptr_type)INPUT_PULLUP, PINMODE, NULL }, + { string230, (fn_ptr_type)INPUT_PULLDOWN, PINMODE, NULL }, + { string231, (fn_ptr_type)OUTPUT, PINMODE, NULL }, + { string232, (fn_ptr_type)AR_DEFAULT, ANALOGREFERENCE, NULL }, + { string233, (fn_ptr_type)AR_VBG, ANALOGREFERENCE, NULL }, + { string234, (fn_ptr_type)AR_SUPPLY_ONE_HALF, ANALOGREFERENCE, NULL }, + { string235, (fn_ptr_type)AR_SUPPLY_ONE_THIRD, ANALOGREFERENCE, NULL }, + { string236, (fn_ptr_type)AR_EXT0, ANALOGREFERENCE, NULL }, + { string237, (fn_ptr_type)AR_EXT1, ANALOGREFERENCE, NULL }, + { string238, (fn_ptr_type)&NRF_GPIO->OUT, REGISTER, NULL }, + { string239, (fn_ptr_type)&NRF_GPIO->OUTSET, REGISTER, NULL }, + { string240, (fn_ptr_type)&NRF_GPIO->OUTCLR, REGISTER, NULL }, + { string241, (fn_ptr_type)&NRF_GPIO->IN, REGISTER, NULL }, + { string242, (fn_ptr_type)&NRF_GPIO->DIR, REGISTER, NULL }, + { string243, (fn_ptr_type)&NRF_GPIO->DIRSET, REGISTER, NULL }, + { string244, (fn_ptr_type)&NRF_GPIO->DIRCLR, REGISTER, NULL }, + { string245, NULL, 0x00, NULL }, #elif defined(CPU_NRF52840) - { string226, (fn_ptr_type)INPUT, PINMODE }, - { string227, (fn_ptr_type)INPUT_PULLUP, PINMODE }, - { string228, (fn_ptr_type)INPUT_PULLDOWN, PINMODE }, - { string229, (fn_ptr_type)OUTPUT, PINMODE }, - { string230, (fn_ptr_type)AR_DEFAULT, ANALOGREFERENCE }, - { string231, (fn_ptr_type)AR_INTERNAL, ANALOGREFERENCE }, - { string232, (fn_ptr_type)AR_INTERNAL_3_0, ANALOGREFERENCE }, - { string233, (fn_ptr_type)AR_INTERNAL_2_4, ANALOGREFERENCE }, - { string234, (fn_ptr_type)AR_INTERNAL_1_8, ANALOGREFERENCE }, - { string235, (fn_ptr_type)AR_INTERNAL_1_2, ANALOGREFERENCE }, - { string236, (fn_ptr_type)AR_VDD4, ANALOGREFERENCE }, - { string237, (fn_ptr_type)&NRF_P0->OUT, REGISTER }, - { string238, (fn_ptr_type)&NRF_P0->OUTSET, REGISTER }, - { string239, (fn_ptr_type)&NRF_P0->OUTCLR, REGISTER }, - { string240, (fn_ptr_type)&NRF_P0->IN, REGISTER }, - { string241, (fn_ptr_type)&NRF_P0->DIR, REGISTER }, - { string242, (fn_ptr_type)&NRF_P0->DIRSET, REGISTER }, - { string243, (fn_ptr_type)&NRF_P0->DIRCLR, REGISTER }, - { string244, (fn_ptr_type)&NRF_P1->OUT, REGISTER }, - { string245, (fn_ptr_type)&NRF_P1->OUTSET, REGISTER }, - { string246, (fn_ptr_type)&NRF_P1->OUTCLR, REGISTER }, - { string247, (fn_ptr_type)&NRF_P1->IN, REGISTER }, - { string248, (fn_ptr_type)&NRF_P1->DIR, REGISTER }, - { string249, (fn_ptr_type)&NRF_P1->DIRSET, REGISTER }, - { string250, (fn_ptr_type)&NRF_P1->DIRCLR, REGISTER }, - { string251, NULL, 0x00 }, + { string228, (fn_ptr_type)INPUT, PINMODE, NULL }, + { string229, (fn_ptr_type)INPUT_PULLUP, PINMODE, NULL }, + { string230, (fn_ptr_type)INPUT_PULLDOWN, PINMODE, NULL }, + { string231, (fn_ptr_type)OUTPUT, PINMODE, NULL }, + { string232, (fn_ptr_type)AR_DEFAULT, ANALOGREFERENCE, NULL }, + { string233, (fn_ptr_type)AR_INTERNAL, ANALOGREFERENCE, NULL }, + { string234, (fn_ptr_type)AR_INTERNAL_3_0, ANALOGREFERENCE, NULL }, + { string235, (fn_ptr_type)AR_INTERNAL_2_4, ANALOGREFERENCE, NULL }, + { string236, (fn_ptr_type)AR_INTERNAL_1_8, ANALOGREFERENCE, NULL }, + { string237, (fn_ptr_type)AR_INTERNAL_1_2, ANALOGREFERENCE, NULL }, + { string238, (fn_ptr_type)AR_VDD4, ANALOGREFERENCE, NULL }, + { string239, (fn_ptr_type)&NRF_P0->OUT, REGISTER, NULL }, + { string240, (fn_ptr_type)&NRF_P0->OUTSET, REGISTER, NULL }, + { string241, (fn_ptr_type)&NRF_P0->OUTCLR, REGISTER, NULL }, + { string242, (fn_ptr_type)&NRF_P0->IN, REGISTER, NULL }, + { string243, (fn_ptr_type)&NRF_P0->DIR, REGISTER, NULL }, + { string244, (fn_ptr_type)&NRF_P0->DIRSET, REGISTER, NULL }, + { string245, (fn_ptr_type)&NRF_P0->DIRCLR, REGISTER, NULL }, + { string246, (fn_ptr_type)&NRF_P1->OUT, REGISTER, NULL }, + { string247, (fn_ptr_type)&NRF_P1->OUTSET, REGISTER, NULL }, + { string248, (fn_ptr_type)&NRF_P1->OUTCLR, REGISTER, NULL }, + { string249, (fn_ptr_type)&NRF_P1->IN, REGISTER, NULL }, + { string250, (fn_ptr_type)&NRF_P1->DIR, REGISTER, NULL }, + { string251, (fn_ptr_type)&NRF_P1->DIRSET, REGISTER, NULL }, + { string252, (fn_ptr_type)&NRF_P1->DIRCLR, REGISTER, NULL }, + { string253, NULL, 0x00, NULL }, #elif defined(CPU_NRF52833) - { string226, (fn_ptr_type)INPUT, PINMODE }, - { string227, (fn_ptr_type)INPUT_PULLUP, PINMODE }, - { string228, (fn_ptr_type)INPUT_PULLDOWN, PINMODE }, - { string229, (fn_ptr_type)OUTPUT, PINMODE }, - { string230, (fn_ptr_type)AR_DEFAULT, ANALOGREFERENCE }, - { string231, (fn_ptr_type)AR_INTERNAL, ANALOGREFERENCE }, - { string232, (fn_ptr_type)AR_VDD4, ANALOGREFERENCE }, - { string233, (fn_ptr_type)&NRF_P0->OUT, REGISTER }, - { string234, (fn_ptr_type)&NRF_P0->OUTSET, REGISTER }, - { string235, (fn_ptr_type)&NRF_P0->OUTCLR, REGISTER }, - { string236, (fn_ptr_type)&NRF_P0->IN, REGISTER }, - { string237, (fn_ptr_type)&NRF_P0->DIR, REGISTER }, - { string238, (fn_ptr_type)&NRF_P0->DIRSET, REGISTER }, - { string239, (fn_ptr_type)&NRF_P0->DIRCLR, REGISTER }, - { string240, (fn_ptr_type)&NRF_P1->OUT, REGISTER }, - { string241, (fn_ptr_type)&NRF_P1->OUTSET, REGISTER }, - { string242, (fn_ptr_type)&NRF_P1->OUTCLR, REGISTER }, - { string243, (fn_ptr_type)&NRF_P1->IN, REGISTER }, - { string244, (fn_ptr_type)&NRF_P1->DIR, REGISTER }, - { string245, (fn_ptr_type)&NRF_P1->DIRSET, REGISTER }, - { string246, (fn_ptr_type)&NRF_P1->DIRCLR, REGISTER }, - { string247, NULL, 0x00 }, + { string228, (fn_ptr_type)INPUT, PINMODE, NULL }, + { string229, (fn_ptr_type)INPUT_PULLUP, PINMODE, NULL }, + { string230, (fn_ptr_type)INPUT_PULLDOWN, PINMODE, NULL }, + { string231, (fn_ptr_type)OUTPUT, PINMODE, NULL }, + { string232, (fn_ptr_type)AR_DEFAULT, ANALOGREFERENCE, NULL }, + { string233, (fn_ptr_type)AR_INTERNAL, ANALOGREFERENCE, NULL }, + { string234, (fn_ptr_type)AR_VDD4, ANALOGREFERENCE, NULL }, + { string235, (fn_ptr_type)&NRF_P0->OUT, REGISTER, NULL }, + { string236, (fn_ptr_type)&NRF_P0->OUTSET, REGISTER, NULL }, + { string237, (fn_ptr_type)&NRF_P0->OUTCLR, REGISTER, NULL }, + { string238, (fn_ptr_type)&NRF_P0->IN, REGISTER, NULL }, + { string239, (fn_ptr_type)&NRF_P0->DIR, REGISTER, NULL }, + { string240, (fn_ptr_type)&NRF_P0->DIRSET, REGISTER, NULL }, + { string241, (fn_ptr_type)&NRF_P0->DIRCLR, REGISTER, NULL }, + { string242, (fn_ptr_type)&NRF_P1->OUT, REGISTER, NULL }, + { string243, (fn_ptr_type)&NRF_P1->OUTSET, REGISTER, NULL }, + { string244, (fn_ptr_type)&NRF_P1->OUTCLR, REGISTER, NULL }, + { string245, (fn_ptr_type)&NRF_P1->IN, REGISTER, NULL }, + { string246, (fn_ptr_type)&NRF_P1->DIR, REGISTER, NULL }, + { string247, (fn_ptr_type)&NRF_P1->DIRSET, REGISTER, NULL }, + { string248, (fn_ptr_type)&NRF_P1->DIRCLR, REGISTER, NULL }, + { string249, NULL, 0x00, NULL }, #elif defined(CPU_iMXRT1062) - { string226, (fn_ptr_type)INPUT, PINMODE }, - { string227, (fn_ptr_type)INPUT_PULLUP, PINMODE }, - { string228, (fn_ptr_type)INPUT_PULLDOWN, PINMODE }, - { string229, (fn_ptr_type)OUTPUT, PINMODE }, - { string230, (fn_ptr_type)OUTPUT_OPENDRAIN, PINMODE }, - { string231, NULL, 0x00 }, + { string228, (fn_ptr_type)INPUT, PINMODE, NULL }, + { string229, (fn_ptr_type)INPUT_PULLUP, PINMODE, NULL }, + { string230, (fn_ptr_type)INPUT_PULLDOWN, PINMODE, NULL }, + { string231, (fn_ptr_type)OUTPUT, PINMODE, NULL }, + { string232, (fn_ptr_type)OUTPUT_OPENDRAIN, PINMODE, NULL }, + { string233, NULL, 0x00, NULL }, #elif defined(CPU_MAX32620) - { string226, (fn_ptr_type)INPUT, PINMODE }, - { string227, (fn_ptr_type)INPUT_PULLUP, PINMODE }, - { string228, (fn_ptr_type)OUTPUT, PINMODE }, - { string229, (fn_ptr_type)DEFAULT, ANALOGREFERENCE }, - { string230, (fn_ptr_type)EXTERNAL, ANALOGREFERENCE }, - { string231, NULL, 0x00 }, + { string228, (fn_ptr_type)INPUT, PINMODE, NULL }, + { string229, (fn_ptr_type)INPUT_PULLUP, PINMODE, NULL }, + { string230, (fn_ptr_type)OUTPUT, PINMODE, NULL }, + { string231, (fn_ptr_type)DEFAULT, ANALOGREFERENCE, NULL }, + { string232, (fn_ptr_type)EXTERNAL, ANALOGREFERENCE, NULL }, + { string233, NULL, 0x00, NULL }, #elif defined(CPU_RP2040) - { string226, (fn_ptr_type)INPUT, PINMODE }, - { string227, (fn_ptr_type)INPUT_PULLUP, PINMODE }, - { string228, (fn_ptr_type)INPUT_PULLDOWN, PINMODE }, - { string229, (fn_ptr_type)OUTPUT, PINMODE }, - { string230, (fn_ptr_type)(SIO_BASE+SIO_GPIO_IN_OFFSET), REGISTER }, - { string231, (fn_ptr_type)(SIO_BASE+SIO_GPIO_OUT_OFFSET), REGISTER }, - { string232, (fn_ptr_type)(SIO_BASE+SIO_GPIO_OUT_SET_OFFSET), REGISTER }, - { string233, (fn_ptr_type)(SIO_BASE+SIO_GPIO_OUT_CLR_OFFSET), REGISTER }, - { string234, (fn_ptr_type)(SIO_BASE+SIO_GPIO_OUT_XOR_OFFSET), REGISTER }, - { string235, (fn_ptr_type)(SIO_BASE+SIO_GPIO_OE_OFFSET), REGISTER }, - { string236, (fn_ptr_type)(SIO_BASE+SIO_GPIO_OE_SET_OFFSET), REGISTER }, - { string237, (fn_ptr_type)(SIO_BASE+SIO_GPIO_OE_CLR_OFFSET), REGISTER }, - { string238, (fn_ptr_type)(SIO_BASE+SIO_GPIO_OE_XOR_OFFSET), REGISTER }, - { string239, NULL, 0x00 }, + { string228, (fn_ptr_type)INPUT, PINMODE, NULL }, + { string229, (fn_ptr_type)INPUT_PULLUP, PINMODE, NULL }, + { string230, (fn_ptr_type)INPUT_PULLDOWN, PINMODE, NULL }, + { string231, (fn_ptr_type)OUTPUT, PINMODE, NULL }, + { string232, (fn_ptr_type)(SIO_BASE+SIO_GPIO_IN_OFFSET), REGISTER, NULL }, + { string233, (fn_ptr_type)(SIO_BASE+SIO_GPIO_OUT_OFFSET), REGISTER, NULL }, + { string234, (fn_ptr_type)(SIO_BASE+SIO_GPIO_OUT_SET_OFFSET), REGISTER, NULL }, + { string235, (fn_ptr_type)(SIO_BASE+SIO_GPIO_OUT_CLR_OFFSET), REGISTER, NULL }, + { string236, (fn_ptr_type)(SIO_BASE+SIO_GPIO_OUT_XOR_OFFSET), REGISTER, NULL }, + { string237, (fn_ptr_type)(SIO_BASE+SIO_GPIO_OE_OFFSET), REGISTER, NULL }, + { string238, (fn_ptr_type)(SIO_BASE+SIO_GPIO_OE_SET_OFFSET), REGISTER, NULL }, + { string239, (fn_ptr_type)(SIO_BASE+SIO_GPIO_OE_CLR_OFFSET), REGISTER, NULL }, + { string240, (fn_ptr_type)(SIO_BASE+SIO_GPIO_OE_XOR_OFFSET), REGISTER, NULL }, + { string241, NULL, 0x00, NULL }, #endif // Insert your own table entries here @@ -5755,6 +6341,10 @@ void checkminmax (builtin_t name, int nargs) { if ((minmax & 0x0f) != 0x0f && nargs>(minmax & 0x0f)) error2(name, toomanyargs); } +char *lookupdoc (builtin_t name) { + return (char*)lookup_table[name].doc; +} + void testescape () { if (Serial.read() == '~') error2(NIL, PSTR("escape!")); } @@ -6472,7 +7062,7 @@ void setup () { initenv(); initsleep(); initgfx(); - pfstring(PSTR("uLisp 4.2 "), pserial); pln(pserial); + pfstring(PSTR("uLisp 4.3 "), pserial); pln(pserial); } // Read/Evaluate/Print loop @@ -6526,4 +7116,4 @@ void loop () { client.stop(); #endif repl(NULL); -} +} \ No newline at end of file