diff options
author | trsaunders <trsaunders@gmail.com> | 2012-07-24 17:22:50 +0100 |
---|---|---|
committer | trsaunders <trsaunders@gmail.com> | 2012-07-24 17:22:50 +0100 |
commit | e4094ad4681e2d73c1a22c60a7dd16835f9b7287 (patch) | |
tree | 8db74abf04b378191b7d036011b09ed32bb58ebc /glcd/glcdWorker.h | |
parent | 4ba0eb23a7d41a0f2afee3fd64b9ed56684bf865 (diff) | |
parent | 8d7a588c5185558fdc85da867a37ecf09026bb3c (diff) | |
download | uGFX-e4094ad4681e2d73c1a22c60a7dd16835f9b7287.tar.gz uGFX-e4094ad4681e2d73c1a22c60a7dd16835f9b7287.tar.bz2 uGFX-e4094ad4681e2d73c1a22c60a7dd16835f9b7287.zip |
get pixel return value implemented in struct
Diffstat (limited to 'glcd/glcdWorker.h')
-rw-r--r-- | glcd/glcdWorker.h | 124 |
1 files changed, 124 insertions, 0 deletions
diff --git a/glcd/glcdWorker.h b/glcd/glcdWorker.h new file mode 100644 index 00000000..40e315b5 --- /dev/null +++ b/glcd/glcdWorker.h @@ -0,0 +1,124 @@ +#ifndef GLCD_WORKER_H +#define GLCD_WORKER_H + +#define GLCD_WORKER_SIZE 512 + +enum glcd_action { GLCD_SET_POWERMODE, + GLCD_SET_ORIENTATION, + GLCD_SET_WINDOW, + GLCD_FILL_AREA, + GLCD_WRITE_AREA, + GLCD_CLEAR, + GLCD_GET_PIXEL_COLOR, + GLCD_DRAW_PIXEL, + GLCD_WRITE_STREAM_START, + GLCD_WRITE_STREAM_STOP, + GLCD_WRITE_STREAM, + GLCD_VERTICAL_SCROLL, + }; + +enum glcd_result { GLCD_DONE, + GLCD_FAILED, + GLCD_PROGRESS, + }; + +typedef enum glcd_result glcd_result_t; + +#define _glcd_msg_base \ + enum glcd_action action; + +struct glcd_msg_base { + _glcd_msg_base +}; + +struct glcd_msg_powermode { + _glcd_msg_base + + uint8_t powermode; +}; + +struct glcd_msg_orientation { + _glcd_msg_base + + uint8_t newOrientation; +}; + +struct glcd_msg_set_window { + _glcd_msg_base + + uint16_t x0; + uint16_t y0; + uint16_t x1; + uint16_t y1; +}; + +struct glcd_msg_fill_area { + _glcd_msg_base + + uint16_t x0; + uint16_t y0; + uint16_t x1; + uint16_t y1; + uint16_t color; +}; + +struct glcd_msg_write_area { + _glcd_msg_base + + uint16_t x0; + uint16_t y0; + uint16_t x1; + uint16_t y1; + uint16_t *buffer; + size_t size; +}; + +struct glcd_msg_clear { + _glcd_msg_base + + uint16_t color; +}; + +struct glcd_msg_get_pixel_color { + _glcd_msg_base + + uint16_t x; + uint16_t y; + uint16_t color; +}; + +struct glcd_msg_draw_pixel { + _glcd_msg_base + + uint16_t x; + uint16_t y; + uint16_t color; +}; + +struct glcd_msg_write_stream_start { + _glcd_msg_base +}; + +struct glcd_msg_write_stream_stop { + _glcd_msg_base +}; + +struct glcd_msg_write_stream { + _glcd_msg_base + + uint16_t *buffer; + uint16_t size; +}; + +struct glcd_msg_vertical_scroll { + _glcd_msg_base + + uint16_t x0; + uint16_t y0; + uint16_t x1; + uint16_t y1; + int16_t lines; +}; + +#endif + |