Details
Description
There are two issues with this:
According to the spec, this should be encoded as UTF-8. The attribute is read-only per default. We map ASCII to UTF-8 and expect each of the 128 symbols to occupy only one byte. This solution is acceptable.
However, the memory storage for the attribute stores stores each character as uin32_t, so we waste 3*128 bytes of memory here. In the PTP stack, we store it as uin8_t which is inconsistent as well.
Furthermore, when the attribute value should be retrieved from the PTP stack, there is another bug: Ptp_Control is called with command code PTP_CTRLCMD_SET_REVISION instead of PTP_CTRLCMD_SET_USERDESCRIPTION. This seem to be a copy & paste error.
Please consider to reduce the storage width to one byte per symbol in both the TimeSync object and the PTP stack. Also fix the copy & paste error.
Maybe mention i nthe APi manual taht we only support single-byte UTF-8 encoding for this attribute.