(Page 5 of 15 in this chapter) Version
DWORD size; /* Size of this structure */
DWORD boardtype; /* Physical board type BRI_BOARDTYPE_xxx */
DWORD serial; /* Serial number */
DWORD ioaddr; /* Base IO address */
DWORD intnum; /* Interrupt number */
} BRI_BOARD_INFO;
void myShowBoardType( CTAHD ctahd, unsigned board )
{
BRI_BOARD_INFO boardinfo;
char type[20];
int ret;
ret = briGetBoardInfo( ctahd, board, sizeof boardinfo, &boardinfo );
if( ret == SUCCESS )
{
if (boardinfo.boardtype != BRI_BOARDTYPE_4PORT)
printf( "board:%2d : Invalid board type\n", board) ;
else
{
strcpy(type, << BX 2000 board >>) ;
printf( "board:%2d at addr:%4x is an %-. \n",
board, boardinfo.ioaddr, type);
}
}
else if( ret == CTAERR_INVALID_BOARD )
printf( "There is no board # %d.\n", board );
else
/* unexpected error */
printf( "Error %x getting board # %d information.\n", ret, board );
}
(Page 5 of 15 in this chapter) Version