summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/include/fb
diff options
context:
space:
mode:
Diffstat (limited to 'src/target/firmware/include/fb')
-rw-r--r--src/target/firmware/include/fb/fb_bw8.h7
-rw-r--r--src/target/firmware/include/fb/framebuffer.h8
2 files changed, 11 insertions, 4 deletions
diff --git a/src/target/firmware/include/fb/fb_bw8.h b/src/target/firmware/include/fb/fb_bw8.h
index d84f91a7..db0b31a5 100644
--- a/src/target/firmware/include/fb/fb_bw8.h
+++ b/src/target/firmware/include/fb/fb_bw8.h
@@ -6,9 +6,9 @@
are common to similar organized displays. */
/*
- Sketch of Memory Layout
+ Sketch of Memory Layout
Left Upper Corner of Display
-
+
col0 col2
col1
+-------------
@@ -22,7 +22,7 @@
...
Backing store (and internal display memory?) looks like...
-
+
uint8_t mem[] = { A, B, C, .... Q, R, S, ... }
We work on a in-memory copy of the framebuffer and only
@@ -45,6 +45,7 @@ extern struct fb_bw8 *fb_bw8; /* symbol defined by the specific LCD driver */
extern void fb_bw8_clear();
extern void fb_bw8_boxto(uint16_t x,uint16_t y); /* draw a box from cursor to x,y */
extern void fb_bw8_lineto(uint16_t x,uint16_t y); /* draw a line from cursor to x,y */
+extern void fb_bw8_set_p(uint16_t x,uint16_t y);
extern int fb_bw8_putstr(char *str,int maxwidth);
diff --git a/src/target/firmware/include/fb/framebuffer.h b/src/target/firmware/include/fb/framebuffer.h
index e765b36d..8a565659 100644
--- a/src/target/firmware/include/fb/framebuffer.h
+++ b/src/target/firmware/include/fb/framebuffer.h
@@ -8,7 +8,7 @@
/* if a color is "special", then the RGB components most likely
don't make sense. Use "special" colours when you have to
mask out bits with transparency or you have to encode
- colours in a fixed color palette... */
+ colours in a fixed color palette ... */
#define FB_COLOR_WHITE 0x00ffffffU
#define FB_COLOR_BLACK 0x00000000U
@@ -31,6 +31,7 @@ struct framebuffer {
char name[8]; // keep it short!
void (*init)(); // (re)initialize
void (*clear)(); // clear display
+ void (*set_p)(uint16_t x,uint16_t y); // set pixel to fg color
void (*boxto)(uint16_t x,uint16_t y); // draw box to xy
void (*lineto)(uint16_t x,uint16_t y); // draw line to xy
int (*putstr)(char *c,int maxwidth); // put text in current font to fb
@@ -66,6 +67,11 @@ fb_lineto(uint16_t x,uint16_t y){
framebuffer->lineto(x,y);
}
+static inline void
+fb_set_p(uint16_t x,uint16_t y){
+ framebuffer->set_p(x,y);
+}
+
static inline int
fb_putstr(char *str,int maxwidth){
return framebuffer->putstr(str,maxwidth);