harp-tech / protocol

Description of the Harp protocol.
https://harp-tech.org/protocol/BinaryProtocol-8bit.html
MIT License
3 stars 5 forks source link

Add UUID register to protocol #39

Open bruno-f-cruz opened 4 months ago

bruno-f-cruz commented 4 months ago

Summary

This PR adds a new register to the protocol called UUID.

Motivation

We currently use a single U16 value to keep track of the serial numbers of devices. This is a rather small number and hardly future proof. Adhering on a pre-existing standard would make the implementation much more generic. For instance, it would allow one to co-opt pico's chip serial number (64bit) into this register.

Detailed Design

For the sake of backward compatibility, we will add a new register instead of modifying the current R_Serial_Number. A new register will be added with the following specs:

Name: UUID Address: 16 Format: U8[16] Access: Read-only

A deprecation warning was also added to the protocol regarding register R_SERIAL_NUMBER. For now, this register will duplicate the first two bytes of R_UUID. On the next major release, the R_SERIAL_NUMBER will likely be removed and only R_UUID supported.

Design Meetings

See further discussion in the following issues:

bruno-f-cruz commented 2 months ago

Use the address name UID instead of UUID Suggest that the unique-ness of the ID should be unique within device type (i.e. whoami) but not necessarily across device types. This way people don't have to worry about clashes across devicetypes