3.14 Reading Board Type
The driver supports reading board type from SAM.
The SAMD51 function for reading SAM device board type is DSCSAM_BoardType.
Step-By-Step Instructions
The user should call the function DSCSAM_BoardType() with an address of a buffer of type BYTE as argument to store the board type value.
The board names corresponding to values are as follows
Value
Board Type
0
Ziggy
1
TBD
3
Stevie
5
Elton
7
Jethro
...
ERRPARAMS errparams; // structure for returning error code and error string
BYTE Board_type;
...
// Reading Board Type
if( DSCSAM_BoardType(&Board_type) != DE_NONE )
{
DSCGetLastError ( &errparams );
printf ( "DSCSAM_BoardType error: %s %s\n", DSCGetErrorString ( errparams.ErrCode ), errparams.errstring );
return 0;
}
// Printing Board Type
if(Board_type == 0)
printf ( "Board Type : ZIGGY\n" );
else if(Board_type == 3)
printf ( "Board Type : STEVIE\n" );
else if(Board_type == 5)
printf ( "Board Type : ELTON\n" );
else if(Board_type == 7)
printf ( "Board Type : JETHRO\n" );
...
Last updated
Was this helpful?