FreeCalypso > hg > fc-usbser-tools
view cp2102/cp210x_defs.h @ 105:1e820ed0904e
Installed-binaries: list of binaries installed by this package
I am establishing a new convention for all FreeCalypso tools, across
different packages and source repositories: each FC tools package
will have a file name Installed-binaries listing all user-invokable
binaries that package installs in /opt/freecalypso/bin. These files
are to serve as an aid to users and distro package maintainers who
prefer to not add /opt/freecalypso/bin to their PATH. The alternative
to adding this directory to PATH is to create a symlink for every
installed binary in some standard location such as /usr/bin or
/usr/local/bin, pointing to the actual binary in /opt/freecalypso/bin;
having a list of all FC-installed binaries in a standardized format
will allow this process to be automated.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 29 Sep 2023 19:42:53 +0000 |
parents | d4d3531d342a |
children |
line wrap: on
line source
/* * Definitions for talking to CP2102 and perhaps other CP210x chips, * taken from Python-based cp210x-program-1.0 tool from 2014, * translated from Python to C. */ #define CP210x_CONFIG 0xFF #define REG_VENDOR_ID 0x3701 #define REG_PRODUCT_ID 0x3702 #define REG_PRODUCT_STRING 0x3703 #define REG_SERIAL_NUMBER 0x3704 #define REG_CFG_ATTRIBUTES 0x3705 #define REG_MAX_POWER 0x3706 #define REG_VERSION 0x3707 #define REG_UNKNOWN 0x3708 #define REG_EEPROM 0x3709 #define REG_LOCK_VALUE 0x370A #define REG_PART_NUMBER 0x370B #define SIZE_EEPROM 0x0400 #define SIZE_PRODUCT_STRING 255 #define SIZE_SERIAL_NUMBER 128 #define SIZE_BAUDRATES 32 #define SIZE_BAUDRATE_CFG 10 #define SIZE_BAUDRATE_TABLE (SIZE_BAUDRATES * SIZE_BAUDRATE_CFG) #define SIZE_VENDOR_STRING 50 #define EEPROM_START_ADDR 0x3600 /* a little bit adapted from libftdi */ #define DEVICE_OUT_REQTYPE (USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_ENDPOINT_OUT) #define DEVICE_IN_REQTYPE (USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_ENDPOINT_IN) #define USB_READ_TIMEOUT 5000 #define USB_WRITE_TIMEOUT 5000