Accessing the Board Services Interface

Top  Previous  Next

You must include the header file SMT_BSI.h to access the board services module. The configurer  automatically arrange for the correct driver module to be added to the kernel on that processor.

 

#include <SMT_BSI.h>

 

Having done this, you have access to two functions:

 

OpenBoardServices

#include <SMT_BSI.h>

int OpenBoardServices(SC6xSmtI **I);

 stand-alone

OpenBoardServices assigns an interface pointer to *I; this is then used in functions communicating with the board services module. The task that opens the board services module needs to have at least 350 bytes free on its heap. *I is set to be a null pointer if board services are not available or cannot be opened.

 

For example:

 

#include <SMT_BSI.h>

SC6xSmtI *BsI;

int status = OpenBoardServices(&BsI);

if (status != BS_OK) {

   printf("Cannot open board services (%d)\n", status);

   exit(1);

}

CloseBoardServices

#include <SMT_BSI.h>

int CloseBoardServices(void);

 stand-alone

You call CloseBoardServices to close the interface once you have finished using it.