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.

* | | | | | +-----------------------------------------------+<br />

* | | | | | | EAPI_ID_GPIO_GPIO05 |<br />

* | | | | | +-----------------------------------------------+<br />

* | | | | |<br />

* | | | | | 0 0 0 0 0 0 0<br />

* | | | | +-----+-----+-----+-----+-----+-----+-----+-----+<br />

* | | | | | Bit | Bit | Bit | Bit | Bit | Bit | Bit | Bit |<br />

* | | | | | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |<br />

* | | | | +-----------------------------------------------+<br />

* | | | | | EAPI_ID_GPIO_GPIO04 |<br />

* | | | | +-----------------------------------------------+<br />

* | | | |<br />

* | | | | 0 0 0 0 0 0 0<br />

* | | | +-----+-----+-----+-----+-----+-----+-----+-----+<br />

* | | | | Bit | Bit | Bit | Bit | Bit | Bit | Bit | Bit |<br />

* | | | | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |<br />

* | | | +-----------------------------------------------+<br />

* | | | | EAPI_ID_GPIO_GPIO03 |<br />

* | | | +-----------------------------------------------+<br />

* | | |<br />

* | | | 0 0 0 0 0 0 0<br />

* | | +-----+-----+-----+-----+-----+-----+-----+-----+<br />

* | | | Bit | Bit | Bit | Bit | Bit | Bit | Bit | Bit |<br />

* | | | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |<br />

* | | +-----------------------------------------------+<br />

* | | | EAPI_ID_GPIO_GPIO02 |<br />

* | | +-----------------------------------------------+<br />

* | |<br />

* | | 0 0 0 0 0 0 0<br />

* | +-----+-----+-----+-----+-----+-----+-----+-----+<br />

* | | Bit | Bit | Bit | Bit | Bit | Bit | Bit | Bit |<br />

* | | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |<br />

* | +-----------------------------------------------+<br />

* | | EAPI_ID_GPIO_GPIO01 |<br />

* | +-----------------------------------------------+<br />

* |<br />

* | 0 0 0 0 0 0 0<br />

* +-----+-----+-----+-----+-----+-----+-----+-----+<br />

* | Bit | Bit | Bit | Bit | Bit | Bit | Bit | Bit |<br />

* | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |<br />

* +-----------------------------------------------+<br />

* | EAPI_ID_GPIO_GPIO00 |<br />

* +-----------------------------------------------+<br />

*/<br />

/* IDs */<br />

/*<br />

* Individual ID Per GPIO Mapping<br />

*/<br />

#define EAPI_GPIO_GPIO_ID(GPIO_NUM) EAPI_UINT32_C(GPIO_NUM)<br />

#define EAPI_GPIO_GPIO_BITMASK EAPI_UINT32_C(1)<br />

#define EAPI_ID_GPIO_GPIO00 EAPI_GPIO_GPIO_ID(0) /* (Optional) */<br />

#define EAPI_ID_GPIO_GPIO01 EAPI_GPIO_GPIO_ID(1) /* (Optional) */<br />

#define EAPI_ID_GPIO_GPIO02 EAPI_GPIO_GPIO_ID(2) /* (Optional) */<br />

#define EAPI_ID_GPIO_GPIO03 EAPI_GPIO_GPIO_ID(3) /* (Optional) */<br />

/*<br />

* Multiple GPIOs Per ID Mapping<br />

*/<br />

#define EAPI_GPIO_BANK_ID(GPIO_NUM) EAPI_UINT32_C(0x10000|((GPIO_NUM)>>5))<br />

#define EAPI_GPIO_BANK_MASK(GPIO_NUM) EAPI_UINT32_C((1((GPIO_NUM)&0x1F))&1)==(TState))<br />

#define EAPI_ID_GPIO_BANK00 EAPI_GPIO_BANK_ID( 0) /* GPIOs 0 - 31<br />

* (optional)<br />

*/<br />

#define EAPI_ID_GPIO_BANK01 EAPI_GPIO_BANK_ID(32) /* GPIOs 32 - 63<br />

* (optional)<br />

*/<br />

#define EAPI_ID_GPIO_BANK02 EAPI_GPIO_BANK_ID(64) /* GPIOs 64 - 95<br />

* (optional)<br />

*/<br />

/* Bit mask Bit States */<br />

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

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

Saved successfully!

Ooh no, something went wrong!