您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ BSP_LCD_DisplayOn函数代码示例

51自学网 2021-06-01 19:53:13
  C++
这篇教程C++ BSP_LCD_DisplayOn函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中BSP_LCD_DisplayOn函数的典型用法代码示例。如果您正苦于以下问题:C++ BSP_LCD_DisplayOn函数的具体用法?C++ BSP_LCD_DisplayOn怎么用?C++ BSP_LCD_DisplayOn使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了BSP_LCD_DisplayOn函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: LCD_Config

/**  * @brief  LCD configuration.  * @param  None  * @retval None  */static void LCD_Config(void){  /* LCD Initialization */   /* Two layers are used in this application simultaneously      so "LCD_MIN_PCLK" is recommended to programme the PCLK at 20 MHz */    BSP_LCD_InitEx(LCD_MIN_PCLK);    /* LCD Layers Initialization */   BSP_LCD_LayerDefaultInit(0, LCD_FB_START_ADDRESS);  BSP_LCD_LayerDefaultInit(1, (LCD_FB_START_ADDRESS+(BSP_LCD_GetXSize()*BSP_LCD_GetYSize()*4)));    /* Enable the LCD */   BSP_LCD_DisplayOn();  /* Set LCD Background Layer  */  BSP_LCD_SelectLayer(0);  /* Clear the Background Layer */  BSP_LCD_Clear(LCD_COLOR_WHITE);  /* Set LCD Foreground Layer  */  BSP_LCD_SelectLayer(1);  /* Clear the Foreground Layer */   BSP_LCD_Clear(LCD_COLOR_BLACK);   /* Configure and enable the Color Keying feature */  BSP_LCD_SetColorKeying(1, 0);   /* Configure the transparency for foreground: Increase the transparency */  BSP_LCD_SetTransparency(1, 100);}
开发者ID:acrepina,项目名称:STM32F7_serverWEB,代码行数:35,


示例2: lcd_init

void lcd_init(void) {    BSP_LCD_Init();    BSP_LCD_LayerDefaultInit(0, (uint32_t)LCD_FRAME_BUFFER);    BSP_LCD_SelectLayer(0);    BSP_LCD_Clear(LCD_COLOR_RED);    BSP_LCD_SetBackColor(LCD_COLOR_RED);    BSP_LCD_SetTextColor(LCD_COLOR_WHITE);//     BSP_LCD_LayerDefaultInit(1, (uint32_t)LCD_FRAME_BUFFER + 76800);//     BSP_LCD_SelectLayer(1);//     BSP_LCD_Clear(LCD_COLOR_RED);//     BSP_LCD_SetBackColor(LCD_COLOR_RED);//     BSP_LCD_SetTextColor(LCD_COLOR_WHITE);    BSP_LCD_SetLayerVisible(0, ENABLE);//     BSP_LCD_SetLayerVisible(1, ENABLE);    BSP_LCD_DisplayOn();    for (int i = 0; i < LCD_SIZE; i ++) {        lcd.screen[i] = ' ';    }    lcd.col = 0;}
开发者ID:deadsy,项目名称:lidar_stm32f4,代码行数:26,


示例3: LCD_Config

/**  * @brief  LCD configuration.  * @param  None  * @retval None  */static void LCD_Config(void){  /* LCD Initialization */   BSP_LCD_Init();  /* LCD Layers Initialization */   BSP_LCD_LayerDefaultInit(0, LCD_FB_START_ADDRESS);  BSP_LCD_LayerDefaultInit(1, (LCD_FB_START_ADDRESS+(BSP_LCD_GetXSize()*BSP_LCD_GetYSize()*4)));    /* Enable the LCD */   BSP_LCD_DisplayOn();  /* Set LCD Background Layer  */  BSP_LCD_SelectLayer(0);  /* Clear the Background Layer */  BSP_LCD_Clear(LCD_COLOR_WHITE);  /* Set LCD Foreground Layer  */  BSP_LCD_SelectLayer(1);  /* Clear the Foreground Layer */   BSP_LCD_Clear(LCD_COLOR_BLACK);   /* Configure and enable the Color Keying feature */  BSP_LCD_SetColorKeying(1, 0);   /* Configure the transparency for foreground: Increase the transparency */  BSP_LCD_SetTransparency(1, 100);}
开发者ID:451506709,项目名称:automated_machine,代码行数:33,


示例4: HID_InitApplication

/**  * @brief  HID application Init.  * @param  None  * @retval None  */static void HID_InitApplication(void){  /* Configure Key Button */  BSP_PB_Init(BUTTON_TAMPER, BUTTON_MODE_EXTI);    /* Configure LED1*/  BSP_LED_Init(LED1);    /* Initialize the LCD */  BSP_LCD_Init();    /* LCD Layer Initialization */  BSP_LCD_LayerDefaultInit(1, LCD_FB_START_ADDRESS);     /* Select the LCD Layer */  BSP_LCD_SelectLayer(1);    /* Enable the display */  BSP_LCD_DisplayOn();    /* Initialize the LCD Log module */  LCD_LOG_Init();  #ifdef USE_USB_HS   LCD_LOG_SetHeader((uint8_t *)" USB OTG HS HID Host");#else  LCD_LOG_SetHeader((uint8_t *)" USB OTG FS HID Host");#endif    LCD_UsrLog("USB Host library started./n");     /* Start HID Interface */  USBH_UsrLog("Starting HID Demo");  HID_MenuInit();}
开发者ID:MrZANE42,项目名称:verisure1512,代码行数:40,


示例5: DUAL_InitApplication

/**  * @brief  DUALCORE application Init.  * @param  None  * @retval None  */static void DUAL_InitApplication(void){  /* Configure Key Button */  BSP_PB_Init(BUTTON_TAMPER, BUTTON_MODE_GPIO);                    /* Configure LED1 */  BSP_LED_Init(LED1);    /* Initialize the LCD */  BSP_LCD_Init();    /* LCD Layer Initialization */  BSP_LCD_LayerDefaultInit(1, LCD_FB_START_ADDRESS);     /* Selects the LCD Layer */  BSP_LCD_SelectLayer(1);    /* Enables the display */  BSP_LCD_DisplayOn();    /* Init the LCD Log module */  LCD_LOG_Init();    LCD_LOG_SetHeader((uint8_t *)" USB OTG DualCore Host");    LCD_UsrLog("USB Host library started./n");     /* Start DualCore Interface */  USBH_UsrLog("Initializing hardware....");  DUAL_MenuInit(); }
开发者ID:acrepina,项目名称:STM32F7_serverWEB,代码行数:36,


示例6: LCD_Config

/**  * @brief  LCD configuration  * @param  None  * @retval None  */static void LCD_Config(void){  /* LCD Initialization */   /* Two layers are used in this application but not simultaneously      so "LCD_MAX_PCLK" is recommended to programme the maximum PCLK = 25,16 MHz */  BSP_LCD_Init();  /* LCD Initialization */   BSP_LCD_LayerDefaultInit(0, LCD_FB_START_ADDRESS);  BSP_LCD_LayerDefaultInit(1, LCD_FB_START_ADDRESS+(BSP_LCD_GetXSize()*BSP_LCD_GetYSize()*4));  /* Enable the LCD */   BSP_LCD_DisplayOn();     /* Select the LCD Background Layer  */  BSP_LCD_SelectLayer(0);  /* Clear the Background Layer */   BSP_LCD_Clear(LCD_COLOR_BLACK);      /* Select the LCD Foreground Layer  */  BSP_LCD_SelectLayer(1);  /* Clear the Foreground Layer */   BSP_LCD_Clear(LCD_COLOR_BLACK);    /* Configure the transparency for foreground and background :     Increase the transparency */  BSP_LCD_SetTransparency(0, 0);  BSP_LCD_SetTransparency(1, 100);}
开发者ID:acrepina,项目名称:STM32F7_serverWEB,代码行数:36,


示例7: DynamicSwitch_InitApplication

/**  * @brief  DS application Init.  * @param  None  * @retval None  */static void DynamicSwitch_InitApplication(void){  /* Configure Key Button */  BSP_PB_Init(BUTTON_TAMPER, BUTTON_MODE_GPIO);                     /* Configure LED1 */  BSP_LED_Init(LED1);    /* Initialize the LCD */  BSP_LCD_Init();    /* LCD Layer Initialization */  BSP_LCD_LayerDefaultInit(1, LCD_FB_START_ADDRESS);     /* Selects the LCD Layer */  BSP_LCD_SelectLayer(1);    /* Enables the display */  BSP_LCD_DisplayOn();    /* Init the LCD Log module */  LCD_LOG_Init();  #ifdef USE_USB_HS   LCD_LOG_SetHeader((uint8_t *)" USB HS DynamicSwitch Host");#else  LCD_LOG_SetHeader((uint8_t *)" USB FS DynamicSwitch Host");#endif    LCD_UsrLog("USB Host library started./n");     /* Start Dynamic Switch Interface */  LCD_UsrLog("Starting DynamicSwitch Demo/n");  LCD_UsrLog("Plug your device To Continue.../n");}
开发者ID:RadMie,项目名称:STM32F7DiscoveryBase,代码行数:40,


示例8: MSC_InitApplication

/**  * @brief  MSC application Init.  * @param  None  * @retval None  */static void MSC_InitApplication(void){  /* Configure Key Button */  BSP_PB_Init(BUTTON_WAKEUP, BUTTON_MODE_EXTI);        /* Configure LED1 */  BSP_LED_Init(LED1);    /* Initialize the LCD */  BSP_LCD_Init();    /* LCD Layer Initialization */  BSP_LCD_LayerDefaultInit(1, LCD_FB_START_ADDRESS);     /* Select the LCD Layer */  BSP_LCD_SelectLayer(1);    /* Enable the display */  BSP_LCD_DisplayOn();    /* Initialize the LCD Log module */  LCD_LOG_Init();    LCD_LOG_SetHeader((uint8_t *)" USB OTG FS MSC Host");  LCD_UsrLog("USB Host library started./n");     /* Initialize menu and MSC process */  Menu_Init();}
开发者ID:pierreroth64,项目名称:STM32Cube_FW_F4,代码行数:34,


示例9: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  /* STM32F4xx HAL library initialization:       - Configure the Flash prefetch, instruction and Data caches       - Configure the Systick to generate an interrupt each 1 msec       - Set NVIC Group Priority to 4       - Global MSP (MCU Support Package) initialization     */  HAL_Init();    /* Configure the system clock to 168 MHz */  SystemClock_Config();       /* Configure LED1 and LED3 */  BSP_LED_Init(LED1);  BSP_LED_Init(LED3);    /*##-1- LCD Initialization #################################################*/   /* Initialize the LCD */  BSP_LCD_Init();   /* Enable the LCD */  BSP_LCD_DisplayOn();  /* Clear the LCD Background layer */  BSP_LCD_Clear(LCD_COLOR_WHITE);  /*##-2- Touch screen initialization ########################################*/  Touchscreen_Calibration();  BSP_TS_Init(BSP_LCD_GetXSize(), BSP_LCD_GetYSize());   /*##-3- Link the SD Card disk I/O driver ###################################*/  if(FATFS_LinkDriver(&SD_Driver, SDPath) != 0)   {    /* FatFs Initialization Error */    Error_Handler();  }    /* Create a FAT file system (format) on the logical drive */  f_mkfs((TCHAR const*)SDPath, 0, 0);    /*##-4- Register the file system object to the FatFs module ################*/  if(f_mount(&SDFatFs, (TCHAR const*)SDPath, 0) != FR_OK)  {    /* FatFs Initialization Error */    Error_Handler();  }      /*##-5- Draw the menu ######################################################*/  Draw_Menu();    /* Infinite loop */    while (1)  {   /*##-6- Configure the touch screen and Get the position ####################*/        GetPosition();  }}
开发者ID:pierreroth64,项目名称:STM32Cube_FW_F4,代码行数:63,


示例10: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  uint32_t  i;  uint32_t  *ptrLcd;   /* Enable the CPU Cache */  CPU_CACHE_Enable();	  /* STM32F7xx HAL library initialization:       - Configure the Flash ART accelerator on ITCM interface       - Systick timer is configured by default as source of time base, but user          can eventually implement his proper time base source (a general purpose          timer for example or other time source), keeping in mind that Time base          duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and          handled in milliseconds basis.       - Set NVIC Group Priority to 4       - Low Level Initialization     */  HAL_Init();  /* Configure the system clock to 200 MHz */  SystemClock_Config();    /*##-1- Initialise the LCD #################################################*/  BSP_LCD_Init();  /* Init LCD screen buffer */  ptrLcd = (uint32_t*)(LCD_FRAME_BUFFER);  for (i=0; i<(BSP_LCD_GetXSize()*BSP_LCD_GetYSize()); i++)  {    ptrLcd[i]=0;  }  BSP_LCD_LayerDefaultInit(1, LCD_FRAME_BUFFER);  /* Enable the LCD */  BSP_LCD_DisplayOn();  /* Select the LCD Foreground layer */  BSP_LCD_SelectLayer(1);  /* Set active window */  BSP_LCD_SetLayerWindow(1, xoffset, yoffset, xsize, ysize);    /*##-2- Camera Initialisation and start capture ############################*/  /* Initialize the Camera */  BSP_CAMERA_Init(resolution);  /* Wait 1s before Camera snapshot */  HAL_Delay(1000);  /* Start the Camera Capture */  BSP_CAMERA_SnapshotStart((uint8_t *)CAMERA_FRAME_BUFFER);  while (1)  {  }}
开发者ID:RadMie,项目名称:STM32F7DiscoveryBase,代码行数:63,


示例11: main

int main(void){	HAL_Init();	/* Configure the system clock */	SystemClock_Config();	BSP_LCD_Init();	BSP_LCD_LayerDefaultInit(1, (uint32_t) LCD_FRAME_BUFFER);	BSP_LCD_SetLayerVisible(1, ENABLE);	BSP_LCD_SelectLayer(1);	BSP_LCD_Clear(LCD_COLOR_WHITE);	BSP_LCD_SetBackColor(LCD_COLOR_WHITE);	BSP_LCD_SetTextColor(LCD_COLOR_BLACK);	BSP_LCD_DisplayOn();	BSP_LCD_DisplayStringAtLine(0, (uint8_t *) "Hello FreeRTOS");	#define LED_TASK_PRIORITY ((1 + tskIDLE_PRIORITY) | portPRIVILEGE_BIT)	#define LCD_TASK_PRIORITY ((1 + tskIDLE_PRIORITY) | portPRIVILEGE_BIT)	#define LED_TASK_PRIORITY_LOW ((1 + tskIDLE_PRIORITY) | portPRIVILEGE_BIT)	#define LED_TASK_PRIORITY_HIGH ((2 + tskIDLE_PRIORITY) | portPRIVILEGE_BIT)	//xTaskCreate( (pdTASK_CODE)test_task_delay, 	"test", configMINIMAL_STACK_SIZE, 0, LED_TASK_PRIORITY, NULL);	//xTaskCreate( (pdTASK_CODE)test_task_delay_until, 	"test", configMINIMAL_STACK_SIZE, 0, LED_TASK_PRIORITY, NULL);	/*std::stringstream output;	std::string outputstring;	const char * chararray;	output.str(std::string());	output << "Counter: " << 0;	outputstring = "";	outputstring = output.str();	chararray = "";	chararray = outputstring.c_str();	BSP_LCD_DisplayStringAtLine (1, (uint8_t *) chararray);*/	//xTaskCreate( (pdTASK_CODE)led1_task, 	"led1", 256, 0, LED_TASK_PRIORITY, NULL);	//xTaskCreate( (pdTASK_CODE)led2_task, 	"led2", 256, 0, LED_TASK_PRIORITY, NULL);	//xTaskCreate( (pdTASK_CODE)lcd_task, 	"lcd", 256, 0, LCD_TASK_PRIORITY, NULL);	xTaskCreate( (pdTASK_CODE)led1_task_timeslicing, 	"led1", 256, 0, LED_TASK_PRIORITY, NULL);	xTaskCreate( (pdTASK_CODE)led2_task_timeslicing, 	"led2", 256, 0, LED_TASK_PRIORITY+1, NULL); // was LED_TASK_PRIORITY	//job_descriptor blink1_job_descriptor = job_descriptor(1000/3, LED3);	//xTaskCreate( (pdTASK_CODE)blink1_task, 	"led3", 256, &blink1_job_descriptor, LED_TASK_PRIORITY, NULL);	//job_descriptor blink2_job_descriptor = job_descriptor(2000/3, LED4);	//xTaskCreate( (pdTASK_CODE)blink2_task, 	"led4", 256, &blink2_job_descriptor, LED_TASK_PRIORITY, NULL);	//xTaskCreate( (pdTASK_CODE)blink_task_low_priority, 	"led3", 256, 0, LED_TASK_PRIORITY_LOW, NULL);	//xTaskCreate( (pdTASK_CODE)blink_task_high_priority, 	"led4", 256, 0, LED_TASK_PRIORITY_HIGH, NULL);	vTaskStartScheduler ();	return 0;}
开发者ID:Alexander-Wilms,项目名称:STM32F429I-DISCO,代码行数:57,


示例12: AUDIO_InitApplication

/**  * @brief  Audio Application Init.  * @param  None  * @retval None  */static void AUDIO_InitApplication(void){  /* Configure Key Button */  BSP_PB_Init(BUTTON_KEY, BUTTON_MODE_EXTI);                  /* Configure IO and LED1 */  BSP_IO_Init();  BSP_LED_Init(LED1);  BSP_LED_Init(LED4);   /* Configure Joystick in EXTI mode */  BSP_JOY_Init(JOY_MODE_EXTI);    /* Camera has to be powered down as some signals use same GPIOs between   * I2S signals and camera bus. Camera drives its signals to low impedance   * when powered ON. So the camera is powered off to let its signals   * in high impedance */  /* Camera power down sequence */  BSP_IO_ConfigPin(RSTI_PIN, IO_MODE_OUTPUT);  BSP_IO_ConfigPin(XSDN_PIN, IO_MODE_OUTPUT);  /* De-assert the camera STANDBY pin (active high) */  BSP_IO_WritePin(XSDN_PIN, BSP_IO_PIN_RESET);  /* Assert the camera RSTI pin (active low) */  BSP_IO_WritePin(RSTI_PIN, BSP_IO_PIN_RESET);  /* Initialize the LCD */  BSP_LCD_Init();    /* LCD Layer Initialization */  BSP_LCD_LayerDefaultInit(1, LCD_FB_START_ADDRESS);     /* Select the LCD Layer */  BSP_LCD_SelectLayer(1);    /* Enable the display */  BSP_LCD_DisplayOn();    /* Init the LCD Log module */  LCD_LOG_Init();    LCD_LOG_SetHeader((uint8_t *)"Audio Playback and Record Application");    LCD_UsrLog("USB Host library started./n");     /* Start Audio interface */  USBH_UsrLog("Starting Audio Demo");    /* Init Audio interface */  AUDIO_PLAYER_Init();    /* Start Audio interface */  AUDIO_MenuInit();}
开发者ID:acrepina,项目名称:STM32F7_serverWEB,代码行数:61,


示例13: BSP_LCD_Init

/**  * @brief  Initializes the LCD.  * @retval LCD state  */uint8_t BSP_LCD_Init(void){    /* Timing Configuration */    ltdc_handle.Init.HorizontalSync = (RK043FN48H_HSYNC - 1);    ltdc_handle.Init.VerticalSync = (RK043FN48H_VSYNC - 1);    ltdc_handle.Init.AccumulatedHBP = (RK043FN48H_HSYNC + RK043FN48H_HBP - 1);    ltdc_handle.Init.AccumulatedVBP = (RK043FN48H_VSYNC + RK043FN48H_VBP - 1);    ltdc_handle.Init.AccumulatedActiveH = (RK043FN48H_HEIGHT + RK043FN48H_VSYNC + RK043FN48H_VBP - 1);    ltdc_handle.Init.AccumulatedActiveW = (RK043FN48H_WIDTH + RK043FN48H_HSYNC + RK043FN48H_HBP - 1);    ltdc_handle.Init.TotalHeigh = (RK043FN48H_HEIGHT + RK043FN48H_VSYNC + RK043FN48H_VBP + RK043FN48H_VFP - 1);    ltdc_handle.Init.TotalWidth = (RK043FN48H_WIDTH + RK043FN48H_HSYNC + RK043FN48H_HBP + RK043FN48H_HFP - 1);    /* LCD clock configuration */    BSP_LCD_ClockConfig(&ltdc_handle, NULL);    /* Initialize the LCD pixel width and pixel height */    ltdc_handle.LayerCfg->ImageWidth  = RK043FN48H_WIDTH;    ltdc_handle.LayerCfg->ImageHeight = RK043FN48H_HEIGHT;    /* Background value */    ltdc_handle.Init.Backcolor.Blue = 0;    ltdc_handle.Init.Backcolor.Green = 0;    ltdc_handle.Init.Backcolor.Red = 0;    /* Polarity */    ltdc_handle.Init.HSPolarity = LTDC_HSPOLARITY_AL;    ltdc_handle.Init.VSPolarity = LTDC_VSPOLARITY_AL;    ltdc_handle.Init.DEPolarity = LTDC_DEPOLARITY_AL;    ltdc_handle.Init.PCPolarity = LTDC_PCPOLARITY_IPC;    ltdc_handle.Instance = LTDC;    if (HAL_LTDC_GetState(&ltdc_handle) == HAL_LTDC_STATE_RESET) {        BSP_LCD_MspInit(&ltdc_handle, NULL);    }    HAL_LTDC_Init(&ltdc_handle);    /* allocate the framebuffer */    size_t fb_size_pages = PAGE_ALIGN(RK043FN48H_WIDTH * RK043FN48H_HEIGHT * 4) / PAGE_SIZE;    void *fb_address = novm_alloc_pages(fb_size_pages, NOVM_ARENA_SECONDARY);    if (!fb_address)        panic("failed to allocate framebuffer for LCD/n");    BSP_LCD_LayerDefaultInit(0, (uint32_t)fb_address);    BSP_LCD_SelectLayer(0);    /* clear framebuffer */    memset((void *)ltdc_handle.LayerCfg[active_layer].FBStartAdress, 0,           BSP_LCD_GetXSize() * BSP_LCD_GetYSize() * BSP_LCD_PixelSize());    /* turn the display on */    BSP_LCD_DisplayOn();    return LCD_OK;}
开发者ID:david-dee,项目名称:lk,代码行数:58,


示例14: main

int main(void){  HAL_Init();  SystemClock_Config();  MX_GPIO_Init();  MX_ADC1_Init();  MX_DMA2D_Init();  MX_FMC_Init();  MX_I2C3_Init();  MX_LTDC_Init();  MX_RNG_Init();  MX_SPI5_Init();	BSP_LCD_Init();	BSP_LCD_LayerDefaultInit(LCD_BACKGROUND_LAYER, LCD_FRAME_BUFFER);	BSP_LCD_LayerDefaultInit(LCD_FOREGROUND_LAYER, LCD_FRAME_BUFFER);	BSP_LCD_SelectLayer(LCD_FOREGROUND_LAYER);	BSP_LCD_Clear(LCD_COLOR_BLACK);	BSP_LCD_DisplayOn();	uint8_t Button_Value;	GPIO_InitTypeDef GPIO_InitStruct;  GPIO_InitStruct.Pin |= GPIO_PIN_0;  GPIO_InitStruct.Mode = 0x00;  GPIO_InitStruct.Pull = 0x02;  HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);	while (1)		{				for(uint16_t i = 0; i < SIZE; i+=2) {			HAL_ADC_Start(&hadc1);			HAL_ADC_PollForConversion(&hadc1,1000); 			samples[i] = HAL_ADC_GetValue(&hadc1);			samples[i+1] = 0;			HAL_ADC_Stop(&hadc1);		}				Button_Value = HAL_GPIO_ReadPin(GPIOA, GPIO_PIN_0);		if( Button_Value )		{					fft();					}		else		{					display_samples(samples);		}	}}
开发者ID:jifwin,项目名称:auk_project,代码行数:54,


示例15: main

/**  * @brief   Main program  * @param  None  * @retval None  */int main(void){  /* STM32F4xx HAL library initialization:       - Configure the Flash prefetch, instruction and Data caches       - Configure the Systick to generate an interrupt each 1 msec       - Set NVIC Group Priority to 4       - Global MSP (MCU Support Package) initialization     */  HAL_Init();    /* Configure the system clock to 180 MHz */  SystemClock_Config();  /*##-1- Disable SAI1_SDA signal ############################################*/    /* Note: In STM324X9I-EVAL RevB, PE6 pin is shared between data_7 of camera            and SAI1_SDA of codec WM8994, after power on, SAI1_SDA pin of codec WM8994            is in output state, thus preventing MCU from Receiving correct signal            from camera, so we need to configure SAI1_SDA pin of codec WM8994            in tri-state   */  /* Initialize the Control interface of the Audio Codec */  BSP_AUDIO_OUT_Init(OUTPUT_DEVICE_SPEAKER, 0, 0);    /* ADCDAT1 is tri-stated */  AUDIO_IO_Write(AUDIO_I2C_ADDRESS, 0x200, 0);  AUDIO_IO_Write(AUDIO_I2C_ADDRESS, 0x300, 0x6010);     /*##-2- Initialize the LCD #################################################*/  BSP_LCD_Init();    /*##-3- Initialize the LCD Layers ##########################################*/  BSP_LCD_LayerDefaultInit(1, LCD_FRAME_BUFFER);    /* Enable the LCD */  BSP_LCD_DisplayOn();    /* Select the LCD Foreground layer */  BSP_LCD_SelectLayer(1);  /*##-4- Camera Initialization and start capture ############################*/  /* Initialize the Camera */  BSP_CAMERA_Init(RESOLUTION_R480x272);    /* Wait 1s before Camera snapshot */  HAL_Delay(1000);    /* Start the Camera Capture */  BSP_CAMERA_SnapshotStart((uint8_t *)CAMERA_FRAME_BUFFER);  /* Infinite loop */  while (1)  {  }}
开发者ID:451506709,项目名称:automated_machine,代码行数:58,


示例16: initializeHardware

void initializeHardware() {	HAL_Init();	BSP_LED_Init(LED3);	BSP_LED_Init(LED4);	BSP_PB_Init(BUTTON_KEY, BUTTON_MODE_GPIO);	BSP_LED_On(LED3);	BSP_LED_Off(LED4);	BSP_LCD_Init();	BSP_LCD_LayerDefaultInit(LCD_BACKGROUND_LAYER, LCD_FRAME_BUFFER);	BSP_LCD_SetLayerVisible(LCD_BACKGROUND_LAYER, ENABLE);	BSP_LCD_SelectLayer(LCD_BACKGROUND_LAYER);	BSP_LCD_DisplayOn();}
开发者ID:saeedhadi,项目名称:stm32f4-freertos-starter,代码行数:16,


示例17: CDC_InitApplication

/**  * @brief  CDC application Init.  * @param  None  * @retval None  */static void CDC_InitApplication(void){  /* Configure Key Button */  BSP_PB_Init(BUTTON_KEY, BUTTON_MODE_EXTI);     /* Configure Joystick in EXTI mode */  BSP_JOY_Init(JOY_MODE_EXTI);    /* Configure LED1, LED2, LED3 and LED4 */  BSP_LED_Init(LED1);  BSP_LED_Init(LED2);  BSP_LED_Init(LED3);  BSP_LED_Init(LED4);    /* Initialize the LCD */  BSP_LCD_Init();    /* LCD Layer Initialization */  BSP_LCD_LayerDefaultInit(1, LCD_FB_START_ADDRESS);     /* Selects the LCD Layer */  BSP_LCD_SelectLayer(1);    /* Enables the display */  BSP_LCD_DisplayOn();    /* Initialize the LCD Log module */  LCD_LOG_Init();  #ifdef USE_USB_HS   LCD_LOG_SetHeader((uint8_t *)" USB OTG HS CDC Host");#else  LCD_LOG_SetHeader((uint8_t *)" USB OTG FS CDC Host");#endif    LCD_UsrLog("USB Host library started./n");     /* Start CDC Interface */  USBH_UsrLog("Starting CDC Demo");    Menu_Init();  /* Initialize microSD */  if (SD_StorageInit() == 0)  {    SD_StorageParse();  }}
开发者ID:nidhiyanandh,项目名称:STM32Cube_FW_F4_V1.5.0_GCC_Makefile,代码行数:52,


示例18: MTP_InitApplication

/**  * @brief  MTP application Init.  * @param  None  * @retval None  */static void MTP_InitApplication(void){  /* Configure KEY Button */  BSP_PB_Init(BUTTON_KEY, BUTTON_MODE_EXTI);                  /* Configure Joystick in EXTI mode */  BSP_JOY_Init(JOY_MODE_EXTI);    /* Configure the LEDs */  BSP_LED_Init(LED1);  BSP_LED_Init(LED2);  BSP_LED_Init(LED3);  BSP_LED_Init(LED4);    /* Initialize the LCD */  BSP_LCD_Init();    /* LCD Layer Initialisation */  BSP_LCD_LayerDefaultInit(1, LCD_FB_START_ADDRESS);     /*Selects the LCD Layer*/  BSP_LCD_SelectLayer(1);    /*Enables the display*/  BSP_LCD_DisplayOn();    /*Init the LCD Log module*/  LCD_LOG_Init();  #ifdef USE_USB_HS   LCD_LOG_SetHeader((uint8_t *)" USB OTG HS MTP Host");#else  LCD_LOG_SetHeader((uint8_t *)" USB OTG FS MTP Host");#endif    LCD_UsrLog("USB Host library started./n");     /* Start MTP Interface */  USBH_UsrLog("Starting MTP Demo");    /* Init Audio interface */  AUDIO_Init();    /* Start MTP Interface */  MTP_MenuInit();}
开发者ID:EarnestHein89,项目名称:STM32Cube_FW_F4,代码行数:51,


示例19: AUDIO_InitApplication

/**  * @brief  Audio Application Init.  * @param  None  * @retval None  */static void AUDIO_InitApplication(void){  /* Configure Key Button */  BSP_PB_Init(BUTTON_KEY, BUTTON_MODE_EXTI);                  /* Configure Joystick in EXTI mode */  BSP_JOY_Init(JOY_MODE_EXTI);    /* Configure the LED1, LED2, LED3 and LED4 */  BSP_LED_Init(LED1);  BSP_LED_Init(LED2);  BSP_LED_Init(LED3);  BSP_LED_Init(LED4);    /* Initialize the LCD */  BSP_LCD_Init();    /* LCD Layer Initialization */  BSP_LCD_LayerDefaultInit(1, LCD_FB_START_ADDRESS);     /* Select the LCD Layer */  BSP_LCD_SelectLayer(1);    /* Enable the display */  BSP_LCD_DisplayOn();    /* Init the LCD Log module */  LCD_LOG_Init();    LCD_LOG_SetHeader((uint8_t *)"Audio Playback and Record Application");    LCD_UsrLog("USB Host library started./n");     /* Start Audio interface */  USBH_UsrLog("Starting Audio Demo");    /* Init Audio interface */  AUDIO_PLAYER_Init();    /* Start Audio interface */  AUDIO_MenuInit();}
开发者ID:eemei,项目名称:library-stm32f4,代码行数:47,


示例20: LCD_Config

static void LCD_Config(void){  /* LCD Initialization */  BSP_LCD_Init();  /* LCD Initialization */  BSP_LCD_LayerDefaultInit(0, LCD_FB_START_ADDRESS);  /* Enable the LCD */  BSP_LCD_DisplayOn();  /* Select the LCD Background Layer  */  BSP_LCD_SelectLayer(0);  /* Clear the Background Layer */  BSP_LCD_Clear(LCD_COLOR_BLACK);  /* Configure the transparency for background */  BSP_LCD_SetTransparency(0, 100);}
开发者ID:Analias,项目名称:stm32-discof7,代码行数:20,


示例21: HID_InitApplication

/**  * @brief  HID application Init  * @param  None  * @retval None  */static void HID_InitApplication(void){  /* Configure Key Button */  BSP_PB_Init(BUTTON_KEY, BUTTON_MODE_GPIO);                    /* Configure Joystick in EXTI mode */  BSP_JOY_Init(JOY_MODE_EXTI);    /* Configure LED1, LED2, LED3 and LED4 */  BSP_LED_Init(LED1);  BSP_LED_Init(LED2);  BSP_LED_Init(LED3);  BSP_LED_Init(LED4);  /* Initialize the LCD */  BSP_LCD_Init();    /* LCD Layer Initialization */  BSP_LCD_LayerDefaultInit(1, LCD_FB_START_ADDRESS);     /* Select the LCD Layer */  BSP_LCD_SelectLayer(1);    /* Enable the display */  BSP_LCD_DisplayOn();    /* Init the LCD Log module */  LCD_LOG_Init();  #ifdef USE_USB_HS   LCD_LOG_SetHeader((uint8_t *)" USB OTG HS HID Host");#else  LCD_LOG_SetHeader((uint8_t *)" USB OTG FS HID Host");#endif    LCD_UsrLog("USB Host library started./n");     /* Start HID Interface */  HID_MenuInit();}
开发者ID:PaxInstruments,项目名称:STM32CubeF4,代码行数:45,


示例22: MSC_InitApplication

/**  * @brief  MSC application Init.  * @param  None  * @retval None  */static void MSC_InitApplication(void){  /* Configure Key Button */  BSP_PB_Init(BUTTON_KEY, BUTTON_MODE_GPIO);    /* Configure Joystick in EXTI mode */  BSP_JOY_Init(JOY_MODE_EXTI);      /* Configure LED1 and LED3 */  BSP_LED_Init(LED1);  BSP_LED_Init(LED3);    /* Initialize the LCD */  BSP_LCD_Init();    /* LCD Layer Initialization */  BSP_LCD_LayerDefaultInit(1, LCD_FB_START_ADDRESS);     /* Select the LCD Layer */  BSP_LCD_SelectLayer(1);    /* Enable the display */  BSP_LCD_DisplayOn();    /* Initialize the LCD Log module */  LCD_LOG_Init();  #ifdef USE_USB_HS   LCD_LOG_SetHeader((uint8_t *)" USB OTG HS MSC Host");#else  LCD_LOG_SetHeader((uint8_t *)" USB OTG FS MSC Host");#endif    LCD_UsrLog("USB Host library started./n");     /* Initialize menu and MSC process */  USBH_UsrLog("Starting MSC Demo");  Menu_Init();}
开发者ID:vlsi1217,项目名称:STM32F7Cube,代码行数:44,


示例23: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  /* STM32F4xx HAL library initialization:       - Configure the Flash prefetch, instruction and Data caches       - Configure the Systick to generate an interrupt each 1 msec       - Set NVIC Group Priority to 4       - Global MSP (MCU Support Package) initialization     */  HAL_Init();    /* Configure the system clock to 180 MHz */  SystemClock_Config();    /* Configure TAMPER Button */  BSP_PB_Init(BUTTON_TAMPER, BUTTON_MODE_GPIO);  /*##-1- Initialize the LCD #################################################*/  /* Initialize the LCD */  BSP_LCD_Init();    /* Set LCD font */  BSP_LCD_SetFont(&Font20);     /* LCD Layer Initialization */  BSP_LCD_LayerDefaultInit(1, 0xC0130000);     BSP_LCD_SelectLayer(1);    BSP_LCD_DisplayOn();      /*##-2- Display messages on LCD ############################################*/    /* Clear the LCD */   BSP_LCD_Clear(LCD_COLOR_WHITE);  /* Set the LCD Text Color */  BSP_LCD_SetTextColor(LCD_COLOR_BLUE);    /* Display test name on LCD */    BSP_LCD_DisplayStringAtLine(0,(uint8_t*)"         Flash Write        ");  BSP_LCD_DisplayStringAtLine(1,(uint8_t*)"       protection test      ");  BSP_LCD_DisplayStringAtLine(2,(uint8_t*)"          Press User        ");  BSP_LCD_DisplayStringAtLine(3,(uint8_t*)"      Tamper/Key-button     ");    /* Infinite loop */  while (1)  {    /* Wait for TAMPER/KEY button to be pushed */    while(BSP_PB_GetState(BUTTON_TAMPER) != RESET)    {    }        /* Get FLASH_WRP_SECTORS write protection status */    HAL_FLASHEx_OBGetConfig(&OBInit);    SectorsWRPStatus = OBInit.WRPSector & FLASH_WRP_SECTORS;        if (SectorsWRPStatus == 0)    {      /* If FLASH_WRP_SECTORS are write protected, disable the write protection */            /* Allow Access to option bytes sector */       HAL_FLASH_OB_Unlock();          /* Allow Access to Flash control registers and user Falsh */      HAL_FLASH_Unlock();            /* Disable FLASH_WRP_SECTORS write protection */      OBInit.OptionType = OPTIONBYTE_WRP;      OBInit.WRPState   = OB_WRPSTATE_DISABLE;      OBInit.Banks      = FLASH_BANK_1;      OBInit.WRPSector  = FLASH_WRP_SECTORS;      HAL_FLASHEx_OBProgram(&OBInit);            /* Start the Option Bytes programming process */        if (HAL_FLASH_OB_Launch() != HAL_OK)      {        /* User can add here some code to deal with this error */        while (1)        {        }      }            /* Prevent Access to option bytes sector */       HAL_FLASH_OB_Lock();          /* Disable the Flash option control register access (recommended to protect       the option Bytes against possible unwanted operations) */      HAL_FLASH_Lock();            /* Get FLASH_WRP_SECTORS write protection status */      HAL_FLASHEx_OBGetConfig(&OBInit);      SectorsWRPStatus = OBInit.WRPSector & FLASH_WRP_SECTORS;            /* Check if FLASH_WRP_SECTORS write protection is disabled */      if (SectorsWRPStatus == FLASH_WRP_SECTORS)      {//.........这里部分代码省略.........
开发者ID:PaxInstruments,项目名称:STM32CubeF4,代码行数:101,


示例24: main

//.........这里部分代码省略.........  /* orientation mode landscape and DSI mode video burst           */  /* STM32F4xx HAL library initialization:       - Configure the Flash prefetch, instruction and Data caches       - Systick timer is configured by default as source of time base, but user          can eventually implement his proper time base source (a general purpose          timer for example or other time source), keeping in mind that Time base          duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and          handled in milliseconds basis.       - Set NVIC Group Priority to 4       - Low Level Initialization: global MSP (MCU Support Package) initialization   */  HAL_Init();  /* Configure the system clock to 180 MHz */  SystemClock_Config();  /* Initialize used LED1 and LED3 */  BSP_LED_Init(LED1);  BSP_LED_Init(LED3);    /* Configure user push-button */  BSP_PB_Init(BUTTON_WAKEUP, BUTTON_MODE_GPIO);    /* Initialize the LCD DSI in Video Burst mode with LANDSCAPE orientation */  lcd_status = BSP_LCD_Init();  OnError_Handler(lcd_status != LCD_OK);    /* Program a line event at line 0 */  HAL_LTDC_ProgramLineEvent(&hltdc_eval, 0);      /* Copy texture to be displayed on LCD from Flash to SDRAM */  CopyPicture((uint32_t *)&candies_800x480_argb8888, (uint32_t *)LCD_FB_START_ADDRESS, 0, 0, BSP_LCD_GetXSize(), BSP_LCD_GetYSize());    BSP_LCD_LayerDefaultInit(LTDC_ACTIVE_LAYER_BACKGROUND, LCD_FB_START_ADDRESS);  BSP_LCD_SelectLayer(LTDC_ACTIVE_LAYER_BACKGROUND);    /* Prepare area to display frame number in the image displayed on LCD */  BSP_LCD_SetTextColor(LCD_COLOR_BLUE);  BSP_LCD_FillRect(0, 400, BSP_LCD_GetXSize(), 80);  BSP_LCD_SetTextColor(LCD_COLOR_WHITE);  BSP_LCD_SetBackColor(LCD_COLOR_BLUE);  BSP_LCD_SetFont(&Font16);    /* Display title */  BSP_LCD_DisplayStringAt(0, 420, (uint8_t *) "LCD_DSI_ULPM_Data example", CENTER_MODE);  BSP_LCD_DisplayStringAt(0, 440, (uint8_t *) "Press TAMPER button to enter ULPM", CENTER_MODE);    BSP_LCD_SetTextColor(LCD_COLOR_WHITE);  BSP_LCD_SetBackColor(LCD_COLOR_BLUE);  BSP_LCD_SetFont(&Font16);    /* Infinite loop */  while (1)  {    /* Clear previous line */    BSP_LCD_ClearStringLine(460);        /* New text to display */    sprintf(str_display, ">> Frame Nb : %lu", frameCnt);        /* Print updated frame number */    BSP_LCD_DisplayStringAt(0, 460, (uint8_t *)str_display, CENTER_MODE);        if (CheckForUserInput() > 0)    {      /* Clear previous line */      BSP_LCD_SetTextColor(LCD_COLOR_GREEN);      BSP_LCD_ClearStringLine(440);      BSP_LCD_DisplayStringAt(0, 440, (uint8_t *) "Enter ULPM - switch Off LCD 6 seconds", CENTER_MODE);      BSP_LCD_SetTextColor(LCD_COLOR_WHITE);            /* Display Off with ULPM management Data lane only integrated */      BSP_LCD_DisplayOff();      HAL_Delay(1000);             /* Switch Off bit LTDCEN */      __HAL_LTDC_DISABLE(&hltdc_eval);             /* Enter ultra low power mode (data lane only integrated) */      HAL_DSI_EnterULPMData(&hdsi_eval);      BSP_LED_On(LED1);            HAL_Delay(6000);            BSP_LCD_ClearStringLine(440);      BSP_LCD_DisplayStringAt(0, 440, (uint8_t *) " Exited ULPM with success - Press To enter Again ULPM. ", CENTER_MODE);            /* Exit ultra low power mode (data lane only integrated) */      HAL_DSI_ExitULPMData(&hdsi_eval);      BSP_LED_Off(LED1);            /* Switch On bit LTDCEN */      __HAL_LTDC_ENABLE(&hltdc_eval);             /* Display On with ULPM exit Data lane only integrated */      BSP_LCD_DisplayOn();              }  }}
开发者ID:z80,项目名称:stm32f429,代码行数:101,


示例25: main

int_t main(void){    error_t error;    NetInterface *interface;    OsTask *task;    MacAddr macAddr;#if (APP_USE_DHCP == DISABLED)    Ipv4Addr ipv4Addr;#endif#if (APP_USE_SLAAC == DISABLED)    Ipv6Addr ipv6Addr;#endif    //MPU configuration    MPU_Config();    //HAL library initialization    HAL_Init();    //Configure the system clock    SystemClock_Config();    //Enable I-cache and D-cache    SCB_EnableICache();    SCB_EnableDCache();    //Initialize kernel    osInitKernel();    //Configure debug UART    debugInit(115200);    //Start-up message    TRACE_INFO("/r/n");    TRACE_INFO("**********************************/r/n");    TRACE_INFO("*** CycloneTCP FTP Client Demo ***/r/n");    TRACE_INFO("**********************************/r/n");    TRACE_INFO("Copyright: 2010-2015 Oryx Embedded SARL/r/n");    TRACE_INFO("Compiled: %s %s/r/n", __DATE__, __TIME__);    TRACE_INFO("Target: STM32F746/r/n");    TRACE_INFO("/r/n");    //LED configuration    BSP_LED_Init(LED1);    //Clear LEDs    BSP_LED_Off(LED1);    //Initialize user button    BSP_PB_Init(BUTTON_KEY, BUTTON_MODE_GPIO);    //Initialize LCD display    BSP_LCD_Init();    BSP_LCD_LayerDefaultInit(0, LCD_FRAME_BUFFER_LAYER0);    BSP_LCD_SelectLayer(0);    BSP_LCD_SetBackColor(LCD_COLOR_BLUE);    BSP_LCD_SetTextColor(LCD_COLOR_WHITE);    BSP_LCD_SetFont(&Font24);    BSP_LCD_DisplayOn();    //Clear LCD display    BSP_LCD_Clear(LCD_COLOR_BLUE);    //Welcome message    lcdSetCursor(0, 0);    printf("FTP Client Demo/r/n");    //TCP/IP stack initialization    error = netInit();    //Any error to report?    if(error)    {        //Debug message        TRACE_ERROR("Failed to initialize TCP/IP stack!/r/n");    }    //Configure the first Ethernet interface    interface = &netInterface[0];    //Set interface name    netSetInterfaceName(interface, "eth0");    //Set host name    netSetHostname(interface, "FTPClientDemo");    //Select the relevant network adapter    netSetDriver(interface, &stm32f7xxEthDriver);    netSetPhyDriver(interface, &lan8742PhyDriver);    //Set host MAC address    macStringToAddr(APP_MAC_ADDR, &macAddr);    netSetMacAddr(interface, &macAddr);    //Initialize network interface    error = netConfigInterface(interface);    //Any error to report?    if(error)    {        //Debug message        TRACE_ERROR("Failed to configure interface %s!/r/n", interface->name);    }#if (IPV4_SUPPORT == ENABLED)#if (APP_USE_DHCP == ENABLED)    //Get default settings    dhcpClientGetDefaultSettings(&dhcpClientSettings);    //Set the network interface to be configured by DHCP//.........这里部分代码省略.........
开发者ID:miragecentury,项目名称:M2_SE_RTOS_Project,代码行数:101,


示例26: SRAM_demo

/**  * @brief  SRAM Demo  * @param  None  * @retval None  */void SRAM_demo (void){   SRAM_SetHint();       /* Disable the LCD to avoid the refrech from the SDRAM */  BSP_LCD_DisplayOff();  /*##-1- Configure the SRAM device ##########################################*/  /* SRAM device configuration */   if(BSP_SRAM_Init() != SRAM_OK)  {    ubSramInit++;  }    /*##-2- SRAM memory read/write access ######################################*/    /* Fill the buffer to write */  Fill_Buffer(sram_aTxBuffer, BUFFER_SIZE, 0xC20F);       /* Write data to the SRAM memory */  if(BSP_SRAM_WriteData(SRAM_DEVICE_ADDR + WRITE_READ_ADDR, sram_aTxBuffer, BUFFER_SIZE) != SRAM_OK)  {    ubSramWrite++;  }       /* Read back data from the SRAM memory */  if(BSP_SRAM_ReadData(SRAM_DEVICE_ADDR + WRITE_READ_ADDR, sram_aRxBuffer, BUFFER_SIZE) != SRAM_OK)  {    ubSramRead++;  }      /*##-3- Checking data integrity ############################################*/  /* Enable the LCD */  BSP_LCD_DisplayOn();    if(ubSramInit != 0)  {    BSP_LCD_DisplayStringAt(20, 100, (uint8_t *)"SRAM Initialization : FAILED.", LEFT_MODE);    BSP_LCD_DisplayStringAt(20, 115, (uint8_t *)"SRAM Test Aborted.", LEFT_MODE);  }  else  {    BSP_LCD_DisplayStringAt(20, 100, (uint8_t *)"SRAM Initialization : OK.", LEFT_MODE);  }  if(ubSramWrite != 0)  {    BSP_LCD_DisplayStringAt(20, 115, (uint8_t *)"SRAM WRITE : FAILED.", LEFT_MODE);    BSP_LCD_DisplayStringAt(20, 130, (uint8_t *)"SRAM Test Aborted.", LEFT_MODE);  }  else  {    BSP_LCD_DisplayStringAt(20, 115, (uint8_t *)"SRAM WRITE : OK.", LEFT_MODE);  }  if(ubSramRead != 0)  {    BSP_LCD_DisplayStringAt(20, 130, (uint8_t *)"SRAM READ : FAILED.", LEFT_MODE);    BSP_LCD_DisplayStringAt(20, 145, (uint8_t *)"SRAM Test Aborted.", LEFT_MODE);  }  else  {    BSP_LCD_DisplayStringAt(20, 130, (uint8_t *)"SRAM READ : OK.", LEFT_MODE);  }    if(Buffercmp(sram_aRxBuffer, sram_aTxBuffer, BUFFER_SIZE) > 0)  {    BSP_LCD_DisplayStringAt(20, 145, (uint8_t *)"SRAM COMPARE : FAILED.", LEFT_MODE);    BSP_LCD_DisplayStringAt(20, 160, (uint8_t *)"SRAM Test Aborted.", LEFT_MODE);  }  else  {        BSP_LCD_DisplayStringAt(20, 145, (uint8_t *)"SRAM Test : OK.", LEFT_MODE);  }    while (1)  {        if(CheckForUserInput() > 0)    {      return;    }  }}
开发者ID:RadMie,项目名称:STM32F7DiscoveryBase,代码行数:85,


示例27: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  /* STM32F4xx HAL library initialization:       - Configure the Flash prefetch, instruction and Data caches       - Configure the Systick to generate an interrupt each 1 msec       - Set NVIC Group Priority to 4       - Global MSP (MCU Support Package) initialization     */  HAL_Init();    /* Configure the system clock to 168 MHz */  SystemClock_Config();    /* Configure LED1 and LED3 */  BSP_LED_Init(LED1);  BSP_LED_Init(LED3);    /*##-1- Init Host Library ##################################################*/  USBH_Init(&hUSB_Host, USBH_UserProcess, 0);    /* Add Supported Class */  USBH_RegisterClass(&hUSB_Host, USBH_MSC_CLASS);    /* Start Host Process */  USBH_Start(&hUSB_Host);    /*##-2- Disable SAI1_SDA signal ############################################*/    /* Note: In STM324x9I-EVAL RevB, PE6 pin is shared between data_7 of camera            and SAI1_SDA of codec WM8994, after power on, SAI1_SDA pin of codec WM8994            is in output state, thus preventing MCU from receiving correct signal            from camera, so we need to configure SAI1_SDA pin of codec WM8994            in tri-state */    /* Initialize the Control interface of the Audio Codec */  BSP_AUDIO_OUT_Init(OUTPUT_DEVICE_SPEAKER, 70, AUDIO_FREQUENCY_48K);   /* ADCDAT1 is tri-stated */  AUDIO_IO_Write(AUDIO_I2C_ADDRESS, 0x200, 0);  AUDIO_IO_Write(AUDIO_I2C_ADDRESS, 0x300, 0x6010);    /*##-3- Configure TAMPER Button ############################################*/  BSP_PB_Init(BUTTON_TAMPER, BUTTON_MODE_GPIO);    /*##-4- Link the USB Host disk I/O driver ##################################*/  FATFS_LinkDriver(&USBH_Driver, MSC_Path);    /*##-5- Initialize the LCD #################################################*/  BSP_LCD_Init();    /* Foreground Layer Initialization */  BSP_LCD_LayerDefaultInit(1, LCD_FRAME_BUFFER_LAYER1);  /* Set Foreground Layer */  BSP_LCD_SelectLayer(1);  /* Clear the LCD Foreground layer */  BSP_LCD_Clear(LCD_COLOR_WHITE);  BSP_LCD_SetLayerVisible(1, DISABLE);    /* Background Layer Initialization */  BSP_LCD_LayerDefaultInit(0, LCD_FRAME_BUFFER);    /* Enable the LCD */  BSP_LCD_DisplayOn();       /* Select the LCD Foreground layer */  BSP_LCD_SelectLayer(0);  BSP_LCD_Clear(LCD_COLOR_WHITE);    /*##-6- Camera Initialization and start capture ############################*/  /* Initialize the Camera */  BSP_CAMERA_Init(RESOLUTION_R480x272);    /* Start the Camera Capture */  BSP_CAMERA_ContinuousStart((uint8_t *)CAMERA_FRAME_BUFFER);    /*##-7- Run Application ####################################################*/  while (1)  {    /* USB Host Background task */    USBH_Process(&hUSB_Host);        switch(Appli_state)    {    case STORAGE_READY:      CAMERA_Capture();      break;          case STORAGE_IDLE:      break;          }   }}
开发者ID:pierreroth64,项目名称:STM32Cube_FW_F4,代码行数:95,


示例28: NOR_demo

/**  * @brief  NOR Demo  * @param  None  * @retval None  */void NOR_demo(void){   /* NOR IDs structure */  static NOR_IDTypeDef pNOR_ID;  NOR_SetHint();  /* STM32F427x/437x/429x/439x "Revision 3" devices: FMC dynamic and static      bank switching is allowed  */  if (HAL_GetREVID() >= 0x2000) {}  else  {    /* Disable the LCD to avoid the refrech from the SDRAM */    BSP_LCD_DisplayOff();  }    /*##-1- Configure the NOR device ###########################################*/  /* NOR device configuration */   if(BSP_NOR_Init() != NOR_STATUS_OK)  {    ubInitStatus++;   }    /*##-2- Read & check the NOR device IDs ####################################*/  /* Initialize the ID structure */  pNOR_ID.Manufacturer_Code = (uint16_t)0x00;  pNOR_ID.Device_Code1 = (uint16_t)0x00;  pNOR_ID.Device_Code2 = (uint16_t)0x00;  pNOR_ID.Device_Code3 = (uint16_t)0x00;    /* Read the NOR memory ID */  BSP_NOR_Read_ID(&pNOR_ID);    /* Test the NOR ID correctness */  if(pNOR_ID.Manufacturer_Code != (uint16_t)0x0020)    ubIDStatus++;  else if(pNOR_ID.Device_Code1 != (uint16_t)0x227E)    ubIDStatus++;  else if (pNOR_ID.Device_Code2 != (uint16_t)0x2221)    ubIDStatus++;  else if (pNOR_ID.Device_Code3 != (uint16_t)0x2200)    ubIDStatus++;      /*##-3- Erase NOR memory ###################################################*/   /* Return to read mode */  BSP_NOR_ReturnToReadMode();      if(BSP_NOR_Erase_Block(WRITE_READ_ADDR) != NOR_STATUS_OK)  {    ubEraseStatus++;   }    /*##-4- NOR memory read/write access  ######################################*/     /* Fill the buffer to write */  Fill_Buffer(nor_aTxBuffer, BUFFER_SIZE, 0xC20F);       /* Write data to the NOR memory */  if(BSP_NOR_WriteData(WRITE_READ_ADDR, nor_aTxBuffer, BUFFER_SIZE) != NOR_STATUS_OK)  {    ubWriteStatus++;   }    /* Read back data from the NOR memory */  if(BSP_NOR_ReadData(WRITE_READ_ADDR, nor_aRxBuffer, BUFFER_SIZE) != NOR_STATUS_OK)  {    ubReadStatus++;   }  /*##-5- Checking data integrity ############################################*/    /* STM32F427x/437x/429x/439x "Revision 3" devices: FMC dynamic and static      bank switching is allowed  */  if (HAL_GetREVID() >= 0x2000) {}  else  {    /* Enable the LCD */    BSP_LCD_DisplayOn();        /* SDRAM initialization */    BSP_SDRAM_Init();  }    if(ubIDStatus != 0)  {    BSP_LCD_DisplayStringAt(20, 100, (uint8_t *)"NOR Read ID : FAILED.", LEFT_MODE);    BSP_LCD_DisplayStringAt(20, 115, (uint8_t *)"NOR Test Aborted.", LEFT_MODE);  }  else  {    if(ubInitStatus != 0)    {      BSP_LCD_DisplayStringAt(20, 100, (uint8_t *)"NOR Initialization : FAILED.", LEFT_MODE);      BSP_LCD_DisplayStringAt(20, 115, (uint8_t *)"NOR Test Aborted.", LEFT_MODE);    }    else    {//.........这里部分代码省略.........
开发者ID:eemei,项目名称:library-stm32f4,代码行数:101,


示例29: main

int main(void){  /*!< At this stage the microcontroller clock setting is already configured,        this is done through SystemInit() function which is called from startup       file (startup_stm32f4xx.s) before to branch to application main.       To reconfigure the default setting of SystemInit() function, refer to        system_stm32f4xx.c file     */    SystemClock_Config();    uint8_t  lcd_status = LCD_OK;    HAL_MspInit();    HAL_Init();    BSP_SDRAM_Init();    //  uint32_t i;    int i;        __HAL_RCC_GPIOD_CLK_ENABLE();    __HAL_RCC_GPIOG_CLK_ENABLE();    __HAL_RCC_GPIOK_CLK_ENABLE();    GPIO_InitTypeDef GPIO_InitStructure;         GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP;    GPIO_InitStructure.Speed =  GPIO_SPEED_HIGH;    GPIO_InitStructure.Pull = GPIO_NOPULL; //GPIO_PULLDOWN;//GPIO_PULLUP;//     GUI_Conf.border=8;        GPIO_InitStructure.Pin = GPIO_PIN_6;    HAL_GPIO_Init(GPIOG,&GPIO_InitStructure);    GPIO_InitStructure.Pin = GPIO_PIN_5;    HAL_GPIO_Init(GPIOD,&GPIO_InitStructure);    GPIO_InitStructure.Pin = 	GPIO_PIN_4;    HAL_GPIO_Init(GPIOD,&GPIO_InitStructure);    GPIO_InitStructure.Pin = GPIO_PIN_3;    HAL_GPIO_Init(GPIOK,&GPIO_InitStructure);    BSP_LCD_Reset(); BSP_LCD_MspInit();    //lcd_status = BSP_LCD_InitEx(LCD_ORIENTATION_PORTRAIT);    //lcd_status = BSP_LCD_InitEx(LCD_ORIENTATION_LANDSCAPE);    lcd_status = BSP_LCD_Init();               BSP_LCD_LayerDefaultInit(0, LCD_FB_START_ADDRESS);       BSP_LCD_SelectLayer(0);    BSP_LCD_DisplayOn();    BSP_LCD_SetTransparency(0,0xff);    if(lcd_status!=LCD_OK)	f_error();    BSP_LCD_Clear(LCD_COLOR_BLACK);        BSP_LCD_SetTextColor(LCD_COLOR_BLUE);    BSP_LCD_FillRect(0, 0,BSP_LCD_GetXSize(),BSP_LCD_GetYSize());    BSP_LCD_SetTextColor(LCD_COLOR_WHITE);    BSP_LCD_FillRect(GUI_Conf.border, GUI_Conf.border,BSP_LCD_GetXSize()-2*GUI_Conf.border,BSP_LCD_GetYSize()-2*GUI_Conf.border);    BSP_LCD_SetTextColor(LCD_COLOR_BLACK);    BSP_LCD_SetFont(&Font16);    BSP_LCD_SetBackColor(LCD_COLOR_TRANSPARENT);    BSP_LCD_DisplayStringAtLine(1, (uint8_t *)"  FAT SD");                        while(1){	Delay(1000);	switch(i%4){	case 0:	    HAL_GPIO_TogglePin(GPIOG,GPIO_PIN_6);	    break;	    	case 1: 	    HAL_GPIO_TogglePin(GPIOD,GPIO_PIN_4);	    break;	case 2:	    HAL_GPIO_TogglePin(GPIOD,GPIO_PIN_5);	    break;	case 3:	    HAL_GPIO_TogglePin(GPIOK,GPIO_PIN_3);	    break;	}	i++;	if(! i%4)	    i=0;			    }        }
开发者ID:Jegeva,项目名称:STM32F469-Discovery,代码行数:100,



注:本文中的BSP_LCD_DisplayOn函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ BSP_LCD_DisplayStringAt函数代码示例
C++ BSP_LCD_DisplayChar函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。