PokittoLib is the library needed for programming the Pokitto DIY game console (www.pokitto.com)

Dependents:   YATTT sd_map_test cPong SnowDemo ... more

PokittoLib

Library for programming Pokitto hardware

How to Use

  1. Import this library to online compiler (see button "import" on the right hand side
  2. DO NOT import mbed-src anymore, a better version is now included inside PokittoLib
  3. Change My_settings.h according to your project
  4. Start coding!
Revision:
60:8b6a110feeea
Parent:
51:113b1d84c34f
Child:
64:1d52d8287c39
--- a/POKITTO_HW/HWLCD.cpp	Sun Oct 07 10:10:24 2018 +0000
+++ b/POKITTO_HW/HWLCD.cpp	Sun Oct 07 10:19:52 2018 +0000
@@ -455,9 +455,9 @@
 */
 void Pokitto::lcdRefreshMode1(uint8_t * scrbuf, uint8_t updRectX, uint8_t updRectY, uint8_t updRectW, uint8_t updRectH, uint16_t* paletteptr) {
 
-    uint16_t x,y,xptr;
+    uint16_t x,y;
     uint16_t scanline[4][176]; // read 4 half-nibbles = 4 pixels at a time
-    uint8_t *d, yoffset=0;
+    uint8_t *d;
 
     // If not the full screen is updated, check the validity of the update rect.
     if ( updRectX != 0 || updRectY != 0 ||updRectW != LCDWIDTH ||updRectH != LCDHEIGHT ) {
@@ -477,7 +477,6 @@
     xptr = 8;
     setDRAMptr(8, 0);
     #else
-    xptr = 0;
     setDRAMptr(0, 0);
     #endif
 
@@ -485,7 +484,6 @@
         d = scrbuf+(x>>2);// point to beginning of line in data
 
         /** find colours in one scanline **/
-        uint8_t s=0;
         d += (updRectY * 220/4);
         for (y=updRectY; y<updRectY+updRectH; y++) {
             uint8_t tdata = *d;
@@ -960,7 +958,7 @@
     
 
 void Pokitto::lcdRefreshMode2(uint8_t * scrbuf, uint16_t* paletteptr ) {
-  uint32_t x,y,byte,c,t=1<<12;
+  uint32_t x,y;
   uint32_t scanline[110];
 
   write_command(0x03); write_data(0x1038);
@@ -1752,7 +1750,7 @@
    CLR_CS_SET_CD_RD_WR;
    SET_MASK_P2;
    
-   uint32_t x, y=0, c, t;
+   uint32_t x, y=0;
    
 #ifndef __ARMCC_VERSION
    asm volatile(
@@ -1851,7 +1849,7 @@
  }
 
 void Pokitto::lcdRefreshMode14(uint8_t * scrbuf, uint16_t* paletteptr) {
-uint16_t x,y,data,xptr;
+uint16_t x,y;
 uint16_t scanline[176]; uint16_t* scptr;
 uint8_t *d;
 
@@ -1988,11 +1986,10 @@
 #else
 
 void Pokitto::lcdRefreshMode15(uint16_t* paletteptr, uint8_t* scrbuf){
-uint16_t x,y,xptr;
+uint16_t x,y;
 uint16_t scanline[2][176]; // read two nibbles = pixels at a time
-uint8_t *d, yoffset=0;
+uint8_t *d;
 
-xptr = 0;
 //setDRAMptr(xptr,yoffset);
 
 write_command(0x20); write_data(0);