Mikroelektronika MIKROE-738 Datenbogen

Seite von 682
mikroC PRO for PIC32
MikroElektronika
155
Prototype
unsigned long KVA_TO_PA(const unsigned long Address);
Description
Function converts virtual address from any Kernel segment to the appropriate physical address.
Parameters
Desired Virtual address.
Returns
Appropriate physical address.
Requires
Nothing.
Example
KVA_TO_PA(0xBFC00000);
Notes
None.
KVA_TO_PA
Prototype
unsigned long PA_TO_KVA0(const unsigned long Address);
Description
Function converts physical address to the virtual address in the KSEG0.
Parameters
Desired physical address.
Returns
Appropriate virtual address in the KSEG0.
Requires
Nothing.
Example
PA_TO_KVA0(0x1D000000);
Notes
None.
PA_TO_KVA0
Prototype
unsigned long PA_TO_KVA1(const unsigned long Address);
Description
Function converts physical address to the virtual address in the KSEG1.
Parameters
Appropriate virtual address in the KSEG1.
Returns
Virtual address in the KSEG1.
Requires
Nothing.
Example
PA_TO_KVA1(0x1D000000);
Notes
None.
PA_TO_KVA1
Prototype
unsigned long CP0_GET(TCPOReg register);
Description
Function returns the value of the coprocessor register or part of the register, based upon the argument 
entered.
Parameters
Parameter must be a constant from the enumerated built-in constants list, which can be found at the 
bottom of this page.
Returns
Value of the coprocessor register or part of the register.
Requires
Nothing.
Example
unsigned long register_value;
register_value = CP0_GET(CP0_CONFIG);
Notes
None.
CP0_GET