Copyright (c) Hyperion Entertainment and contributors.
Xena Resource: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
m Text replacement - "<syntaxhighlight>" to "<syntaxhighlight lang="C" line>" |
|||
Line 26: | Line 26: | ||
Example code to use the XTAG port: |
Example code to use the XTAG port: |
||
<syntaxhighlight> |
<syntaxhighlight lang="C" line> |
||
#include <proto/xena.h> |
#include <proto/xena.h> |
||
#include <resources/xena.h> |
#include <resources/xena.h> |
Latest revision as of 19:28, 26 January 2025
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);
}