mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-11 14:33:41 +00:00
nrf,sam,rp2040: add machine.HardwareID function
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
//go:build rp2040 || nrf || sam
|
||||
|
||||
package machine
|
||||
|
||||
// DeviceID returns an identifier that is unique within
|
||||
// a particular chipset.
|
||||
//
|
||||
// The identity is one burnt into the MCU itself, or the
|
||||
// flash chip at time of manufacture.
|
||||
//
|
||||
// It's possible that two different vendors may allocate
|
||||
// the same DeviceID, so callers should take this into
|
||||
// account if needing to generate a globally unique id.
|
||||
//
|
||||
// The length of the hardware ID is vendor-specific, but
|
||||
// 8 bytes (64 bits) and 16 bytes (128 bits) are common.
|
||||
var _ = (func() []byte)(DeviceID)
|
||||
Reference in New Issue
Block a user