Copyright (c) Hyperion Entertainment and contributors.
Xena Resource: Difference between revisions
Steven Solie (talk | contribs) No edit summary |
|||
Line 3: | Line 3: | ||
The Xena Resource provides access to the Xena chip on the AmigaOne X1000. Two functions allow you to use the Xena chip. |
The Xena Resource provides access to the Xena chip on the AmigaOne X1000. Two functions allow you to use the Xena chip. |
||
''' |
'''Xena Resource Functions''' |
||
{| class="wikitable" |
{| class="wikitable" |
||
| AllocResource || Obtain exclusive access to Xena resources. |
| AllocResource() || Obtain exclusive access to one of the Xena resources. |
||
|- |
|- |
||
| FreeResource() || Returns a resource to the system. |
| FreeResource() || Returns a resource to the system. |
||
Line 17: | Line 17: | ||
| AutoDocs || [[xenares.doc]] |
| AutoDocs || [[xenares.doc]] |
||
|} |
|} |
||
There are four separate resources that may be requested. |
|||
The application must secure as many as it requires to access the Xena system. |
|||
XR_XTAGPORT is for access to the JTAG control lines that access the Xena chip and any additional devices on the Xorro board. |
|||
XR_DATABUS is for the fast Localbus access to Core0. |
|||
XR_INTERRUPT is used for Xena to interrupt the PA6T when it needs attention. This is likely to be used with XR_DATABUS |
|||
XR_LONELYBIT is the extra unassigned pin |
|||
Example code to use the XTAG port: |
|||
#include <proto/xena.h> |
|||
#include <resources/xena.h> |
|||
struct XenaIFace *IXena; |
|||
IXena = IExec->OpenResource("xena.resource"); |
|||
if(NULL == IXena) |
|||
{ |
|||
exit(-5); |
|||
} |
|||
STRPTR result = IXena->AllocResource(XR_XTAGPORT, "MyAppName"); |
|||
if(NULL == result) |
|||
{ |
|||
// we have exclusive access, |
|||
// code using the JTAG port goes here |
|||
//when finished, just |
|||
IXena->FreeResource(XR_XTAGPORT); |
|||
} |
|||
else |
|||
{ |
|||
IDOS->Printf("We cannot access the port because %s got here first\n", result); |
|||
} |
Revision as of 02:39, 24 May 2012
Xena Resource
The Xena Resource provides access to the Xena chip on the AmigaOne X1000. Two functions allow you to use the Xena chip.
Xena Resource Functions
AllocResource() | Obtain exclusive access to one of the Xena resources. |
FreeResource() | Returns a resource to the system. |
Xena Resource Information | |
---|---|
Includes | resources/xena.h |
AutoDocs | xenares.doc |
There are four separate resources that may be requested. The application must secure as many as it requires to access the Xena system. XR_XTAGPORT is for access to the JTAG control lines that access the Xena chip and any additional devices on the Xorro board. XR_DATABUS is for the fast Localbus access to Core0. XR_INTERRUPT is used for Xena to interrupt the PA6T when it needs attention. This is likely to be used with XR_DATABUS XR_LONELYBIT is the extra unassigned pin
Example code to use the XTAG port:
- include <proto/xena.h>
- include <resources/xena.h>
struct XenaIFace *IXena; IXena = IExec->OpenResource("xena.resource"); if(NULL == IXena) {
exit(-5);
} STRPTR result = IXena->AllocResource(XR_XTAGPORT, "MyAppName"); if(NULL == result) {
// we have exclusive access, // code using the JTAG port goes here
//when finished, just IXena->FreeResource(XR_XTAGPORT);
} else {
IDOS->Printf("We cannot access the port because %s got here first\n", result);
}