STM3210C_EVAL BSP User Manual: STM3210C EVAL IO Exported Functions

STM3210C_EVAL BSP

STM3210C_EVAL BSP User Manual
STM3210C EVAL IO Exported Functions

Functions

uint8_t BSP_IO_Init (void)
 Initializes and configures the IO functionalities and configures all necessary hardware resources (GPIOs, clocks..).
uint32_t BSP_IO_ITGetStatus (uint32_t IO_Pin)
 Gets the selected pins IT status.
void BSP_IO_ITClear (uint32_t IO_Pin)
 Clears the selected IO IT pending bit.
uint8_t BSP_IO_ConfigPin (uint32_t IO_Pin, IO_ModeTypedef IO_Mode)
 Configures the IO pin(s) according to IO mode structure value.
void BSP_IO_WritePin (uint32_t IO_Pin, uint8_t PinState)
 Sets the selected pins state.
uint32_t BSP_IO_ReadPin (uint32_t IO_Pin)
 Gets the selected pins current state.
void BSP_IO_TogglePin (uint32_t IO_Pin)
 Toggles the selected pins state.

Function Documentation

uint8_t BSP_IO_ConfigPin ( uint32_t  IO_Pin,
IO_ModeTypedef  IO_Mode 
)

Configures the IO pin(s) according to IO mode structure value.

Parameters:
IO_Pin,:Output pin to be set or reset. This parameter can be any combination of the IO pins.
IO_Mode,:IO pin mode to configure This parameter can be one of the following values:
  • IO_MODE_INPUT
  • IO_MODE_OUTPUT
  • IO_MODE_IT_RISING_EDGE
  • IO_MODE_IT_FALLING_EDGE
  • IO_MODE_IT_LOW_LEVEL
  • IO_MODE_IT_HIGH_LEVEL
Return values:
IO_OK,:if all initializations are OK. Other value if error.

Definition at line 218 of file stm3210c_eval_io.c.

References io1_driver, IO1_I2C_ADDRESS, IO1_PIN_ALL, IO1_PIN_OFFSET, io2_driver, IO2_I2C_ADDRESS, IO2_PIN_ALL, IO2_PIN_OFFSET, and IO_OK.

Referenced by ACCELERO_IO_ITConfig(), AUDIO_IO_Init(), and BSP_JOY_Init().

uint8_t BSP_IO_Init ( void  )

Initializes and configures the IO functionalities and configures all necessary hardware resources (GPIOs, clocks..).

Note:
BSP_IO_Init() is using HAL_Delay() function to ensure that stmpe811 IO Expander is correctly reset. HAL_Delay() function provides accurate delay (in milliseconds) based on variable incremented in SysTick ISR. This implies that if BSP_IO_Init() is called from a peripheral ISR process, then the SysTick interrupt must have higher priority (numerically lower) than the peripheral interrupt. Otherwise the caller ISR process will be blocked.
Return values:
IO_OK,:if all initializations are OK. Other value if error.

Definition at line 117 of file stm3210c_eval_io.c.

References io1_driver, IO1_I2C_ADDRESS, IO1_PIN_ALL, IO1_PIN_OFFSET, io2_driver, IO2_I2C_ADDRESS, IO2_PIN_ALL, IO2_PIN_OFFSET, IO_ERROR, and IO_OK.

Referenced by ACCELERO_IO_Init(), AUDIO_IO_Init(), and BSP_JOY_Init().

void BSP_IO_ITClear ( uint32_t  IO_Pin)

Clears the selected IO IT pending bit.

Parameters:
IO_Pin,:Selected pins to check the status. This parameter can be any combination of the IO pins.

Definition at line 183 of file stm3210c_eval_io.c.

References io1_driver, IO1_I2C_ADDRESS, IO1_PIN_ALL, IO1_PIN_OFFSET, io2_driver, IO2_I2C_ADDRESS, IO2_PIN_ALL, and IO2_PIN_OFFSET.

uint32_t BSP_IO_ITGetStatus ( uint32_t  IO_Pin)

Gets the selected pins IT status.

Parameters:
IO_Pin,:Selected pins to check the status. This parameter can be any combination of the IO pins.
Return values:
Statusof the checked IO pin(s).

Definition at line 154 of file stm3210c_eval_io.c.

References io1_driver, IO1_I2C_ADDRESS, IO1_PIN_ALL, IO1_PIN_OFFSET, io2_driver, IO2_I2C_ADDRESS, IO2_PIN_ALL, and IO2_PIN_OFFSET.

uint32_t BSP_IO_ReadPin ( uint32_t  IO_Pin)

Gets the selected pins current state.

Parameters:
IO_Pin,:Selected pins to read. This parameter can be any combination of the IO pins.
Return values:
Thecurrent pins state

Definition at line 274 of file stm3210c_eval_io.c.

References io1_driver, IO1_I2C_ADDRESS, IO1_PIN_ALL, IO1_PIN_OFFSET, io2_driver, IO2_I2C_ADDRESS, IO2_PIN_ALL, and IO2_PIN_OFFSET.

Referenced by BSP_JOY_GetState().

void BSP_IO_TogglePin ( uint32_t  IO_Pin)

Toggles the selected pins state.

Parameters:
IO_Pin,:Selected pins to toggle. This parameter can be any combination of the IO pins.

Definition at line 303 of file stm3210c_eval_io.c.

References BSP_IO_WritePin(), io1_driver, IO1_I2C_ADDRESS, IO1_PIN_ALL, IO1_PIN_OFFSET, io2_driver, IO2_I2C_ADDRESS, IO2_PIN_ALL, and IO2_PIN_OFFSET.

void BSP_IO_WritePin ( uint32_t  IO_Pin,
uint8_t  PinState 
)

Sets the selected pins state.

Parameters:
IO_Pin,:Selected pins to write. This parameter can be any combination of the IO pins.
PinState,:New pins state to write

Definition at line 247 of file stm3210c_eval_io.c.

References io1_driver, IO1_I2C_ADDRESS, IO1_PIN_ALL, IO1_PIN_OFFSET, io2_driver, IO2_I2C_ADDRESS, IO2_PIN_ALL, and IO2_PIN_OFFSET.

Referenced by AUDIO_IO_Init(), BSP_AUDIO_OUT_Stop(), and BSP_IO_TogglePin().

Generated on Fri Apr 14 2017 13:00:47 for STM3210C_EVAL BSP User Manual by   doxygen 1.7.6.1