TwiceAsNice  2019-02-18
Classes | Macros | Functions | Variables
ezusb.h File Reference
#include <stdbool.h>
Include dependency graph for ezusb.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  fx_known_device
 

Macros

#define FX_TYPE_UNDEFINED   -1
 
#define FX_TYPE_AN21   0 /* Original AnchorChips parts */
 
#define FX_TYPE_FX1   1 /* Updated Cypress versions */
 
#define FX_TYPE_FX2   2 /* USB 2.0 versions */
 
#define FX_TYPE_FX2LP   3 /* Updated FX2 */
 
#define FX_TYPE_FX3   4 /* USB 3.0 versions */
 
#define FX_TYPE_MAX   5
 
#define FX_TYPE_NAMES   { "an21", "fx", "fx2", "fx2lp", "fx3" }
 
#define IMG_TYPE_UNDEFINED   -1
 
#define IMG_TYPE_HEX   0 /* Intel HEX */
 
#define IMG_TYPE_IIC   1 /* Cypress 8051 IIC */
 
#define IMG_TYPE_BIX   2 /* Cypress 8051 BIX */
 
#define IMG_TYPE_IMG   3 /* Cypress IMG format */
 
#define IMG_TYPE_MAX   4
 
#define IMG_TYPE_NAMES   { "Intel HEX", "Cypress 8051 IIC", "Cypress 8051 BIX", "Cypress IMG format" }
 
#define FX_KNOWN_DEVICES
 

Functions

int ezusb_load_ram (libusb_device_handle *device, const char *path, int fx_type, int img_type, int stage)
 
int ezusb_load_eeprom (libusb_device_handle *device, const char *path, int fx_type, int img_type, int config)
 

Variables

int verbose
 

Macro Definition Documentation

◆ FX_KNOWN_DEVICES

#define FX_KNOWN_DEVICES
Value:
{ \
{ 0x0547, 0x2122, FX_TYPE_AN21, "Cypress EZ-USB (2122S)" },\
{ 0x0547, 0x2125, FX_TYPE_AN21, "Cypress EZ-USB (2121S/2125S)" },\
{ 0x0547, 0x2126, FX_TYPE_AN21, "Cypress EZ-USB (2126S)" },\
{ 0x0547, 0x2131, FX_TYPE_AN21, "Cypress EZ-USB (2131Q/2131S/2135S)" },\
{ 0x0547, 0x2136, FX_TYPE_AN21, "Cypress EZ-USB (2136S)" },\
{ 0x0547, 0x2225, FX_TYPE_AN21, "Cypress EZ-USB (2225)" },\
{ 0x0547, 0x2226, FX_TYPE_AN21, "Cypress EZ-USB (2226)" },\
{ 0x0547, 0x2235, FX_TYPE_AN21, "Cypress EZ-USB (2235)" },\
{ 0x0547, 0x2236, FX_TYPE_AN21, "Cypress EZ-USB (2236)" },\
{ 0x04b4, 0x6473, FX_TYPE_FX1, "Cypress EZ-USB FX1" },\
{ 0x04b4, 0x8613, FX_TYPE_FX2LP, "Cypress EZ-USB FX2LP (68013A/68014A/68015A/68016A)" }, \
{ 0x04b4, 0x00f3, FX_TYPE_FX3, "Cypress FX3" },\
}
#define FX_TYPE_FX2LP
Definition: ezusb.h:45
#define FX_TYPE_AN21
Definition: ezusb.h:42
#define FX_TYPE_FX1
Definition: ezusb.h:43
#define FX_TYPE_FX3
Definition: ezusb.h:46

◆ FX_TYPE_AN21

#define FX_TYPE_AN21   0 /* Original AnchorChips parts */

◆ FX_TYPE_FX1

#define FX_TYPE_FX1   1 /* Updated Cypress versions */

◆ FX_TYPE_FX2

#define FX_TYPE_FX2   2 /* USB 2.0 versions */

◆ FX_TYPE_FX2LP

#define FX_TYPE_FX2LP   3 /* Updated FX2 */

◆ FX_TYPE_FX3

#define FX_TYPE_FX3   4 /* USB 3.0 versions */

◆ FX_TYPE_MAX

#define FX_TYPE_MAX   5

◆ FX_TYPE_NAMES

#define FX_TYPE_NAMES   { "an21", "fx", "fx2", "fx2lp", "fx3" }

◆ FX_TYPE_UNDEFINED

#define FX_TYPE_UNDEFINED   -1

◆ IMG_TYPE_BIX

#define IMG_TYPE_BIX   2 /* Cypress 8051 BIX */

◆ IMG_TYPE_HEX

#define IMG_TYPE_HEX   0 /* Intel HEX */

◆ IMG_TYPE_IIC

#define IMG_TYPE_IIC   1 /* Cypress 8051 IIC */

◆ IMG_TYPE_IMG

#define IMG_TYPE_IMG   3 /* Cypress IMG format */

◆ IMG_TYPE_MAX

#define IMG_TYPE_MAX   4

◆ IMG_TYPE_NAMES

#define IMG_TYPE_NAMES   { "Intel HEX", "Cypress 8051 IIC", "Cypress 8051 BIX", "Cypress IMG format" }

◆ IMG_TYPE_UNDEFINED

#define IMG_TYPE_UNDEFINED   -1

Function Documentation

◆ ezusb_load_eeprom()

int ezusb_load_eeprom ( libusb_device_handle device,
const char *  path,
int  fx_type,
int  img_type,
int  config 
)

◆ ezusb_load_ram()

int ezusb_load_ram ( libusb_device_handle device,
const char *  path,
int  fx_type,
int  img_type,
int  stage 
)

Variable Documentation

◆ verbose

int verbose