Commits

Ivan A-R committed cbf339c

reg 0x36 write 01 to normal display

Comments (0)

Files changed (3)

firmware/gui/lcd_hw_ssd1963.c

 #include "lcd_hw.h"
 #include "lcd_mcu.h"
 
-#define LCD_GLASS 1
+#define LCD_GLASS 0
 
 #define swapcoord(a, b) do { lcd_coords_t _t = a; a = b; b = _t; } while(0)
 
 #if (LCD_GLASS == 1)
 	lcdMcuData(0x0000);
 #else
-	lcdMcuData(0x0080); // (0)
+	lcdMcuData(0x0001); // (0)
 #endif
 	// lcdMcuData(0x0060);
 

firmware/ssd1963/main.c

     // sfEraseChip();
     // sfWriteBlock(earth_rle, 0, earth_rle_len);
     // sfWaitFlash();
-    putRleImage(0, 0);
+    // putRleImage(0, 0);
 
-    fontString(fontList[0], 48, 8, "Привет мир!", lcdNightBlue, lcdYellow);
-    fontString(fontList[0], 48, 24, hello_world, lcdNightBlue, lcdYellow);
+    fontString(fontList[0], 48, 32, "Привет мир!", lcdNightBlue, lcdYellow);
+    fontString(fontList[0], 48, 32+14, hello_world, lcdNightBlue, lcdYellow);
     fontString(fontList[0], lcdHwWidth()-8*(sizeof(hello_world)-1), lcdHwHeight()-16, hello_world, lcdNightBlue, lcdYellow);
 
     uint32_t id = sfReadJedecId();

firmware/ssd1963/spiflash.c

 
 #define USE_HW_SPI 1
 
-#define nCS (1<<13)
-#define grabCS() GPIOD->BRR = nCS
-#define releaseCS() GPIOD->BSRR = nCS
+#define nCS (1<<4)
+#define grabCS() GPIOA->BRR = nCS
+#define releaseCS() GPIOA->BSRR = nCS
 
 void sfSpiCsGrab(void)
 {
 void sfInit(void)
 {
 #if (USE_HW_SPI == 1)
-    GPIOA->CRL = (GPIOA->CRL & 0x000FFFFF) | 0xbbb00000;
-    GPIOD->CRH = (GPIOD->CRH & 0xFF0FFFFF) | 0x00300000;
+    GPIOA->CRL = (GPIOA->CRL & 0x0000FFFF) | 0xbbb30000;
+    // GPIOD->CRH = (GPIOD->CRH & 0xFF0FFFFF) | 0x00300000;
     releaseCS();
 
     /*
         // SPI_CR1_CPOL |
         // SPI_CR1_BR_0 | SPI_CR1_BR_1 | SPI_CR1_BR_2 | /* BR[2-0] = 000 - Fpclk/2 */
         0;
-    SPI1->CR2 = 0;
+    SPI1->CR2 = 0; // SPI_CR2_SSOE;
     SPI1->CR1 |= SPI_CR1_SPE; // Enable SPI
     //(void)(SPI1->DR);