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

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

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

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

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

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


示例2: BSP_InitIO

void  BSP_InitIO (void)    {#ifdef _TARGET_440H	BSP_IO_Init();	LCD_Init();	Tmr_Init();    LED_Init();                                                         /* Initialize LEDs                                  */	LS2_UART_Init();#else	SYSTEMConfig(BSP_CLK_FREQ, SYS_CFG_WAIT_STATES | SYS_CFG_PCACHE);	    BSP_IO_Init(); #ifndef AX12_REG_PROGRAMMING                                                     // Initialize the board's I/Os    Tmr_Init();                                                         // Initialize the timers    BSP_InitIntCtrl();                                                  // Initialize the interrupt controller#endif    LED_Init();                                                         // Initialize LEDs    //PB_Init();                                                        // Initialize the push buttons    ADC_Init();	PMP_Init();	LS2_UART_Init();	PWM_Init();#endif}
开发者ID:Vanganesha,项目名称:oufffteam,代码行数:25,


示例3: BSP_TS_ITConfig

/**  * @brief  Configures and enables the touch screen interrupts.  * @retval TS_OK if all initializations are OK. Other value if error.  */uint8_t BSP_TS_ITConfig(void){  uint8_t ts_status = TS_ERROR;  uint8_t io_status = IO_ERROR;  /* Initialize the IO */  io_status = BSP_IO_Init();  if(io_status != IO_OK)  {    return (ts_status);  }  /* Configure TS IT line IO : is active low on FT6206 (see data sheet)                           */  /* Configure TS_INT_PIN (MFX_IO_14) low level to generate MFX_IRQ_OUT in EXTI on MCU            */  /* This will call HAL_GPIO_EXTI_Callback() that is setting variable 'mfx_exti_received' to 1b1' */  io_status = BSP_IO_ConfigPin(TS_INT_PIN, IO_MODE_IT_LOW_LEVEL_PU);  if(io_status != IO_OK)  {    return (ts_status);  }  /* Enable the TS in interrupt mode */  /* In that case the INT output of FT6206 when new touch is available */  /* is active low and directed on MFX IO14 */  ts_driver->EnableIT(I2C_Address);  /* If arrived here : set good status on exit */  ts_status = TS_OK;  return (ts_status);}
开发者ID:robbie-cao,项目名称:stm32f4-discovery,代码行数:35,


示例4: BSP_TS_Init

/**  * @brief  Initializes and configures the touch screen functionalities and   *         configures all necessary hardware resources (GPIOs, clocks..).  * @param  xSize: Maximum X size of the TS area on LCD  * @param  ySize: Maximum Y size of the TS area on LCD    * @retval TS_OK if all initializations are OK. Other value if error.  */uint8_t BSP_TS_Init(uint16_t xSize, uint16_t ySize){  uint8_t mfxstm32l152_id = 0;    tsBundaryX = xSize;  tsBundaryY = ySize;  /* Initialize IO functionalities (MFX) used by TS */  BSP_IO_Init();     /* Read ID and verify if the IO expander is ready */  mfxstm32l152_id = mfxstm32l152_io_drv.ReadID(IO_I2C_ADDRESS);  if((mfxstm32l152_id == MFXSTM32L152_ID_1) || (mfxstm32l152_id == MFXSTM32L152_ID_2))  {     /* Initialize the TS driver structure */    ts_driver = &mfxstm32l152_ts_drv;      AddressI2C = TS_I2C_ADDRESS;    tsOrientation = TS_SWAP_NONE;  }    /* Initialize the TS driver */  ts_driver->Init(AddressI2C);  ts_driver->Start(AddressI2C);    return TS_OK;}
开发者ID:jaggies,项目名称:matchbox,代码行数:34,


示例5: 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();  /* Init HID Application */  HID_InitApplication();  /* Init Host Library */  USBH_Init(&hUSBHost, USBH_UserProcess, 0);    /* Add Supported Class */  USBH_RegisterClass(&hUSBHost, USBH_HID_CLASS);    /* Start Host Process */  USBH_Start(&hUSBHost);    /* Run Application (Blocking mode) */  while (1)  {    /* USB Host Background task */    USBH_Process(&hUSBHost);          /* HID Menu Process */    HID_MenuProcess();  }}
开发者ID:pierreroth64,项目名称:STM32Cube_FW_F4,代码行数:38,


示例6: 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 200 Mhz */  SystemClock_Config();    /* Initialize IO expander */  BSP_IO_Init();    /* Start task */  osThreadDef(USER_Thread, StartThread, osPriorityNormal, 0, 8 * configMINIMAL_STACK_SIZE);  osThreadCreate(osThread(USER_Thread), NULL);    /* Create Application Queue */  osMessageQDef(osqueue, 1, uint16_t);  AppliEvent = osMessageCreate(osMessageQ(osqueue), NULL);    /* Start scheduler */  osKernelStart();    /* We should never get here as control is now taken by the scheduler */  for( ;; );}
开发者ID:MrZANE42,项目名称:verisure1512,代码行数:38,


示例7: 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();  /* Init Device Library */  USBD_Init(&USBD_Device, &MSC_Desc, 0);    /* Add Supported Class */  USBD_RegisterClass(&USBD_Device, USBD_MSC_CLASS);    /* Add Storage callbacks for MSC Class */  USBD_MSC_RegisterStorage(&USBD_Device, &USBD_DISK_fops);    /* Start Device Process */  USBD_Start(&USBD_Device);    /* Run Application (Interrupt mode) */  while (1)  {  }}
开发者ID:eemei,项目名称:library-stm32f4,代码行数:33,


示例8: 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();    /* Start task */    osThreadDef(USER_Thread, StartThread, osPriorityNormal, 0, 8 * configMINIMAL_STACK_SIZE);    osThreadCreate(osThread(USER_Thread), NULL);    /* Create Application Queue */    osMessageQDef(osqueue, 1, uint16_t);    AppliEvent = osMessageCreate(osMessageQ(osqueue), NULL);    /* Start scheduler */    osKernelStart();    /* We should never get here as control is now taken by the scheduler */    for( ;; );}
开发者ID:PaxInstruments,项目名称:STM32CubeF4,代码行数:30,


示例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 180 MHz */  SystemClock_Config();    /*Initialize the IO module*/  BSP_IO_Init ();    /* Configure LED1 and LED3 */  BSP_LED_Init(LED1);  BSP_LED_Init(LED3);      /*##-1- Link the USB Host disk I/O driver ##################################*/  if(FATFS_LinkDriver(&USBH_Driver, USBDISKPath) == 0)  {    /*##-2- Init Host Library ################################################*/    USBH_Init(&hUSB_Host, USBH_UserProcess, 0);        /*##-3- Add Supported Class ##############################################*/    USBH_RegisterClass(&hUSB_Host, USBH_MSC_CLASS);        /*##-4- Start Host Process ###############################################*/    USBH_Start(&hUSB_Host);        /*##-5- Run Application (Blocking mode) ##################################*/    while (1)    {      /* USB Host Background task */      USBH_Process(&hUSB_Host);            /* Mass Storage Application State Machine */      switch(Appli_state)      {      case APPLICATION_START:        MSC_Application();        Appli_state = APPLICATION_IDLE;        break;               case APPLICATION_IDLE:      default:        break;            }    }  }  /* Infinite loop */  while (1)  {  }    }
开发者ID:Lembed,项目名称:STM32CubeF4-mirrors,代码行数:64,


示例10: SD_Detect_MspInit

/**  * @brief  Initializes the SD Detect pin MSP.  * @param  hsd: SD handle  * @param  Params  * @retval None  */static void SD_Detect_MspInit(void){  if (BSP_IO_Init() == IO_ERROR)  {    BSP_ErrorHandler();  }  BSP_IO_ConfigPin(SD_DETECT_PIN, IO_MODE_INPUT_PU);}
开发者ID:cyysu,项目名称:AliOS-Things,代码行数:14,


示例11: BSP_CAMERA_Init

/**  * @brief  Initializes the camera.  * @param  uint32_t Resolution : camera sensor requested resolution (x, y) : standard resolution  *         naming QQVGA, QVGA, VGA ...  *  * @retval Camera status  */uint8_t BSP_CAMERA_Init(uint32_t Resolution){   DCMI_HandleTypeDef *phdcmi;  uint8_t status = CAMERA_ERROR;  /* Get the DCMI handle structure */  phdcmi = &hDcmiEval;  /*** Configures the DCMI to interface with the camera module ***/  /* DCMI configuration */  phdcmi->Init.CaptureRate      = DCMI_CR_ALL_FRAME;  phdcmi->Init.HSPolarity       = DCMI_HSPOLARITY_HIGH;  phdcmi->Init.SynchroMode      = DCMI_SYNCHRO_HARDWARE;  phdcmi->Init.VSPolarity       = DCMI_VSPOLARITY_HIGH;  phdcmi->Init.ExtendedDataMode = DCMI_EXTEND_DATA_8B;  phdcmi->Init.PCKPolarity      = DCMI_PCKPOLARITY_RISING;  phdcmi->Instance              = DCMI;  /* Configure IO functionalities for CAMERA detect pin */  BSP_IO_Init();     /* Apply Camera Module hardware reset */  BSP_CAMERA_HwReset();  /* Check if the CAMERA Module is plugged on board */  if(BSP_IO_ReadPin(CAM_PLUG_PIN) == BSP_IO_PIN_SET)  {    status = CAMERA_NOT_DETECTED;    return status; /* Exit with error */  }  /* Read ID of Camera module via I2C */  if (s5k5cag_ReadID(CAMERA_I2C_ADDRESS) == S5K5CAG_ID)  {    /* Initialize the camera driver structure */    camera_drv = &s5k5cag_drv;    CameraHwAddress = CAMERA_I2C_ADDRESS;    /* DCMI Initialization */    BSP_CAMERA_MspInit(&hDcmiEval, NULL);    HAL_DCMI_Init(phdcmi);    /* Camera Module Initialization via I2C to the wanted 'Resolution' */    camera_drv->Init(CameraHwAddress, Resolution);    CameraCurrentResolution = Resolution;    /* Return CAMERA_OK status */    status = CAMERA_OK;  }  else  {    /* Return CAMERA_NOT_SUPPORTED status */	status = CAMERA_NOT_SUPPORTED;  }  return status;}
开发者ID:ASzz,项目名称:verisure1512,代码行数:65,


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


示例13: BSP_TS_ITConfig

/**  * @brief  Configures and enables the touch screen interrupts.  * @retval TS_OK if all initializations are OK. Other value if error.  */uint8_t BSP_TS_ITConfig(void){  /* Initialize the IO */  BSP_IO_Init();      /* Enable the TS ITs */  ts_driver->EnableIT(AddressI2C);  return TS_OK;  }
开发者ID:jaggies,项目名称:matchbox,代码行数:14,


示例14: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  /* Configure Key Button */  BSP_PB_Init(BUTTON_KEY, BUTTON_MODE_GPIO);  /* Unlock the Flash to enable the flash control register access */  FLASH_If_FlashUnlock();  /* Test if User button on the STM32446E_EVAL is pressed */  if (BSP_PB_GetState(BUTTON_KEY) != GPIO_PIN_SET)  {    /* Check Vector Table: Test if user code is programmed starting from address    "APPLICATION_ADDRESS" */    if (((*(__IO uint32_t*)APPLICATION_ADDRESS) & 0xFF000000 ) == 0x20000000)    {      /* Jump to user application */      JumpAddress = *(__IO uint32_t*) (APPLICATION_ADDRESS + 4);      Jump_To_Application = (pFunction) JumpAddress;      /* Initialize user application's Stack Pointer */      __set_MSP(*(__IO uint32_t*) APPLICATION_ADDRESS);      Jump_To_Application();    }  }  /* STM32F446xx HAL library initialization */  HAL_Init();  /* Configure the system clock to 180 Mhz */  SystemClock_Config();  /* Initialize IO expander */  BSP_IO_Init();  /* Init FW upgrade Application */  FW_InitApplication();  /* Init Host Library */  USBH_Init(&hUSBHost, USBH_UserProcess, 0);  /* Add Supported Class */  USBH_RegisterClass(&hUSBHost, USBH_MSC_CLASS);  /* Start Host Process */  USBH_Start(&hUSBHost);  /* Run Application (Blocking mode)*/  while (1)  {    /* USB Host Background task */    USBH_Process(&hUSBHost);    /* FW Menu Process */    FW_UPGRADE_Process();  }}
开发者ID:Joe-Merten,项目名称:Stm32-Tools-Evaluation,代码行数:60,


示例15: SD_Detect_MspDeInit

/**  * @brief  Initializes the SD Detect pin MSP.  * @param  hsd: SD handle  * @param  Params  * @retval None  */static void SD_Detect_MspDeInit(void){  /* Disable all interrupts */  /*HAL_NVIC_DisableIRQ(MFX_INT_EXTI_IRQn);*/  if (BSP_IO_Init() == IO_ERROR)  {    BSP_ErrorHandler();  }  BSP_IO_ConfigPin(SD_DETECT_PIN, IO_MODE_ANALOG);}
开发者ID:cyysu,项目名称:AliOS-Things,代码行数:17,


示例16: BSP_Config

/**  * @brief  Initializes the STM32469I-EVAL's LCD and LEDs resources.  * @param  None  * @retval None  */static void BSP_Config(void){    /* Initialize IO expander */    BSP_IO_Init();    /* Initialize STM32469I-EVAL's LEDs */    BSP_LED_Init(LED1);    BSP_LED_Init(LED2);    BSP_LED_Init(LED3);    BSP_LED_Init(LED4);}
开发者ID:PaxInstruments,项目名称:STM32CubeF4,代码行数:17,


示例17: BSP_CAMERA_Init

/**  * @brief  Initializes the camera.  * @param  Camera: Pointer to the camera configuration structure  * @retval Camera status  */uint8_t BSP_CAMERA_Init(uint32_t Resolution){   DCMI_HandleTypeDef *phdcmi;    uint8_t ret = CAMERA_ERROR;    /* Get the DCMI handle structure */  phdcmi = &hdcmi_eval;    /*** Configures the DCMI to interface with the camera module ***/  /* DCMI configuration */  phdcmi->Init.CaptureRate      = DCMI_CR_ALL_FRAME;    phdcmi->Init.HSPolarity       = DCMI_HSPOLARITY_LOW;  phdcmi->Init.SynchroMode      = DCMI_SYNCHRO_HARDWARE;  phdcmi->Init.VSPolarity       = DCMI_VSPOLARITY_LOW;  phdcmi->Init.ExtendedDataMode = DCMI_EXTEND_DATA_8B;  phdcmi->Init.PCKPolarity      = DCMI_PCKPOLARITY_RISING;  phdcmi->Instance              = DCMI;    /* Configure IO functionalities for camera detect pin */  BSP_IO_Init();     /* Set the camera STANDBY pin */  BSP_IO_ConfigPin(XSDN_PIN, IO_MODE_OUTPUT);  BSP_IO_WritePin(XSDN_PIN, SET);    /* Check if the camera is plugged */  if(BSP_IO_ReadPin(CAM_PLUG_PIN))  {    return CAMERA_ERROR;  }    /* DCMI Initialization */  DCMI_MspInit();    HAL_DCMI_Init(phdcmi);    if(ov2640_ReadID(CAMERA_I2C_ADDRESS) == OV2640_ID)  {     /* Initialize the camera driver structure */    camera_drv = &ov2640_drv;             /* Camera Init */       camera_drv->Init(CAMERA_I2C_ADDRESS, Resolution);        /* Return CAMERA_OK status */    ret = CAMERA_OK;  }     current_resolution = Resolution;    return ret;}
开发者ID:PaulingZhou,项目名称:RM2016_0X3_SystemBoard,代码行数:57,


示例18: BSP_Config

/**  * @brief  Initializes the STM324x9I-EVAL's LCD and LEDs resources.  * @param  None  * @retval None  */static void BSP_Config(void){  /* Configure LED1, LED2, LED3 and LED4 */  BSP_LED_Init(LED1);  BSP_LED_Init(LED2);  BSP_LED_Init(LED3);  BSP_LED_Init(LED4);    /* Init IO Expander */  BSP_IO_Init();  /* Enable IO Expander interrupt for ETH MII pin */  BSP_IO_ConfigPin(MII_INT_PIN, IO_MODE_IT_FALLING_EDGE);}
开发者ID:pierreroth64,项目名称:STM32Cube_FW_F4,代码行数:18,


示例19: BSP_TS_ITConfig

/**  * @brief  Configures and enables the touch screen interrupts.  * @retval TS_OK if all initializations are OK. Other value if error.  */uint8_t BSP_TS_ITConfig(void){  /* Initialize the IO */  BSP_IO_Init();    /* Configure TS IT line IO */  BSP_IO_ConfigPin(TS_INT_PIN, IO_MODE_IT_FALLING_EDGE);    /* Enable the TS ITs */  tsDriver->EnableIT(I2cAddress);  return TS_OK;  }
开发者ID:opetany93,项目名称:STM32F7-HAL,代码行数:17,


示例20: BSP_Config

/**  * @brief  Initializes the STM324x9I-EVAL's LCD and LEDs resources.  * @param  None  * @retval None  */static void BSP_Config(void){  /* Initialize STM324x9I-EVAL's LEDs */  BSP_LED_Init(LED1);  BSP_LED_Init(LED2);  BSP_LED_Init(LED3);  BSP_LED_Init(LED4);    /* Init IO Expander */  BSP_IO_Init();  /* Enable IO Expander interrupt for ETH MII pin */  BSP_IO_ConfigPin(MII_INT_PIN, IO_MODE_IT_FALLING_EDGE);}
开发者ID:ClintHaerinck,项目名称:STM32Cube_FW_F4,代码行数:18,


示例21: BSP_SD_Init

/**  * @brief  Initializes the SD card device.  * @retval SD status  */uint8_t BSP_SD_Init(void){  uint8_t sd_state = MSD_OK;  /* PLLSAI is dedicated to LCD periph. Do not use it to get 48MHz*/  /* uSD device interface configuration */  uSdHandle.Instance = SDIO;  uSdHandle.Init.ClockEdge           = SDIO_CLOCK_EDGE_RISING;  uSdHandle.Init.ClockBypass         = SDIO_CLOCK_BYPASS_DISABLE;  uSdHandle.Init.ClockPowerSave      = SDIO_CLOCK_POWER_SAVE_DISABLE;  uSdHandle.Init.BusWide             = SDIO_BUS_WIDE_1B;  uSdHandle.Init.HardwareFlowControl = SDIO_HARDWARE_FLOW_CONTROL_ENABLE;  uSdHandle.Init.ClockDiv            = SDIO_TRANSFER_CLK_DIV;  /* Configure IO functionalities for SD detect pin */  BSP_IO_Init();  /* Check if the SD card is plugged in the slot */  BSP_IO_ConfigPin(SD_DETECT_PIN, IO_MODE_INPUT_PU);  if(BSP_SD_IsDetected() != SD_PRESENT)  {    return MSD_ERROR_SD_NOT_PRESENT;  }    /* Msp SD initialization */  BSP_SD_MspInit(&uSdHandle, NULL);  /* HAL SD initialization */  if(HAL_SD_Init(&uSdHandle, &uSdCardInfo) != SD_OK)  {    sd_state = MSD_ERROR;  }  /* Configure SD Bus width */  if(sd_state == MSD_OK)  {    /* Enable wide operation */    if(HAL_SD_WideBusOperation_Config(&uSdHandle, SDIO_BUS_WIDE_4B) != SD_OK)    {      sd_state = MSD_ERROR;    }    else    {      sd_state = MSD_OK;    }  }  return  sd_state;}
开发者ID:robbie-cao,项目名称:stm32f4-discovery,代码行数:54,


示例22: BSP_Config

/**  * @brief  Initializes the STM324x9I-EVAL's LCD and LEDs resources.  * @param  None  * @retval None  */static void BSP_Config(void){#ifdef USE_LCD  uint8_t lcd_status = LCD_OK;#endif /* USE_LCD */  /* Configure LED1, LED2, LED3 and LED4 */  BSP_LED_Init(LED1);  BSP_LED_Init(LED2);  BSP_LED_Init(LED3);  BSP_LED_Init(LED4);    /* Init MFX IO Expander */  BSP_IO_Init();    /* Enable MFX IO Expander interrupt for ETH MII pin */  BSP_IO_ConfigPin(MII_INT_PIN, IO_MODE_IT_FALLING_EDGE);  #ifdef USE_LCD  /* Initialize and start the LCD display in mode 'lcd_mode'   *  Using LCD_FB_START_ADDRESS as frame buffer displayed contents.   *  This buffer is modified by the BSP (draw fonts, objects depending on BSP calls).   */  /* Set Portrait orientation if needed, by default orientation is set to     Landscape */    /* 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_SetFont(&LCD_DEFAULT_FONT);    /* Initialize LCD Log module */  LCD_LOG_Init();    /* Show Header and Footer texts */  LCD_LOG_SetHeader((uint8_t *)"Webserver Application Netconn API");  LCD_LOG_SetFooter((uint8_t *)"STM32469I-EVAL board");    LCD_UsrLog ((char *)"  State: Ethernet Initialization .../n");#endif /* USE_LCD */}
开发者ID:pierreroth64,项目名称:STM32Cube_FW_F4,代码行数:54,


示例23: BSP_Config

/**  * @brief  Initializes the STM32446E's LCD and LEDs resources.  * @param  None  * @retval None  */static void BSP_Config(void){  /* Initialize IO expander */  BSP_IO_Init();  /* Initialize STM32446E-EVAL's LEDs */  BSP_LED_Init(LED1);  BSP_LED_Init(LED3);    /* Initialize the Touch screen */  BSP_TS_Init(240, 320);   /* Enable the CRC Module */  __CRC_CLK_ENABLE();}
开发者ID:pierreroth64,项目名称:STM32Cube_FW_F4,代码行数:20,


示例24: BSP_TS_ITConfig

/**  * @brief  Configures and enables the touch screen interrupts.  * @param  None  * @retval TS_OK: if ITconfig is OK. Other value if error.  */uint8_t BSP_TS_ITConfig(void){  uint8_t ret = TS_ERROR;  /* Initialize the IO */  ret = BSP_IO_Init();    /* Configure TS IT line IO */  BSP_IO_ConfigPin(TS_INT_PIN, IO_MODE_IT_FALLING_EDGE);    /* Enable the TS ITs */  TsDrv->EnableIT(TS_I2C_ADDRESS);  return ret;  }
开发者ID:Bosvark,项目名称:STM32Cube_FW_F4_V1.1.0,代码行数:20,


示例25: BSP_JOY_Init

/**  * @brief  Configures joystick GPIO and EXTI modes.  * @param  Joy_Mode: Button mode.  *          This parameter can be one of the following values:  *            @arg  JOY_MODE_GPIO: Joystick pins will be used as simple IOs  *            @arg  JOY_MODE_EXTI: Joystick pins will be connected to EXTI line   *                                 with interrupt generation capability    * @retval IO_OK: if all initializations are OK. Other value if error.  */uint8_t BSP_JOY_Init(JOYMode_TypeDef Joy_Mode){  uint8_t ret = 0;    /* Initialize the IO functionalities */  ret = BSP_IO_Init();    /* Configure joystick pins in IT mode */  if(Joy_Mode == JOY_MODE_EXTI)  {    /* Configure joystick pins in IT mode */    BSP_IO_ConfigPin(JOY_ALL_PINS, IO_MODE_IT_FALLING_EDGE);  }    return ret; }
开发者ID:BradleyConn,项目名称:stm32f429,代码行数:25,


示例26: BSP_Config

/**  * @brief  Configurates the BSP.  * @param  None  * @retval None  */static void BSP_Config(void){  /* Configure LED1, LED2, LED3 and LED4 */  BSP_LED_Init(LED1);  BSP_LED_Init(LED2);  BSP_LED_Init(LED3);  BSP_LED_Init(LED4);    /* Set Systick Interrupt to the highest priority */  HAL_NVIC_SetPriority(SysTick_IRQn, 0x0, 0x0);    /* Init IO Expander */  BSP_IO_Init();  /* Enable IO Expander interrupt for ETH MII pin */  BSP_IO_ConfigPin(MII_INT_PIN, IO_MODE_IT_FALLING_EDGE);}
开发者ID:eemei,项目名称:library-stm32f4,代码行数:21,


示例27: 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 200 Mhz */  SystemClock_Config();    /* Initialize IO expander */  BSP_IO_Init();    /* Init MSC Application */  MSC_InitApplication();    /* Init Host Library */  USBH_Init(&hUSBHost, USBH_UserProcess, 0);    /* Add Supported Class */  USBH_RegisterClass(&hUSBHost, USBH_MSC_CLASS);    /* Start Host Process */  USBH_Start(&hUSBHost);    /* Register the file system object to the FatFs module */  if(f_mount(&USBH_fatfs, "", 0) != FR_OK)  {      LCD_ErrLog("ERROR : Cannot Initialize FatFs! /n");  }    /* Run Application (Blocking mode) */  while (1)  {    /* USB Host Background task */    USBH_Process(&hUSBHost);        /* MSC Menu Process */    MSC_MenuProcess();  }}
开发者ID:vlsi1217,项目名称:STM32F7Cube,代码行数:52,


示例28: BSP_SD_Init

/**  * @brief  Initializes the SD card device.  * @param  None  * @retval SD status.  */uint8_t BSP_SD_Init(void){   uint8_t SD_state = MSD_OK;    /* uSD device interface configuration */  uSdHandle.Instance = SDIO;  uSdHandle.Init.ClockEdge           = SDIO_CLOCK_EDGE_RISING;  uSdHandle.Init.ClockBypass         = SDIO_CLOCK_BYPASS_DISABLE;  uSdHandle.Init.ClockPowerSave      = SDIO_CLOCK_POWER_SAVE_DISABLE;  uSdHandle.Init.BusWide             = SDIO_BUS_WIDE_1B;  uSdHandle.Init.HardwareFlowControl = SDIO_HARDWARE_FLOW_CONTROL_DISABLE;  uSdHandle.Init.ClockDiv            = SDIO_TRANSFER_CLK_DIV;    /* Configure IO functionalities for SD detect pin */  BSP_IO_Init();     /* Check if the SD card is plugged in the slot */  if(BSP_SD_IsDetected() != SD_PRESENT)  {    return MSD_ERROR;  }    /* HAL SD initialization */  SD_MspInit();  if(HAL_SD_Init(&uSdHandle, &SD_CardInfo) != SD_OK)  {    SD_state = MSD_ERROR;  }    /* Configure SD Bus width */  if(SD_state == MSD_OK)  {    /* Enable wide operation */    if(HAL_SD_WideBusOperation_Config(&uSdHandle, SDIO_BUS_WIDE_4B) != SD_OK)    {      SD_state = MSD_ERROR;    }    else    {      SD_state = MSD_OK;    }  }    return  SD_state;}
开发者ID:Bosvark,项目名称:STM32Cube_FW_F4_V1.1.0,代码行数:51,



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


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