01.06.2013 Views

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

AH<br />

ES:DI<br />

Must be 0x90.<br />

Pointer to a HwApiFunctionStruct data structure which will be filled with vectors to <strong>@CHIP</strong>-<strong>RTOS</strong><br />

Hardware API Functions.<br />

Return Value<br />

Comments<br />

AX= -1 if size parameter was too large. The size field of the structure will be set in this case to the<br />

number of supported vectors.<br />

AX= 0 on success<br />

Note that the size member of the HwApiFunctionStruct serves as both an input and output<br />

parameter. The caller must set this value to the number of vectors to be filled into the data structure by<br />

this API call. In the event that this value exceeds the number of vectors available, the AX value returned<br />

will be -1 and this API will set the size to 2, which is the number of vectors available by this API's current<br />

implementation.<br />

In any case, the resulting count in size indicates the number of vectors output to the caller's<br />

HwApiFunctionStruct data structure at [ES:DI] by this API call.<br />

typedef struct<br />

{<br />

int size; // number of function entries<br />

unsigned (huge *readPios)(void);<br />

void (huge *writePios)(unsigned);<br />

} HwApiFunctionStruct;<br />

// Example for usage:<br />

int main()<br />

{<br />

HwApiFunctionStruct hwApi;<br />

unsigned pios;<br />

}<br />

Top of list<br />

Index page<br />

[...]<br />

hwApi.size = 2; // space for two functions in the struct<br />

pfe_get_hwapi_func_ptr(&hwApi);<br />

hwApi.writePios(0x55); // write something to the pios<br />

pios = hwApi.readPios(); // read something from the pios<br />

[...]<br />

Interrupt 0xA1 service 0x10: HAL: Set int0 Vector<br />

Parameters<br />

Define the interrupt handler for the hardware interrupt 0<br />

Page 291 / 400

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

Saved successfully!

Ooh no, something went wrong!