#include "led.h" /// Return the number of frames that should be /// painted between updates char getFramesPerUpdate() { return 10; } /// Load the next frame into the provided buffer. /// The frameSeq parameter contains the number of /// frames that have been displayed since startup. /// The lines appear sequentially in the buffer, so /// that the layout is: /// | line0 | line1 | line2 | ... | line7 | /// pFrame pFrame+4 pFrame+8 ... pFrame+28 void getNextFrame( unsigned char* pFrame, unsigned int frameSeq ) { unsigned char pattern = 0x55; if (frameSeq % 2 == 0) { pattern = 0xaa; } int i; for (i = 0; i < 32; i++) { pFrame[i] = pattern; } }