Skip to content

Commit e3a8d5a

Browse files
Laurence BankLaurence Bank
authored andcommitted
first working version of command bytes
1 parent e3db682 commit e3a8d5a

2 files changed

Lines changed: 139 additions & 168 deletions

File tree

src/OneBitDisplay.h

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -142,16 +142,14 @@ enum {
142142
ANGLE_FLIPY
143143
};
144144
// Bytewise commands for rendering scenes
145+
// stored in the lower 4 bits of the command byte
146+
// the upper 4 bits can hold single bit parameters
145147
#define OBD_FILL 0
146-
#define OBD_SETCOLOR 1
147-
#define OBD_SETFONT 2
148-
#define OBD_DRAWTEXT 3
149-
#define OBD_DRAWLINE 4
150-
#define OBD_DRAWRECT 5
151-
#define OBD_DRAWRECTFILLED 6
152-
#define OBD_DRAWELLIPSE 7
153-
#define OBD_DRAWELLIPSEFILLED 8
154-
#define OBD_DRAWSPRITE 9
148+
#define OBD_DRAWTEXT 1
149+
#define OBD_DRAWLINE 2
150+
#define OBD_DRAWRECT 3
151+
#define OBD_DRAWELLIPSE 4
152+
#define OBD_DRAWSPRITE 5
155153

156154
// Return value from obd obdI2CInit()
157155
enum {
@@ -320,7 +318,7 @@ int obdDrawGFX(OBDISP *pOBD, uint8_t *pSrc, int iSrcCol, int iSrcRow, int iDestC
320318
// and execute the drawing instructions on the current display/buffer
321319
// Optionally render on backbuffer or physical display
322320
//
323-
void obdExecCommands(OBDISP *pSrc, OBDISP *pOBD, int bRender);
321+
void obdExecCommands(uint8_t *pData, int iLen, OBDISP *pOBD, int bRender);
324322
//
325323
// Return the number of bytes accumulated as commands
326324
//

0 commit comments

Comments
 (0)