24.05.2014 Views

Embedded Application Programming Interface - picmg

Embedded Application Programming Interface - picmg

Embedded Application Programming Interface - picmg

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

9.5 EApiGPIOGetLevel<br />

9.5.1 Description<br />

Read the from GPIO ports.<br />

9.5.2 Parameters<br />

Id<br />

uint32_t<br />

EAPI_CALLTYPE<br />

EApiGPIOGetLevel(<br />

__IN uint32_t Id , /* GPIO Id */<br />

__IN uint32_t Bitmask , /* Bit mask of Affected<br />

* Bits<br />

*/<br />

__OUT uint32_t *pLevel /* Current Level */<br />

);<br />

FUNC_DEF 24: EApiGPIOGetLevel<br />

__IN See '9.1.1 GPIO Ids' on page 47<br />

Bitmask<br />

__IN Bit mask. Only selected bits are returned. Unselected bits return EAPI_GPIO_LOW.<br />

Value<br />

EAPI_GPIO_BITMASK_NOSELECT<br />

EAPI_GPIO_BITMASK_SELECT<br />

Description<br />

Do not use the selected GPIO port for this operation.<br />

Use the selected GPIO port for this operation.<br />

See examples 'Single port addressing' and 'Bank addressing' on page 47.<br />

pLevel<br />

__OUT Pointer to a buffer that receives the GPIO level. Results can be read on a bit level.<br />

Value<br />

EAPI_GPIO_LOW<br />

EAPI_GPIO_HIGH<br />

Description<br />

Selected GPIO port is low.<br />

Selected GPIO port is high.<br />

9.5.3 Return Status Codes<br />

Condition<br />

Return Value<br />

Library Uninitialized<br />

EAPI_STATUS_NOT_INITIALIZED<br />

Bitmask==0<br />

EAPI_STATUS_INVALID_PARAMETER<br />

Unsupported ID<br />

EAPI_STATUS_UNSUPPORTED<br />

(Bitmask&~(pInputs|pOutputs))<br />

EAPI_STATUS_INVALID_BITMASK<br />

... see 2.3 Status Codes on page 16<br />

Success<br />

EAPI_STATUS_SUCCESS<br />

PICMG® EAPI R1.0, August 8, 2010 page 52 of 83

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!