MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / GPIO_PinInGet

Function GPIO_PinInGet

bsp/efm32/Libraries/emlib/src/em_gpio.c:197–202  ·  view source on GitHub ↗

/ * @brief * Read the pad value for a single pin in a GPIO port. * * @param[in] port * The GPIO port to access. * * @param[in] pin * The pin number to read. * * @return * The pin value, 0 or 1. ******************************************************************************/

Source from the content-addressed store, hash-verified

195 * The pin value, 0 or 1.
196 ******************************************************************************/
197unsigned int GPIO_PinInGet(GPIO_Port_TypeDef port, unsigned int pin)
198{
199 EFM_ASSERT(GPIO_PORT_VALID(port) && GPIO_PIN_VALID(pin));
200
201 return((unsigned int)((GPIO->P[port].DIN >> pin) & 0x1));
202}
203
204
205/***************************************************************************//**

Callers 3

rt_hw_led_stateFunction · 0.85
efm_accel_auto_zeroFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected