|
@@ -355,10 +355,6 @@ void setup()
|
|
|
default_optical.release = 0x20;
|
|
|
memcpy(&default_optical.revision_date, "1995", 4);
|
|
|
|
|
|
-
|
|
|
- delay(3000);
|
|
|
-
|
|
|
-
|
|
|
int image_file_set = ((digitalRead(BOARD_SWITCH1_PIN) == LOW) ) |
|
|
|
((digitalRead(BOARD_SWITCH2_PIN) == LOW) ) << 1 |
|
|
|
((digitalRead(BOARD_SWITCH3_PIN) == LOW) ) << 2 |
|
|
@@ -824,9 +820,25 @@ void readDataLoop(uint32_t blockSize, byte* dstptr)
|
|
|
// Start of the do/while and WAIT are already aligned to 8 bytes.
|
|
|
do {
|
|
|
WAIT_ACK_ACTIVE();
|
|
|
+ asm("nop");
|
|
|
+ asm("nop");
|
|
|
+ asm("nop");
|
|
|
+ asm("nop");
|
|
|
+ asm("nop");
|
|
|
+ asm("nop");
|
|
|
+ asm("nop");
|
|
|
+ asm("nop");
|
|
|
+ asm("nop");
|
|
|
+ asm("nop");
|
|
|
+ asm("nop");
|
|
|
+ asm("nop");
|
|
|
+ asm("nop");
|
|
|
+ asm("nop");
|
|
|
uint32_t ret = PDREG->IDR;
|
|
|
+
|
|
|
REQ_OFF();
|
|
|
- *dstptr++ = (byte)~(((ret) & 0b11111111));
|
|
|
+
|
|
|
+ *dstptr++ = (byte)~((ret) & 0b11111111);
|
|
|
// Move wait loop in to a single 8 byte prefetch buffer
|
|
|
asm("nop.w;nop");
|
|
|
WAIT_ACK_INACTIVE();
|
|
@@ -835,7 +847,7 @@ void readDataLoop(uint32_t blockSize, byte* dstptr)
|
|
|
asm("nop");
|
|
|
} while(dstptr<endptr);
|
|
|
WAIT_ACK_ACTIVE();
|
|
|
- uint32_t ret = GPIOD->regs->IDR;
|
|
|
+ uint32_t ret = PDREG->IDR;
|
|
|
REQ_OFF();
|
|
|
*dstptr = (byte)~(((ret ) & 0b11111111) );
|
|
|
WAIT_ACK_INACTIVE();
|