Skip to content

Instantly share code, notes, and snippets.

@bc080401210
Created October 1, 2016 12:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bc080401210/e8bf50bdfbc2b6cda5de21af4ac64f82 to your computer and use it in GitHub Desktop.
Save bc080401210/e8bf50bdfbc2b6cda5de21af4ac64f82 to your computer and use it in GitHub Desktop.
/* Includes ------------------------------------------------------------------*/
#include <stdio.h>
#include "stm32f4xx.h"
#include "stm32f4_discovery.h"
#include "stm32f4_discovery_lcd.h"
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
#define MESSAGE1 " STM32F4xx "
#define MESSAGE2 " Device running on "
#define MESSAGE3 " stm32f4_discovery "
/*main define ------------------------------------------------------------*/
void main(){
/* wait the power stable */
for (dlycnt = 0; dlycnt < 10000000; dlycnt++);
STM32f4_Discovery_LCD_Init();
/* Display message on stm32f4_discovery LCD **********************************/
/* Clear the LCD */
LCD_Clear(LCD_COLOR_WHITE);
/* Set the LCD Back Color */
LCD_SetBackColor(LCD_COLOR_BLUE);
/* Set the LCD Text Color */
LCD_SetTextColor(LCD_COLOR_WHITE);
LCD_DisplayStringLine(LINE(3), (uint8_t *)MESSAGE1);
LCD_DisplayStringLine(LINE(4), (uint8_t *)MESSAGE2);
LCD_DisplayStringLine(LINE(5), (uint8_t *)MESSAGE3);
/* wait for a moment */
for (dlycnt = 0; dlycnt < 50000000; dlycnt++);
/* LCD RGB Test */
LCD_RGB_Test();
while(1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment