diff --git a/avrtft.c b/avrtft.c index a8d6d79..fda06aa 100644 --- a/avrtft.c +++ b/avrtft.c @@ -66,6 +66,7 @@ DDR_DISP |= (1 << PIN_RST); // drive SPI and display output pins high + PORT_DSPI |= (1 << PIN_SDCS); PORT_DSPI |= (1 << PIN_DCS); PORT_DSPI |= (1 << PIN_DC); PORT_DISP |= (1 << PIN_RST); diff --git a/bmp.c b/bmp.c index cd81783..8ae5100 100644 --- a/bmp.c +++ b/bmp.c @@ -180,8 +180,8 @@ bool success = readSingleBlock(address++, block); displaySel(); if (success) { - for (uint16_t j = 0; j < SD_BLOCK_SIZE && status == BMP_BUSY; j++) { - status = stream(block[j]); + for (uint16_t i = 0; i < SD_BLOCK_SIZE && status == BMP_BUSY; i++) { + status = stream(block[i]); } } } while (status == BMP_BUSY); diff --git a/sdcard.c b/sdcard.c index fd74de3..5966f3e 100644 --- a/sdcard.c +++ b/sdcard.c @@ -8,7 +8,6 @@ */ #include "sdcard.h" -#include "bmp.h" /** * Transmits the given command, argument and CRC value.