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.4 EApiGPIOSetDirection<br />

9.4.1 Description<br />

Sets the configuration for the selected GPIO ports.<br />

9.4.2 Parameters<br />

Id<br />

uint32_t<br />

EAPI_CALLTYPE<br />

EApiGPIOSetDirection(<br />

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

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

* Bits<br />

*/<br />

__IN uint32_t Direction /* Direction */<br />

);<br />

FUNC_DEF 23: EApiGPIOSetDirection<br />

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

Bitmask<br />

__IN Bit mask. Only the ports with the level EAPI_GPIO_HIGH are processed.<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 also 'Bitmask' on page 53.<br />

Direction<br />

__IN Sets the direction of the selected GPIO ports. Bits with the value EAPI_GPIO_INPUT are inputs,<br />

bits with EAPI_GPIO_OUTPUT are outputs.<br />

Value<br />

EAPI_GPIO_INPUT<br />

EAPI_GPIO_OUTPUT<br />

Description<br />

Selected GPIO port is an input.<br />

Selected GPIO port is an output.<br />

9.4.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 />

(Bitmask&Direction)&~pInputs<br />

EAPI_STATUS_INVALID_DIRECTION<br />

(Bitmask&~Direction)&~pOutputs EAPI_STATUS_INVALID_DIRECTION<br />

Not Started<br />

EAPI_STATUS_ERROR<br />

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

Success<br />

EAPI_STATUS_SUCCESS<br />

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

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

Saved successfully!

Ooh no, something went wrong!