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

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

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

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

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

示例1: LowPowerStopRTCAlarm

/**  * @brief  Enter in stop mode and exit by an alarm  * @param  None  * @note   This example enter in stop mode.    * @retval None  */void LowPowerStopRTCAlarm(void){  kWindow_Popup("STOP Alarme", LCD_COLOR_WHITE, LCD_COLOR_BLUE,/                "/nset delay time/n",                          /                LCD_COLOR_BLUE, LCD_COLOR_WHITE );     /* set the alarm */  LowPowerHandleAlarm();    kWindow_Popup("STOP Alarm", LCD_COLOR_WHITE, LCD_COLOR_BLUE, /                "/n/nstop mode/nstarted/nwait alarm/nto exit/n",        /                LCD_COLOR_BLUE, LCD_COLOR_WHITE );      BSP_JOY_Init(JOY_MODE_GPIO);      /* Enter Stop Mode */  HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFE);    /* Restore the clock configuration */  SystemClock_STOPExit();    HAL_RTC_DeactivateAlarm(&RtcHandle, RTC_ALARM_A);  /* Clear the Alarm interrupt pending bit */  __HAL_RTC_ALARM_CLEAR_FLAG(&RtcHandle,RTC_FLAG_ALRAF);  /* Clear the EXTI's line Flag for RTC Alarm */  __HAL_RTC_EXTI_CLEAR_FLAG(RTC_EXTI_LINE_ALARM_EVENT);    BSP_JOY_Init(JOY_MODE_EXTI);}
开发者ID:GreyCardinalRus,项目名称:stm32-cube,代码行数:35,


示例2: LowPowerStopEXTI

/**  * @brief  Enter in stop mode and exit by pressingf the tamper button  * @param  None  * @note   This example enter in stop mode.    * @retval None  */void LowPowerStopEXTI(void){  kWindow_Popup("STOP EXTI", LCD_COLOR_WHITE, LCD_COLOR_BLUE,        /                "/n/nPres JOY sel to/nstart/nstop mode/n", /                 LCD_COLOR_WHITE, LCD_COLOR_BLUE );  HAL_Delay(100);  user_event = JOY_UP;  while(user_event != JOY_SEL)  {    user_action = 0;  };  kWindow_Popup("STOP EXTI", LCD_COLOR_WHITE, LCD_COLOR_BLUE,        /                "/n/nstop mode/nstarted/npress tamper/nto exit/n", /                 LCD_COLOR_BLUE, LCD_COLOR_WHITE );      /* User push-button (EXTI_Line0) will be used to wakeup the system from STOP mode */  BSP_PB_Init(BUTTON_TAMPER, BUTTON_MODE_EXTI);  /* avoid wakeup from JOY event */  BSP_JOY_Init(JOY_MODE_GPIO);      /* Clear PWR wake up Flag */  __HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);    /* Enter Stop Mode */  HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);    /* Restore the clock configuration */  SystemClock_STOPExit();    /* User push-button (EXTI_Line0) will be used to wakeup the system from STOP mode */  BSP_PB_Init(BUTTON_TAMPER, BUTTON_MODE_GPIO);    BSP_JOY_Init(JOY_MODE_EXTI);  }
开发者ID:GreyCardinalRus,项目名称:stm32-cube,代码行数:40,


示例3: DUAL_InitApplication

/**  * @brief  DUALCORE application Init.  * @param  None  * @retval None  */static void DUAL_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 the LEDs */  BSP_LED_Init(LED1);  BSP_LED_Init(LED2);  BSP_LED_Init(LED3);  BSP_LED_Init(LED4);    /* Initialize the LCD */  BSP_LCD_Init();    /* Initialize 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:EarnestHein89,项目名称:STM32Cube_FW_F4,代码行数:33,


示例4: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  /* STM32F469xx HAL library initialization */  HAL_Init();  /* Configure the system clock to 180 MHz */  SystemClock_Config();  /* Initialize IO expander (MFX) */  BSP_IO_Init();  /* Configure LED1, LED2, LED3 and LED4 */  BSP_LED_Init(LED1);  BSP_LED_Init(LED2);  BSP_LED_Init(LED3);  BSP_LED_Init(LED4);  /* Initialize IO expander */  BSP_IO_Init();  /* Initialize Joystick */  if (BSP_JOY_Init(JOY_MODE_GPIO) == 0)  {    JoyButtonInitialized = 1;  }  /* Init CDC Application */  USBD_Init(&USBD_Device_HS, &VCP_Desc, 1);  /* Init HID Application */  USBD_Init(&USBD_Device_FS, &HID_Desc, 0);  /* Add Supported Classes */  USBD_RegisterClass(&USBD_Device_HS, &USBD_CDC);  USBD_RegisterClass(&USBD_Device_FS, &USBD_HID);    /* Add CDC Interface Class */  USBD_CDC_RegisterInterface(&USBD_Device_HS, &USBD_CDC_fops);  /* Start Device Process */  USBD_Start(&USBD_Device_FS);  USBD_Start(&USBD_Device_HS);  /* Run Application (Interrupt mode) */  while (1)  {    Toggle_Leds();    if(HID_SendReport == 1)    {      HID_SendReport = 0;      GetPointerData(HID_Buffer);      /* Send data though IN endpoint*/      if((HID_Buffer[1] != 0) || (HID_Buffer[2] != 0))      {        USBD_HID_SendReport(&USBD_Device_FS, HID_Buffer, 4);      }    }  }}
开发者ID:Joe-Merten,项目名称:Stm32-Tools-Evaluation,代码行数:65,


示例5: 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);      /* Initialize the LCD */  BSP_LCD_Init();    /* 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:451506709,项目名称:automated_machine,代码行数:31,


示例6: DynamicSwitch_InitApplication

/**  * @brief  DS application Init.  * @param  None  * @retval None  */static void DynamicSwitch_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();    /* Initialize 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:PaxInstruments,项目名称:STM32CubeF4,代码行数:37,


示例7: 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_GPIO);    /* Configure Joystick in EXTI mode */  BSP_JOY_Init(JOY_MODE_EXTI);  /* Initialize the LCD */  BSP_LCD_Init();    /* 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:pierreroth64,项目名称:STM32Cube_FW_F4,代码行数:30,


示例8: Joystick_demo

/**  * @brief  Joystick Gpio demo  * @param  None  * @retval None  */void Joystick_demo (void){   uint8_t status = 0;  Joystick_SetHint();    status = BSP_JOY_Init();    if (status != HAL_OK)  {    BSP_LCD_SetBackColor(LCD_COLOR_WHITE);     BSP_LCD_SetTextColor(LCD_COLOR_RED);    BSP_LCD_DisplayStringAt(0, BSP_LCD_GetYSize()- 70, (uint8_t *)"ERROR", CENTER_MODE);    BSP_LCD_DisplayStringAt(0, BSP_LCD_GetYSize()- 55, (uint8_t *)"Joystick cannot", CENTER_MODE);    BSP_LCD_DisplayStringAt(0, BSP_LCD_GetYSize()- 40, (uint8_t *)"be initialized", CENTER_MODE);  }    while (1)  {    if (status == HAL_OK)    {      /* Get the Joystick State */      JoyState = BSP_JOY_GetState();      Joystick_SetCursorPosition();    }    if(CheckForUserInput() > 0)    {      return;    }    HAL_Delay(6);  }}
开发者ID:PaxInstruments,项目名称:STM32CubeF2,代码行数:38,


示例9: 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 the LEDs */  BSP_LED_Init(LED1);  BSP_LED_Init(LED2);  BSP_LED_Init(LED3);  BSP_LED_Init(LED4);    /* Initialize the LCD */  BSP_LCD_Init();    /* 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");     /* Start MSC Interface */  USBH_UsrLog("Starting MSC Demo");    Menu_Init();}
开发者ID:Lembed,项目名称:STM32CubeF1-mirrors,代码行数:34,


示例10: 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,


示例11: main

/**  * @brief  Main program.  * @param  None  * @retval None  */int main(void){  /* Reset of all peripherals, Initializes the Flash interface and the Systick. */  HAL_Init();    /* Initialize LEDs */  BSP_LED_Init(LED1);  BSP_LED_Init(LED2);  BSP_LED_Init(LED3);  BSP_LED_Init(LED4);    /* Configure the system clock to 72 MHz */  SystemClock_Config();    /* Initialize Joystick */  BSP_JOY_Init(JOY_MODE_GPIO);    /* Configure Key push-button for remote wakeup */  BSP_PB_Init(BUTTON_KEY, BUTTON_MODE_EXTI);    /* Init Device Library */  USBD_Init(&USBD_Device, &HID_Desc, 0);    /* Register the HID class */  USBD_RegisterClass(&USBD_Device, &USBD_HID);    /* Start Device Process */  USBD_Start(&USBD_Device);    /* Infinite loop */  while (1)  {  }}
开发者ID:Lembed,项目名称:STM32CubeF1-mirrors,代码行数:39,


示例12: 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();    /* 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:PaxInstruments,项目名称:STM32CubeF2,代码行数:37,


示例13: 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,


示例14: 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,


示例15: Joystick_exti_demo

/**  * @brief  Joystick Exti demo  * @param  None  * @retval None  */void Joystick_exti_demo (void){  uint8_t status = 0;  uint32_t ITstatus = 0;  Joystick_SetHint(1);  status = BSP_JOY_Init(JOY_MODE_EXTI);  if (status != IO_OK)  {    BSP_LCD_SetBackColor(LCD_COLOR_WHITE);    BSP_LCD_SetTextColor(LCD_COLOR_RED);    BSP_LCD_DisplayStringAt(0, BSP_LCD_GetYSize()- 95, (uint8_t *)"ERROR", CENTER_MODE);    BSP_LCD_DisplayStringAt(0, BSP_LCD_GetYSize()- 80, (uint8_t *)"Joystick cannot be initialized", CENTER_MODE);  }  if (status == IO_OK)  {    Joystick_SetCursorPosition();  }	  while (1)  /* pull for USER button in GPIO mode */  {    if (status == IO_OK)    {      if (MfxExtiReceived == 1)      {        MfxExtiReceived = 0;        ITstatus = BSP_IO_ITGetStatus(JOY_ALL_PINS);        if (ITstatus)        {          /* Get the Joystick State */          JoyState = BSP_JOY_GetState();          Joystick_SetCursorPosition();        }        BSP_IO_ITClear();        /* poll if joystick is still pressed until it is released*/        while ( BSP_JOY_GetState() != JOY_NONE)        {          Joystick_SetCursorPosition();          HAL_Delay(5);        }      }    }    if(CheckForUserInput() > 0)    {      return;    }    HAL_Delay(5);  }}
开发者ID:eemei,项目名称:library-stm32f4,代码行数:57,


示例16: 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 the LEDs */  BSP_LED_Init(LED1);  BSP_LED_Init(LED2);  BSP_LED_Init(LED3);  BSP_LED_Init(LED4);      /*Initialize Joystick */  BSP_JOY_Init(JOY_MODE_GPIO);    /* Init MSC Application */  USBD_Init(&USBD_Device_HS, &MSC_Desc, 1);      /* Init HID Application */  USBD_Init(&USBD_Device_FS, &HID_Desc, 0);    /* Add Supported Classes */  USBD_RegisterClass(&USBD_Device_HS, &USBD_MSC);  USBD_RegisterClass(&USBD_Device_FS, &USBD_HID);    /* Add Storage callbacks for MSC Class */  USBD_MSC_RegisterStorage(&USBD_Device_HS, &USBD_DISK_fops);    /* Start Device Process */  USBD_Start(&USBD_Device_FS);  USBD_Start(&USBD_Device_HS);    /* Run Application (Interrupt mode)*/  while (1)  {    GetPointerData(HID_Buffer);          if((HID_Buffer[1] != 0) || (HID_Buffer[2] != 0))    {      USBD_HID_SendReport(&USBD_Device_FS, HID_Buffer, 4);    }   }}
开发者ID:chsigi,项目名称:blindschleiche,代码行数:55,


示例17: 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 LED1 and LED3 */  BSP_LED_Init(LED1);  BSP_LED_Init(LED3);  /* Configure Key Button */  BSP_PB_Init(BUTTON_TAMPER, BUTTON_MODE_EXTI);    /* Configure Joystick using MFX in IT mode in order to wakeup system after standby */  BSP_JOY_Init(JOY_MODE_EXTI);  /* RTC configuration */  RTC_Config();    /* Turn on LED1 */  BSP_LED_On(LED1);  /* Enable WKUP pin */  HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN1);  /* Infinite loop */  while (1)  {    if (AuthorizeToggle)    {      /* Toggle LED1 */      BSP_LED_Toggle(LED1);      AuthorizeToggle = 0;    }    if (MfxExtiReceived)    {      /* Clear MFX IT */      BSP_IO_ITClear();      MfxExtiReceived = 0;    }  }}
开发者ID:pierreroth64,项目名称:STM32Cube_FW_F4,代码行数:54,


示例18: 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,


示例19: 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,


示例20: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  /* STM32F3xx HAL library initialization:       - Configure the Flash prefetch       - 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();  /* Initialize LEDs */  BSP_LED_Init(LED1);  BSP_LED_Init(LED2);  BSP_LED_Init(LED3);  BSP_LED_Init(LED4);  /* Configure the system clock to 72 MHz */  SystemClock_Config();  /* Change Systick priority: should be higher than Key button interrupt */  HAL_NVIC_SetPriority(SysTick_IRQn,0,0);  /* Initialize Joystick */  BSP_JOY_Init(JOY_MODE_GPIO);  /* Configure Key button for remote wakeup */  BSP_PB_Init(BUTTON_KEY, BUTTON_MODE_EXTI);  /* Init Device Library */  USBD_Init(&USBD_Device, &HID_Desc, 0);  /* Register the HID class */  USBD_RegisterClass(&USBD_Device, &USBD_HID);  /* Start Device Process */  USBD_Start(&USBD_Device);  while (1)  {  }}
开发者ID:afconsult-south,项目名称:dragonfly-fcb,代码行数:50,


示例21: LowPowerStandbyRTCAlarm

/**  * @brief  Run the Lowpower Standby mode RTC Alarm  * @param  None.  * @note   run and display information about the lowpower feature.    * @retval None.  */void LowPowerStandbyRTCAlarm(void){  kWindow_Popup("STANDBY Alarm", LCD_COLOR_WHITE, LCD_COLOR_BLUE,/                "/nset delay time/n",                            /                LCD_COLOR_BLUE, LCD_COLOR_WHITE );    /* Set the alarm */  LowPowerHandleAlarm();    kWindow_Popup("", LCD_COLOR_WHITE, LCD_COLOR_WHITE, /                "/n/nstandby mode/nstarted/nwait alarm/nto exit/nand reset/n", /                LCD_COLOR_BLUE, LCD_COLOR_WHITE );      BSP_JOY_Init(JOY_MODE_GPIO);  /*#### Enter StandBy mode ####*/  HAL_PWR_EnterSTANDBYMode();}
开发者ID:GreyCardinalRus,项目名称:stm32-cube,代码行数:24,


示例22: 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 the LEDs */  BSP_LED_Init(LED1);  BSP_LED_Init(LED2);  BSP_LED_Init(LED3);  BSP_LED_Init(LED4);      /*Initialize Joystick */  BSP_JOY_Init(JOY_MODE_GPIO);    /* Init MSC Application */  USBD_Init(&USBD_Device_HS, &VCP_Desc, 1);      /* Init HID Application */  USBD_Init(&USBD_Device_FS, &HID_Desc, 0);    /* Add Supported Classes */  USBD_RegisterClass(&USBD_Device_HS, &USBD_CDC);  USBD_RegisterClass(&USBD_Device_FS, &USBD_HID);      /* Add CDC Interface Class */  USBD_CDC_RegisterInterface(&USBD_Device_HS, &USBD_CDC_fops);    /* Start Device Process */  USBD_Start(&USBD_Device_FS);  USBD_Start(&USBD_Device_HS);    /* Run Application (Interrupt mode)*/  while (1)  {  }}
开发者ID:Bosvark,项目名称:STM32Cube_FW_F4_V1.1.0,代码行数:49,


示例23: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  /* Enable the CPU Cache */  CPU_CACHE_Enable();    /* STM32F7xx HAL library initialization:       - Configure the Flash ART accelerator on ITCM interface       - Configure the Systick to generate an interrupt each 1 msec       - Set NVIC Group Priority to 4       - Low Level Initialization     */  HAL_Init();    /* Configure the System clock to have a frequency of 216 MHz */  SystemClock_Config();      /* Configure LED1 and LED3 */  BSP_LED_Init(LED1);  BSP_LED_Init(LED3);    /* Initialize Joystick */  if (BSP_JOY_Init(JOY_MODE_GPIO) == 0)  {    JoyButtonInitialized = 1;  }    /* Configure Key button for remote wakeup */  BSP_PB_Init(BUTTON_TAMPER, BUTTON_MODE_EXTI);    /* Init Device Library */  USBD_Init(&USBD_Device, &HID_Desc, 0);    /* Add Supported Class */  USBD_RegisterClass(&USBD_Device, USBD_HID_CLASS);    /* Start Device Process */  USBD_Start(&USBD_Device);    /* Run Application (Interrupt mode) */  while (1)  {  }}
开发者ID:MrZANE42,项目名称:verisure1512,代码行数:48,


示例24: 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,


示例25: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  /* STM32F446xx HAL library initialization */  HAL_Init();    /* Configure the system clock to 180 MHz */  SystemClock_Config();  /* Initialize IO expander */  BSP_IO_Init();  /* Configure LED1, LED2, LED3 and LED4 */  BSP_LED_Init(LED1);  BSP_LED_Init(LED2);  BSP_LED_Init(LED3);  BSP_LED_Init(LED4);  LEDsInitialized = 1;    /* Initialize Joystick */  if (BSP_JOY_Init(JOY_MODE_GPIO) == 0)  {    JoyButtonInitialized = 1;  }    /* Configure Key button for remote wakeup */  BSP_PB_Init(BUTTON_TAMPER, BUTTON_MODE_EXTI);    /* Init Device Library */  USBD_Init(&USBD_Device, &HID_Desc, 0);    /* Add Supported Class */  USBD_RegisterClass(&USBD_Device, USBD_HID_CLASS);    /* Start Device Process */  USBD_Start(&USBD_Device);    /* Run Application (Interrupt mode) */  while (1)  {  }}
开发者ID:Lembed,项目名称:STM32CubeF4-mirrors,代码行数:46,


示例26: DynamicSwitch_InitApplication

/**  * @brief  DS application Init.  * @param  None  * @retval None  */static void DynamicSwitch_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 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:ClintHaerinck,项目名称:STM32Cube_FW_F4,代码行数:46,


示例27: 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,


示例28: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  /* STM32F2xx 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 120 MHz */  SystemClock_Config();    /* Change Systick priority: should be higher than Key button interrupt */  HAL_NVIC_SetPriority(SysTick_IRQn,0,0);    /* Configure LED1, LED2, LED3 and LED4 */  BSP_LED_Init(LED1);  BSP_LED_Init(LED2);  BSP_LED_Init(LED3);  BSP_LED_Init(LED4);    /* Initialize Joystick */  BSP_JOY_Init(JOY_MODE_GPIO);      /* Configure Key button for remote wakeup */  BSP_PB_Init(BUTTON_KEY, BUTTON_MODE_EXTI);    /* Init Device Library */  USBD_Init(&USBD_Device, &HID_Desc, 0);    /* Add Supported Class */  USBD_RegisterClass(&USBD_Device, &USBD_HID);    /* Start Device Process */  USBD_Start(&USBD_Device);  while (1);}
开发者ID:GreyCardinalRus,项目名称:stm32-cube,代码行数:45,


示例29: HDMI_CEC_demo

/**  * @brief Test HDMI CEC Hardware.  * @param  None  * @retval None  */void HDMI_CEC_demo(void){    /* Display the demo description */  HdmiCec_SetHint();  /* Configuration of the joystick in GPIO mode */  BSP_JOY_Init(JOY_MODE_GPIO);    /* Select the device type of the board */  HdmiCec_SelectDevice();  /* Initialization of the HDMI CEC */  if (BSP_HDMI_CEC_Init() != HDMI_CEC_OK)  {    Error_Handler();  }    /* Display informations after initialization */  HdmiCec_DisplayInitInfo();    /* Display connected devices */  HdmiCec_DisplayConnectedDevices();  /* Infinite loop */  while(!CheckForUserInput())  {     if(ReceivedFrame != 0)    {      /* Display received message */      HdmiCec_DisplayReceivedMsg();            /* Handle the received messages */      BSP_HDMI_CEC_CommandCallBack();            /* Display connected devices */      HdmiCec_DisplayConnectedDevices();    }  }}
开发者ID:NjordCZ,项目名称:stm32cubef0,代码行数:45,



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


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