Embedded Application Programming Interface - picmg

Embedded Application Programming Interface - picmg Embedded Application Programming Interface - picmg

24.05.2014 Views

Individual GPIO Ids Description EAPI_GPIO_ID1 'GPIO 1' Bit mapped to Bit 0 EAPI_GPIO_ID2 'GPIO 2' Bit mapped to Bit 0 EAPI_GPIO_ID3 'GPIO 3' Bit mapped to Bit 0 EAPI_GPIO_ID4 'GPIO 4' Bit mapped to Bit 0 EAPI_GPIO_ID5 'GPIO 5' Bit mapped to Bit 0 EAPI_GPIO_ID6 'GPIO 6' Bit mapped to Bit 0 EAPI_GPIO_ID7 'GPIO 7' Bit mapped to Bit 0 Parallel GPIO addressing A group of selected GPIO pins can be addressed simultaneously. Multiple GPIO Ids Description EAPI_ID_GPIO_BANK00 GPIO 0-31 Bit mapped to Bit 0-31 9.1.2 Bit-mask Bit States Name EAPI_GPIO_BITMASK_SELECT EAPI_GPIO_BITMASK_NOSELECT Description Used to specify that the Specific GPIO is selected Used to specify that the Specific GPIO is not selected, and should be ignored. 9.1.3 Level Bit States Name EAPI_GPIO_LOW EAPI_GPIO_HIGH Description Used to specify/signify that the Specific GPIO is low(not asserted). Used to specify/signify that the Specific GPIO is high(asserted). 9.1.4 Direction Bit States Name EAPI_GPIO_INPUT EAPI_GPIO_OUTPUT Description Used to specify/signify that the Specific GPIO is in input mode. Used to specify/signify that the Specific GPIO is in output mode. 9.2 EApiGPIOGetDirectionCaps PICMG® EAPI R1.0, August 8, 2010 page 48 of 83

9.2.1 Description Reads the capabilities of the current GPIO implementation from the selected GPIO interface. The ports where both input and output bit masks are 1 are GPIOs. The direction of this ports can be configured by EApiGPIOSetDirection 9.2.2 Parameters Id uint32_t EAPI_CALLTYPE EApiGPIOGetDirectionCaps( __IN uint32_t Id , /* GPIO Id */ __OUTOPT uint32_t *pInputs , /* Supported GPIO Input * Bit Mask */ __OUTOPT uint32_t *pOutputs /* Supported GPIO Output * Bit Mask */ ); FUNC_DEF 21: EApiGPIOGetDirectionCaps __IN See '9.1.1 GPIO Ids' on page 47 pInputs __OUTOPT Pointer to a buffer that receives the bit mask of the supported inputs. pOutputs __OUTOPT Pointer to a buffer that receives the bit mask of the supported inputs. 9.2.3 Return Status Codes Condition Library Uninitialized ((pInputs==NULL)&&(pOutputs==NULL)) Unsupported ID Not Started Return Value EAPI_STATUS_NOT_INITIALIZED EAPI_STATUS_INVALID_PARAMETER EAPI_STATUS_UNSUPPORTED EAPI_STATUS_ERROR ... see 2.3 Status Codes on page 16 Success EAPI_STATUS_SUCCESS 9.3 EApiGPIOGetDirection PICMG® EAPI R1.0, August 8, 2010 page 49 of 83

9.2.1 Description<br />

Reads the capabilities of the current GPIO implementation from the selected GPIO interface.<br />

The ports where both input and output bit masks are 1 are GPIOs. The direction of this ports can be<br />

configured by EApiGPIOSetDirection<br />

9.2.2 Parameters<br />

Id<br />

uint32_t<br />

EAPI_CALLTYPE<br />

EApiGPIOGetDirectionCaps(<br />

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

__OUTOPT uint32_t *pInputs , /* Supported GPIO Input<br />

* Bit Mask<br />

*/<br />

__OUTOPT uint32_t *pOutputs /* Supported GPIO Output<br />

* Bit Mask<br />

*/<br />

);<br />

FUNC_DEF 21: EApiGPIOGetDirectionCaps<br />

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

pInputs<br />

__OUTOPT Pointer to a buffer that receives the bit mask of the supported inputs.<br />

pOutputs<br />

__OUTOPT Pointer to a buffer that receives the bit mask of the supported inputs.<br />

9.2.3 Return Status Codes<br />

Condition<br />

Library Uninitialized<br />

((pInputs==NULL)&&(pOutputs==NULL))<br />

Unsupported ID<br />

Not Started<br />

Return Value<br />

EAPI_STATUS_NOT_INITIALIZED<br />

EAPI_STATUS_INVALID_PARAMETER<br />

EAPI_STATUS_UNSUPPORTED<br />

EAPI_STATUS_ERROR<br />

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

Success<br />

EAPI_STATUS_SUCCESS<br />

9.3 EApiGPIOGetDirection<br />

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

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

Saved successfully!

Ooh no, something went wrong!