github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/machine/usb/descriptor/classspecific.go (about) 1 package descriptor 2 3 const ( 4 classSpecificTypeLen = 5 5 ) 6 7 type ClassSpecificType struct { 8 data []byte 9 } 10 11 func (d ClassSpecificType) Bytes() []byte { 12 return d.data[:d.data[0]] 13 } 14 15 func (d ClassSpecificType) Length(v uint8) { 16 d.data[0] = byte(v) 17 }