本文整理汇总了C++中BSP_IO_ConfigPin函数的典型用法代码示例。如果您正苦于以下问题:C++ BSP_IO_ConfigPin函数的具体用法?C++ BSP_IO_ConfigPin怎么用?C++ BSP_IO_ConfigPin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了BSP_IO_ConfigPin函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: BSP_SD_DeInitEx
/**
* @brief DeInitializes the SD card device.
* @param SdCard: SD card to be used, that should be SD_CARD1 or SD_CARD2
* @retval SD status
*/
uint8_t BSP_SD_DeInitEx(uint32_t SdCard)
{
uint8_t sd_state = MSD_OK;
/* Set back Mfx pin to INPUT mode in case it was in exti */
UseExtiModeDetection = 0;
if(SdCard == SD_CARD1)
{
uSdHandle.Instance = SDMMC1;
/* HAL SD deinitialization */
if(HAL_SD_DeInit(&uSdHandle) != HAL_OK)
{
sd_state = MSD_ERROR;
}
/* Msp SD deinitialization */
BSP_SD_MspDeInit(&uSdHandle, NULL);
BSP_IO_ConfigPin(SD1_DETECT_PIN, IO_MODE_INPUT_PU);
}
else
{
uSdHandle2.Instance = SDMMC2;
BSP_IO_ConfigPin(SD2_DETECT_PIN, IO_MODE_INPUT_PU);
/* HAL SD deinitialization */
if(HAL_SD_DeInit(&uSdHandle2) != HAL_OK)
{
sd_state = MSD_ERROR;
}
/* Msp SD deinitialization */
BSP_SD_MspDeInit(&uSdHandle2, NULL);
}
return sd_state;
}
开发者ID:ryankurte,项目名称:stm32f4-base,代码行数:40,代码来源:stm32f769i_eval_sd.c
示例2: 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,代码来源:main.c
示例3: BSP_CAMERA_PwrDown
/**
* @brief CAMERA power down
* @param None
* @retval None
*/
void BSP_CAMERA_PwrDown(void)
{
/* 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);
}
开发者ID:QuantumDeveloper,项目名称:AvalonStudio,代码行数:17,代码来源:stm32446e_eval_camera.c
示例4: BSP_SD_ITConfig
/**
* @brief Configures Interrupt mode for SD detection pin.
* @param None
* @retval IO_OK: if all initializations are OK. Other value if error.
*/
uint8_t BSP_SD_ITConfig(void)
{
/* Check SD card detect pin */
if (BSP_IO_ReadPin(SD_DETECT_PIN) != SD_DETECT_PIN)
{
return BSP_IO_ConfigPin(SD_DETECT_PIN, IO_MODE_IT_RISING_EDGE_PU);
}
else
{
return BSP_IO_ConfigPin(SD_DETECT_PIN, IO_MODE_IT_FALLING_EDGE_PU);
}
}
开发者ID:cyysu,项目名称:AliOS-Things,代码行数:17,代码来源:stm32l496g_discovery_sd.c
示例5: 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,代码来源:stm32469i_eval_ts.c
示例6: BSP_SD_ITConfig
/**
* @brief Configures Interrupt mode for SD detection pin.
* @param None
* @retval Returns 0
*/
uint8_t BSP_SD_ITConfig(void)
{
/* Configure Interrupt mode for SD detection pin */
BSP_IO_ConfigPin(SD_DETECT_PIN, IO_MODE_IT_FALLING_EDGE);
return 0;
}
开发者ID:Bosvark,项目名称:STM32Cube_FW_F4_V1.1.0,代码行数:12,代码来源:stm324x9i_eval_sd.c
示例7: 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,代码来源:stm32l496g_discovery_sd.c
示例8: BSP_SD_IsDetectedEx
/**
* @brief Detects if SD card is correctly plugged in the memory slot or not.
* @param SdCard: SD card to be used, that should be SD_CARD1 or SD_CARD2
* @retval Returns if SD is detected or not
*/
uint8_t BSP_SD_IsDetectedEx(uint32_t SdCard)
{
__IO uint8_t status = SD_PRESENT;
if(SdCard == SD_CARD1)
{
/* Check SD card detect pin */
if((BSP_IO_ReadPin(SD1_DETECT_PIN)&SD1_DETECT_PIN) != SD1_DETECT_PIN)
{
if (UseExtiModeDetection)
{
BSP_IO_ConfigPin(SD1_DETECT_PIN, IO_MODE_IT_RISING_EDGE_PU);
}
}
else
{
status = SD_NOT_PRESENT;
if (UseExtiModeDetection)
{
BSP_IO_ConfigPin(SD1_DETECT_PIN, IO_MODE_IT_FALLING_EDGE_PU);
}
}
}
else
{
/* Check SD card detect pin */
if((BSP_IO_ReadPin(SD2_DETECT_PIN)&SD2_DETECT_PIN) != SD2_DETECT_PIN)
{
if (UseExtiModeDetection)
{
BSP_IO_ConfigPin(SD2_DETECT_PIN, IO_MODE_IT_RISING_EDGE_PU);
}
}
else
{
status = SD_NOT_PRESENT;
if (UseExtiModeDetection)
{
BSP_IO_ConfigPin(SD2_DETECT_PIN, IO_MODE_IT_FALLING_EDGE_PU);
}
}
}
return status;
}
开发者ID:ryankurte,项目名称:stm32f4-base,代码行数:49,代码来源:stm32f769i_eval_sd.c
示例9: BSP_IDD_GetValue
/**
* @brief Get Idd current value.
* @param IddValue: Pointer on u32 to store Idd. Value unit is 10 nA.
* @retval None
*/
void BSP_IDD_GetValue(uint32_t *IddValue)
{
/* De-activate the OPAMP used ny the MFX to measure the current consumption */
BSP_IO_ConfigPin(IDD_AMP_CONTROL_PIN, IO_MODE_OUTPUT);
BSP_IO_WritePin(IDD_AMP_CONTROL_PIN, GPIO_PIN_RESET);
if (IddDrv->GetValue != NULL)
{
IddDrv->GetValue(IDD_I2C_ADDRESS, IddValue);
}
}
开发者ID:cyysu,项目名称:AliOS-Things,代码行数:16,代码来源:stm32l496g_discovery_idd.c
示例10: BSP_SD_IsDetected
/**
* @brief Detects if SD card is correctly plugged in the memory slot or not.
* @retval Returns if SD is detected or not
*/
uint8_t BSP_SD_IsDetected(void)
{
__IO uint8_t status = SD_PRESENT;
/* Check SD card detect pin */
if((BSP_IO_ReadPin(SD_DETECT_PIN)&SD_DETECT_PIN) != SD_DETECT_PIN)
{
if (UseExtiModeDetection)
BSP_IO_ConfigPin(SD_DETECT_PIN, IO_MODE_IT_RISING_EDGE_PU);
}
else
{
status = SD_NOT_PRESENT;
if (UseExtiModeDetection)
BSP_IO_ConfigPin(SD_DETECT_PIN, IO_MODE_IT_FALLING_EDGE_PU);
}
return status;
}
开发者ID:robbie-cao,项目名称:stm32f4-discovery,代码行数:24,代码来源:stm32469i_eval_sd.c
示例11: 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,代码来源:stm32l496g_discovery_sd.c
示例12: BSP_IDD_StartMeasure
/**
* @brief Start Measurement campaign
* @retval None
*/
void BSP_IDD_StartMeasure(void)
{
/* Activate the OPAMP used ny the MFX to measure the current consumption */
BSP_IO_ConfigPin(IDD_AMP_CONTROL_PIN, IO_MODE_OUTPUT);
BSP_IO_WritePin(IDD_AMP_CONTROL_PIN, GPIO_PIN_RESET);
if (IddDrv->Start != NULL)
{
IddDrv->Start(IDD_I2C_ADDRESS);
}
}
开发者ID:cyysu,项目名称:AliOS-Things,代码行数:16,代码来源:stm32l496g_discovery_idd.c
示例13: 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,代码来源:stm324x9i_eval_camera.c
示例14: 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,代码来源:stm32756g_eval_ts.c
示例15: 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,代码来源:main.c
示例16: 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,代码来源:main.c
示例17: 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,代码来源:stm32469i_eval_sd.c
示例18: 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,代码来源:main.c
示例19: 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,代码来源:stm32f429i_discovery_ts.c
示例20: 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();
if (ret == IO_OK)
{
/* Configure joystick pins in IT mode */
if(Joy_Mode == JOY_MODE_EXTI)
{
/* MFX pins init for Joystick */
/* Configure IO interrupt acquisition mode */
BSP_IO_ConfigPin(JOY_ALL_PINS, IO_MODE_IT_LOW_LEVEL_PU);
}
else
{
BSP_IO_ConfigPin(JOY_ALL_PINS, IO_MODE_INPUT_PU);
}
}
return ret;
}
开发者ID:S4mw1s3,项目名称:Nucleo32,代码行数:33,代码来源:stm32l073z_eval.c
注:本文中的BSP_IO_ConfigPin函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论