github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/machine/usb/descriptor/interfaceassociation.go (about)

     1  package descriptor
     2  
     3  const (
     4  	interfaceAssociationTypeLen = 8
     5  )
     6  
     7  type InterfaceAssociationType struct {
     8  	data []byte
     9  }
    10  
    11  func (d InterfaceAssociationType) Bytes() []byte {
    12  	return d.data
    13  }
    14  
    15  func (d InterfaceAssociationType) Length(v uint8) {
    16  	d.data[0] = byte(v)
    17  }
    18  
    19  func (d InterfaceAssociationType) Type(v uint8) {
    20  	d.data[1] = byte(v)
    21  }
    22  
    23  func (d InterfaceAssociationType) FirstInterface(v uint8) {
    24  	d.data[2] = byte(v)
    25  }
    26  
    27  func (d InterfaceAssociationType) InterfaceCount(v uint8) {
    28  	d.data[3] = byte(v)
    29  }
    30  
    31  func (d InterfaceAssociationType) FunctionClass(v uint8) {
    32  	d.data[4] = byte(v)
    33  }
    34  
    35  func (d InterfaceAssociationType) FunctionSubClass(v uint8) {
    36  	d.data[5] = byte(v)
    37  }
    38  
    39  func (d InterfaceAssociationType) FunctionProtocol(v uint8) {
    40  	d.data[6] = byte(v)
    41  }
    42  
    43  func (d InterfaceAssociationType) Function(v uint8) {
    44  	d.data[7] = byte(v)
    45  }