some progress
This commit is contained in:
29
displayTest.c
Normal file
29
displayTest.c
Normal file
@ -0,0 +1,29 @@
|
||||
#include <stdlib.h>
|
||||
#include "canvas.h"
|
||||
#include "PontCoopScheduler.h"
|
||||
|
||||
|
||||
static canvas_t *canvas;
|
||||
static uint8_t lastPixel = 0xff;
|
||||
static uint8_t currentPixel = 0;
|
||||
|
||||
void displayTestExec(void *args) {
|
||||
if (lastPixel != 0xff) {
|
||||
*((canvas->canvas)+lastPixel) = 0x80;
|
||||
}
|
||||
|
||||
lastPixel = currentPixel;
|
||||
*((canvas->canvas)+currentPixel) = 0x81;
|
||||
currentPixel++;
|
||||
if (currentPixel >= canvas->size) {
|
||||
currentPixel = 0;
|
||||
}
|
||||
|
||||
canvasShow();
|
||||
}
|
||||
|
||||
void displayTestInit() {
|
||||
canvas = canvasGet();
|
||||
schAdd(displayTestExec, NULL, 0, 50);
|
||||
}
|
||||
|
Reference in New Issue
Block a user