当前位置: 首页>>代码示例>>C++>>正文


C++ BSP_LCD_DisplayOn函数代码示例

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


在下文中一共展示了BSP_LCD_DisplayOn函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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,代码来源:main.c

示例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,代码来源:lcd.c

示例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,代码来源:main.c

示例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,代码来源:main.c

示例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,代码来源:main.c

示例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,代码来源:main.c

示例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,代码来源:main.c

示例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,代码来源:main.c

示例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,代码来源:main.c

示例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,代码来源:main.c

示例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,代码来源:main.cpp

示例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,代码来源:main.c

示例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,代码来源:lcd.c

示例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,代码来源:main.c

示例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,代码来源:main.c


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