screenshot extension works
This commit is contained in:
parent
066e7582c9
commit
0e41f059c6
4
ext.lisp
4
ext.lisp
|
@ -6,6 +6,10 @@
|
|||
;; Quick shorthand
|
||||
(defun dir () (directory))
|
||||
|
||||
;; File manipulation
|
||||
(defun file-read (filename) (with-sd-card (str filename) (read str)))
|
||||
(defun file-append (filename data) (with-sd-card (str filename 2) (print data str)))
|
||||
(defun file-write (filename data) (with-sd-card (str filename 2) (print data str)))
|
||||
|
||||
;; Maths
|
||||
(defun sq (x) (* x x))
|
||||
|
|
|
@ -12,7 +12,7 @@ object *fn_savescreen (object *args, object *env) {
|
|||
(void) env;
|
||||
#if defined(sdcardsupport)
|
||||
object *arg = checkstring(first(args));
|
||||
sd_begin();
|
||||
SDBegin();
|
||||
File file;
|
||||
char buffer[BUFFERSIZE];
|
||||
file = SD.open(MakeFilename(arg, buffer), FILE_WRITE);
|
||||
|
@ -88,7 +88,7 @@ const char stringsavescreen[] PROGMEM = "save-screen";
|
|||
const char doc_sym_def[] PROGMEM = "(symbol-def symbol [str])\n"
|
||||
"Prints the definition of a symbol (variable or function) defined in ulisp using the pretty printer."
|
||||
"If str is specified it prints to the specified stream. It returns no value.";
|
||||
|
||||
//
|
||||
const char docsavescreen[] PROGMEM = "(save-screen filename)\n"
|
||||
"Saves an image of the text screen as a BMP file on the SD card.";
|
||||
|
||||
|
|
|
@ -6,7 +6,12 @@
|
|||
|
||||
|
||||
const char LispLibrary[] PROGMEM =
|
||||
"(defun load-package (filename) (with-sd-card (str filename) (loop (let (ln (eval (read str))) (unless ln (return nothing))))))"
|
||||
"(defun load-package (filename)"
|
||||
" (with-sd-card (str filename)"
|
||||
" (loop"
|
||||
" (let ((ln (eval (read str))))"
|
||||
" (unless ln (return nothing))))))"
|
||||
|
||||
"(defun save-package (filename list) (with-sd-card (str filename 2) (dolist (f list) (symbol-def f str))))"
|
||||
"(defun add-to-package (filename list) (with-sd-card (str filename 1) (dolist (f list) (symbol-def f str))))"
|
||||
;
|
||||
|
|
Loading…
Reference in a new issue