Download C/C++ Communication API - Electronic Systems Group
Transcript
FUSE C/C++ API Developers Guide
DWORD i;
SWMBInfo* pSWMBInfo;
//Using the DIME_SystemStatusPtr function
if( (pSWMBInfo=(SWMBInfo*)DIME_SystemStatusPtr(0,dinfDIME_SWMBTS))
!=NULL)
{
printf("The software detects %d motherboards.\n",
pSWMBInfo->NumTypes);
for (i=0; i<pSWMBInfo->NumTypes; i++)
{
printf("Details of mothreboard number %d of %d
follows:\n",(1+i),pSWMBInfo->NumTypes);
printf("\tMotherboard type: %d.\n",pSWMBInfo
->pCardInfo[i].MotherBoardType);
printf("\tMotherboard description: %s.\n",pSWMBInfo
->pCardInfo[i].MotherBoardDesc);
}
}
Figure 10: DIME_SystemStatusPtr example
7.71
DIME_UnLockMemory
Syntax
DWORD DIME_UnLockMemory(DIME_HANDLE handle, DIME_MEMHANDLE
MemHandle)
Arguments
handle is a valid handle to the DIME carrier card that performed the
DIME_LockMemory.
MemHandle is the valid memory handle that needs to be unlocked.
Return
Returns zero on success, non-zero otherwise.
Description
This unlocks memory and gives control of the memory back to the OS kernel.
Example
See Figure 8: Locking and Unlocking memory for DMA transfers
7.72
DIME_WriteLEDs
Syntax
void DIME_WriteLEDs(DIME_HANDLE handle, DWORD Value)
Arguments
handle is a valid handle to a DIME carrier card.
Value is the value that is to be written to the LEDs.
Return
N/A
Description
This function sets the status of the LEDs that are controlled via the PCI interface. The
values are stored in the least significant bits with a value of ‘0’ indicating that the LED
is to be illuminated. The function checks that a valid card has been opened before
setting the LEDs status.
Please check your motherboards user guide for details on the LEDs.
Example
7.73
See Figure 3: Locating, Opening and Closing a card
DIME_WritePIO
Syntax
DWORD DIME_WritePIO(DIME_HANDLE handle, DWORD Bank, DWORD Data)
Arguments
handle is a valid handle to a DIME carrier card.
NT107-0068 Issue 4 19-05-2003
www.nallatech.com
73