Software Library API naibrd 1.62
See all documentation at naii.docs.com
Board Control Functions

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_IsBoardReady (int32_t cardIndex)
 Determines whether the board is fully booted.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetMasterBitStatus (int32_t cardIndex, int32_t module, nai_status_access_type_t accessType, nai_status_bit_t *p_outstatusBit)
 Retrieve the latched or realtime BIT status correpsonding to the specified module from the Master BIT status register. Module 0 is reserved for future use. For Gen5, this feature is added in MBCore(Rev 4.123) and above. The user can read the MBCore revision at mother board address 0x100. The revsion is encoded as (0x007B0004)minor(123) major(4).
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetWatchdog (int32_t cardIndex, uint32_t watchdog)
 Sets the watchdog register. The processor will invert the contents of this register within 1 second of the value being set.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetWatchdog (int32_t cardIndex, uint32_t *outwatchdog)
 Retrieves the watchdog register. The processor will invert the contents of this register within 1 second of the value being set.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CheckWatchdog (int32_t cardIndex, uint32_t watchdog)
 Checks the watchdog register. The processor will invert the contents of this register within 1 second of the value being set. Call naibrd_SetWatchdog() routine first with the watchdog value and call naibrd_CheckWatchdog() routine at lease 1 second afterwards with the same watchdog value. This routine will compare the contents read from the watchdog register and determine if the processor inverted the watchdog register value correctly.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SoftReset (int32_t cardIndex)
 For Gen 2 and Gen 3 Products, this function performs a soft reset on the card. For Gen5, this feature is added in MBCore(Rev 4.123) and above. The user can read the MBCore revision at mother board address 0x100. The revsion is encoded as (0x007B0004)minor(123) major(4). This will return setting to the power-on load state.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_HoldBoardReset (int32_t cardIndex, uint32_t holdBoardReset)
 Hole/Release board reset to the board for power management.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_IsBoardResetOnHold (int32_t cardIndex, uint32_t *isBoardResetOnHold)
 Get the hold board reset status of the board.
 

Detailed Description


Function Documentation

◆ naibrd_CheckWatchdog()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CheckWatchdog ( int32_t cardIndex,
uint32_t watchdog )

Checks the watchdog register. The processor will invert the contents of this register within 1 second of the value being set. Call naibrd_SetWatchdog() routine first with the watchdog value and call naibrd_CheckWatchdog() routine at lease 1 second afterwards with the same watchdog value. This routine will compare the contents read from the watchdog register and determine if the processor inverted the watchdog register value correctly.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
watchdog: (Input) Watchdog register value.
Returns
  • NAI_SUCCESS when the board is ready.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_READY when the board is not ready.
  • NAI_ERROR_UNKOWN if naibrd does not know how to determine if the board is ready
  • An error returned by naibrd_ReadReg32

◆ naibrd_GetMasterBitStatus()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetMasterBitStatus ( int32_t cardIndex,
int32_t module,
nai_status_access_type_t accessType,
nai_status_bit_t * p_outstatusBit )

Retrieve the latched or realtime BIT status correpsonding to the specified module from the Master BIT status register. Module 0 is reserved for future use. For Gen5, this feature is added in MBCore(Rev 4.123) and above. The user can read the MBCore revision at mother board address 0x100. The revsion is encoded as (0x007B0004)minor(123) major(4).

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (0 - [max modules for board]).
accessType: (Input) The status access type to read: NAI_STATUS_LATCHED or NAI_STATUS_REALTIME.
p_outstatusBit: (Output) Status Bit read from board: NAI_STATUS_BIT_LO or NAI_STATUS_BIT_HI.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid accessType parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.

◆ naibrd_GetWatchdog()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetWatchdog ( int32_t cardIndex,
uint32_t * outwatchdog )

Retrieves the watchdog register. The processor will invert the contents of this register within 1 second of the value being set.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
outwatchdog: (Output) Watchdog register value.
Returns
  • NAI_SUCCESS when the board is ready.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_READY when the board is not ready.
  • NAI_ERROR_UNKOWN if naibrd does not know how to determine if the board is ready
  • An error returned by naibrd_ReadReg32

◆ naibrd_HoldBoardReset()

NAIBRDFUNC nai_status_t NAIAPI naibrd_HoldBoardReset ( int32_t cardIndex,
uint32_t holdBoardReset )

Hole/Release board reset to the board for power management.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
holdBoardReset: (Input) Hold/Release board reset to the board (0=Release hold, 1=Hold) .
Returns
  • NAI_SUCCESS when the board is ready.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_VALUE when the communications mode is invalid.
  • NAI_ERROR_NOT_SUPPORTED if naibrd does not support that communications mode as configured and NAIBRD_IOFLAGS_NO_DEFAULT_INTF was not specified to naibrd_SetIOFnc.
  • NAI_ERROR_NOT_OPEN if no connection has been established.
  • An error returned by internal calls closing the connection.

◆ naibrd_IsBoardReady()

NAIBRDFUNC nai_status_t NAIAPI naibrd_IsBoardReady ( int32_t cardIndex)

Determines whether the board is fully booted.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
Returns
  • NAI_SUCCESS when the board is ready.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_READY when the board is not ready.
  • NAI_ERROR_UNKOWN if naibrd does not know how to determine if the board is ready
  • An error returned by naibrd_ReadReg32

◆ naibrd_IsBoardResetOnHold()

NAIBRDFUNC nai_status_t NAIAPI naibrd_IsBoardResetOnHold ( int32_t cardIndex,
uint32_t * isBoardResetOnHold )

Get the hold board reset status of the board.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
*isBoardResetOnHold: (Output) Returns hold board reset of the board (0=Release hold, 1=Hold) .
Returns
  • NAI_SUCCESS when the board is ready.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_VALUE when the communications mode is invalid.
  • NAI_ERROR_NOT_SUPPORTED if naibrd does not support that communications mode as configured and NAIBRD_IOFLAGS_NO_DEFAULT_INTF was not specified to naibrd_SetIOFnc.
  • NAI_ERROR_NOT_OPEN if no connection has been established.
  • An error returned by internal calls closing the connection.

◆ naibrd_SetWatchdog()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetWatchdog ( int32_t cardIndex,
uint32_t watchdog )

Sets the watchdog register. The processor will invert the contents of this register within 1 second of the value being set.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
watchdog: (Input) Watchdog register value.
Returns
  • NAI_SUCCESS when the board is ready.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_READY when the board is not ready.
  • NAI_ERROR_UNKOWN if naibrd does not know how to determine if the board is ready
  • An error returned by naibrd_ReadReg32

◆ naibrd_SoftReset()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SoftReset ( int32_t cardIndex)

For Gen 2 and Gen 3 Products, this function performs a soft reset on the card. For Gen5, this feature is added in MBCore(Rev 4.123) and above. The user can read the MBCore revision at mother board address 0x100. The revsion is encoded as (0x007B0004)minor(123) major(4). This will return setting to the power-on load state.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
Returns
  • NAI_SUCCESS when the board is ready.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_VALUE when the communications mode is invalid.
  • NAI_ERROR_NOT_SUPPORTED for Gen 5 products.
  • NAI_ERROR_NOT_OPEN if no connection has been established.
  • An error returned by internal calls closing the connection.