Exemplo n.º 1
0
/**
 * @brief Initializes the OLED display.
 * @retval None
 */
void Blox_OLED_Init(void) {
  uint8_t garbage;
  OLED_RCC_Configuration();
  OLED_GPIO_Configuration();
  SysTick_Init();
  Blox_VUSART_Init(OLED_USART_ID);

  OLED_Reset();
  SysTick_Wait(2000);
  Blox_VUSART_TryReceive(2, &garbage);  //receive any garbage data
  Blox_OLED_Send(OLED_AUTOBAUD); 
  Blox_OLED_Receive();
}
Exemplo n.º 2
0
void initial_ssd1303(void) 	//OLEDªì©l¤Æ
 {
  unsigned char k;
  P4DIR=0xFF;
  P5DIR=0xFF;
  P5OUT = 0x41;  		// 0100 0001  set BS1¡BBS2¡BRD to Hi
  OLED_Reset();
  P5OUT &= ~AA0; 		
  P5OUT &= ~ACSB; 		// set ACSB(CS#) to low
  for(k=0;k<16;k++)
  {     	
    P4OUT = initial[k];
    P5OUT &= ~AWRN; 		//set AWRN to low	
    P5OUT |= AWRN; 		
  }
}
Exemplo n.º 3
0
void En_OLED(){
  P5OUT&=~OLED_EN;
  OLED_Reset();
  initial_ssd1303();
}