tdeck-ulisp/ext.lisp
2024-11-11 16:27:44 -06:00

16 lines
479 B
Common Lisp

;; start is the intended function to load this ext.lisp file
;; I use `(save-image 'start)`
(defun start () (load-package "ext.lisp"))
;; 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))