p GPn is one of GP0, GP1, GP2 or GP3
p PIN_FUNCTION is one of GPIO_PIN_INPUT, GPIO_PIN_OUTPUT, GPIO_PIN_ALT0, GPIO_PIN_ALT1, GPIO_PIN_ALT2, GPIO_PIN_ALT3, DEFAULT_OUTPUT_ZERO, or DEFAULT_OUTPUT_ONE
p For a .Ar put flash the GPn and PIN_FUNCTION pairs may be repeated .Sh DESCRIPTION The .Nm utility interacts with a MCP2221 / MCP2221A and can be used to pull the status of the chip, get the SRAM values, get the values from the onboard FLASH and can be used to set some of the FLASH values assoicated with the gpio pins. The values from flash are copied into the SRAM when the chip enumerates or powers up. .Sh EXAMPLES
p .Dl "umcpmioctl /dev/umcpmio0ctl status"
p Query the chip for its status.
p .Dl "umcpmioctl /dev/umcpmio0ctl get sram"
p Return the values from the SRAM on the chip.
p .Dl "umcpmioctl /dev/umcpmio0ctl get flash cs"
p Return the values for the chip settings from the FLASH.
p .Dl "umcpmioctl /dev/umcpmio0ctl put flash gp GP0 GPIO_PIN_INPUT"
p This will set the GP0 pin to be an input pin on start up of the chip.
p .Dl "umcpmioctl /dev/umcpmio0ctl put flash gp GP2 GPIO_PIN_OUTPUT GP0 GPIO_PIN_ALT0"
p This will set the GP2 pin to be an output pin and GP0 pin to have the ALT0 function upon chip start up. .Sh SEE ALSO .Xr umcpmio 4 .Xr gpio 4 .Sh HISTORY The .Nm utility first appeared in .Nx 11.0 . .Sh AUTHORS .An -nosplit The .Nm utility was written by .An Brad Spencer Aq Mt brad (at] anduin.eldar.org . .Sh BUGS Only the gpio settings can be changed in FLASH.
p The output is not very pleasent to use and one will probably need to have the datasheet for the MCP2221 / MCP2221A on hand to make sense of it.