|
@@ -377,13 +377,33 @@ void display_WriteData(const uint8_t * data, uint8_t addr, uint8_t len) {
|
|
|
}
|
|
|
|
|
|
#ifdef FRAMEBUFFER_ROTATE
|
|
|
+ int i;
|
|
|
+
|
|
|
+ GPIO_SPI_SW();
|
|
|
+ HT1632C_CS_ON;
|
|
|
+ i = (0x280 | addr);
|
|
|
+ // write addr
|
|
|
+ _display_WriteBits(i, 0x200);
|
|
|
+
|
|
|
+ GPIO_SPI_HW();
|
|
|
+ while ((SPI1->SR & SPI_SR_BSY) != 0) { __NOP(); }
|
|
|
+ for (i=0; i<len; i++) {
|
|
|
+ while ((SPI1->SR & SPI_SR_TXE) == 0) { __NOP(); }
|
|
|
+ SPI1->DR = data[i];
|
|
|
+ }
|
|
|
+ // wait for end of transmission
|
|
|
+ while ((SPI1->SR & SPI_SR_BSY) != 0) { __NOP(); }
|
|
|
+ HT1632C_CS_OFF;
|
|
|
+
|
|
|
/* Copy given data to framebuffer */
|
|
|
+ /*
|
|
|
int i, a;
|
|
|
for (i=0; i<len; i++) {
|
|
|
a = addr + i;
|
|
|
display_Buffer[a] = data[i];
|
|
|
}
|
|
|
//display_WriteBuffer();
|
|
|
+ */
|
|
|
#else
|
|
|
uint16_t a = 0x280 | addr;
|
|
|
|