ugfx/glcd/glcdWorker.h

134 lines
1.8 KiB
C
Raw Normal View History

2012-07-23 17:54:34 +00:00
#ifndef GLCD_WORKER_H
#define GLCD_WORKER_H
2012-07-16 01:05:12 +00:00
2012-07-25 17:37:46 +00:00
#include "glcd.h"
2012-07-16 02:04:36 +00:00
#define GLCD_WORKER_SIZE 512
2012-07-16 01:05:12 +00:00
2012-07-16 23:01:57 +00:00
enum glcd_action { GLCD_SET_POWERMODE,
2012-07-16 01:56:46 +00:00
GLCD_SET_ORIENTATION,
GLCD_SET_WINDOW,
GLCD_FILL_AREA,
GLCD_WRITE_AREA,
GLCD_CLEAR,
GLCD_GET_PIXEL_COLOR,
2012-07-16 01:05:12 +00:00
GLCD_DRAW_PIXEL,
2012-07-16 01:56:46 +00:00
GLCD_WRITE_STREAM_START,
GLCD_WRITE_STREAM_STOP,
GLCD_WRITE_STREAM,
2012-07-18 02:22:28 +00:00
GLCD_VERTICAL_SCROLL,
2012-07-25 17:37:46 +00:00
GLCD_DRAW_CHAR,
2012-07-16 01:05:12 +00:00
};
#define _glcd_msg_base \
enum glcd_action action;
2012-07-16 01:05:12 +00:00
struct glcd_msg_base {
_glcd_msg_base
};
2012-07-16 01:56:46 +00:00
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;
};
2012-07-16 01:05:12 +00:00
struct glcd_msg_draw_pixel {
_glcd_msg_base
uint16_t x;
uint16_t y;
uint16_t color;
};
2012-07-16 01:56:46 +00:00
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;
};
2012-07-18 02:22:28 +00:00
struct glcd_msg_vertical_scroll {
_glcd_msg_base
uint16_t x0;
uint16_t y0;
uint16_t x1;
uint16_t y1;
int16_t lines;
};
2012-07-25 17:37:46 +00:00
struct glcd_msg_draw_char {
_glcd_msg_base;
uint16_t cx;
uint16_t cy;
uint16_t color;
uint16_t bkcolor;
uint16_t ret_width;
char c;
2012-07-25 17:43:45 +00:00
font_t font;
2012-07-25 17:37:46 +00:00
bool_t tpText;
};
2012-07-16 01:05:12 +00:00
#endif