From: Uwe Hermann Date: Tue, 17 Jul 2012 15:47:56 +0000 (+0200) Subject: Cosmetics, update docs. X-Git-Tag: sigrok-firmware-fx2lafw-0.1.0~14 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=c7e02d8c24b6f89a274b33300dd47925f5ffb69f;p=sigrok-firmware-fx2lafw.git Cosmetics, update docs. --- diff --git a/README b/README index fd9dc253..a724b02d 100644 --- a/README +++ b/README @@ -5,17 +5,20 @@ fx2lafw fx2lafw is a free/libre/open-source firmware for logic analyzers based on the Cypress EZ-USB FX2(LP) chip. -It is licensed under the terms of the GNU GPL (version 2 or later). +It is licensed under the terms of the GNU GPL (version 2 or later), and uses +additional helper code licensed under the GNU LGPL (version 2.1 or later). Requirements ------------ -In order to build fx2lafw you need the 'sdcc' compiler. + - In order to build fx2lafw you need the 'sdcc' compiler. + On Debian you can install it via: -On Debian you can install it via: + $ apt-get install sdcc - $ apt-get install sdcc + - You need libsigrok >= 0.1.1 in order to make use of fx2lafw. Earlier + versions didn't have support for FX2 devices using this firmware. Building diff --git a/fx2lafw.c b/fx2lafw.c index 7fe95284..e376443a 100644 --- a/fx2lafw.c +++ b/fx2lafw.c @@ -28,10 +28,9 @@ * * - We use the FX2 in GPIF mode to sample the data (asynchronously). * - We use the internal 48MHz clock for GPIF. - * - The 8 channels/pins we sample (the GPIF data bus) are PB0-PB7. - * Support for 16 channels is not yet included, but might be added later. - * - Endpoint 2 is used for data transfers from FX2 to host. - * - The endpoint is quad-buffered. + * - The 8 channels/pins we sample (the GPIF data bus) are PB0-PB7, + * or PB0-PB7 + PD0-PD7 for 16-channel sampling. + * - Endpoint 2 (quad-buffered) is used for data transfers from FX2 to host. * * Documentation: * @@ -44,7 +43,6 @@ #include #include #include - #include #include #include @@ -157,7 +155,7 @@ BOOL handle_set_interface(BYTE ifc, BYTE alt_ifc) /* We only support interface 0, alternate interface 0. */ if (ifc != 0 || alt_ifc != 0) return FALSE; - + /* Perform procedure from TRM, section 2.3.7: */ /* (1) TODO. */ diff --git a/gpif-acquisition.c b/gpif-acquisition.c index 4878b513..39e62e58 100644 --- a/gpif-acquisition.c +++ b/gpif-acquisition.c @@ -71,7 +71,7 @@ static void gpif_setup_registers(void) /* Contains RDY* pin values. Read-only according to TRM. */ GPIFREADYSTAT = 0; - /* Make GPIF stop on transcation count not flag */ + /* Make GPIF stop on transaction count not flag. */ EP2GPIFPFSTOP = (0 << 0); } @@ -128,7 +128,7 @@ void gpif_init_la(void) /* Initialize flowstate registers (not used by us). */ gpif_init_flowstates(); - /* Reset the status */ + /* Reset the status. */ gpif_acquiring = FALSE; } diff --git a/hw/braintechnology-usb-lps/Makefile b/hw/braintechnology-usb-lps/Makefile index 759c3096..bfc0aecc 100644 --- a/hw/braintechnology-usb-lps/Makefile +++ b/hw/braintechnology-usb-lps/Makefile @@ -18,9 +18,7 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## -SOURCES = \ - ../../fx2lafw.c \ - ../../gpif-acquisition.c +SOURCES = ../../fx2lafw.c ../../gpif-acquisition.c A51_SOURCES = dscr.a51 BASENAME = fx2lafw-braintechnology-usb-lps diff --git a/hw/cwav-usbeeax/Makefile b/hw/cwav-usbeeax/Makefile index d0faa468..2159f607 100644 --- a/hw/cwav-usbeeax/Makefile +++ b/hw/cwav-usbeeax/Makefile @@ -18,9 +18,7 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## -SOURCES = \ - ../../fx2lafw.c \ - ../../gpif-acquisition.c +SOURCES = ../../fx2lafw.c ../../gpif-acquisition.c A51_SOURCES = dscr.a51 BASENAME = fx2lafw-cwav-usbeeax diff --git a/hw/cwav-usbeesx/Makefile b/hw/cwav-usbeesx/Makefile index d5713a47..39128266 100644 --- a/hw/cwav-usbeesx/Makefile +++ b/hw/cwav-usbeesx/Makefile @@ -19,9 +19,7 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## -SOURCES = \ - ../../fx2lafw.c \ - ../../gpif-acquisition.c +SOURCES = ../../fx2lafw.c ../../gpif-acquisition.c A51_SOURCES = dscr.a51 BASENAME = fx2lafw-cwav-usbeesx diff --git a/hw/cypress-fx2/Makefile b/hw/cypress-fx2/Makefile index 87d22196..78e2308c 100644 --- a/hw/cypress-fx2/Makefile +++ b/hw/cypress-fx2/Makefile @@ -18,9 +18,7 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## -SOURCES = \ - ../../fx2lafw.c \ - ../../gpif-acquisition.c +SOURCES = ../../fx2lafw.c ../../gpif-acquisition.c A51_SOURCES = dscr.a51 BASENAME = fx2lafw-cypress-fx2 diff --git a/hw/cypress-fx2/dscr.a51 b/hw/cypress-fx2/dscr.a51 index 540642a4..a4a6e908 100644 --- a/hw/cypress-fx2/dscr.a51 +++ b/hw/cypress-fx2/dscr.a51 @@ -19,7 +19,7 @@ ;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ;; -VID = 0xB404 ; Manufacturer ID (0x04B4) +VID = 0xb404 ; Manufacturer ID (0x04b4) PID = 0x1386 ; Product ID (0x8613) .include "../../../include/dscr.inc" diff --git a/hw/saleae-logic/Makefile b/hw/saleae-logic/Makefile index f1e239d3..340ab87b 100644 --- a/hw/saleae-logic/Makefile +++ b/hw/saleae-logic/Makefile @@ -18,9 +18,7 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## -SOURCES = \ - ../../fx2lafw.c \ - ../../gpif-acquisition.c +SOURCES = ../../fx2lafw.c ../../gpif-acquisition.c A51_SOURCES = dscr.a51 BASENAME = fx2lafw-saleae-logic diff --git a/include/fx2lafw.h b/include/fx2lafw.h index 3f69361c..5a66de86 100644 --- a/include/fx2lafw.h +++ b/include/fx2lafw.h @@ -25,6 +25,18 @@ #define SYNCDELAY() SYNCDELAY4 +/* + * Major and minor fx2lafw firmware version numbers. + * These can be queried by the host via CMD_GET_FW_VERSION. + * + * The minor version number must be increased every time there are + * backwards-compatible changes (which do not change the API). + * + * The major version number must be increased every time there are API + * changes or functional changes which require adaptations in the host + * (libsigrok) drivers, i.e. changes where old libsigrok versions would no + * longer (properly) work with the new fx2lafw firmware. + */ #define FX2LAFW_VERSION_MAJOR 1 #define FX2LAFW_VERSION_MINOR 0 diff --git a/include/gpif-acquisition.h b/include/gpif-acquisition.h index ff6ecf57..8787cf91 100644 --- a/include/gpif-acquisition.h +++ b/include/gpif-acquisition.h @@ -22,13 +22,10 @@ #define FX2LAFW_GPIF_ACQUISITION_H #include - #include void gpif_init_la(void); - bool gpif_acquisition_start(const struct cmd_start_acquisition *cmd); - void gpif_poll(void); #endif