本文整理汇总了C++中BSP_LCD_SelectLayer函数的典型用法代码示例。如果您正苦于以下问题:C++ BSP_LCD_SelectLayer函数的具体用法?C++ BSP_LCD_SelectLayer怎么用?C++ BSP_LCD_SelectLayer使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了BSP_LCD_SelectLayer函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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 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
示例2: 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
示例3: LCD_Config
/**
* @brief LCD configuration
* @param None
* @retval None
*/
static void LCD_Config(void)
{
uint8_t lcd_status = LCD_OK;
/* LCD DSI initialization in mode Video Burst */
/* Initialize DSI LCD */
// BSP_LCD_InitEx(LCD_ORIENTATION_PORTRAIT); /* uncomment if Portrait orientation is needed */
BSP_LCD_Init(); /* Uncomment if default config (landscape orientation) is needed */
while(lcd_status != LCD_OK);
BSP_LCD_LayerDefaultInit(0, LCD_FB_START_ADDRESS);
BSP_LCD_LayerDefaultInit(1, LCD_BG_LAYER_ADDRESS);
/* Select the LCD Background Layer */
BSP_LCD_SelectLayer(LTDC_ACTIVE_LAYER_BACKGROUND);
/* Clear the Background Layer */
BSP_LCD_Clear(LCD_COLOR_BLACK);
/* Select the LCD Foreground Layer */
BSP_LCD_SelectLayer(LTDC_ACTIVE_LAYER_FOREGROUND);
/* Clear the Foreground Layer */
BSP_LCD_Clear(LCD_COLOR_BLACK);
/* Configure the transparency for foreground and background :
Increase the transparency */
BSP_LCD_SetTransparency(LTDC_ACTIVE_LAYER_BACKGROUND, 0);
BSP_LCD_SetTransparency(LTDC_ACTIVE_LAYER_FOREGROUND, 100);
}
开发者ID:pierreroth64,项目名称:STM32Cube_FW_F4,代码行数:35,代码来源:main.c
示例4: 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
示例5: 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
示例6: CDC_InitApplication
/**
* @brief CDC application Init
* @param None
* @retval None
*/
static void CDC_InitApplication(void)
{
/* Configure LED1, LED2, LED3 and LED4 */
BSP_LED_Init(LED1);
BSP_LED_Init(LED2);
BSP_LED_Init(LED3);
BSP_LED_Init(LED4);
/* Configure KEY Button */
BSP_PB_Init(BUTTON_WAKEUP, BUTTON_MODE_GPIO);
/* Initialize the LCD */
BSP_LCD_Init();
BSP_LCD_LayerDefaultInit(0, LCD_FB_START_ADDRESS);
BSP_LCD_SelectLayer(0);
/* Init the LCD Log module */
LCD_LOG_Init();
LCD_LOG_SetHeader((uint8_t *)" USB OTG FS CDC Host");
LCD_UsrLog("USB Host library started.\n");
/* Start CDC Interface */
USBH_UsrLog("Starting CDC Demo");
Menu_Init();
}
开发者ID:pierreroth64,项目名称:STM32Cube_FW_F4,代码行数:32,代码来源:main.c
示例7: 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, 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();
BSP_LCD_LayerDefaultInit(0, LCD_FB_START_ADDRESS);
BSP_LCD_SelectLayer(0);
/* Init 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:Joe-Merten,项目名称:Stm32-Tools-Evaluation,代码行数:39,代码来源:main.c
示例8: 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
示例9: 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
示例10: DUAL_InitApplication
/**
* @brief DUALCORE application Init
* @param None
* @retval None
*/
static void DUAL_InitApplication(void)
{
/* Configure LED1s */
BSP_LED_Init(LED1);
BSP_LED_Init(LED2);
BSP_LED_Init(LED3);
BSP_LED_Init(LED4);
/* Configure KEY Button */
BSP_PB_Init(BUTTON_TAMPER, BUTTON_MODE_GPIO);
/* Configure Joystick in EXTI mode */
BSP_JOY_Init(JOY_MODE_EXTI);
/* Initialize the LCD */
BSP_LCD_Init();
BSP_LCD_LayerDefaultInit(0, LCD_FB_START_ADDRESS);
BSP_LCD_SelectLayer(0);
/* 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:Joe-Merten,项目名称:Stm32-Tools-Evaluation,代码行数:36,代码来源:main.c
示例11: 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
示例12: 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
示例13: Display_DemoDescription
/**
* @brief Display main demo messages
* @param None
* @retval None
*/
static void Display_DemoDescription(void)
{
char desc[50];
/* Set LCD Foreground Layer */
BSP_LCD_SelectLayer(1);
BSP_LCD_SetFont(&LCD_DEFAULT_FONT);
/* Clear the LCD */
BSP_LCD_SetBackColor(LCD_COLOR_WHITE);
BSP_LCD_Clear(LCD_COLOR_WHITE);
/* Set the LCD Text Color */
BSP_LCD_SetTextColor(LCD_COLOR_DARKBLUE);
/* Display LCD messages */
BSP_LCD_DisplayStringAt(0, 10, (uint8_t *)"STM32756G BSP", CENTER_MODE);
BSP_LCD_DisplayStringAt(0, 35, (uint8_t *)"Drivers examples", CENTER_MODE);
/* Draw Bitmap */
BSP_LCD_DrawBitmap((BSP_LCD_GetXSize() - 80)/2, 65, (uint8_t *)stlogo);
BSP_LCD_SetFont(&Font12);
BSP_LCD_DisplayStringAt(0, BSP_LCD_GetYSize()- 20, (uint8_t *)"Copyright (c) STMicroelectronics 2015", CENTER_MODE);
BSP_LCD_SetFont(&Font16);
BSP_LCD_SetTextColor(LCD_COLOR_BLUE);
BSP_LCD_FillRect(0, BSP_LCD_GetYSize()/2 + 15, BSP_LCD_GetXSize(), 60);
BSP_LCD_SetTextColor(LCD_COLOR_WHITE);
BSP_LCD_SetBackColor(LCD_COLOR_BLUE);
BSP_LCD_DisplayStringAt(0, BSP_LCD_GetYSize() / 2 + 30, (uint8_t *)"Press Tamper push-button to start :", CENTER_MODE);
sprintf(desc,"%s example", BSP_examples[DemoIndex].DemoName);
BSP_LCD_DisplayStringAt(0, BSP_LCD_GetYSize()/2 + 45, (uint8_t *)desc, CENTER_MODE);
}
开发者ID:RadMie,项目名称:STM32F7DiscoveryBase,代码行数:40,代码来源:main.c
示例14: main
/**
* @brief Main program
* @param None
* @retval None
*/
int main(void)
{
uint8_t lcd_status = LCD_OK;
/* 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 the SDRAM */
BSP_SDRAM_Init();
/* Initialize the LCD */
lcd_status = LCD_Init();
OnError_Handler(lcd_status != LCD_OK);
/* Initialize LTDC layer 0 iused for Hint */
BSP_LCD_LayerDefaultInit(0, LAYER0_ADDRESS);
BSP_LCD_SelectLayer(0);
/* Display example brief */
LCD_BriefDisplay();
/*Draw first image */
CopyBuffer((uint32_t *)Images[ImageIndex++], (uint32_t *)LAYER0_ADDRESS, 240, 160, 320, 240);
pending_buffer = 0;
/*Refresh the LCD display*/
HAL_DSI_Refresh(&hdsi_eval);
/* Infinite loop */
while (1)
{
if(pending_buffer < 0)
{
CopyBuffer((uint32_t *)Images[ImageIndex++], (uint32_t *)LAYER0_ADDRESS, 240, 160, 320, 240);
if(ImageIndex >= 2)
{
ImageIndex = 0;
}
pending_buffer = 0;
HAL_DSI_Refresh(&hdsi_eval);
}
/* Wait some time before switching to next image */
HAL_Delay(2000);
}
}
开发者ID:pierreroth64,项目名称:STM32Cube_FW_F4,代码行数:64,代码来源:main.c
示例15: main
/**
* @brief Main program
* @param None
* @retval None
*/
int main(void)
{
/* This sample code shows how to use STM32F4xx GPIO HAL API to toggle PG13
IOs (connected to LED3 on STM32F429i-Discovery board)
in an infinite loop.
To proceed, 3 steps are required: */
/* 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();
/* -1- Initialize LEDs mounted on Discovery board */
BSP_LED_Init(LED3);
BSP_LED_Init(LED4);
/* -2- Configure the system clock */
SystemClock_Config();
/* -3- Configure EXTI Line0 (connected to PA0 pin) in interrupt mode */
EXTILine0_Config();
/*##-1- Initialize the LCD #################################################*/
/* Initialize the LCD */
BSP_LCD_Init();
/* Initialise the LCD Layers */
BSP_LCD_LayerDefaultInit(1, LCD_FRAME_BUFFER);
/* Gleich bleibende Einstellenungen am LCD-Display */
/* Set LCD Foreground Layer */
BSP_LCD_SelectLayer(1);
BSP_LCD_SetFont(&LCD_DEFAULT_FONT);
/* Clear the LCD */
BSP_LCD_SetBackColor(LCD_COLOR_WHITE);
BSP_LCD_Clear(LCD_COLOR_WHITE);
/* Set the LCD Text Color */
BSP_LCD_SetTextColor(LCD_COLOR_DARKBLUE);
/* Display LCD messages */
BSP_LCD_DisplayStringAt(0, 10, (uint8_t*)"GOLF CART", CENTER_MODE);
BSP_LCD_SetFont(&Font16);
BSP_LCD_DisplayStringAt(0, 35, (uint8_t*)"v in km/h", CENTER_MODE);
/* Infinite loop */
while (1)
{
if (uAenderung) {
GeschwindigkeitAufLCD(uAktuelleGeschwindigkeit_zehntelkmh);
uAenderung = 0;
}
}
}
开发者ID:vollmermen,项目名称:golfcart,代码行数:64,代码来源:main.c
示例16: main
/**
* @brief Main program
* @param None
* @retval None
*/
int main(void)
{
HAL_StatusTypeDef hal_status = HAL_OK;
uint8_t lcd_status = LCD_OK;
/* 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 */
SystemClock_Config();
/* Wait until MFX is ready after reset */
HAL_Delay(100);
/* Configure LED1, LED2 and LED3 */
BSP_LED_Init(LED1);
BSP_LED_Init(LED2);
BSP_LED_Init(LED3);
/*##-1- Initialize the SDRAM ##############################################*/
BSP_SDRAM_Init();
/*##-2- Initialize the LCD #################################################*/
/* Proceed to LTDC, DSI initialization and LCD screen initialization
* with the configuration filled in above */
lcd_status = BSP_LCD_Init();
LCD_LayerDefaultInit(1, (uint32_t)&aBufferResult);
BSP_LCD_SelectLayer(1);
OnError_Handler(lcd_status != LCD_OK);
HAL_Delay(100);
/*##-3- DMA2D configuration ################################################*/
DMA2D_Config();
/*##-4- Start DMA2D transfer ###############################################*/
hal_status = HAL_DMA2D_Start_IT(&Dma2dHandle,
(uint32_t)LCD_COLOR_GREEN, /* Fill the DMA2D output register with this color */
(uint32_t)&aBufferResult, /* DMA2D output register */
LAYER_SIZE_X,
LAYER_SIZE_Y);
OnError_Handler(hal_status != HAL_OK);
while (1)
{
;
}
}
开发者ID:pierreroth64,项目名称:STM32Cube_FW_F4,代码行数:64,代码来源:main.c
示例17: 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
示例18: Error_Handler
/**
* @brief This function is executed in case of error occurrence.
* @param None
* @retval None
*/
static void Error_Handler(void)
{
/* Turn LED3 on */
BSP_LED_On(LED3);
BSP_LCD_SelectLayer(0);
while(1)
{
}
}
开发者ID:pierreroth64,项目名称:STM32Cube_FW_F4,代码行数:14,代码来源:main.c
示例19: 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
示例20: main
/**
* @brief Main program
* @param None
* @retval None
*/
int main(void)
{
HAL_StatusTypeDef hal_status = HAL_OK;
uint8_t lcd_status = LCD_OK;
/* 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 */
SystemClock_Config();
/* Wait until MFX is ready after reset */
HAL_Delay(100);
/* Configure LED1, LED2 and LED3 */
BSP_LED_Init(LED1);
BSP_LED_Init(LED2);
BSP_LED_Init(LED3);
/*##-1- Initialize the LCD #################################################*/
/* Proceed to LTDC, DSI initialization and LCD screen initialization
* with the configuration filled in above */
lcd_status = BSP_LCD_Init();
LCD_LayerDefaultInit(0, (uint32_t)&ARGB8888_300x120); //Background layer shows original image, on top of the screen
LCD_LayerDefaultInit(1, (uint32_t)&aBufferResult); //Forground layer shows converted image, on bottom of the screen
BSP_LCD_SelectLayer(1);
OnError_Handler(lcd_status != LCD_OK);
HAL_Delay(100);
/*##-2- DMA2D configuration ################################################*/
DMA2D_Config();
/*##-3- Start DMA2D transfer ###############################################*/
hal_status = HAL_DMA2D_Start_IT(&Dma2dHandle,
(uint32_t)&ARGB8888_300x120, /* Input image 300x120 of format ARGB8888 (32 bpp) */
(uint32_t)&aBufferResult, /* Output image of same size 300x120 after conversion by PFC in ARGB4444 (16 bpp) */
LAYER_SIZE_X,
LAYER_SIZE_Y);
OnError_Handler(hal_status != HAL_OK);
while (1)
{
;
}
}
开发者ID:z80,项目名称:stm32f429,代码行数:62,代码来源:main.c
注:本文中的BSP_LCD_SelectLayer函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论