Add a command to boardctl() to obtain a baord unique ID
This commit is contained in:
parent
5937f9930d
commit
91a8514774
@ -1764,6 +1764,22 @@ config BOARDCTL_RESET
|
||||
Architecture specific logic must provide the board_reset()
|
||||
interface.
|
||||
|
||||
config BOARDCTL_UNIQUEID
|
||||
bool "Return board unique ID"
|
||||
default n
|
||||
---help---
|
||||
Enables support for the BOARDIOC_UNIQUEID boardctl() command.
|
||||
Architecture specific logic must provide the board_uniqueid()
|
||||
interface.
|
||||
|
||||
config BOARDCTL_UNIQUEID_SIZE
|
||||
int "Size of the board unique ID (bytes)"
|
||||
default 16
|
||||
depends on BOARDCTL_UNIQUEID
|
||||
---help---
|
||||
Provides the size of the memory buffer that must be provided by the
|
||||
caller of board_uniqueid() in which to receive the board unique ID.
|
||||
|
||||
config BOARDCTL_SYMTAB
|
||||
bool "Enable symbol table interfaces"
|
||||
default n
|
||||
|
@ -131,6 +131,23 @@ int boardctl(unsigned int cmd, uintptr_t arg)
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BOARDCTL_UNIQUEID
|
||||
/* CMD: BOARDIOC_UNIQUEID
|
||||
* DESCRIPTION: Return a unique ID associated with the board (such
|
||||
* as a serial number or a MAC address).
|
||||
* ARG: A writable array of size CONFIG_BOARDCTL_UNIQUEID_SIZE
|
||||
* in which to receive the board unique ID.
|
||||
* DEPENDENCIES: Board logic must provide the board_uniqueid()
|
||||
* interface.
|
||||
*/
|
||||
|
||||
case BOARDIOC_UNIQUEID:
|
||||
{
|
||||
ret = board_uniqueid((FAR uint8_t *)arg);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BOARDCTL_SYMTAB
|
||||
/* CMD: BOARDIOC_SYMTAB
|
||||
* DESCRIPTION: Select a symbol table
|
||||
|
Loading…
Reference in New Issue
Block a user