summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/include/fb/framebuffer.h
diff options
context:
space:
mode:
authorMarcel `sdrfnord` McKinnon <sdrfnord@gmx.de>2013-04-05 23:15:18 +0200
committerMartin Hauke <mardnh@gmx.de>2020-08-04 19:57:45 +0200
commitfd32afbe26db135be05943c7c26883e5b48e2790 (patch)
treeb9f6f3704db240bd476dc3bc5e5f580e1484d6e4 /src/target/firmware/include/fb/framebuffer.h
parentbedfdc9b62484e481c8de7850951b14fb165b5e2 (diff)
firmware/fb: Implemtented fb_bw8_line and fb_set_p(uint16_t x,uint16_t y)
Diffstat (limited to 'src/target/firmware/include/fb/framebuffer.h')
-rw-r--r--src/target/firmware/include/fb/framebuffer.h8
1 files changed, 7 insertions, 1 deletions
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);