im trying to build a gaming library based on the Gamebuino handheld system that's simple enough to allow any one to make their own games. the original library uses UNO and a nokia 5110 but I want better graphics and a color oled. ive also updated my cpu to a teensy 3.2 for the extra oomph.
any way ive been looking for a way to store bitmaps on sd and I found a piece of code that will work but Im getting not declared errors for a couple of my code lines and ive tried the regular stuff like brackets and such but no go. here are the actual errors. the tx rx lines are supposedly needed by the petifatfs library but I cant find any reference to any of these lines much less the functions loop until byte is set.
Arduino: 1.6.11 (Windows 7), TD: 1.30-beta3, Board: "Teensy 3.2 / 3.1, Serial, 72 MHz optimize speed, US English"
C:\Users\duhjoker\Documents\Arduino\libraries\gamebuinoduhjokercolorMAINSD\DisplayRGB.cpp: In function 'byte rx()':
C:\Users\duhjoker\Documents\Arduino\libraries\gamebuinoduhjokercolorMAINSD\DisplayRGB.cpp:61:58: error: 'loop_until_bit_is_set' was not declared in this scope
byte rx() { SPDR = 0xFF; loop_until_bit_is_set(SPSR, SPIF); return SPDR; }
^
C:\Users\duhjoker\Documents\Arduino\libraries\gamebuinoduhjokercolorMAINSD\DisplayRGB.cpp: In function 'void tx(byte)':
C:\Users\duhjoker\Documents\Arduino\libraries\gamebuinoduhjokercolorMAINSD\DisplayRGB.cpp:62:61: error: 'loop_until_bit_is_set' was not declared in this scope
void tx(byte d) { SPDR = d; loop_until_bit_is_set(SPSR, SPIF); }
^
as you can see the arrow is pointing at the spif variable but theres no reference to it in the petitfatfs library.
the next errors have to do with the drawbitmap function that goes along with the drawbitmapfromsd function that tells the drawfromsd command how to actually build the bitmap.
C:\Users\duhjoker\Documents\Arduino\libraries\gamebuinoduhjokercolorMAINSD\DisplayRGB.cpp: In
C:\Users\duhjoker\Documents\Arduino\libraries\gamebuinoduhjokercolorMAINSD\DisplayRGB.cpp:734:96: error: 'drawPixel' was not declared in this scope
function 'void drawBitmap(byte, byte, char*, uint16_t)':
if (!((bitmap[2 + j*byteWidth + byteNum]) & (B10000000 >> bitNum))) drawPixel(x+i, y+j,color);
now the draw pixel function calls tom draw pixel function that has a color variable as with all my display commands. But it quit giving me not declared errors
included are gaming library the display files are the problem files im also including the petitfatfs library
gamebuinoduhjokercolorMAINSD.zip (34.2 KB)
petit_fatfs.zip (17.5 KB)