| 36 | */ |
| 37 | |
| 38 | bool ImageManager::drawFullImage() { |
| 39 | |
| 40 | uint32_t blockIndex,i; |
| 41 | uint16_t blocks[512]; |
| 42 | |
| 43 | // get the first block. There are two blocks per scan line. |
| 44 | |
| 45 | blockIndex=_bmManager.getFirstBlockIndex(_currentImage); |
| 46 | |
| 47 | // get the display device |
| 48 | |
| 49 | LcdManager::LcdAccess& lcd=_lcdManager.getLcd(); |
| 50 | |
| 51 | lcd.moveTo(lcd.getFullScreenRectangle()); |
| 52 | lcd.beginWriting(); |
| 53 | |
| 54 | for(i=blockIndex;i<blockIndex+640;i+=2) { |
| 55 | |
| 56 | // read the 2 blocks (one scan) |
| 57 | |
| 58 | if(!_blockDevice.readBlocks(blocks,i,2)) |
| 59 | return false; |
| 60 | |
| 61 | // write to the device |
| 62 | |
| 63 | lcd.rawTransfer(blocks,120); // 120 pixels are here (480 bytes in one 512b sector) |
| 64 | lcd.rawTransfer(&blocks[256],120); // and the next 120 are here |
| 65 | } |
| 66 | |
| 67 | return true; |
| 68 | } |
| 69 | |
| 70 | |
| 71 | /* |
nothing calls this directly
no test coverage detected