diff --git a/ssd1306.c b/ssd1306.c --- a/ssd1306.c +++ b/ssd1306.c @@ -92,7 +92,7 @@ void ssd1306_Init(void) *************************************************/ // Lower Column Address WriteCommand(0x00); /* Set Lower Column Address */ - GPIO_SetBits(GPIOA,GPIO_Pin_15); + GPIO_SetBits(GPIOA,GPIO_Pin_15);//turn on status LED // High Column Address WriteCommand(0x10); /* Set Higher Column Address*/ // Display Start Line @@ -164,6 +164,27 @@ void ssd1306_Init(void) // WriteCommand(0xaf); } +void ssd1306_block_write(void) +{ + + // Set col start addr to 0 + WriteCommand(0x21); + WriteCommand(0x00); + // Set col end addr to width - 1 + WriteCommand(127); + + // Set page addr + WriteCommand(0x22); + WriteCommand(0x00); // start page addr + WriteCommand(4); // end page addr (height / 8) + + + uint32_t i = 0; + for(i=0;i<1024;i++) + WriteData(ssd1306_Buffer[i]); +} + + /******************************************************************************* * Function Name : ssd1306_TurnOff * Description : Turn off the ssd1306 controller