adding inverted color commands
This commit is contained in:
10
README.md
10
README.md
@@ -28,6 +28,10 @@ cmake --build build
|
||||
|
||||
After building, flash the firmware to your Pico (e.g. by copying `build/eink_api.uf2` to the Pico's mass storage device or using `picotool load build/eink_api.uf2`).
|
||||
|
||||
### Build/Flash Helper Script
|
||||
|
||||
Run `scripts/flash_and_connect.sh [/dev/ttyACM0]` to configure CMake, compile the firmware, optionally flash it with `picotool`, and open a serial session (defaults to `screen` at 115200 baud). Set `PICO_SERIAL` to override the port, `PICO_BAUD` for a different baud rate, and `SERIAL_CLIENT` if you prefer `picocom` or `minicom`. If `picotool` is missing, the script will remind you to copy the UF2 to the board manually.
|
||||
|
||||
## Usage
|
||||
|
||||
1. Open a serial terminal (115200 baud) over the Pico's USB CDC interface.
|
||||
@@ -44,14 +48,18 @@ After building, flash the firmware to your Pico (e.g. by copying `build/eink_api
|
||||
| `display` | Pushes the framebuffer to the panel (requires display on). |
|
||||
| `draw_test` | Draws a hard-coded Waveshare demo pattern. |
|
||||
| `draw_text x y text` | Writes `text` at `(x,y)` using the current font. |
|
||||
| `draw_text_white x y text` | Writes inverted white text at `(x,y)` with a black background. |
|
||||
| `draw_point x y` | Draws a black point at the given coordinates. |
|
||||
| `draw_line x1 y1 x2 y2` | Draws a black line between two points. |
|
||||
| `draw_sine x y length amplitude frequency` | Draws a sine-wave curve of `length` pixels starting at `(x,y)`, oscillating by `amplitude`, with the given number of cycles. |
|
||||
| `draw_rectangle x1 y1 x2 y2` | Draws an empty rectangle. |
|
||||
| `draw_rectangle_fill x1 y1 x2 y2` | Draws a filled rectangle. |
|
||||
| `draw_circle x y r` | Draws an empty circle with radius `r`. |
|
||||
| `draw_circle_fill x y r` | Draws a filled circle with radius `r`. |
|
||||
| `draw_num x y num` | Draws `num` using the default numeric font. |
|
||||
| `set_pixel x y color` | Sets a single pixel to `color` (0=white, 1=black). |
|
||||
| `close` | Sends the panel to deep sleep and frees the framebuffer. |
|
||||
| `editor` | Enables editor mode; text typed is rendered live on-screen until inactivity. |
|
||||
| `editor [0|1]` | Enables editor mode; default uses white background, non-zero switches to white text on black. |
|
||||
|
||||
## Notes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user