• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ LCD_LOG_ClearTextZone函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: CDC_Handle_Receive_Menu

/**
  * @brief  Handles CDC Receive Menu. 
  * @param  None
  * @retval None
  */
void CDC_Handle_Receive_Menu(void)
{
  switch(CdcDemo.Receive_state)
  {
  case CDC_RECEIVE_IDLE:
    /* Start Reception */
    LCD_LOG_ClearTextZone();
    CdcDemo.Receive_state = CDC_RECEIVE_WAIT;
    USBH_CDC_Stop(&hUSBHost);
    LCD_DbgLog("Receiving data ...\n");
    
    xPos = 0;
    yLinePos = 5;
    
    memset(CDC_RX_Buffer, 0, RX_BUFF_SIZE); 
    USBH_CDC_Receive(&hUSBHost, CDC_RX_Buffer, RX_BUFF_SIZE);
    
    BSP_LCD_ClearStringLine(19);
    BSP_LCD_SetTextColor(LCD_COLOR_GREEN);
    BSP_LCD_DisplayStringAtLine(19, (uint8_t *)"Press User button to start sending data ");
    break;
    
  case CDC_RECEIVE_WAIT:
    if((BSP_PB_GetState(BUTTON_KEY) == SET) && (Appli_state != APPLICATION_DISCONNECT))
    {
      CdcDemo.state =  CDC_DEMO_WAIT;
      CdcDemo.Receive_state = CDC_RECEIVE_IDLE;
    }
    break;
    
  default:
    break;
  }
}
开发者ID:MrZANE42,项目名称:verisure1512,代码行数:39,代码来源:cdc_receive.c


示例2: Log_demo

/**
  * @brief  LCD Log demo 
  * @param  None
  * @retval None
  */
void Log_demo(void)
{ 
  JOYState_TypeDef JoyState = JOY_NONE;
  uint8_t i = 0;
  
  /* Wait For User inputs */
  while(CheckForUserInput() == 0);
  
  BSP_JOY_Init(JOY_MODE_GPIO);
  
  /* Initialize LCD Log module */
  LCD_LOG_Init();
  
  /* Show Header and Footer texts */
  LCD_LOG_SetHeader((uint8_t *)"Log Example");
  LCD_LOG_SetFooter((uint8_t *)"Use Joystick to scroll up/down");
  
  /* Output User logs */
  for (i = 0; i < 10; i++)
  {
    LCD_UsrLog ("This is Line %d \n", i);
  }
  
  HAL_Delay(2000);
  
  /* Clear Old logs */
  LCD_LOG_ClearTextZone();
  
  /* Output new user logs */
  for (i = 0; i < 30; i++)
  {
    LCD_UsrLog ("This is Line %d \n", i);
  }
  
  /* Check for joystick user input for scroll (back and forward) */
  while (1)
  {
    JoyState = BSP_JOY_GetState();
    switch(JoyState)
    {
    case JOY_UP:
      LCD_LOG_ScrollBack();
      break;
      
    case JOY_DOWN:
      LCD_LOG_ScrollForward();
      break;          
      
    default:
      break;           
    }
    if(CheckForUserInput() > 0)
    {
      return;
    }    
    HAL_Delay (10);
  }
}
开发者ID:451506709,项目名称:automated_machine,代码行数:63,代码来源:log.c


示例3: HID_KeyboardMenuProcess

/**
  * @brief  Handles Keyboard Menu.
  * @param  None
  * @retval None
  */
void HID_KeyboardMenuProcess(void)
{
  if(hid_demo.keyboard_state == HID_KEYBOARD_START)
  {
    LCD_LOG_ClearTextZone();
    BSP_LCD_ClearStringLine(19);
    USBH_HID_KeybdInit(&hUSBHost);
    USR_KEYBRD_Init();
  }
}
开发者ID:Joe-Merten,项目名称:Stm32-Tools-Evaluation,代码行数:15,代码来源:keyboard.c


示例4: USBH_USR_DeviceDisconnected

/**
* @brief  USBH_DisconnectEvent
*         Device disconnect event
* @param  None
* @retval Staus
*/
void USBH_USR_DeviceDisconnected (void)
{
  
  LCD_LOG_ClearTextZone();
  
  LCD_DisplayStringLine( LCD_PIXEL_HEIGHT - 42, "                                      ");
  LCD_DisplayStringLine( LCD_PIXEL_HEIGHT - 30, "                                      ");  
  
  /* Set default screen color*/
  LCD_ErrLog((void *)MSG_DEV_DISCONNECTED);
}
开发者ID:nhaberla,项目名称:stm32f4,代码行数:17,代码来源:usbh_usr_lcd.c


示例5: HID_MouseMenuProcess

/**
  * @brief  Manages Mouse Menu Process.  
  * @param  None
  * @retval None
  */
void HID_MouseMenuProcess(void)
{
  if(hid_demo.mouse_state == HID_MOUSE_START)
  {
    LCD_LOG_ClearTextZone();
    BSP_LCD_ClearStringLine(19);
    USBH_HID_MouseInit(&hUSBHost);
    USR_MOUSE_Init();
    HID_MOUSE_UpdatePosition(0,0);
  }
}  
开发者ID:nguyenvuhung,项目名称:STM32Cube_FW_F4,代码行数:16,代码来源:mouse.c


示例6: USR_KEYBRD_Init

/**
  * @brief  Init Keyboard window.
  * @param  None
  * @retval None
  */
static void USR_KEYBRD_Init(void)
{
  LCD_LOG_ClearTextZone();
  BSP_LCD_SetTextColor(LCD_COLOR_YELLOW);

  BSP_LCD_DisplayStringAtLine(4, (uint8_t *)"Use Keyboard to tape characters:                                                            ");
  BSP_LCD_SetTextColor(LCD_COLOR_WHITE);

  KeybrdCharXpos = KYBRD_FIRST_LINE;
  KeybrdCharYpos = KYBRD_FIRST_COLUMN;
}
开发者ID:Joe-Merten,项目名称:Stm32-Tools-Evaluation,代码行数:16,代码来源:keyboard.c


示例7: CDC_MenuProcess

/**
  * @brief  Manages CDC Menu Process.
  * @param  None
  * @retval None
  */
void CDC_MenuProcess(void)
{
  switch(CdcDemo.state)
  {
  case CDC_DEMO_WAIT:
    if(Appli_state == APPLICATION_READY)
    {
      BSP_LCD_SetTextColor(LCD_COLOR_GREEN);
      BSP_LCD_DisplayStringAtLine(19, (uint8_t *)"Press User button to start sending data ");
      
      /* Wait for User Input */
      while((BSP_PB_GetState(BUTTON_TAMPER) != SET) && (Appli_state != APPLICATION_DISCONNECT))
      {
      }
      CdcDemo.state = CDC_DEMO_SEND;
     
      /* Prevent debounce effect for user key */
      HAL_Delay(400);
      
      BSP_LCD_ClearStringLine(19);
    }
    break;
    
  case CDC_DEMO_SEND:
    /* Read and Write File Here */
    if(Appli_state == APPLICATION_READY)
    {
      CDC_Handle_Send_Menu();
    }
    break; 
    
    case CDC_DEMO_RECEIVE:
    if(Appli_state == APPLICATION_READY)
    {
      CDC_Handle_Receive_Menu();
    }
    break;
    
  default:
    break;
  }
  
  if(Appli_state == APPLICATION_DISCONNECT)
  {
    Appli_state = APPLICATION_IDLE;
    LCD_LOG_ClearTextZone();
    LCD_ErrLog("CDC device disconnected!\n");
    CdcDemo.state = CDC_DEMO_WAIT;
    CdcDemo.Receive_state = CDC_RECEIVE_IDLE;
    CdcDemo.Send_state = CDC_SEND_IDLE;
    CdcDemo.select = 0;
  }
}
开发者ID:RadMie,项目名称:STM32F7DiscoveryBase,代码行数:58,代码来源:menu.c


示例8: HID_MouseMenuProcess

/**
  * @brief  Manages Mouse Menu Process.  
  * @param  None
  * @retval None
  */
void HID_MouseMenuProcess(void)
{
  switch(hid_demo.mouse_state)
  {
  case HID_MOUSE_IDLE:
    hid_demo.mouse_state = HID_MOUSE_START;
    HID_SelectItem(DEMO_MOUSE_menu, 0);
    hid_demo.select = 0;
    prev_select = 0;
    break;
    
  case HID_MOUSE_WAIT:
    if(hid_demo.select != prev_select)
    {
      prev_select = hid_demo.select ;
      HID_SelectItem(DEMO_MOUSE_menu, hid_demo.select & 0x7F);
      
      /* Handle select item */
      if(hid_demo.select & 0x80)
      {
        switch(hid_demo.select & 0x7F)
        {
        case 0: 
          hid_demo.mouse_state = HID_MOUSE_START;
          break;
          
        case 1: /* Return */
          LCD_LOG_ClearTextZone();
          hid_demo.state = HID_DEMO_REENUMERATE;
          hid_demo.select = 0;
          break;
          
        default:
          break;
        }
      }
    }
    break; 
    
  case HID_MOUSE_START:
    USBH_HID_MouseInit(&hUSBHost);
    USR_MOUSE_Init();   
    hid_demo.mouse_state = HID_MOUSE_WAIT;
    HID_MOUSE_UpdatePosition(0,0);
    break;    
    
  default:
    break;
  }
  hid_demo.select &= 0x7F;  
}  
开发者ID:ClintHaerinck,项目名称:STM32Cube_FW_F4,代码行数:56,代码来源:mouse.c


示例9: HID_MouseMenuProcess

/**
  * @brief  Manages Mouse Menu Process.  
  * @param  None
  * @retval None
  */
void HID_MouseMenuProcess(void)
{
  switch(demo.mouse_state)
  {
  case HID_MOUSE_IDLE:
    demo.mouse_state = HID_MOUSE_START;
    Demo_SelectItem(DEMO_MOUSE_menu, 0);
    demo.select = 0;
    break;
    
  case HID_MOUSE_WAIT:
    if(demo.select != prev_select)
    {
      prev_select = demo.select;
      Demo_SelectItem(DEMO_MOUSE_menu, demo.select & 0x7F);
      
      /* Handle select item */
      if(demo.select & 0x80)
      {
        demo.select &= 0x7F;
        switch(demo.select)
        {
        case 0: 
          demo.mouse_state = HID_MOUSE_START;
          break;
          
        case 1: /* Return */
          LCD_LOG_ClearTextZone();
          demo.state = DEMO_IDLE;
          LCD_UsrLogY("> HID application closed.\n");
          demo.select = 0;
          break;
          
        default:
          break;
        }
      }
    }
    break; 
    
  case HID_MOUSE_START:
    USR_MOUSE_Init();   
    demo.mouse_state = HID_MOUSE_WAIT;
    HID_MOUSE_UpdatePosition(0,0);
    break;    
    
  default:
    break;
  }
}  
开发者ID:PaxInstruments,项目名称:STM32CubeF4,代码行数:55,代码来源:mouse.c


示例10: HID_KeyboardMenuProcess

/**
  * @brief  Handles Keyboard Menu.
  * @param  None
  * @retval None
  */
void HID_KeyboardMenuProcess(void)
{
  switch(hid_demo.keyboard_state)
  {
  case HID_KEYBOARD_IDLE:
    hid_demo.keyboard_state = HID_KEYBOARD_START;
    HID_SelectItem(DEMO_KEYBOARD_menu, 0);
    hid_demo.select = 0;
    prev_select = 0;
    break;

  case HID_KEYBOARD_WAIT:
    if(hid_demo.select != prev_select)
    {
      prev_select = hid_demo.select;
      HID_SelectItem(DEMO_KEYBOARD_menu, hid_demo.select & 0x7F);
      /* Handle select item */
      if(hid_demo.select & 0x80)
      {
        switch(hid_demo.select& 0x7F)
        {
        case 0:
          hid_demo.keyboard_state = HID_KEYBOARD_START;
          break;

        case 1: /* Return */
          LCD_LOG_ClearTextZone();
          hid_demo.state = HID_DEMO_REENUMERATE;
          hid_demo.select = 0;
          break;

        default:
          break;
        }
      }
    }
    break;

  case HID_KEYBOARD_START:
    USBH_HID_KeybdInit(&hUSBHost);
    USR_KEYBRD_Init();
    hid_demo.keyboard_state = HID_KEYBOARD_WAIT;
    break;

  default:
    break;
  }
  hid_demo.select &= 0x7F;
}
开发者ID:Joe-Merten,项目名称:Stm32-Tools-Evaluation,代码行数:54,代码来源:keyboard.c


示例11: HID_KeyboardMenuProcess

/**
  * @brief  Handle Keyboard 
  * @param  None
  * @retval None
  */
void HID_KeyboardMenuProcess(void)
{
  switch(demo.keyboard_state)
  {
  case HID_KEYBOARD_IDLE:
    demo.keyboard_state = HID_KEYBOARD_START;
    Demo_SelectItem(DEMO_KEYBOARD_menu, 0);   
    demo.select = 0;       
    break;
    
  case HID_KEYBOARD_WAIT:
    if(demo.select != prev_select)
    {
      prev_select = demo.select;
      Demo_SelectItem(DEMO_KEYBOARD_menu, demo.select & 0x7F);
      /* Handle select item */
      if(demo.select & 0x80)
      {
        demo.select &= 0x7F;
        switch(demo.select)
        {
        case 0: 
          demo.keyboard_state = HID_KEYBOARD_START;
          break;
          
        case 1: /* return */
          LCD_LOG_ClearTextZone();
          demo.state = DEMO_IDLE;
          LCD_UsrLogY("> HID application closed.\n");
          demo.select = 0;
          break;
          
        default:
          break;
        }
      }
    }
    break; 
    
  case HID_KEYBOARD_START:
    USR_KEYBRD_Init();   
    demo.keyboard_state = HID_KEYBOARD_WAIT;
    break;  
    
  default:
    break;
  }
}
开发者ID:RadMie,项目名称:STM32F7DiscoveryBase,代码行数:53,代码来源:keyboard.c


示例12: USBH_USR_DeviceDisconnected

/**
* @brief  USBH_DisconnectEvent
*         Device disconnect event
* @param  None
* @retval None
*/
void USBH_USR_DeviceDisconnected (void)
{
  
  LCD_SetBackColor(Black); 
  LCD_SetTextColor(Black);   
  
  LCD_LOG_ClearTextZone();

  LCD_DrawRect(MOUSE_WINDOW_X,
               MOUSE_WINDOW_Y, 
               MOUSE_WINDOW_HEIGHT,
               MOUSE_WINDOW_WIDTH);
  LCD_SetTextColor(White);    
  
  LCD_DisplayStringLine( LCD_PIXEL_HEIGHT - 42, "                                   ");
  LCD_DisplayStringLine( LCD_PIXEL_HEIGHT - 30, "                                   ");  
  
  LCD_ErrLog((void *)MSG_DEV_DISCONNECTED);
}
开发者ID:Seok-Jung,项目名称:STM32F207,代码行数:25,代码来源:usbh_usr.c


示例13: USR_MOUSE_Init

/**
  * @brief  Init Mouse window.    
  * @param  None
  * @retval None
  */
static void USR_MOUSE_Init(void)
{
  LCD_LOG_ClearTextZone();
  BSP_LCD_SetTextColor(LCD_COLOR_YELLOW);
  BSP_LCD_DisplayStringAtLine(4, (uint8_t *)"USB HID Host Mouse Demo...                     ");  
  BSP_LCD_SetTextColor(LCD_LOG_DEFAULT_COLOR);
  
  /* Display Mouse Window */
  BSP_LCD_DrawRect(MOUSE_WINDOW_X, MOUSE_WINDOW_Y, MOUSE_WINDOW_WIDTH, MOUSE_WINDOW_HEIGHT);
  
  HID_MOUSE_ButtonReleased(0);
  HID_MOUSE_ButtonReleased(1);
  HID_MOUSE_ButtonReleased(2);
  
  BSP_LCD_SetTextColor(LCD_COLOR_GREEN);
  BSP_LCD_SetBackColor(LCD_COLOR_BLACK);
  
  HID_MOUSE_UpdatePosition(0,0);
}
开发者ID:PaxInstruments,项目名称:STM32CubeF4,代码行数:24,代码来源:mouse.c


示例14: Log_demo

/**
  * @brief  LCD Log demo 
  * @param  None
  * @retval None
  */
void Log_demo(void)
{ 
  uint8_t i = 0;

  /* Initialize LCD Log module */
  LCD_LOG_Init();
  
  /* Show Header and Footer texts */
  LCD_LOG_SetHeader((uint8_t*)"This is the header");
  LCD_LOG_SetFooter((uint8_t*)"This is the footer");
  
  /* Wait For User inputs */
  while(CheckForUserInput() == 0);
  
  /* Output User logs */
  for (i = 0; i < 10; i++)
  {
    LCD_UsrLog ("This is Line %d \n", i);
    HAL_Delay(100);
  }
  
  HAL_Delay(1500);
  
   /* Clear Old logs */
  LCD_LOG_ClearTextZone();
  
   /* Output new user logs */
  for (i = 0; i < 30; i++)
  {
    LCD_UsrLog ("This is Line %d \n", i);
    HAL_Delay(100);
  }
  
  /* Check for joystick user input for scroll (back and forward) */
  while (1)
  {
    if(CheckForUserInput() > 0)
    {
      return;
    }    
    HAL_Delay (10);
  }
}
开发者ID:EarnestHein89,项目名称:STM32Cube_FW_F4,代码行数:48,代码来源:log.c


示例15: Log_demo

/**
  * @brief  LCD Log demo 
  * @param  None
  * @retval None
  */
void Log_demo(void)
{ 
  uint8_t i = 0;

  /* Wait For User inputs */
  while(CheckForUserInput() == 0);
  
  BSP_JOY_Init(JOY_MODE_GPIO);
  
  /* Initialize LCD Log module */
  LCD_LOG_Init();
  
  /* Show Header and Footer texts */
  LCD_LOG_SetHeader((uint8_t *)"Log Example");
  
  /* Output User logs */
  for (i = 0; i < 10; i++)
  {
    LCD_UsrLog ("This is Line %d \n", i);
  }
  
  HAL_Delay(2000);
  
   /* Clear Old logs */
  LCD_LOG_ClearTextZone();
  
   /* Output new user logs */
  for (i = 0; i < 30; i++)
  {
    LCD_UsrLog ("This is Line %d \n", i);
  }
  
  while (1)
  {
    if(CheckForUserInput() > 0)
    {
      return;
    }    
    HAL_Delay (10);
  }
}
开发者ID:jmoyerman,项目名称:stm32f0_cube,代码行数:46,代码来源:log.c


示例16: CDC_Handle_Send_Menu

/**
  * @brief  Handles CDC Send Menu. 
  * @param  None
  * @retval None
*/
void CDC_Handle_Send_Menu(void)
{
  switch(CdcDemo.Send_state)
  {
  case CDC_SEND_IDLE:
    CdcDemo.Send_state = CDC_SEND_WAIT;
    CDC_SendState = 0;
    USBH_CDC_Stop(&hUSBHost);
    memset(CDC_TX_Buffer, 0x5A, TX_BUFF_SIZE);
    LCD_LOG_ClearTextZone();
    LCD_DbgLog("Sending data ...\n"); 
    USBH_CDC_Transmit(&hUSBHost, CDC_TX_Buffer, TX_BUFF_SIZE);
    break;
  
  case CDC_SEND_WAIT:
    if(CDC_SendState == 1) /* Data sent */
    {
      BSP_LCD_ClearStringLine(19);
      BSP_LCD_SetTextColor(LCD_COLOR_GREEN);
      BSP_LCD_DisplayStringAtLine(19, (uint8_t *)"Press User button to start receiving data ");
      
      /* Wait for User Input */
      while((BSP_PB_GetState(BUTTON_KEY) != SET) && (Appli_state != APPLICATION_DISCONNECT))
      {
      }
      HAL_Delay(400);
      
      CdcDemo.state = CDC_DEMO_RECEIVE;
      CdcDemo.Send_state = CDC_SEND_IDLE;
    }
    break;
    
  default:
    break;
  }
}
开发者ID:MrZANE42,项目名称:verisure1512,代码行数:41,代码来源:cdc_send.c


示例17: HID_MenuThread

/**
  * @brief  User task
  * @param  pvParameters not used
  * @retval None
  */
void HID_MenuThread(void const *argument)
{
  for(;;)
  {
    if(osSemaphoreWait(MenuEvent , osWaitForever) == osOK)
    {
      switch(hid_demo.state)
      {
      case HID_DEMO_IDLE:
          hid_demo.state = HID_DEMO_START;
          osSemaphoreRelease(MenuEvent);
        break;  
        
      case HID_DEMO_START:
        if(Appli_state == APPLICATION_READY)
        {
          /* Wait for User Input */
          if(ButtonPressed == 1)
          {
            ButtonPressed = 0;
            if(USBH_HID_GetDeviceType(&hUSBHost) == HID_KEYBOARD)
            {
              hid_demo.keyboard_state = HID_KEYBOARD_START;
              hid_demo.state = HID_DEMO_KEYBOARD;
              HID_KeyboardMenuProcess();
            }
            else if(USBH_HID_GetDeviceType(&hUSBHost) == HID_MOUSE)
            {
              hid_demo.mouse_state = HID_MOUSE_START;
              hid_demo.state = HID_DEMO_MOUSE;
              HID_MouseMenuProcess();
            }
            else
            {
              LCD_ErrLog("No supported HID device!\n");
              hid_demo.state = HID_DEMO_IDLE;
            }
          }
          osSemaphoreRelease(MenuEvent);          
        }
        break;
        
      case HID_DEMO_MOUSE:
        if(Appli_state == APPLICATION_READY)
        {
          USBH_MouseDemo(&hUSBHost);
        }
        break;
        
      case HID_DEMO_KEYBOARD:
        if(Appli_state == APPLICATION_READY)  
        {
          USBH_KeybdDemo(&hUSBHost);
        }   
        break;
        
      default:
        break;
      }
      
      if(Appli_state == APPLICATION_DISCONNECT)
      {
        Appli_state = APPLICATION_IDLE; 
        LCD_LOG_ClearTextZone();
        BSP_LCD_ClearStringLine(19);
        LCD_ErrLog("HID device disconnected!\n");
        hid_demo.state = HID_DEMO_IDLE;
      }
    }
  }
}
开发者ID:z80,项目名称:stm32f429,代码行数:76,代码来源:menu.c


示例18: USR_KEYBRD_ProcessData

/**
  * @brief  Processes Keyboard data.
  * @param  data: Keyboard data to be displayed
  * @retval None
  */
void USR_KEYBRD_ProcessData(uint8_t data)
{
  if(data == '\n')
  {
    KeybrdCharYpos = KYBRD_FIRST_COLUMN;

    /* Increment char X position */
    KeybrdCharXpos += SMALL_FONT_LINE_WIDTH;

    if(KeybrdCharXpos > KYBRD_LAST_LINE)
    {
      LCD_LOG_ClearTextZone();
      KeybrdCharXpos = KYBRD_FIRST_LINE;
      KeybrdCharYpos = KYBRD_FIRST_COLUMN;
    }
  }
  else if(data == '\r')
  {
    /* Manage deletion of character and upadte cursor location */
    if(KeybrdCharYpos == KYBRD_FIRST_COLUMN)
    {
      /* First character of first line to be deleted */
      if(KeybrdCharXpos == KYBRD_FIRST_LINE)
      {
        KeybrdCharYpos = KYBRD_FIRST_COLUMN;
      }
      else
      {
        KeybrdCharXpos += SMALL_FONT_LINE_WIDTH;
        KeybrdCharYpos = (KYBRD_LAST_COLUMN + SMALL_FONT_COLUMN_WIDTH);
      }
    }
    else
    {
      KeybrdCharYpos += SMALL_FONT_COLUMN_WIDTH;
    }
    BSP_LCD_DisplayChar(KeybrdCharYpos, KeybrdCharXpos, ' ');
  }
  else
  {
    /* Update the cursor position on LCD */
    BSP_LCD_DisplayChar(KeybrdCharYpos, KeybrdCharXpos, data);

    /* Increment char Y position */
    KeybrdCharYpos += SMALL_FONT_COLUMN_WIDTH;

    /* Check if the Y position has reached the last column */
    if(KeybrdCharYpos == KYBRD_LAST_COLUMN)
    {
      KeybrdCharYpos = KYBRD_FIRST_COLUMN;

      /* Increment char X position */
      KeybrdCharXpos += SMALL_FONT_LINE_WIDTH;
    }

    if(KeybrdCharXpos > KYBRD_LAST_LINE)
    {
      LCD_LOG_ClearTextZone();
      KeybrdCharXpos = KYBRD_FIRST_LINE;
      /* Start New Display of the cursor position on LCD */
      BSP_LCD_DisplayChar(KeybrdCharYpos,KeybrdCharXpos, data);
    }
  }
}
开发者ID:Joe-Merten,项目名称:Stm32-Tools-Evaluation,代码行数:69,代码来源:keyboard.c


示例19: HID_MenuProcess

/**
  * @brief  Manages HID Menu Process.
  * @param  None
  * @retval None
  */
void HID_MenuProcess(void)
{
  switch(hid_demo.state)
  {    
  case HID_DEMO_START:
    if(Appli_state == APPLICATION_READY)
    {
      if(USBH_HID_GetDeviceType(&hUSBHost) == HID_KEYBOARD)
      {
        hid_demo.keyboard_state = HID_KEYBOARD_IDLE; 
        hid_demo.state = HID_DEMO_KEYBOARD;
        
        BSP_LCD_SetTextColor(LCD_COLOR_GREEN);
        BSP_LCD_DisplayStringAtLine(19, (uint8_t *)"Press User button to start");
        
        /* Wait for User Input */
        while((BSP_PB_GetState(BUTTON_WAKEUP) != SET) && (Appli_state != APPLICATION_DISCONNECT))
        {
        }
        BSP_LCD_ClearStringLine(19);
        
        HID_KeyboardMenuProcess();
      }
      else if(USBH_HID_GetDeviceType(&hUSBHost) == HID_MOUSE)
      {
        hid_demo.mouse_state = HID_MOUSE_IDLE;  
        hid_demo.state = HID_DEMO_MOUSE;
        
        BSP_LCD_SetTextColor(LCD_COLOR_GREEN);
        BSP_LCD_DisplayStringAtLine(19, (uint8_t *)"Press User button to start");
        
        /* Wait for User Input */
        while((BSP_PB_GetState(BUTTON_WAKEUP) != SET) && (Appli_state != APPLICATION_DISCONNECT))
        {
        }
        BSP_LCD_ClearStringLine(19);
        
        HID_MouseMenuProcess();
      }
      else
      {
        LCD_ErrLog("No supported HID device!\n");
        hid_demo.state = HID_DEMO_START;
      }
    }
    break;

  case HID_DEMO_MOUSE:
    if(Appli_state == APPLICATION_READY)
    {
      USBH_MouseDemo(&hUSBHost);
    }
    break; 
    
  case HID_DEMO_KEYBOARD:
    if(Appli_state == APPLICATION_READY)  
    {
      USBH_KeybdDemo(&hUSBHost);
    }   
    break;
    
  default:
    break;
  }

  if(Appli_state == APPLICATION_DISCONNECT)
  {
    Appli_state = APPLICATION_IDLE; 
    LCD_LOG_ClearTextZone();
    LCD_ErrLog("HID device disconnected!\n");
    hid_demo.state = HID_DEMO_START;
    hid_demo.select = 0;    
  }
}
开发者ID:nguyenvuhung,项目名称:STM32Cube_FW_F4,代码行数:79,代码来源:menu.c


示例20: HID_MenuThread


//.........这里部分代码省略.........
    if(osSemaphoreWait(MenuEvent , osWaitForever) == osOK)
    {
      switch(hid_demo.state)
      {
      case HID_DEMO_IDLE:
        HID_SelectItem(DEMO_HID_menu, 0); 
        hid_demo.state = HID_DEMO_WAIT;
        hid_demo.select = 0;
        osSemaphoreRelease(MenuEvent);
        break;        
        
      case HID_DEMO_WAIT:
        if(hid_demo.select != prev_select)
        {
          prev_select = hid_demo.select;        
          
          HID_SelectItem(DEMO_HID_menu, hid_demo.select & 0x7F); 
          /* Handle select item */
          if(hid_demo.select & 0x80)
          {
            switch(hid_demo.select & 0x7F)
            {
            case 0:
              hid_demo.state = HID_DEMO_START; 
              osSemaphoreRelease(MenuEvent);
              break;
              
            case 1:
              hid_demo.state = HID_DEMO_REENUMERATE;
              osSemaphoreRelease(MenuEvent);
              break;
              
            default:
              break;
            }
          }
        }
        break; 
        
      case HID_DEMO_START:
        if(Appli_state == APPLICATION_READY)
        {
          if(USBH_HID_GetDeviceType(&hUSBHost) == HID_KEYBOARD)
          {
            hid_demo.keyboard_state = HID_KEYBOARD_IDLE; 
            hid_demo.state = HID_DEMO_KEYBOARD;
          }
          else if(USBH_HID_GetDeviceType(&hUSBHost) == HID_MOUSE)
          {
            hid_demo.mouse_state = HID_MOUSE_IDLE;  
            hid_demo.state = HID_DEMO_MOUSE;        
          }
        }
        else
        {
          LCD_ErrLog("No supported HID device!\n");
          hid_demo.state = HID_DEMO_WAIT;
        }
        osSemaphoreRelease(MenuEvent);
        break;
        
      case HID_DEMO_REENUMERATE:
        /* Force MSC Device to re-enumerate */
        USBH_ReEnumerate(&hUSBHost); 
        hid_demo.state = HID_DEMO_WAIT;
        osSemaphoreRelease(MenuEvent);
        break;
        
      case HID_DEMO_MOUSE:
        if(Appli_state == APPLICATION_READY)
        {
          HID_MouseMenuProcess();
          USBH_MouseDemo(&hUSBHost);
        }
        break; 
        
      case HID_DEMO_KEYBOARD:
        if(Appli_state == APPLICATION_READY)  
        {    
          HID_KeyboardMenuProcess();
          USBH_KeybdDemo(&hUSBHost);
        }   
        break;
        
      default:
        break;
      }
      
      if(Appli_state == APPLICATION_DISCONNECT)
      {
        Appli_state = APPLICATION_IDLE; 
        LCD_LOG_ClearTextZone();
        LCD_ErrLog("HID device disconnected!\n");
        hid_demo.state = HID_DEMO_IDLE;
        hid_demo.select = 0;    
      }
      hid_demo.select &= 0x7F;
    }
  }
}
开发者ID:nidhiyanandh,项目名称:STM32Cube_FW_F4_V1.5.0_GCC_Makefile,代码行数:101,代码来源:menu.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ LCD_LOG_Init函数代码示例发布时间:2022-05-30
下一篇:
C++ LCD_Init函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap