Skip to content

Commit df4b869

Browse files
kenbelldeadprogram
authored andcommitted
Document machine.HardwareID
1 parent 54bf7c4 commit df4b869

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

content/docs/reference/machine.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,14 @@ CPUReset performs a hard system reset.
365365

366366
Not all chips support CPUReset.
367367

368+
```go
369+
func DeviceID() []byte
370+
```
371+
372+
DeviceID returns a byte array containing a unique id (aka Serial Number) specific to this chip. In some architectures (notably RP2040) the device ID is actually the ID of the flash chip. The device ID can be useful for identifying specific devices within a family. There is no guarantee the ID is globally unique. The size of the ID is chip-family specific with 8 bytes (64 bits) and 16 bytes (128 bits) being common.
373+
374+
Not all chips have a hardware ID.
375+
368376
```go
369377
func GetRNG() uint32
370378
```

0 commit comments

Comments
 (0)