IPS(Interpreter for Process Structures) for mbed
Dependencies: ConfigFile FATFileSystem mbed
IPS port from linux/unix version.
mbed_blinky.ips
0 VAR led1 " LED1 " DigitalOut led1 ! : main ANFANG 1 JA? 1 led1 @ write 200 wait_ms 0 led1 @ write 200 wait_ms DANN/NOCHMAL ; main
- ips-02.tgz - ips for linux/unix
- ipsdoc.zip - document
- https://bitbucket.org/va009039/ips/
Diff: VideoRAM.h
- Revision:
- 1:e74530ad6b9e
- Child:
- 2:908338b1151a
diff -r 25fe9b2fe195 -r e74530ad6b9e VideoRAM.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VideoRAM.h Wed May 13 18:39:01 2015 +0900 @@ -0,0 +1,34 @@ +#pragma once + +class VideoRAM { +public: + VideoRAM(RawSerial& pc):_pc(pc),x(0),y(0) { + _puts("\x1b[2J"); // erase + } + void vpoke(uint16_t i, uint8_t b) { + if (i < 1024) { + if (x != i%64 || y != i/64) { + x = i%64; + y = i/64; + char buf[16]; + snprintf(buf, sizeof(buf), "\x1b[%d;%dH", y+1, x+1) ; // locate + _puts(buf); + } + _putc(b & 0x7f); + x++; + } + } + +private: + void _puts(const char* s) { + while(*s) { + _putc(*s++); + } + } + void _putc(int c) { + _pc.putc(c); + } + RawSerial& _pc; + uint16_t x, y; +}; +