3-40
MPC564EVB User’s Manual
System Call Functions
{
/* assume r3 contains the character */
asm(“
addi r10, r0, 0x0000”); Selects the function
asm(“
sc”);
The character is returned in r3
}
3.5.3 IN_STAT
This function (function code 0x0001) checks if an input character is present to receive. A value of
zero is returned in r3 when no character is present. A value of 1 in r3 means a character is present.
Assembly example:
addi r10, r0, 0x0001
Select the function
sc
Make the call, r3 contains the response (yes/no).
C example:
int board_char_present (void)
{
asm(
"addi
r10,r0,0x0001");Select the function
asm(
"sc");
Make the call, r3 contains the response (yes/no).
}
3.5.4 ISR_REGISTER
This function’s code is 0x0040. For ISR_REGISTER, the vector, handler, device ptr, and arg ptr
are in r3, r4, r5, and r6 respectively.
C example:
int
board_isr_register (int vector, void *handler, void *device, void *arg)
{
/*
* Vector will normally be 0x0500 for IRQ. Handler should be address
* of your routine. Device and Arg are both used as arguments to
* Handler when it is invoked. Ie. handler(device,arg); It is
* intended that Device point to the device. If the handler is
* registered OK, 1 is returned, otherwise 0.
*/
asm(
"addi
r10,r0,0x0040");
asm(
"sc");
}
3.5.5 ISR_REMOVE
This function’s code is 0x0041. For ISR_REMOVE, the vector is in r3. Nothing is returned.
Assembly example:
addi r10, r0, 0x0041
Selects the function
sc
The character is returned in r3
Summary of Contents for MPC564EVB
Page 1: ...MPC564EVBUM Rev 1 2 3 2003 MPC564EVB User s Manual ...
Page 6: ......
Page 10: ...Contents Paragraph Number Title Page Number iv MPC564EVB User s Manual MOTOROLA ...
Page 50: ...2 12 MPC564EVB User s Manual System Power up and Initial Operation ...
Page 92: ...3 42 MPC564EVB User s Manual System Call Functions ...
Page 98: ...B 4 MPC564EVB User s Manual Troubleshooting Network Problems ...