本文整理汇总了C++中GUI_Init函数的典型用法代码示例。如果您正苦于以下问题:C++ GUI_Init函数的具体用法?C++ GUI_Init怎么用?C++ GUI_Init使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GUI_Init函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
/**
* @function main
* @brief entry point
* @param none
* @return dummy
*/
int32_t main(void) {
timer_t tmInit;
UcInit(); /*uc init; shall be the first one*/
TicksInit(); /*software clock init*/
LCD_Init(); /*start the ILI932X*/
/* start a timer; backlight will be turned on once this timer will elapse
* -> this avoids a white flash*/
tmInit = GetTimeout(120);
P2D_Init();
GUI_Init();
TouchScreenCalib(NULL);
TouchScreenEnable();
/*mount the file system*/
disk_initialize(0);
f_mount(0, &Fatfs);
/* wait the 120ms timeout */
while(IsTimerElapsed(tmInit) == false) DelayMs(1);
BacklightInit();
/*set the main task*/
pCurrentTask = &SetupTask;
/*main loop*/
while(1) {
/*execute the main task, if any*/
if(pCurrentTask != NULL) pCurrentTask();
/*GUI task*/
GUI_DrawObjects();
GUI_DBG_Task();
/*software RTC task*/
RtcTask();
/*CPU limiter; reduces the power consumption*/
DelayMs(1);
}
/*never arrive here*/
return -1;
}
示例2: MainTask
/*********************************************************************
*
* MainTask
*/
void MainTask(void) {
GUI_Init();
//
// Use memory devices for all windows
//
#if GUI_SUPPORT_MEMDEV
WM_SetCreateFlags(WM_CF_MEMDEV);
WM_EnableMemdev(WM_HBKWIN);
#endif
WM_SetDesktopColor(GUI_GREEN);
while(1) {
_Font = _Color = 0;
GUI_ExecDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), &_cbDialog, 0, 0, 0);
GUI_Delay(1000);
}
}
示例3: MainTask
/*********************************************************************
*
* MainTask
*/
void MainTask(void) {
GUI_Init();
//
// Check if recommended memory for the sample is available
//
if (GUI_ALLOC_GetNumFreeBytes() < RECOMMENDED_MEMORY) {
GUI_ErrorOut("Not enough memory available.");
return;
}
WM_SetCallback(WM_HBKWIN, _cbBkWindow);
WM_SetCreateFlags(WM_CF_MEMDEV); // Use memory devices on all windows to avoid flicker
while (1) {
GUI_ExecDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbCallback, 0, 0, 0);
GUI_Delay(1000);
}
}
示例4: GUI_SEGGERLIBRARY_Init
/* API initializes the Segger library */
GUI_SEGGERLIBRARY_STATUS_t GUI_SEGGERLIBRARY_Init(GUI_SEGGERLIBRARY_t *handle)
{
GUI_SEGGERLIBRARY_STATUS_t status;
status = GUI_SEGGERLIBRARY_STATUS_SUCCESS;
#if (GUI_SEGGERLIBRARY_RTOS_PRESENT == 0)
status = (GUI_SEGGERLIBRARY_STATUS_t)SYSTIMER_Init(handle->systimer_handler);
#endif
#if (CMSIS_RTOS_RTX_PRESENT == 1)
status = (GUI_SEGGERLIBRARY_STATUS_t)CMSIS_RTOS_RTX_Init(&CMSIS_RTOS_RTX_0);
#endif
if (status == GUI_SEGGERLIBRARY_STATUS_SUCCESS)
{
/* Initialize SPI as well as the port and pin for GPIO */
#if (SPI_INTERFACE == 1)
status = (GUI_SEGGERLIBRARY_STATUS_t)SPI_MASTER_Init(handle->spi_master_handler);
#if !USER_DEFINED_LCD
if (status == GUI_SEGGERLIBRARY_STATUS_SUCCESS)
{
XMC_GPIO_Init(handle->config->portNo, handle->config->pinNo, handle->config->gpio);
status = GUI_SEGGERLIBRARY_STATUS_SUCCESS;
}
else
{
status = GUI_SEGGERLIBRARY_STATUS_FAILURE;
}
#endif
#endif
if (handle->enable_at_init == true)
{
GUI_Init();
}
}
else
{
status = GUI_SEGGERLIBRARY_STATUS_FAILURE;
}
return (status);
}
示例5: main
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration----------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* Configure the system clock */
SystemClock_Config();
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_DMA_Init();
MX_CRC_Init();
MX_USART1_UART_Init();
// MX_RTC_Init(); /**< 重新用cube生成工程时 注释掉此函数 再下载 */
/* USER CODE BEGIN 2 */
rtc_init(); /**< 使用改造后的初始化函数实现备份掉电时的数据 */
GUI_Init();
GUI_UC_SetEncodeUTF8();
GUI_SetFont(&GUI_Font24B_1);
GUI_SetBkColor(GUI_BLACK);
GUI_SetColor(GUI_GREEN);
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
RTC_display_current_time(20, 170);
RTC_display_current_date(120, 170);
}
/* USER CODE END 3 */
}
示例6: App_Task1
static void App_Task1(void *p_arg)
{
(void)p_arg;
LED_GPIO_Conf();
GUI_Init();
GUI_SetBkColor(GUI_RED);
GUI_SetColor(GUI_BLUE);
GUI_Clear();
while(1)
{
LED0(On);
OSTimeDly(500);
LED0(Off);
OSTimeDly(500);
MainTask();
}
}
示例7: MainTask
void MainTask(void) {
SPINBOX_Handle hSpin;
FRAMEWIN_Handle hFrame;
WM_HWIN hClient;
GUI_Init();
WM_SetCallback(WM_HBKWIN, _cbBk);
hFrame = FRAMEWIN_CreateEx(110, 60, 100, 80, WM_HBKWIN, WM_CF_SHOW, 0, ID_FRAMEWIN_0, "Spinbox", 0);
hClient = WM_GetClientWindow(hFrame);
FRAMEWIN_SetSkin(hFrame, FRAMEWIN_SKIN_FLEX);
FRAMEWIN_SetFont(hFrame, GUI_FONT_16B_ASCII);
hSpin = SPINBOX_CreateEx(10, 10, 60, 20, hClient, WM_CF_SHOW, GUI_ID_SPINBOX0, 5, 2222);
SPINBOX_SetSkin(hSpin, SPINBOX_SKIN_FLEX);
while (1) {
GUI_Delay(100);
}
}
示例8: test_gui
/*******************************************************************************
* Function Name : testgui
* Description : GUI测试函数,初化后,显示数据
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void test_gui(void)
{
int i;
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_CRC, ENABLE);
GUI_Init();
GUI_Initialized = 1;
GUI_DispChars('/', 53);
for( i= 0; i < 240; i += 8)
{
GUI_DispCharAt('/', 312, i);
GUI_DispCharAt('/', 1, i);
}
GUI_DispChars('/', 52);
GUI_SetFont(&GUI_Font24B_ASCII);
GUI_SetColor(GUI_RED);
GUI_DispStringAt("This is a test program!",10,110);
}
示例9: MainTask
/*********************************************************************
*
* MainTask
*/
void MainTask(void) {
//
// Init GUI
//
GUI_Init();
//
// Create tasks
//
CREATE_TASK(&aTCB[0], "Task_0", Task_0, 100, Stack_0);
CREATE_TASK(&aTCB[1], "Task_1", Task_1, 50, Stack_1);
CREATE_TASK(&aTCB[2], "Task_2", Task_2, 50, Stack_2);
CREATE_TASK(&aTCB[3], "GUI_TASK", _GUI_Task, 1, Stack_3);
//
// Start multitasking
//
START_MT();
}
示例10: main
int main(void)
{
GUI_MEMDEV_Handle hMem0,hMem1;
SysTick_Config(180000);
SDRAM_Init();
LCD_Config();
GUI_Init();
GUI_SetFont(&GUI_Font32B_ASCII);
GUI_SetBkColor(GUI_BLUE);
GUI_SetColor(GUI_YELLOW);
GUI_Clear();
// GUI_DispStringAt("blacklight",0,100);
// GUIDEMO_Main();
hMem0 = GUI_MEMDEV_CreateFixed(0,0,100,50,GUI_MEMDEV_NOTRANS,GUI_MEMDEV_APILIST_32,GUI_COLOR_CONV_888);
hMem1 = GUI_MEMDEV_CreateFixed(0,0,100,50,GUI_MEMDEV_NOTRANS,GUI_MEMDEV_APILIST_32,GUI_COLOR_CONV_888);
GUI_MEMDEV_Select(hMem0);
GUI_Clear();
GUI_DispString("Text");
GUI_MEMDEV_CopyToLCDAt(hMem0,0,0);
while(1)
{
GUI_MEMDEV_Select(hMem1);
GUI_MEMDEV_DrawPerspectiveX(hMem0,0,0,50,50-50*i/100,100-100*i/100,25*i/100);
GUI_MEMDEV_CopyToLCDAt(hMem1,i,50+i);
GUI_Delay(10);
GUI_MEMDEV_Select(hMem1);
GUI_Clear();
GUI_MEMDEV_CopyToLCDAt(hMem1,i,50+i);
i+=1;
if(i>100)
{
i=0;
}
}
while(1);
}
示例11: MainTask
void MainTask(void) {
static GUI_PID_STATE OldState;
GUI_PID_STATE CurrentState;
int tEnd;
GUI_Init();
do {
WM_HWIN hButton0, hButton1;
WM_SetCallback(WM_HBKWIN, _cbBkWin);
hButton0 = _CreateButton(100, 220, 170, 150, 5, 25, "Dashboard" , &bmDashboard , GUI_ID_BUTTON0);
hButton1 = _CreateButton(370, 220, 170, 150, 5, 25, "Cash Terminal", &bmCashTerminal, GUI_ID_BUTTON1);
WM_SetFocus(hButton0);
tEnd = GUI_GetTime() + 4000;
do {
GUI_PID_GetState(&CurrentState);
if ((OldState.x != CurrentState.x) || (OldState.y != CurrentState.y)) {
tEnd = GUI_GetTime() + 10000;
}
OldState = CurrentState;
GUI_Delay(100);
if (GUI_GetTime() >= tEnd) {
if (_AppSelectionOld) {
_AppSelection = ((_AppSelectionOld - 1) ^ 1) + 1;
} else {
_AppSelection = APP_DASHBOARD;
}
}
} while (!_AppSelection && !_Break);
WM_DeleteWindow(hButton0);
WM_DeleteWindow(hButton1);
if (!_Break) {
switch (_AppSelection) {
case APP_DASHBOARD:
AppDashBoard();
break;
case APP_CASHTERMINAL:
AppCashTerminal();
break;
}
GUI_CURSOR_Hide();
_AppSelectionOld = _AppSelection;
_AppSelection = 0;
}
} while (!_Break);
}
示例12: rt_gui_thread_entry
void rt_gui_thread_entry(void* parameter)
{
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_CRC, ENABLE);
/*设置默认创建标记WM 然后会将 WM_PAINT 消息输出重定向到存储设备中,再复制到显
示器中。如果整个窗口的内存不够,会自动使用分段*/
WM_SetCreateFlags(WM_CF_MEMDEV);
touch_config();
Timer5Config();
GUI_Init();
GUI_Initialized = 1;
ADC_Config();
LED_Init();
RS485GPIOConfig();
RS485Write();
GUIDEMO_Main();
}
示例13: main
int main(void)
{
InitHard();
// Init the STemWin GUI Library.
GUI_Init();
GUI_Initialized = 1;
// Activate the use of memory device feature.
WM_SetCreateFlags(WM_CF_MEMDEV);
WM_HWIN hDlg = CreateTestDlg();
while (1)
{
GUI_Delay(10);
}
}
示例14: MainTask
/*********************************************************************
*
* MainTask
*/
void MainTask(void) {
GUI_Init();
#if GUI_SUPPORT_MEMDEV
WM_SetCreateFlags(WM_CF_MEMDEV);
#endif
WM_SetCallback(WM_HBKWIN, &_cbBkWindow);
//
// Create message box and wait until it is closed
//
while (1) {
GUI_MessageBox("This text is shown\nin a message box",
"Caption/Title", GUI_MESSAGEBOX_CF_MOVEABLE);
GUI_Delay(750); // Wait for a short moment ...
GUI_MessageBox("New message !",
"Caption/Title", GUI_MESSAGEBOX_CF_MOVEABLE);
GUI_Delay(750);
}
}
示例15: MainTask
/*********************************************************************
*
* MainTask
*/
void MainTask(void) {
GUI_PID_STATE TouchState;
int xPhys;
int yPhys;
GUI_Init();
GUI_CURSOR_Show();
GUI_CURSOR_Select(&GUI_CursorCrossL);
GUI_SetBkColor(GUI_WHITE);
GUI_SetColor(GUI_BLACK);
GUI_Clear();
GUI_DispString("Measurement of\nA/D converter values");
while (1) {
GUI_TOUCH_GetState(&TouchState); // Get the touch position in pixel
xPhys = GUI_TOUCH_GetxPhys(); // Get the A/D mesurement result in x
yPhys = GUI_TOUCH_GetyPhys(); // Get the A/D mesurement result in y
//
// Display the measurement result
//
GUI_SetColor(GUI_BLUE);
GUI_DispStringAt("Analog input:\n", 0, 20);
GUI_GotoY(GUI_GetDispPosY() + 2);
GUI_DispString("x:");
GUI_DispDec(xPhys, 4);
GUI_DispString(", y:");
GUI_DispDec(yPhys, 4);
//
// Display the according position
//
GUI_SetColor(GUI_RED);
GUI_GotoY(GUI_GetDispPosY() + 4);
GUI_DispString("\nPosition:\n");
GUI_GotoY(GUI_GetDispPosY() + 2);
GUI_DispString("x:");
GUI_DispDec(TouchState.x,4);
GUI_DispString(", y:");
GUI_DispDec(TouchState.y,4);
//
// Wait a while
//
GUI_Delay(100);
};
}