package ftdi_switch import ( "testing" "gotest.tools/v3/assert" ) const ( ID_VENDOR int = 0x0403 ID_PRODUCT int = 0x6014 ) func TestMain(t *testing.T) { logger.SetPrefix("ftdi_switch: ") logger.Println("Starting") var err error err = Start(ID_VENDOR, ID_PRODUCT, 0) assert.NilError(t, err) err = Write_bit(3, true) assert.NilError(t, err) err = Write_bit(5, true) assert.NilError(t, err) err = Write_bit(6, true) assert.NilError(t, err) err = Write_bit(7, true) assert.NilError(t, err) err = Write_byte(0) assert.NilError(t, err) err = Stop() assert.NilError(t, err) }