Low-Level API Reference
The Low-Level API commands mostly map to the HID commands supported by the chip. In case of doubts, please refer to the chip's documentation.
- Low-Level API Reference
Summary of commands and responses.
Constants
MCP2221Driver.HID_MESSAGE_LENGTH
— ConstantLength in bytes of HID communcations.
MCP2221Driver.MCP2221A_DEFAULT_VID
— ConstantMCP2221A default Vendor ID (VID), as per documentation.
MCP2221Driver.MCP2221A_DEFAULT_PID
— ConstantMCP2221A default Product ID (PID), as per documentation.
Enumerations and Utility Structures
Communication protocol
MCP2221Driver.ResponseStatus
— TypeStatus flag for a response.
Success
: command succeded,I2CBusy
:CommandNotSupported
: Command not supported,COmmandNotAllowed
: Command not allowed.
MCP2221Driver.ChipConfigurationSecurityOption
— TypeChip security configuration option:
PermanentlyLocked
PasswordProtected
Unsecured
Analog to Digital / Ditital to Analog conversion
MCP2221Driver.ReferenceVoltageOption
— TypeReference voltage configuration for DAC and ADC.
Reference4p096
: reference is 4.096V (only if VDD is above this voltage)Reference2p048
: reference is 2.048VReference1p024
: reference is 1.024V
MCP2221Driver.SourceReferenceOption
— TypeReference voltage for DAC.
SourceReferenceVRM
: reference voltage is VRMSourceReferenceVDD
: reference voltage is VDD
I²C
MCP2221Driver.CancellationStatus
— TypeCancellation status after a StatusSetParametersCommand
:
NoSpecialOperation
cancel current I²C/SMBus transfer,MarkedForCancellation
current transferm marked for cancellation, bus release will need some time,AlreadyIdle
the I²C engine was already in Idle mode.
MCP2221Driver.CommunicationSpeedStatus
— TypeCommunication speed status after a StatusSetParametersCommand
:
NoSetSpeed
no new speed was issued,NewSpeedConsidered
new speed is now considered,SpeedNotSet
communication speed was not set.
MCP2221Driver.I2CFrameMode
— TypeI²C Frame mode. Writing and reading on the I²C bus is affected by this enumeration.
I2CSingle
I2CRepeatedStart
I2CNoStop
MCP2221Driver.I2CAddress
— TypeFacility container for storing I²C addresses. Users generally should not care about this.
Fields
address::UInt8
General Purpose pins
MCP2221Driver.GPDesignation
— TypeEnum to set the dedicated function of a GP pin.
GPIOOperation
DedicatedFunctionOperation
AlternateFunction0
AlternateFunction1
AlternateFunction2
Not all members of the enum are available to all four GP pins. Refer to the following table for a list of available modes:
GP pin | GPIOOperation | DedicatedFunctionOperation | AlternateFunction0 | AlternateFunction1 | AlternateFunction2 |
---|---|---|---|---|---|
GP0 | Available | SSPND | LED_URx | Not Available | Not Available |
GP1 | Available | clock output | ADC1 | LED_UTx | Interrupt detection |
GP2 | Available | USBCFG | ADC2 | DAC1 | Not Available |
GP3 | Available | LED_I2C | ADC3 | DAC2 | Not Available |
MCP2221Driver.GPDirection
— TypeEnum to set the direction of a GP pin.
GPIOInput
GPIOOutput
MCP2221Driver.ClockOutputDutyCycle
— TypeClock output duty cycle for GP1.
MCP2221Driver.ClockOutputFrequency
— TypeClock output frequency for GP1.
MCP2221Driver.GPIOStatus
— TypeStore the status of a GPIO.
Fields
outputvalue::Bool
: Logical value present at the output.direction::MCP2221Driver.GPDirection
: GPIO direction.designation::MCP2221Driver.GPDesignation
: GPIO designation. SeeGPDesignation
for a list of available designation for each pin.
Commands and Responses
MCP2221Driver.query
— Functionquery(dev, command)
Blocking call to the device to send the command and receive the response if one is expected.
MCP2221Driver.GenericResponse
— TypeA generic response where only the response status is interesting.
Fields
status::MCP2221Driver.ResponseStatus
: SeeResponseStatus
.
MCP2221Driver.StringResponse
— TypeA generic response for commands that respond with a string.
Fields
status::MCP2221Driver.ResponseStatus
: SeeResponseStatus
.string::String
: Response.
Chip configuration commands and responses
MCP2221Driver.StatusSetParametersCommand
— TypePoll the status of the device, and establish certain I²C bus parameters/conditions.
MCP2221Driver.StatusSetParametersCommand
expects a MCP2221Driver.StatusSetParametersResponse
response.
Fields
cancelcurrent::Bool
: Cancel current I²C/SMBus transferdivider::Int8
: Set I²C/SMBus communication speed. If set to 0 don't act. Otherwise the new clock speed is 12 MHz/divider
MCP2221Driver.StatusSetParametersResponse
— TypeResponse for a StatusSetParametersCommand
.
Fields
status::MCP2221Driver.ResponseStatus
: SeeResponseStatus
.cancellationstatus::MCP2221Driver.CancellationStatus
: Status of the cancellation request.speedstatus::MCP2221Driver.CommunicationSpeedStatus
: Status of the new speed request.divider::UInt8
: Divider value for the speed.requestedtransferlength::UInt16
: Length of the requested I²C transfer.alreadytransferedlength::UInt16
: Length of the already transfered I²C message.i2cbuffercounter::UInt8
: Internal I²C data buffer counter.currentcommunicationspeeddividervalue::UInt8
: Current communication speed divider value.currenti2ctimeoutvalue::UInt8
: Current I²C timeout value.currenti2caddress::UInt16
: Current I²C address.ackreceived::Bool
: IfACK
was received from client.sclvalue::UInt8
: Current SCL line value.sdavalue::UInt8
: Current SDA line value.interuptedgestate::Bool
: Interrupt edge detector state.i2creadpendingvalue::UInt8
: I²C read pending value.hardwareversion::VersionNumber
: MCP2221 hardware version.firmwareversion::VersionNumber
: MCP2221 firmware version.adcdatach0::UInt16
: Channel 0 ADC value.adcdatach1::UInt16
: Channel 1 ADC value.adcdatach2::UInt16
: Channel 2 ADC value.
MCP2221Driver.ResetChipCommand
— TypeThis command is used to force a Reset of the MCP2221A device. This command is useful when the Flash memory is updated with new data. The MCP2221A would need to be re-enumerated to see the new data.
MCP2221Driver.ResetChipCommand
does not expects a response.
This command is the only command that does not expect a response.
Flash Memory Manipulation
MCP2221Driver.ReadFlashDataCommand
— TypeMain type for reading the flash memory.
MCP2221Driver.ReadFlashDataChipSettingsCommand
— TypeRead chip settings from flash memory.
MCP2221Driver.ReadFlashDataChipSettingsCommand
expects a MCP2221Driver.ReadFlashDataChipSettingsResponse
response. See also WriteFlashDataChipSettingsCommand
.
MCP2221Driver.ReadFlashDataChipSettingsResponse
— TypeResponse for a ReadFlashDataChipSettingsCommand
.
Fields
status::MCP2221Driver.ResponseStatus
: SeeResponseStatus
.cdcserialnumberenumerationenable::Bool
: If true, the USB serial number will be used during the USB enumeration of the CDC interface.chipconfigurationsecurityoption::MCP2221Driver.ChipConfigurationSecurityOption
: Chip configuration security option.clockoutputduty::MCP2221Driver.ClockOutputDutyCycle
: If the GP pin is enabled for clock output operations, this is the duty cycle of the output.clockoutputdividervalue::MCP2221Driver.ClockOutputFrequency
: If the GP pin is enabled for clock output operations, the divider value will be used on the 48MHz US internal clock and the divider output will be sent to this pin.dacreferencevoltage::MCP2221Driver.ReferenceVoltageOption
: DAC reference voltage option.dacreferenceoption::MCP2221Driver.SourceReferenceOption
: DAC reference option.powerupdacvalue::UInt8
: Power-up DAC value.interruptdetectionnegativeedge::Bool
: Iftrue
, the interrupt detection flag will be set when a negative edge occurs.interruptdetectionpositiveedge::Bool
: Iftrue
, the interrupt detection flag will be set when a positive edge occurs.adcreferencevoltage::MCP2221Driver.ReferenceVoltageOption
: ADC reference voltage.adcreferenceoption::MCP2221Driver.SourceReferenceOption
: ADC reference option.vid::UInt16
: USB VID value.pid::UInt16
: USB PID value.usbpowerattributes::UInt8
: USB power attribute as per USB 2.0 specification.usbrequestednumberofma::UInt8
: USB requested number of mA(s) as per USB 2.0 specification.
MCP2221Driver.ReadFlashDataGPSettingsCommand
— TypeRead GP settings from flash memory.
MCP2221Driver.ReadFlashDataGPSettingsCommand
expects a MCP2221Driver.ReadFlashDataGPSettingsResponse
response.
MCP2221Driver.ReadFlashDataGPSettingsResponse
— TypeResponse for a ReadFlashDataGPSettingsCommand
.
Fields
status::MCP2221Driver.ResponseStatus
: SeeResponseStatus
.gpio0powerupstatus::MCP2221Driver.GPIOStatus
: GPIO0 status at power-up.gpio1powerupstatus::MCP2221Driver.GPIOStatus
: GPIO1 status at power-up.gpio2powerupstatus::MCP2221Driver.GPIOStatus
: GPIO2 status at power-up.gpio3powerupstatus::MCP2221Driver.GPIOStatus
: GPIO3 status at power-up.
MCP2221Driver.ReadFlashDataUSBManufacturerDescriptorStringCommand
— TypeRead USB manufacturer string descriptor used during USB enumeration from flash memory.
MCP2221Driver.ReadFlashDataUSBManufacturerDescriptorStringCommand
expects a MCP2221Driver.StringResponse
response.
MCP2221Driver.ReadFlashDataUSBProductDescriptorStringCommand
— TypeRead USB product string descriptor used during USB enumeration from flash memory.
MCP2221Driver.ReadFlashDataUSBProductDescriptorStringCommand
expects a MCP2221Driver.StringResponse
response.
MCP2221Driver.ReadFlashDataUSBSerialNumberDescriptorStringCommand
— TypeRead USB serial number used during USB enumeration from flash memory.
MCP2221Driver.ReadFlashDataUSBSerialNumberDescriptorStringCommand
expects a MCP2221Driver.StringResponse
response.
MCP2221Driver.ReadFlashDataChipFactorySerialNumberCommand
— TypeRead chip factory serial number from flash memory. Cannot be changed.
MCP2221Driver.ReadFlashDataChipFactorySerialNumberCommand
expects a MCP2221Driver.ReadFlashDataChipFactorySerialNumberResponse
response.
MCP2221Driver.ReadFlashDataChipFactorySerialNumberResponse
— TypeResponse for a ReadFlashDataChipFactorySerialNumberCommand
.
Fields
status::MCP2221Driver.ResponseStatus
: SeeResponseStatus
.number::Vector{UInt8}
: Chip factory serial number, typically 8 bytes long.
MCP2221Driver.WriteFlashDataCommand
— TypeAbstract supertype for all flash writing operations. Used internally because the MCP2221 actually have only one command divided in sub-commands for this.
MCP2221Driver.WriteFlashDataChipSettingsCommand
— TypeWrite chip settings into Flash memory.
MCP2221Driver.WriteFlashDataChipSettingsCommand
expects a MCP2221Driver.GenericResponse
response. See also ReadFlashDataChipSettingsCommand
.
Fields
cdcserialnumberenumerationenable::Bool
: If true, the USB serial number will be used during the USB enumeration of the CDC interface.chipconfigurationsecurityoption::MCP2221Driver.ChipConfigurationSecurityOption
: Chip configuration security option.clockoutputduty::MCP2221Driver.ClockOutputDutyCycle
: If the GP pin is enabled for clock output operations, this is the duty cycle of the output.clockoutputdividervalue::MCP2221Driver.ClockOutputFrequency
: If the GP pin is enabled for clock output operations, the divider value will be used on the 48MHz US internal clock and the divider output will be sent to this pin.dacreferencevoltage::MCP2221Driver.ReferenceVoltageOption
: DAC reference voltage option.dacreferenceoption::MCP2221Driver.SourceReferenceOption
: DAC reference option.powerupdacvalue::UInt8
: Power-up DAC value.interruptdetectionnegativeedge::Bool
: Iftrue
, the interrupt detection flag will be set when a negative edge occurs.interruptdetectionpositiveedge::Bool
: Iftrue
, the interrupt detection flag will be set when a positive edge occurs.adcreferencevoltage::MCP2221Driver.ReferenceVoltageOption
: ADC reference voltage.adcreferenceoption::MCP2221Driver.SourceReferenceOption
: ADC reference option.vid::UInt16
: USB VID value.pid::UInt16
: USB PID value.usbpowerattributes::UInt8
: USB power attribute as per USB 2.0 specification.usbrequestednumberofma::UInt8
: USB requested number of mA(s) as per USB 2.0 specification.password::String
: 8-byte password (for Flash modifications protection).
MCP2221Driver.WriteFlashDataGPSettingsCommand
— TypeWrite GP settings into Flash memory.
MCP2221Driver.WriteFlashDataGPSettingsCommand
expects a MCP2221Driver.GenericResponse
response. ReadFlashDataGPSettingsCommand
.
Fields
gpio0powerupstatus::MCP2221Driver.GPIOStatus
: GPIO0 status at power-up.gpio1powerupstatus::MCP2221Driver.GPIOStatus
: GPIO1 status at power-up.gpio2powerupstatus::MCP2221Driver.GPIOStatus
: GPIO2 status at power-up.gpio3powerupstatus::MCP2221Driver.GPIOStatus
: GPIO3 status at power-up.
MCP2221Driver.WriteFlashStringCommand
— TypeAbstract super-type for all commands writing a string to flash memory. The subtypes are expected to expose a string
attribute.
MCP2221Driver.WriteFlashDataUSBManufacturerDescriptorStringCommand
— TypeWrite USB manufacturer descriptor string into Flash memory.
MCP2221Driver.WriteFlashDataUSBManufacturerDescriptorStringCommand
expects a MCP2221Driver.GenericResponse
response. See also ReadFlashDataUSBManufacturerDescriptorStringCommand
.
Fields
string::String
MCP2221Driver.WriteFlashDataUSBProductDescriptorStringCommand
— TypeWrite USB product descriptor string into Flash memory.
MCP2221Driver.WriteFlashDataUSBProductDescriptorStringCommand
expects a MCP2221Driver.GenericResponse
response. See also ReadFlashDataUSBProductDescriptorStringCommand
.
Fields
string::String
MCP2221Driver.WriteFlashDataUSBSerialNumberDescriptorStringCommand
— TypeWrite USB serial number descriptor string into Flash memory.
MCP2221Driver.WriteFlashDataUSBSerialNumberDescriptorStringCommand
expects a MCP2221Driver.GenericResponse
response. See also ReadFlashDataUSBSerialNumberDescriptorStringCommand
.
Fields
string::String
MCP2221Driver.SendFlashAccessPasswordCommand
— TypeSend user-supplied password that will be compared to the one stored in the device's Flash when Flash updates are required and the Flash data are password-protected.
The password must be at most 8 bytes long. If your string contains characters more than one byte long, their LSB will be written first.
MCP2221Driver.SendFlashAccessPasswordCommand
expects a MCP2221Driver.GenericResponse
response.
Fields
password::AbstractString
: 8-bytes of password.
SRAM Manipulation
MCP2221Driver.SetSRAMSettingsCommand
— TypeThis command is used to al,er various run-time Chip settings. The altered settings reside in SRAM me,ory and they will not affect the Chip’s power-up/Reset default settings. These altered settings will be active until the next chip power-up/Reset.
MCP2221Driver.SetSRAMSettingsCommand
expects a MCP2221Driver.GenericResponse
response.
Fields
clockoutputsettings::Union{Nothing, @NamedTuple{duty::MCP2221Driver.ClockOutputDutyCycle, dividervalue::MCP2221Driver.ClockOutputFrequency}}
: If the GP pin is enabled for clock output operations, these are the duty cycle and the output frequency.
dacsettings::Union{Nothing, @NamedTuple{referencevoltage::MCP2221Driver.ReferenceVoltageOption, referenceoption::MCP2221Driver.SourceReferenceOption}}
: DAC settings.dacoutputvalue::Union{Nothing, UInt8}
: DAC output value, only the 5 LSB are taken into account.adcsettings::Union{Nothing, @NamedTuple{referencevoltage::MCP2221Driver.ReferenceVoltageOption, referenceoption::MCP2221Driver.SourceReferenceOption}}
: ADC settings.interruptdetectionpositiveedge::Union{Nothing, Bool}
: If set to a boolean value, control wether interrupt detection will trigger on positive edges.interruptdetectionnegativeedge::Union{Nothing, Bool}
: If set to a boolean value, control wether interrupt detection will trigger on negative edges.clearinterrupt::Bool
: If set totrue
, clear the interrupt flag. Default isfalse
.gpiosettings::Union{Nothing, @NamedTuple{gpio0::MCP2221Driver.GPIOStatus, gpio1::MCP2221Driver.GPIOStatus, gpio2::MCP2221Driver.GPIOStatus, gpio3::MCP2221Driver.GPIOStatus}}
: If set, change GPIO settings. For more fine-grained control, seeSetGPIOOutputValuesCommand
.
MCP2221Driver.GetSRAMSettingsCommand
— TypeThis command is used to retrieve the run-time Chip and GP settings.
MCP2221Driver.GetSRAMSettingsCommand
expects a MCP2221Driver.GetSRAMSettingsResponse
response.
MCP2221Driver.GetSRAMSettingsResponse
— TypeResponse to a GetSRAMSettingsCommand
.
Fields
status::MCP2221Driver.ResponseStatus
: SeeResponseStatus
.lengthchipsettings::UInt8
: Length in bytes of the SRAM Chip settings area.lengthgpsettings::UInt8
: Length in bytes of the SRAM GP settings area.cdcserialnumberenumerationenable::Bool
: If true, the USB serial number will be used during the USB enumeration of the CDC interface.chipconfigurationsecurityoption::MCP2221Driver.ChipConfigurationSecurityOption
: Chip configuration security option.clockoutputduty::MCP2221Driver.ClockOutputDutyCycle
: If the GP pin is enabled for clock output operations, this is the duty cycle of the output.clockoutputdividervalue::MCP2221Driver.ClockOutputFrequency
: If the GP pin is enabled for clock output operations, the divider value will be used on the 48MHz US internal clock and the divider output will be sent to this pin.dacreferencevoltage::MCP2221Driver.ReferenceVoltageOption
: DAC reference voltage option.dacreferenceoption::MCP2221Driver.SourceReferenceOption
: DAC reference option.powerupdacvalue::UInt8
: Power-up DAC value.interruptdetectionnegativeedge::Bool
: Iftrue
, the interrupt detection flag will be set when a negative edge occurs.interruptdetectionpositiveedge::Bool
: Iftrue
, the interrupt detection flag will be set when a positive edge occurs.adcreferencevoltage::MCP2221Driver.ReferenceVoltageOption
: ADC reference voltage.adcreferenceoption::MCP2221Driver.SourceReferenceOption
: ADC reference option.vid::UInt16
: USB VID value.pid::UInt16
: USB PID value.usbpowerattributes::UInt8
: USB power attribute as per USB 2.0 specification.usbrequestednumberofma::UInt8
: USB requested number of mA(s) as per USB 2.0 specification.password::String
: Current Supplied Password (8 bytes).gpio0status::MCP2221Driver.GPIOStatus
: GPIO0 status.gpio1status::MCP2221Driver.GPIOStatus
: GPIO1 status.gpio2status::MCP2221Driver.GPIOStatus
: GPIO2 status.gpio3status::MCP2221Driver.GPIOStatus
: GPIO3 status.
I²C Communications
MCP2221Driver.I2CWriteDataCommand
— TypeWrite data on the I²C bus. Depending on the chosen I2CFrameMode
, the behavior will vary. The command has the following effects:
- Send the "Start" (
I2CSingle
,I2CNoStop
) or "RepeatedStart" (I2CRepeatedStart
) condition. - Send the I²C client address and wait for the client to send an Acknowledge bit.
- The user data follow next. The I²C engine waits for the Acknowledge bit from the client.
- If the requested length is more than 60 bytes, subsequent user bytes will be sent on the bus.
- When the user data length reaches the requested length, the I²C engine will send the "Stop" condition on the bus, except when the mode is
I2CNoStop
.
Note that you can send data longer than 60 bytes by repeating the command, but this layer will not take care of that for you and will error if your data
is longer than 60 bytes.
MCP2221Driver.I2CWriteDataCommand
expects a MCP2221Driver.GenericResponse
response.
Fields
address::MCP2221Driver.I2CAddress
writemode::MCP2221Driver.I2CFrameMode
data::Vector{UInt8}
MCP2221Driver.I2CReadDataCommand
— TypeRead data from the I²C bus. Depending on the chosen I2CFrameMode
, the behavior will vary. Note that the I2CNoStop
mode is not supported. The command has the following effects:
- Send the "Start" (
I2CSingle
) or "RepeatedStart" (I2CRepeatedStart
) condition. - Send the I²C client address and wait for the client to send an Acknowledge bit.
- The user data follow next. The I²C engine sends the Acknowledge bit to the client.
- If the requested length is more than 60 bytes, subsequent user bytes will be read from the bus.
- When the user data length reaches the requested length, the I²C engine will send the "Stop" condition on the bus.
MCP2221Driver.I2CReadDataCommand
expects a MCP2221Driver.GenericResponse
response.
Fields
address::MCP2221Driver.I2CAddress
readmode::MCP2221Driver.I2CFrameMode
length::UInt16
MCP2221Driver.GetI2CDataCommand
— TypeThis command is used to read back the data from the I2C client device.
MCP2221Driver.GetI2CDataCommand
expects a MCP2221Driver.GetI2CDataResponse
response.
MCP2221Driver.GetI2CDataResponse
— TypeResponse to a GetI2CDataCommand
.
Fields
status::MCP2221Driver.ResponseStatus
: SeeResponseStatus
.data::Vector{UInt8}
GPIO Manipulation
MCP2221Driver.SetGPIOOutputValuesCommand
— TypeThis command is used to change the GPIO output value for those GP pins assigned for GPIO operation (GPIO outputs).
MCP2221Driver.SetGPIOOutputValuesCommand
expects a MCP2221Driver.GenericResponse
response.
Fields
gp0outputvalue::Union{Nothing, Bool}
: GP0 output value, set tonothing
to leave unchanged.gp0pindirection::Union{Nothing, Bool}
: GP0 pin direction, set tonothing
to leave unchanged,false
for output,true
for input.gp1outputvalue::Union{Nothing, Bool}
: GP1 output value, set tonothing
to leave unchanged.gp1pindirection::Union{Nothing, Bool}
: GP1 pin direction, set tonothing
to leave unchanged,false
for output,true
for input.gp2outputvalue::Union{Nothing, Bool}
: GP2 output value, set tonothing
to leave unchanged.gp2pindirection::Union{Nothing, Bool}
: GP2 pin direction, set tonothing
to leave unchanged,false
for output,true
for input.gp3outputvalue::Union{Nothing, Bool}
: GP3 output value, set tonothing
to leave unchanged.gp3pindirection::Union{Nothing, Bool}
: GP3 pin direction, set tonothing
to leave unchanged,false
for output,true
for input.
MCP2221Driver.GetGPIOValuesCommand
— TypeThis command is used to retrieve the GPIO direction and pin value for those GP pins assigned for GPIO operation (GPIO inputs or outputs).
MCP2221Driver.GetGPIOValuesCommand
expects a MCP2221Driver.GetGPIOValuesResponse
response.
MCP2221Driver.GetGPIOValuesResponse
— TypeResponse to a GetGPIOValuesCommand
.
Fields
status::MCP2221Driver.ResponseStatus
: SeeResponseStatus
.gp0pinvalue::Union{Nothing, Bool}
: GP0 logic pin value, ornothing
if not set for GPIO operations.gp0directionvalue::Union{Nothing, Bool}
: GP0 pin designation (false
for outputtrue
for input), or nothing if not set for GPIO operations.gp1pinvalue::Union{Nothing, Bool}
: GP1 logic pin value, ornothing
if not set for GPIO operations.gp1directionvalue::Union{Nothing, Bool}
: GP1 pin designation (false
for outputtrue
for input), or nothing if not set for GPIO operations.gp2pinvalue::Union{Nothing, Bool}
: GP2 logic pin value, ornothing
if not set for GPIO operations.gp2directionvalue::Union{Nothing, Bool}
: GP2 pin designation (false
for outputtrue
for input), or nothing if not set for GPIO operations.gp3pinvalue::Union{Nothing, Bool}
: GP3 logic pin value, ornothing
if not set for GPIO operations.gp3directionvalue::Union{Nothing, Bool}
: GP3 pin designation (false
for outputtrue
for input), or nothing if not set for GPIO operations.
Index
MCP2221Driver.HID_MESSAGE_LENGTH
MCP2221Driver.MCP2221A_DEFAULT_PID
MCP2221Driver.MCP2221A_DEFAULT_VID
MCP2221Driver.CancellationStatus
MCP2221Driver.ChipConfigurationSecurityOption
MCP2221Driver.ClockOutputDutyCycle
MCP2221Driver.ClockOutputFrequency
MCP2221Driver.CommunicationSpeedStatus
MCP2221Driver.GPDesignation
MCP2221Driver.GPDirection
MCP2221Driver.GPIOStatus
MCP2221Driver.GenericResponse
MCP2221Driver.GetGPIOValuesCommand
MCP2221Driver.GetGPIOValuesResponse
MCP2221Driver.GetI2CDataCommand
MCP2221Driver.GetI2CDataResponse
MCP2221Driver.GetSRAMSettingsCommand
MCP2221Driver.GetSRAMSettingsResponse
MCP2221Driver.I2CAddress
MCP2221Driver.I2CFrameMode
MCP2221Driver.I2CReadDataCommand
MCP2221Driver.I2CWriteDataCommand
MCP2221Driver.ReadFlashDataChipFactorySerialNumberCommand
MCP2221Driver.ReadFlashDataChipFactorySerialNumberResponse
MCP2221Driver.ReadFlashDataChipSettingsCommand
MCP2221Driver.ReadFlashDataChipSettingsResponse
MCP2221Driver.ReadFlashDataCommand
MCP2221Driver.ReadFlashDataGPSettingsCommand
MCP2221Driver.ReadFlashDataGPSettingsResponse
MCP2221Driver.ReadFlashDataUSBManufacturerDescriptorStringCommand
MCP2221Driver.ReadFlashDataUSBProductDescriptorStringCommand
MCP2221Driver.ReadFlashDataUSBSerialNumberDescriptorStringCommand
MCP2221Driver.ReferenceVoltageOption
MCP2221Driver.ResetChipCommand
MCP2221Driver.ResponseStatus
MCP2221Driver.SendFlashAccessPasswordCommand
MCP2221Driver.SetGPIOOutputValuesCommand
MCP2221Driver.SetSRAMSettingsCommand
MCP2221Driver.SourceReferenceOption
MCP2221Driver.StatusSetParametersCommand
MCP2221Driver.StatusSetParametersResponse
MCP2221Driver.StringResponse
MCP2221Driver.WriteFlashDataChipSettingsCommand
MCP2221Driver.WriteFlashDataCommand
MCP2221Driver.WriteFlashDataGPSettingsCommand
MCP2221Driver.WriteFlashDataUSBManufacturerDescriptorStringCommand
MCP2221Driver.WriteFlashDataUSBProductDescriptorStringCommand
MCP2221Driver.WriteFlashDataUSBSerialNumberDescriptorStringCommand
MCP2221Driver.WriteFlashStringCommand
MCP2221Driver.query