OpenCores
URL https://opencores.org/ocsvn/gecko3/gecko3/trunk

Subversion Repositories gecko3

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 9 to Rev 10
    Reverse comparison

Rev 9 → Rev 10

/gecko3/trunk/gecko3com-fw/doc/inc/leopard_gecko_by_larkin_art_97_46.jpg Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
gecko3/trunk/gecko3com-fw/doc/inc/leopard_gecko_by_larkin_art_97_46.jpg Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: gecko3/trunk/gecko3com-fw/doc/inc/Thumbs.db =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: gecko3/trunk/gecko3com-fw/doc/inc/Thumbs.db =================================================================== --- gecko3/trunk/gecko3com-fw/doc/inc/Thumbs.db (revision 9) +++ gecko3/trunk/gecko3com-fw/doc/inc/Thumbs.db (nonexistent)
gecko3/trunk/gecko3com-fw/doc/inc/Thumbs.db Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: gecko3/trunk/gecko3com-fw/doc/inc/doxygen-header.html =================================================================== --- gecko3/trunk/gecko3com-fw/doc/inc/doxygen-header.html (revision 9) +++ gecko3/trunk/gecko3com-fw/doc/inc/doxygen-header.html (nonexistent) @@ -1,9 +0,0 @@ - - - $title - - - - - - \ No newline at end of file Index: gecko3/trunk/gecko3com-fw/doc/inc/gecko-logo.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: gecko3/trunk/gecko3com-fw/doc/inc/gecko-logo.png =================================================================== --- gecko3/trunk/gecko3com-fw/doc/inc/gecko-logo.png (revision 9) +++ gecko3/trunk/gecko3com-fw/doc/inc/gecko-logo.png (nonexistent)
gecko3/trunk/gecko3com-fw/doc/inc/gecko-logo.png Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: gecko3/trunk/gecko3com-fw/doc/inc/mainpage.dox =================================================================== --- gecko3/trunk/gecko3com-fw/doc/inc/mainpage.dox (revision 9) +++ gecko3/trunk/gecko3com-fw/doc/inc/mainpage.dox (nonexistent) @@ -1,36 +0,0 @@ -/** \mainpage - -\section links GECKO3 Project Documentation -For all information about the GECKO3 system and the GECKO3COM firmware visit the GECKO3 project wiki.GECKO3COM Documentation - -\section gecko3com What is GECKO3COM? -GECKO3COM defines the communication between the GECKO3main and a USB Master e.g. a computer. - -The USB master communicates over the EZ-USB with the FPGA or the flash. This is used to configure the FPGA (download your project into the FPGA) or download your project into the flash. It allows you further to communicate with any master USB device. This makes it possible to send and receive date from the FPGA to Matlab or Labview. - -\subsection aim Aim - -The aim of this kind of communication is to use standard commands for different products on the Gecko system. When you for example develop a function generator on the GECKO3main, it would implement the standard commands for a function generator refering to SCPI. - -\section prot Protocols - -\subsection scpi SCPI - -The Standard Commands for Programmable Instruments defines a standard set of commands to control programmable test and measurement devices. The physical communications link is NOT defined by SCPI. In our case this is USBTMC. SCPI commands are ASCII textual strings as defined by IEEE488. SCPI 99 Standard - -\subsection ieee488 IEEE 488 - -This standard was defined for communicating with devices and is known as GPIB or HP-IB. This standard defines the protocol, the physical layer as well the connectors. In the GECKO3 project we use USBTMC instead of the physical layer. IEEE-488.2: Standard Codes, Formats, Protocols, and Common Commands for Use With IEEE-488.1 - -\subsection usbtmc USBTMC - -The Test and Measurement Class is the IEEE 488 (General Purpose Interface Bus) protocol built on top of the USB protocol. From the user's point of view, the USB device behaves just like an older GPIB device but with the full speed of USB. The ASCII message based communication still remains IEEE 488. The exchange interaction is Host- Slave, the computer is always the Host and the GECKO3 the Slave. - -\section update Firmware update - -The DFU (Device Firmware Upgrade Class) protocol allows to update the firmware of the GECKO3. USB Device Firmware Upgrade Specification, Revision 1.0 - -On Linux you can use the tool dfu-util for this purpose. If you have only one DFU capable device connected use the following command:\n -\verbatim dfu-util -R -D /gecko3com.iic \endverbatim - -*/ Index: gecko3/trunk/gecko3com-fw/doc/inc/doxygen-footer.html =================================================================== --- gecko3/trunk/gecko3com-fw/doc/inc/doxygen-footer.html (revision 9) +++ gecko3/trunk/gecko3com-fw/doc/inc/doxygen-footer.html (nonexistent) @@ -1,12 +0,0 @@ -

-

-


- - -Generated on $datetime by doxygen version $doxygenversion - -GECKO3 Project - - \ No newline at end of file Index: gecko3/trunk/gecko3com-fw/doc/inc/gecko_by_larkin_art_200_131.jpg =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: gecko3/trunk/gecko3com-fw/doc/inc/gecko_by_larkin_art_200_131.jpg =================================================================== --- gecko3/trunk/gecko3com-fw/doc/inc/gecko_by_larkin_art_200_131.jpg (revision 9) +++ gecko3/trunk/gecko3com-fw/doc/inc/gecko_by_larkin_art_200_131.jpg (nonexistent)
gecko3/trunk/gecko3com-fw/doc/inc/gecko_by_larkin_art_200_131.jpg Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: gecko3/trunk/gecko3com-fw/doc/inc/leopard_gecko_by_larkin_art.jpg =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: gecko3/trunk/gecko3com-fw/doc/inc/leopard_gecko_by_larkin_art.jpg =================================================================== --- gecko3/trunk/gecko3com-fw/doc/inc/leopard_gecko_by_larkin_art.jpg (revision 9) +++ gecko3/trunk/gecko3com-fw/doc/inc/leopard_gecko_by_larkin_art.jpg (nonexistent)
gecko3/trunk/gecko3com-fw/doc/inc/leopard_gecko_by_larkin_art.jpg Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: gecko3/trunk/gecko3com-fw/doc/inc/tabs.css =================================================================== --- gecko3/trunk/gecko3com-fw/doc/inc/tabs.css (revision 9) +++ gecko3/trunk/gecko3com-fw/doc/inc/tabs.css (nonexistent) @@ -1,102 +0,0 @@ -/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ - -DIV.tabs -{ - float : left; - width : 100%; - background : url("tab_b.gif") repeat-x bottom; - margin-bottom : 4px; -} - -DIV.tabs UL -{ - margin : 0px; - padding-left : 10px; - list-style : none; -} - -DIV.tabs LI, DIV.tabs FORM -{ - display : inline; - margin : 0px; - padding : 0px; -} - -DIV.tabs FORM -{ - float : right; -} - -DIV.tabs A -{ - float : left; - background : url("tab_r.gif") no-repeat right top; - border-bottom : 1px solid #84B0C7; - font-size : x-small; - font-weight : bold; - text-decoration : none; -} - -DIV.tabs A:hover -{ - background-position: 100% -150px; -} - -DIV.tabs A:link, DIV.tabs A:visited, -DIV.tabs A:active, DIV.tabs A:hover -{ - color: #1A419D; -} - -DIV.tabs SPAN -{ - float : left; - display : block; - background : url("tab_l.gif") no-repeat left top; - padding : 5px 9px; - white-space : nowrap; -} - -DIV.tabs INPUT -{ - float : right; - display : inline; - font-size : 1em; -} - -DIV.tabs TD -{ - font-size : x-small; - font-weight : bold; - text-decoration : none; -} - - - -/* Commented Backslash Hack hides rule from IE5-Mac \*/ -DIV.tabs SPAN {float : none;} -/* End IE5-Mac hack */ - -DIV.tabs A:hover SPAN -{ - background-position: 0% -150px; -} - -DIV.tabs LI.current A -{ - background-position: 100% -150px; - border-width : 0px; -} - -DIV.tabs LI.current SPAN -{ - background-position: 0% -150px; - padding-bottom : 6px; -} - -DIV.nav -{ - background : none; - border : none; - border-bottom : 1px solid #84B0C7; -} Index: gecko3/trunk/gecko3com-fw/configure-fpga.sh =================================================================== --- gecko3/trunk/gecko3com-fw/configure-fpga.sh (revision 9) +++ gecko3/trunk/gecko3com-fw/configure-fpga.sh (nonexistent) @@ -1,59 +0,0 @@ -#!/bin/sh - -echo "*idn?" > /dev/usbtmc1 - -BOARD=$(cat /dev/usbtmc1) - -if [ "$?" = 0 ]; -then - kdialog --caption="GECKO3COM" \ - --msgbox "Welcome to the GECKO3COM configuration tool\n Ready to configure board:\n$BOARD" \ - --title "Ready" - - FILE=$(kdialog --getopenfilename :label1 "*.bit" --caption "GECKO3COM" \ - --title "Select FPGA *bit file to download") - if [ "$?" = 0 ]; - then - - dcopRef=$(kdialog --progressbar "Configuring FPGA..." --caption="GECKO3COM" 10) - - echo -n "fpga:conf " > /tmp/fpga_conf.dat - cat "$FILE" >> /tmp/fpga_conf.dat - - dcop $dcopRef setProgress 2 - - cp /tmp/fpga_conf.dat /dev/usbtmc1 | dcop $dcopRef setProgress 8 - - dcop $dcopRef close - - if [ "$?" = 0 ]; - then - - echo "fpga:done?" > /dev/usbtmc1 - RESULT=$(cat /dev/usbtmc1) - - if [ "$?" = 0 ] && [ "$RESULT" = 1 ]; - then - kdialog --msgbox "Successfully configured!" --title "Finished" --caption="GECKO3COM"; - else - kdialog --error "FPGA is not done.\nConfiguration failed!" --caption="GECKO3COM" - - usbtmc_ioctl 1 clear - echo "*idn?" > /dev/usbtmc1; - fi; - else - kdialog --error "Failed to configure FPGA" --caption="GECKO3COM" - usbtmc_ioctl 1 clear - echo "*idn?" > /dev/usbtmc1; - fi - - rm /tmp/fpga_conf.dat; - fi; - -else - kdialog --sorry "No FPGA board found!" --caption="GECKO3COM" - usbtmc_ioctl 1 clear - echo "*idn?" > /dev/usbtmc1; -fi; - - Index: gecko3/trunk/gecko3com-fw/AUTHORS =================================================================== --- gecko3/trunk/gecko3com-fw/AUTHORS (revision 9) +++ gecko3/trunk/gecko3com-fw/AUTHORS (nonexistent) @@ -1,4 +0,0 @@ -Christoph Zimmermann -Lukas Kohler - -this project is based on the gnuradio usrp firmware sourcecode. many thanks to the gnuradio people for the work. \ No newline at end of file Index: gecko3/trunk/gecko3com-fw/gecko3-util/gecko3-util =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: gecko3/trunk/gecko3com-fw/gecko3-util/gecko3-util =================================================================== --- gecko3/trunk/gecko3com-fw/gecko3-util/gecko3-util (revision 9) +++ gecko3/trunk/gecko3com-fw/gecko3-util/gecko3-util (nonexistent)
gecko3/trunk/gecko3com-fw/gecko3-util/gecko3-util Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: gecko3/trunk/gecko3com-fw/gecko3-util/gecko3-util.c =================================================================== --- gecko3/trunk/gecko3com-fw/gecko3-util/gecko3-util.c (revision 9) +++ gecko3/trunk/gecko3com-fw/gecko3-util/gecko3-util.c (nonexistent) @@ -1,416 +0,0 @@ -/* GECKO3COM - * - * Copyright (C) 2008 by - * ___ ____ _ _ - * ( _`\ ( __)( ) ( ) - * | (_) )| (_ | |_| | Berne University of Applied Sciences - * | _ <'| _) | _ | School of Engineering and - * | (_) )| | | | | | Information Technology - * (____/'(_) (_) (_) - * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/*********************************************************************/ -/** \file gecko3-util.c - ********************************************************************* - * \brief simple small helper tool for GECKO3COM - * - * with this tool you can set the serial number, hw revision - * and FPGA type of a GECKO3COM driven device. - * mainly this is the GECKO3main but the firmware could be - * used on other boards. \n - * Based on existing code of dfu-util and testlibusb - * - * \warning does only work on little endian machines! - * - * \author Christoph Zimmermann bfh.ch - * \date 2009-1-23 first version - * \date 2009-8-25 fixed some little bugs. option --device works now, - * counts connected GECKO3 boards now correct. - * -*/ - -#include -#include -#include -#include -#include - -#include "gecko3-util.h" - -#define VERSION "1.1" - - -/* global variables */ -int debug; -static int verbose = 0; - -/* type definitions */ -struct usb_vendprod { - u_int16_t vendor; - u_int16_t product; -}; - -struct gecko3_if { - u_int16_t vendor; - u_int16_t product; - u_int8_t configuration; - u_int8_t interface; - u_int8_t altsetting; - unsigned int flags; - struct usb_device *dev; - - struct usb_dev_handle *dev_handle; -}; - -static struct option opts[] = { - { "help", 0, 0, 'h' }, - { "version", 0, 0, 'V' }, - { "verbose", 0, 0, 'v' }, - { "device", 1, 0, 'd' }, - { "transfer-size", 1, 0, 't' }, - { "set-serial", 1, 0, 's' }, - { "set-hw-rev", 1, 0, 'r' }, - { "set-fpga-type", 1, 0, 'f' }, - { "set-fpga-idcode", 1, 0, 'i' }, -}; - -/*----------------------------------------------------------------------------*/ -/* start of functions block */ - -/* define a portable function for reading a 16bit little-endian word */ -unsigned short get_int16_le(const void *p) -{ - const unsigned char *cp = p; - - return ( cp[0] ) | ( ((unsigned short)cp[1]) << 8 ); -} - -static int _get_first_cb(struct gecko3_if *dif, void *v) -{ - struct gecko3_if *v_dif = v; - - memcpy(v_dif, dif, sizeof(*v_dif)-sizeof(struct usb_dev_handle *)); - - /* return a value that makes find_gecko3_if return immediately */ - return 1; -} - - -/* Iterate over all matching devices within system */ -static int iterate_gecko3_devices(struct gecko3_if *dif, - int (*action)(struct usb_device *dev, void *user), void *user) -{ - struct usb_bus *usb_bus; - struct usb_device *dev; - - /* Walk the tree and find our device. */ - for (usb_bus = usb_get_busses(); NULL != usb_bus; - usb_bus = usb_bus->next) { - for (dev = usb_bus->devices; NULL != dev; dev = dev->next) { - int retval; - - if (dif && \ - (dev->descriptor.idVendor == dif->vendor && \ - dev->descriptor.idProduct == dif->product)) { - retval = action(dev, user); - if (retval) - return retval; - } - } - } - return 0; -} - - -static int found_gecko3_device(struct usb_device *dev, void *user) -{ - struct gecko3_if *dif = user; - - dif->dev = dev; - return 1; -} - - -/* Find the first device, save it in gecko3_if->dev */ -static int get_first_gecko3_device(struct gecko3_if *dif) -{ - return iterate_gecko3_devices(dif, found_gecko3_device, dif); -} - - -static int count_one_gecko3_device(struct usb_device *dev, void *user) -{ - int *num = user; - - (*num)++; - return 0; -} - - -/* Count matching devices within system */ -static int count_gecko3_devices(struct gecko3_if *dif) -{ - int num_found = 0; - - iterate_gecko3_devices(dif, count_one_gecko3_device, &num_found); - return num_found; -} - -static int parse_vendprod(struct usb_vendprod *vp, const char *str) -{ - unsigned long vend, prod; - const char *colon; - - colon = strchr(str, ':'); - if (!colon || strlen(colon) < 2) - return -EINVAL; - - vend = strtoul(str, NULL, 16); - prod = strtoul(colon+1, NULL, 16); - - if (vend > 0xffff || prod > 0xffff) - return -EINVAL; - - vp->vendor = vend; - vp->product = prod; - - return 0; -} - -static void help(void) -{ - printf("Usage: gecko3-util [options] ...\n" - " -h --help\t\t\tPrint this help message\n" - " -V --version\t\t\tPrint the version number\n" - " -v --verbose\n" - " -d --device vendor:product\tSpecify Vendor/Product ID of GECKO3COM device\n" - " -t --transfer-size\t\tSpecify the number of bytes per USB Transfer\n" - " -s --set-serial\t\tWrite the Serial Number. Expects a String as argument\n" - " -r --set-hw-rev\t\tWrite the Hardware Revision. Only one digit\n" - " -f --set-fpga-type\t\tWrite the FPGA type. Formated as ASCII String\n" - " -i --set-fpga-idcode\t\tWrite the FPGA JTAG IDCODE. This is a 32bit Integer value\n" - ); -} - -static void print_version(void) -{ - printf("gecko3-util version %s\n", VERSION); -} - -/*----------------------------------------------------------------------------*/ - -int main(int argc, char **argv) -{ - struct usb_vendprod vendprod; - struct gecko3_if _rt_dif, _dif, *dif = &_dif; - char serial_num[20] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; - unsigned int hw_rev; - char fpga_type[20] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; - char fpga_idcode[20] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; - int num_devs; - unsigned int transfer_size = 0; - const char *little_endian_data; - int ret; - - printf("gecko3-util - (C) 2009 by Berne University of Applied Science\n" - "This program is Free Software and has ABSOLUTELY NO WARRANTY\n\n"); - - memset(dif, 0, sizeof(*dif)); - dif->vendor = GECKO3COM_VID; - dif->product = GECKO3COM_PID; - dif->flags = 0; - - usb_init(); - //usb_set_debug(255); - usb_find_busses(); - usb_find_devices(); - - while (1) { - int c, option_index = 0; - c = getopt_long(argc, argv, "hVvd:t:s:r:i:f:", opts, - &option_index); - if (c == -1) - break; - - switch (c) { - case 'h': - help(); - exit(0); - break; - case 'V': - print_version(); - exit(0); - break; - case 'v': - verbose = 1; - break; - case 'd': - /* Parse device */ - if (parse_vendprod(&vendprod, optarg) < 0) { - fprintf(stderr, "unable to parse `%s'\n", optarg); - exit(2); - } - dif->vendor = vendprod.vendor; - dif->product = vendprod.product; - break; - case 't': - transfer_size = atoi(optarg); - break; - case 's': - dif->flags |= FL_SET_SERIAL; - strcpy(serial_num, optarg); - break; - case 'i': - dif->flags |= FL_SET_FPGA_IDCODE; - strcpy(fpga_idcode, optarg); - break; - case 'r': - dif->flags |= FL_SET_HW_REV; - hw_rev = atoi(optarg); - break; - case 'f': - dif->flags |= FL_SET_FPGA_TYPE; - strcpy(fpga_type, optarg); - break; - default: - help(); - exit(2); - } - } - - - if (dif->flags == 0) { - fprintf(stderr, "You need to specify one of -s, -r, -f or -i\n\n"); - help(); - exit(2); - } - - num_devs = count_gecko3_devices(dif); - if (num_devs == 0) { - fprintf(stderr, "No GECKO3COM USB device found\n"); - exit(1); - } else if (num_devs > 1) { - /* We do not support more than one GECKO3COM device */ - fprintf(stderr, "More than one GECKO3COM USB device found. " - "We can handle only one device at the same time. " - "Please disconnect all but one device\n"); - exit(3); - } - if (!get_first_gecko3_device(dif)) - exit(3); - - /* We have exactly one device. It's usb_device is now in dif->dev */ - - printf("Opening USB Device 0x%04x:0x%04x...\n", dif->vendor, dif->product); - dif->dev_handle = usb_open(dif->dev); - if (!dif->dev_handle) { - fprintf(stderr, "Cannot open device: %s\n", usb_strerror()); - exit(1); - } - - printf("Claiming USB Interface...\n"); - if (usb_claim_interface(dif->dev_handle,GECKO3COM_IF) < 0) { - fprintf(stderr, "Cannot claim interface: %s\n", - usb_strerror()); - exit(1); - } - - /* write Serial Number to the device */ - if (dif->flags & FL_SET_SERIAL) { - printf("Write Serial Number...\n"); - ret = usb_control_msg(dif->dev_handle, - bmRT_TYPE_VENDOR | bmRT_DIR_OUT, /* bmRequestType */ - VRQ_SET_SERIAL, /* bRequest */ - 0, /* wValue */ - 0, /* wIndex */ - serial_num, /* Data */ - SERIAL_NO_LEN, /* wLength */ - TIMEOUT); - if (ret < 0) { - fprintf(stderr, "Cannot write Serial Number: %s\n", - usb_strerror()); - exit(1); - } - } - - /* write Hardware Revision to the device */ - if (dif->flags & FL_SET_HW_REV) { - printf("Write Hardware Revision...\n"); - ret = usb_control_msg(dif->dev_handle, - bmRT_TYPE_VENDOR | bmRT_DIR_OUT, /* bmRequestType */ - VRQ_SET_HW_REV, /* bRequest */ - 0, /* wValue */ - 0, /* wIndex */ - (char*)(&hw_rev), /* Data */ - 1, /* wLength */ - TIMEOUT); - if (ret < 0) { - fprintf(stderr, "Cannot write Hardware Revision: %s\n", - usb_strerror()); - exit(1); - } - } - - /* write FPGA Type to the device */ - if (dif->flags & FL_SET_FPGA_TYPE) { - printf("Write FPGA Type...\n"); - ret = usb_control_msg(dif->dev_handle, - bmRT_TYPE_VENDOR | bmRT_DIR_OUT, /* bmRequestType */ - VRQ_SET_FPGA_TYPE, /* bRequest */ - 0, /* wValue */ - 0, /* wIndex */ - fpga_type, /* Data */ - FPGA_TYPE_LEN, /* wLength */ - TIMEOUT); - if (ret < 0) { - fprintf(stderr, "Cannot write FPGA Type: %s\n", - usb_strerror()); - exit(1); - } - } - - /* write FPGA IDCODE to the device */ - if (dif->flags & FL_SET_FPGA_IDCODE) { - printf("Write FPGA IDCODE...\n"); - ret = usb_control_msg(dif->dev_handle, - bmRT_TYPE_VENDOR | bmRT_DIR_OUT, /* bmRequestType */ - VRQ_SET_FPGA_IDCODE, /* bRequest */ - 0, /* wValue */ - 0, /* wIndex */ - fpga_idcode, /* Data */ - FPGA_IDCODE_LEN, /* wLength */ - TIMEOUT); - if (ret < 0) { - fprintf(stderr, "Cannot write FPGA IDCODE: %s\n", - usb_strerror()); - exit(1); - } - } - - printf("We're done. Cleaning up...\n"); - if (usb_release_interface(dif->dev_handle, GECKO3COM_IF) < 0) { - fprintf(stderr, "Cannot release interface: %s\n", - usb_strerror()); - exit(1); - } - if (usb_close(dif->dev_handle) < 0) { - fprintf(stderr, "Cannot close USB device: %s\n", - usb_strerror()); - exit(1); - } - printf("Finished\n"); - exit(0); -} Index: gecko3/trunk/gecko3com-fw/gecko3-util/gecko3-util.h =================================================================== --- gecko3/trunk/gecko3com-fw/gecko3-util/gecko3-util.h (revision 9) +++ gecko3/trunk/gecko3com-fw/gecko3-util/gecko3-util.h (nonexistent) @@ -1,148 +0,0 @@ -/*********************************************************** - * Gecko3 SoC HW/SW Development Board - * ___ ___ _ _ - * ( _`\ ( __)( ) ( ) - * | (_) )| ( | |_| | Berne University of Applied Sciences - * | _ <'| _) | _ | School of Engineering and - * | (_) )| | | | | | Information Technology - * (____/'(_) (_) (_) - * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/************************************************************/ -/** \file gecko3-util.h - ************************************************************* - * \brief Commands used by GECKO3COM - * - * Here are the definitions of the commands interpreted - * by the GECKO3COM firmware. - * Mainly these are IEEE488 messages used with the USB - * Test and Measurement Class (TMC). - * We implemented also a few vendor specific USB commands - * to write the serial number and the FPGA type. - * - * \author Christoph Zimmermann bfh.ch - * \date 17.09.2007 first version - * - */ - -#ifndef _GECKO3_UTIL_H_ -#define _GECKO3_UTIL_H_ - - -#define GECKO3COM_VID 0x0547 -#define GECKO3COM_PID 0x0002 - -#define GECKO3COM_IF 1 -#define TIMEOUT 500 - -#define FPGA_TYPE_LEN 16 -#define FPGA_IDCODE_LEN 10 /* the JTAG chip IDCODE is a 32 bit integer but stored as 0x11223344 */ -#define SERIAL_NO_LEN 8 - -/* bit masks for the Flags variable */ -#define FL_SET_SERIAL 0x01 -#define FL_SET_HW_REV 0x02 -#define FL_SET_FPGA_TYPE 0x04 -#define FL_SET_FPGA_IDCODE 0x08 - - -/* ---------------------------------------------------------------- - * Vendor bmRequestType's - * --------------------------------------------------------------*/ - -#define VRT_VENDOR_IN 0xC0 -#define VRT_VENDOR_OUT 0x40 - -/* ---------------------------------------------------------------- - * GECKO3COM Vendor Requests - * - * Note that Cypress reserves [0xA0,0xAF]. - * 0xA0 is the firmware load function. - * --------------------------------------------------------------*/ - - -/* IN commands */ - -/* #define VRQ_GET_STATUS 0x80 */ - - -/* OUT commands */ - -#define VRQ_SET_SERIAL 0x01 - -#define VRQ_SET_HW_REV 0x02 - -#define VRQ_SET_FPGA_TYPE 0x03 - -#define VRQ_SET_FPGA_IDCODE 0x04 - - -#define bmRT_DIR_MASK (0x1 << 7) -#define bmRT_DIR_IN (1 << 7) -#define bmRT_DIR_OUT (0 << 7) - -#define bmRT_TYPE_MASK (0x3 << 5) -#define bmRT_TYPE_STD (0 << 5) -#define bmRT_TYPE_CLASS (1 << 5) -#define bmRT_TYPE_VENDOR (2 << 5) -#define bmRT_TYPE_RESERVED (3 << 5) - -#define bmRT_RECIP_MASK (0x1f << 0) -#define bmRT_RECIP_DEVICE (0 << 0) -#define bmRT_RECIP_INTERFACE (1 << 0) -#define bmRT_RECIP_ENDPOINT (2 << 0) -#define bmRT_RECIP_OTHER (3 << 0) - - -/* standard request codes (bRequest) */ - -#define RQ_GET_STATUS 0 -#define RQ_CLEAR_FEATURE 1 -#define RQ_RESERVED_2 2 -#define RQ_SET_FEATURE 3 -#define RQ_RESERVED_4 4 -#define RQ_SET_ADDRESS 5 -#define RQ_GET_DESCR 6 -#define RQ_SET_DESCR 7 -#define RQ_GET_CONFIG 8 -#define RQ_SET_CONFIG 9 -#define RQ_GET_INTERFACE 10 -#define RQ_SET_INTERFACE 11 -#define RQ_SYNCH_FRAME 12 - -/* standard descriptor types */ - -#define DT_DEVICE 1 -#define DT_CONFIG 2 -#define DT_STRING 3 -#define DT_INTERFACE 4 -#define DT_ENDPOINT 5 -#define DT_DEVQUAL 6 -#define DT_OTHER_SPEED 7 -#define DT_INTERFACE_POWER 8 - -/* standard feature selectors */ - -#define FS_ENDPOINT_HALT 0 /* recip: endpoint */ -#define FS_DEV_REMOTE_WAKEUP 1 /* recip: device */ -#define FS_TEST_MODE 2 /* recip: device */ - -/* Get Status device attributes */ - -#define bmGSDA_SELF_POWERED 0x01 -#define bmGSDA_REM_WAKEUP 0x02 - -#endif /* _GECKO3_UTIL_H_ */ Index: gecko3/trunk/gecko3com-fw/gecko3-util/README =================================================================== --- gecko3/trunk/gecko3com-fw/gecko3-util/README (revision 9) +++ gecko3/trunk/gecko3com-fw/gecko3-util/README (nonexistent) @@ -1,52 +0,0 @@ -gecko3-util - -Copyright (C) 2008 by - ___ ____ _ _ - ( _`\ ( __)( ) ( ) - | (_) )| (_ | |_| | Berne University of Applied Sciences - | _ <'| _) | _ | School of Engineering and - | (_) )| | | | | | Information Technology - (____/'(_) (_) (_) - -Simple small helper tool for GECKO3COM - - With this tool you can set the serial number, hw revision - and FPGA type of a GECKO3COM driven device. - mainly this is the GECKO3main but the firmware could be - used on other boards. - - Warning: This tool does only work on little endian machines! - -Usage: gecko3-util [options] ... - -h --help Print this help message - -V --version Print the version number - -v --verbose - -d --device vendor:product Specify Vendor/Product ID of GECKO3COM device - -t --transfer-size Specify the number of bytes per USB Transfer - -s --set-serial Write the Serial Number. Expects a String as argument - -r --set-hw-rev Write the Hardware Revision. Only one digit - -f --set-fpga-type Write the FPGA type. Formated as ASCII String - -i --set-fpga-idcode Write the FPGA JTAG IDCODE. This is a 32bit Integer value - -Example: - GECKO3main, first version, with a Spartan3 with 4 Mio. gates and the serial number 36: - gecko3-util --set-hw-rev 0 --set-fpga-type 3s4000fg676 --set-fpga-idcode 0x01448093 --set-serial 36 - -Installation: - To build the tool type "make" in the gecko3-util folder. The libusb header - files have to be installed for this. - - There is also a installation rule in the Makefile which copies the - gecko3-util to "/usr/local/bin". For this type as usual "make install" in the - gecko3-util folder. - - - -Christoph Zimmermann bfh.ch -2009-1-26 - -Changelog: -Version 1.1 22. September 2009: -Corrected two bugs. -- The gecko3-util wrongly counted some hubs as GECKO3COM devices. -- After the --device option no argument was allowed (segmentation fault) \ No newline at end of file Index: gecko3/trunk/gecko3com-fw/gecko3-util/Makefile =================================================================== --- gecko3/trunk/gecko3com-fw/gecko3-util/Makefile (revision 9) +++ gecko3/trunk/gecko3com-fw/gecko3-util/Makefile (nonexistent) @@ -1,20 +0,0 @@ -INSTALL_LOCATION=/usr/local - -.c.o : - cc -I . -c $< - -all: gecko3-util - -gecko3-util: gecko3-util.o - cc -o $@ gecko3-util.o -L. -lusb - -install: gecko3-util-install - -gecko3-util-install: - mkdir -p $(INSTALL_LOCATION)/bin - cp gecko3-util $(INSTALL_LOCATION)/bin - chmod 755 $(INSTALL_LOCATION)/bin/gecko3-util - -clean: - rm -f *.o gecko3-util - Index: gecko3/trunk/gecko3com-fw/ChangeLog =================================================================== --- gecko3/trunk/gecko3com-fw/ChangeLog (revision 9) +++ gecko3/trunk/gecko3com-fw/ChangeLog (nonexistent) @@ -1,45 +0,0 @@ -2008-Nov-21 Christoph Zimmermann - - * firmware/lib/ser.c - added library functions for rs232 communication. based on a source - code provided by sdcc, modified to use the fast baudrate generator - of the FX2 - - * firmware/include/debugprint.h - macro definitions to send debug messages to stdout using the - printf_small function. (you have to provide your own putchar and - getchar function as explained in the sdcc documenttion). - it provides different levels of output messages, you can select - the desired level in the make file. all unused function calls are - removed by the preprocessor - - -2006-Nov-19 Christoph Zimmermann - - * firmware/src/Makefile.unix - fixed the last error in the make file. the order of the object - files is now correct for the linker (the irq vector tables have to - come first). original usrp fw is now working on the dev board - - - -# -# Copyright 2008 MicroLab (Berne University of Applied Science) -# -# This file is part of GECKO3COM -# -# GECKO3COM; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GECKO3COM is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# Index: gecko3/trunk/gecko3com-fw/COPYING =================================================================== --- gecko3/trunk/gecko3com-fw/COPYING (revision 9) +++ gecko3/trunk/gecko3com-fw/COPYING (nonexistent) @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. Index: gecko3/trunk/gecko3com-fw/firmware/gpif-design/gecko3main_fifo_transfer_test.gpf =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: gecko3/trunk/gecko3com-fw/firmware/gpif-design/gecko3main_fifo_transfer_test.gpf =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/gpif-design/gecko3main_fifo_transfer_test.gpf (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/gpif-design/gecko3main_fifo_transfer_test.gpf (nonexistent)
gecko3/trunk/gecko3com-fw/firmware/gpif-design/gecko3main_fifo_transfer_test.gpf Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: gecko3/trunk/gecko3com-fw/firmware/gpif-design/gecko3main_fifo_transfer.gpf =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: gecko3/trunk/gecko3com-fw/firmware/gpif-design/gecko3main_fifo_transfer.gpf =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/gpif-design/gecko3main_fifo_transfer.gpf (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/gpif-design/gecko3main_fifo_transfer.gpf (nonexistent)
gecko3/trunk/gecko3com-fw/firmware/gpif-design/gecko3main_fifo_transfer.gpf Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: gecko3/trunk/gecko3com-fw/firmware/gpif-design/gecko3main_gpif.c =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/gpif-design/gecko3main_gpif.c (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/gpif-design/gecko3main_gpif.c (nonexistent) @@ -1,292 +0,0 @@ -// This program configures the General Programmable Interface (GPIF) for FX2. -// Please do not modify sections of text which are marked as "DO NOT EDIT ...". -// -// DO NOT EDIT ... -// GPIF Initialization -// Interface Timing Sync -// Internal Ready Init IntRdy=1 -// CTL Out Tristate-able Binary -// SingleWrite WF Select 1 -// SingleRead WF Select 0 -// FifoWrite WF Select 3 -// FifoRead WF Select 2 -// Data Bus Idle Drive Tristate -// END DO NOT EDIT - -// DO NOT EDIT ... -// GPIF Wave Names -// Wave 0 = Single R -// Wave 1 = Single W -// Wave 2 = FIFO Rea -// Wave 3 = FIFO Wri - -// GPIF Ctrl Outputs Level -// CTL 0 = RDYU CMOS -// CTL 1 = WRU CMOS -// CTL 2 = RDYU CMOS -// CTL 3 = intern CMOS -// CTL 4 = unused CMOS -// CTL 5 = unused CMOS - -// GPIF Rdy Inputs -// RDY0 = WRX -// RDY1 = RDYX -// RDY2 = unused -// RDY3 = unused -// RDY4 = unused -// RDY5 = TCXpire -// FIFOFlag = FIFOFlag -// IntReady = IntReady -// END DO NOT EDIT -// DO NOT EDIT ... -// -// GPIF Waveform 0: Single R -// -// Interval 0 1 2 3 4 5 6 Idle (7) -// _________ _________ _________ _________ _________ _________ _________ _________ -// -// AddrMode Same Val Same Val Same Val Same Val Same Val Same Val Same Val -// DataMode NO Data NO Data Activate Activate Activate Activate Activate -// NextData SameData SameData SameData SameData SameData SameData SameData -// Int Trig No Int No Int No Int No Int No Int No Int No Int -// IF/Wait IF Wait 1 IF Wait 1 Wait 1 Wait 1 Wait 1 -// Term A WRX WRX -// LFunc AND AND -// Term B WRX WRX -// Branch1 Then 1 ThenIdle -// Branch0 ElseIdle ElseIdle -// Re-Exec Yes Yes -// Sngl/CRC Default Default Default Default Default Default Default -// RDYU 0 0 0 0 0 0 0 0 -// WRU 0 0 0 0 0 0 0 0 -// RDYU 0 1 1 1 1 1 1 0 -// intern 0 0 0 0 0 0 0 0 -// unused 0 0 0 0 0 0 0 0 -// unused 0 0 0 0 0 0 0 0 -// -// END DO NOT EDIT -// DO NOT EDIT ... -// -// GPIF Waveform 1: Single W -// -// Interval 0 1 2 3 4 5 6 Idle (7) -// _________ _________ _________ _________ _________ _________ _________ _________ -// -// AddrMode Same Val Same Val Same Val Same Val Same Val Same Val Same Val -// DataMode NO Data NO Data Activate NO Data NO Data NO Data NO Data -// NextData SameData SameData SameData SameData SameData SameData SameData -// Int Trig No Int No Int No Int No Int No Int No Int No Int -// IF/Wait IF IF IF IF Wait 1 Wait 1 Wait 1 -// Term A WRX RDYX RDYX RDYX -// LFunc OR AND AND AND -// Term B WRX RDYX IntReady RDYX -// Branch1 ThenIdle Then 2 ThenIdle Then 3 -// Branch0 Else 1 Else 1 Else 3 ElseIdle -// Re-Exec No No Yes No -// Sngl/CRC Default Default Default Default Default Default Default -// RDYU 0 0 0 0 0 0 0 0 -// WRU 0 1 1 1 1 1 1 0 -// RDYU 0 0 0 1 1 1 1 0 -// intern 0 0 0 0 0 0 0 0 -// unused 0 0 0 0 0 0 0 0 -// unused 0 0 0 0 0 0 0 0 -// -// END DO NOT EDIT -// DO NOT EDIT ... -// -// GPIF Waveform 2: FIFO Rea -// -// Interval 0 1 2 3 4 5 6 Idle (7) -// _________ _________ _________ _________ _________ _________ _________ _________ -// -// AddrMode Same Val Same Val Same Val Same Val Same Val Same Val Same Val -// DataMode NO Data NO Data NO Data Activate Activate NO Data NO Data -// NextData SameData SameData SameData SameData NextData SameData SameData -// Int Trig No Int No Int No Int No Int Trig Int No Int No Int -// IF/Wait IF Wait 2 Wait 1 IF Wait 1 IF IF -// Term A WRX WRX WRX WRX -// LFunc AND AND AND AND -// Term B WRX WRX WRX WRX -// Branch1 Then 1 Then 3 ThenIdle ThenIdle -// Branch0 Else 0 Else 4 ElseIdle ElseIdle -// Re-Exec No Yes No Yes -// Sngl/CRC Default Default Default Default Default Default Default -// RDYU 0 0 0 0 0 0 0 0 -// WRU 0 0 0 0 0 0 0 0 -// RDYU 0 0 1 1 1 0 0 0 -// intern 0 1 1 1 1 0 0 0 -// unused 0 0 0 0 0 0 0 0 -// unused 0 0 0 0 0 0 0 0 -// -// END DO NOT EDIT -// DO NOT EDIT ... -// -// GPIF Waveform 3: FIFO Wri -// -// Interval 0 1 2 3 4 5 6 Idle (7) -// _________ _________ _________ _________ _________ _________ _________ _________ -// -// AddrMode Same Val Same Val Same Val Same Val Same Val Same Val Same Val -// DataMode NO Data NO Data NO Data Activate Activate Activate NO Data -// NextData SameData SameData SameData SameData SameData NextData SameData -// Int Trig No Int No Int No Int No Int No Int Trig Int No Int -// IF/Wait IF Wait 1 IF IF IF IF IF -// Term A WRX WRX RDYX FIFOFlag RDYX WRX -// LFunc AND AND AND AND AND AND -// Term B WRX WRX RDYX FIFOFlag RDYX WRX -// Branch1 ThenIdle Then 2 Then 4 Then 4 ThenIdle ThenIdle -// Branch0 Else 1 Else 3 Else 3 Else 5 ElseIdle ElseIdle -// Re-Exec No No No Yes No No -// Sngl/CRC Default Default Default Default Default Default Default -// RDYU 0 0 0 0 0 0 0 0 -// WRU 0 1 1 1 1 0 0 0 -// RDYU 0 0 0 0 0 0 0 0 -// intern 0 0 0 0 0 0 0 0 -// unused 0 0 0 0 0 0 0 0 -// unused 0 0 0 0 0 0 0 0 -// -// END DO NOT EDIT - -// GPIF Program Code - -// DO NOT EDIT ... -#include "fx2.h" -#include "fx2regs.h" -#include "fx2sdly.h" // SYNCDELAY macro -// END DO NOT EDIT - -// DO NOT EDIT ... -const char xdata WaveData[128] = -{ -// Wave 0 -/* LenBr */ 0x8F, 0x01, 0xBF, 0x01, 0x01, 0x01, 0x01, 0x07, -/* Opcode*/ 0x01, 0x00, 0x03, 0x02, 0x02, 0x02, 0x02, 0x00, -/* Output*/ 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, -/* LFun */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, -// Wave 1 -/* LenBr */ 0x39, 0x11, 0xBB, 0x1F, 0x01, 0x01, 0x01, 0x07, -/* Opcode*/ 0x01, 0x01, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, -/* Output*/ 0x00, 0x02, 0x02, 0x06, 0x06, 0x06, 0x06, 0x00, -/* LFun */ 0x40, 0x09, 0x0F, 0x09, 0x00, 0x00, 0x00, 0x3F, -// Wave 2 -/* LenBr */ 0x08, 0x02, 0x01, 0x9C, 0x01, 0x3F, 0xBF, 0x07, -/* Opcode*/ 0x01, 0x00, 0x00, 0x03, 0x16, 0x01, 0x01, 0x00, -/* Output*/ 0x00, 0x08, 0x0C, 0x0C, 0x0C, 0x00, 0x00, 0x00, -/* LFun */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, -// Wave 3 -/* LenBr */ 0x39, 0x01, 0x13, 0x23, 0xA5, 0x3F, 0x3F, 0x07, -/* Opcode*/ 0x01, 0x00, 0x01, 0x03, 0x03, 0x17, 0x01, 0x00, -/* Output*/ 0x00, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, -/* LFun */ 0x00, 0x00, 0x00, 0x09, 0x36, 0x09, 0x00, 0x3F, -}; -// END DO NOT EDIT - -// DO NOT EDIT ... -const char xdata FlowStates[36] = -{ -/* Wave 0 FlowStates */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -/* Wave 1 FlowStates */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -/* Wave 2 FlowStates */ 0x83,0x36,0x04,0x00,0x03,0x23,0x03,0x02,0x00, -/* Wave 3 FlowStates */ 0x84,0x09,0x02,0x02,0x02,0x23,0x03,0x02,0x00, -}; -// END DO NOT EDIT - -// DO NOT EDIT ... -const char xdata InitData[7] = -{ -/* Regs */ 0xE0,0x00,0x00,0x00,0xEE,0x4E,0x00 -}; -// END DO NOT EDIT - -// TO DO: You may add additional code below. - -void GpifInit( void ) -{ - BYTE i; - - // Registers which require a synchronization delay, see section 15.14 - // FIFORESET FIFOPINPOLAR - // INPKTEND OUTPKTEND - // EPxBCH:L REVCTL - // GPIFTCB3 GPIFTCB2 - // GPIFTCB1 GPIFTCB0 - // EPxFIFOPFH:L EPxAUTOINLENH:L - // EPxFIFOCFG EPxGPIFFLGSEL - // PINFLAGSxx EPxFIFOIRQ - // EPxFIFOIE GPIFIRQ - // GPIFIE GPIFADRH:L - // UDMACRCH:L EPxGPIFTRIG - // GPIFTRIG - - // Note: The pre-REVE EPxGPIFTCH/L register are affected, as well... - // ...these have been replaced by GPIFTC[B3:B0] registers - - // 8051 doesn't have access to waveform memories 'til - // the part is in GPIF mode. - - IFCONFIG = 0xEE; - // IFCLKSRC=1 , FIFOs executes on internal clk source - // xMHz=1 , 48MHz internal clk rate - // IFCLKOE=0 , Don't drive IFCLK pin signal at 48MHz - // IFCLKPOL=0 , Don't invert IFCLK pin signal from internal clk - // ASYNC=1 , master samples asynchronous - // GSTATE=1 , Drive GPIF states out on PORTE[2:0], debug WF - // IFCFG[1:0]=10, FX2 in GPIF master mode - - GPIFABORT = 0xFF; // abort any waveforms pending - - GPIFREADYCFG = InitData[ 0 ]; - GPIFCTLCFG = InitData[ 1 ]; - GPIFIDLECS = InitData[ 2 ]; - GPIFIDLECTL = InitData[ 3 ]; - GPIFWFSELECT = InitData[ 5 ]; - GPIFREADYSTAT = InitData[ 6 ]; - - // use dual autopointer feature... - AUTOPTRSETUP = 0x07; // inc both pointers, - // ...warning: this introduces pdata hole(s) - // ...at E67B (XAUTODAT1) and E67C (XAUTODAT2) - - // source - AUTOPTRH1 = MSB( &WaveData ); - AUTOPTRL1 = LSB( &WaveData ); - - // destination - AUTOPTRH2 = 0xE4; - AUTOPTRL2 = 0x00; - - // transfer - for ( i = 0x00; i < 128; i++ ) - { - EXTAUTODAT2 = EXTAUTODAT1; - } - -// Configure GPIF Address pins, output initial value, - PORTCCFG = 0xFF; // [7:0] as alt. func. GPIFADR[7:0] - OEC = 0xFF; // and as outputs - PORTECFG |= 0x80; // [8] as alt. func. GPIFADR[8] - OEE |= 0x80; // and as output - -// ...OR... tri-state GPIFADR[8:0] pins -// PORTCCFG = 0x00; // [7:0] as port I/O -// OEC = 0x00; // and as inputs -// PORTECFG &= 0x7F; // [8] as port I/O -// OEE &= 0x7F; // and as input - -// GPIF address pins update when GPIFADRH/L written - SYNCDELAY; // - GPIFADRH = 0x00; // bits[7:1] always 0 - SYNCDELAY; // - GPIFADRL = 0x00; // point to PERIPHERAL address 0x0000 - -// Configure GPIF FlowStates registers for Wave 0 of WaveData - FLOWSTATE = FlowStates[ 0 ]; - FLOWLOGIC = FlowStates[ 1 ]; - FLOWEQ0CTL = FlowStates[ 2 ]; - FLOWEQ1CTL = FlowStates[ 3 ]; - FLOWHOLDOFF = FlowStates[ 4 ]; - FLOWSTB = FlowStates[ 5 ]; - FLOWSTBEDGE = FlowStates[ 6 ]; - FLOWSTBHPERIOD = FlowStates[ 7 ]; -} - Index: gecko3/trunk/gecko3com-fw/firmware/gpif-design/edit-gpif =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/gpif-design/edit-gpif (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/gpif-design/edit-gpif (nonexistent) @@ -1,114 +0,0 @@ -#!/usr/bin/env python -# -*- Python -*- -# -# Copyright 2003 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - - -# Edit the gpif.c file generated by the Cypress GPIF Designer Tool and -# produce usrp_gpif.c, and usrp_gpif_inline.h, files suitable for our -# uses. - -import re -import string -import sys - -def check_flow_state (line, flow_state_dict): - mo = re.match (r'/\* Wave (\d) FlowStates \*/ (.*),', line) - if mo: - wave = int (mo.group (1)) - data = mo.group (2) - split = data.split (',', 8) - v = map (lambda x : int (x, 16), split) - # print "%s, %s" % (wave, data) - # print "split: ", split - # print "v : ", v - flow_state_dict[wave] = v - - -def delta (xseq, yseq): - # set subtraction - z = [] - for x in xseq: - if x not in yseq: - z.append (x) - return z - - -def write_define (output, name, pairs): - output.write ('#define %s()\t\\\n' % name) - output.write ('do {\t\t\t\t\t\\\n') - for reg, val in pairs: - output.write ('%14s = 0x%02x;\t\t\t\\\n' % (reg, val)) - output.write ('} while (0)\n\n') - -def write_inlines (output, dict): - regs = ['FLOWSTATE', 'FLOWLOGIC', 'FLOWEQ0CTL', 'FLOWEQ1CTL', 'FLOWHOLDOFF', - 'FLOWSTB', 'FLOWSTBEDGE', 'FLOWSTBHPERIOD', 'GPIFHOLDAMOUNT'] - - READ_FLOW_STATE = 2 - WRITE_FLOW_STATE = 3 - - read_info = zip (regs, dict[READ_FLOW_STATE]) - write_info = zip (regs, dict[WRITE_FLOW_STATE]) - - output.write ('''/* - * Machine generated by "edit-gpif". Do not edit by hand. - */ - -''') - write_define (output, 'setup_flowstate_common', read_info) - write_define (output, 'setup_flowstate_read', delta (read_info, write_info)) - write_define (output, 'setup_flowstate_write', delta (write_info, read_info)) - - -def edit_gpif (input_name, output_name, inline_name): - input = open (input_name, 'r') - output = open (output_name, 'w') - inline = open (inline_name, 'w') - flow_state_dict = {} - - output.write ('''/* - * Machine generated by "edit-gpif". Do not edit by hand. - */ - -''') - - while 1: - line = input.readline () - line = string.replace (line, '\r','') - line = re.sub (r' *$', r'', line) - - check_flow_state (line, flow_state_dict) - - line = re.sub (r'#include', r'// #include', line) - line = re.sub (r'xdata ', r'', line) - if re.search (r'GpifInit', line): - break - - output.write (line) - - output.close () - write_inlines (inline, flow_state_dict) - inline.close () - - -# gpif.c usrp_gpif.c usrp_gpif_inline.h -edit_gpif (sys.argv[1], sys.argv[2], sys.argv[3])
gecko3/trunk/gecko3com-fw/firmware/gpif-design/edit-gpif Property changes : Deleted: svn:executable Index: gecko3/trunk/gecko3com-fw/firmware/gpif-design/README =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/gpif-design/README (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/gpif-design/README (nonexistent) @@ -1,8 +0,0 @@ -Edit the gpif.c file generated by the Cypress GPIF Designer Tool and -produce usrp_gpif.c, and usrp_gpif_inline.h, files suitable for our -uses. - -usage: -edit-gpif - -example: edit-gpif gecko3main_gpif.c gpif_data.c gpif_data.h Index: gecko3/trunk/gecko3com-fw/firmware/gpif-design/Makefile =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/gpif-design/Makefile (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/gpif-design/Makefile (nonexistent) @@ -1,39 +0,0 @@ -# GECKO3COM -# -# Copyright (C) 2008 by -# ___ ____ _ _ -# ( _`\ ( __)( ) ( ) -# | (_) )| (_ | |_| | Berne University of Applied Sciences -# | _ <'| _) | _ | School of Engineering and -# | (_) )| | | | | | Information Technology -# (____/'(_) (_) (_) -# -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# - -TARGET = gpif_data - -GECKO3MAIN : - ./edit-gpif gecko3main_gpif.c $(TARGET).c $(TARGET).h - - -clean : - rm -f $(TARGET).* - -.PHONY : clean GECKO3MAIN - - - - - Index: gecko3/trunk/gecko3com-fw/firmware/gpif-design/gecko3main_single_byte.gpf =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: gecko3/trunk/gecko3com-fw/firmware/gpif-design/gecko3main_single_byte.gpf =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/gpif-design/gecko3main_single_byte.gpf (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/gpif-design/gecko3main_single_byte.gpf (nonexistent)
gecko3/trunk/gecko3com-fw/firmware/gpif-design/gecko3main_single_byte.gpf Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: gecko3/trunk/gecko3com-fw/firmware/gecko3com.iic =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: gecko3/trunk/gecko3com-fw/firmware/gecko3com.iic =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/gecko3com.iic (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/gecko3com.iic (nonexistent)
gecko3/trunk/gecko3com-fw/firmware/gecko3com.iic Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: gecko3/trunk/gecko3com-fw/firmware/include/scpi_parser.h =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/include/scpi_parser.h (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/include/scpi_parser.h (nonexistent) @@ -1,93 +0,0 @@ -/* GECKO3COM - * - * Copyright (C) 2009 by - * ___ ____ _ _ - * ( _`\ ( __)( ) ( ) - * | (_) )| (_ | |_| | Berne University of Applied Sciences - * | _ <'| _) | _ | School of Engineering and - * | (_) )| | | | | | Information Technology - * (____/'(_) (_) (_) - * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/*********************************************************************/ -/** \file scpi_parser.h - ********************************************************************* - * \brief General header file for an scpi parser. - * - * This SCPI parser header file should be usefull for - * different parser implementations. - * You can design your parser for example with a parser - * generator like re2c (regular expressions to C) or by hand. - * - * In this file we define a enum type for the actions to - * be exceduted outside the parser. Add your desired actions - * here and implement them elsewhere. - * To modify the the known commands and the according action - * modify the scpi_parser.c file. - * - * \author Christoph Zimmermann bfh.ch - * \date 2009-02-04 - * -*/ - -#ifndef _SCPI_PARSER_H_ -#define _SCPI_PARSER_H_ - -#include "usb_tmc.h" - -/** \brief define action flags for device dependent commands here. - * command syntax is defined in the parser itself */ -typedef enum { - NOACTION, - SYSTEM_RESET, - rqFPGA_IDCODE, - rqFPGA_TYPE, - rqFPGA_DONE, - FPGA_CONFIGURE, - FPGA_COMMUNICATION, - rqSPI_FILE_LIST, - SPI_DELETE, - SPI_WRITE, -} SCPI_Action; - - -/** \brief struct with the pointers for the scpi_scan - * - * struct that contains all pointer needed for the scpi scanner to work. - * set the source pointer to the start of the scpi message (for example to - * the endpoint buffer to the byte afterthe usb tmc header). */ -typedef struct Scanner { - unsigned char *source; /**< pointer to the data to be parsed */ - SCPI_Action action; /**< device command parsed. this value says which action the device should execute now */ -} Scanner; - - -/** \brief parser for scpi/IEEE488.2 commands - * - * The parser for scpi 99 and IEEE488.2 commands. Most mandatory commands are - * implemented (due to memory restrictions) and all of them are handled in - * the parser. Device dependent commands are handled outside of the parser. - * - * \param[in] idata uint16_t *offset pointer to the offset, buffer[offset] is - * the current position, anything before this is already consumed. - * \param[in] xdata Scanner *s a Scanner struct with the member *source set to - * the start of the scpi message - * \param[in] xdata TMC_Response_Queue *queue pointer to a TMC_Response_Queue - * \return Status value, 0 if an error occoured in this case the error is - * written to the IEEE488 event register. */ -int8_t scpi_scan(idata uint16_t *offset, xdata Scanner *s, xdata TMC_Response_Queue *queue); - -#endif Index: gecko3/trunk/gecko3com-fw/firmware/include/usb_descriptors.h =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/include/usb_descriptors.h (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/include/usb_descriptors.h (nonexistent) @@ -1,74 +0,0 @@ -/* GECKO3COM - * - * Copyright (C) 2008 by - * ___ ____ _ _ - * ( _`\ ( __)( ) ( ) - * | (_) )| (_ | |_| | Berne University of Applied Sciences - * | _ <'| _) | _ | School of Engineering and - * | (_) )| | | | | | Information Technology - * (____/'(_) (_) (_) - * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/*********************************************************************/ -/** \file usb_descriptors.h - ********************************************************************* - * \brief header file for the USB descriptors. The descriptors are - * defined outside in the usb_descriptor.a51 file. - * - * \author GNUradio, Christoph Zimmermann bfh.ch - * -*/ - -/** USB High speed device descriptor */ -extern xdata const char high_speed_device_descr[]; -/** USB High speed device qualifier descriptor */ -extern xdata const char high_speed_devqual_descr[]; -/** USB High speed configuration descriptor */ -extern xdata const char high_speed_config_descr[]; - -/** USB Full speed device descriptor */ -extern xdata const char full_speed_device_descr[]; -/** USB Full speed device qualifier descriptor */ -extern xdata const char full_speed_devqual_descr[]; -/** USB Full speed configuration descriptor */ -extern xdata const char full_speed_config_descr[]; - -#ifdef USB_DFU_SUPPORT -/** USB DFU mode device descriptor */ -extern xdata const char dfu_mode_device_descr[]; -/** USB DFU mode configuration descriptor */ -extern xdata const char dfu_mode_config_descr[]; -/** USB DFU mode functional descriptor */ -extern xdata const char dfu_mode_functional_descr[]; -#endif - -/** Number of USB String descriptors available */ -extern xdata unsigned char nstring_descriptors; - -/** USB String descriptors */ -extern xdata char * xdata string_descriptors[]; - -/** We patch these locations with info read from the config eeprom */ -extern xdata char usb_desc_hw_rev_binary_patch_location_0[]; -/** We patch these locations with info read from the config eeprom */ -extern xdata char usb_desc_hw_rev_binary_patch_location_1[]; -/** We patch these locations with info read from the config eeprom */ -extern xdata char usb_desc_hw_rev_binary_patch_location_2[]; -/** We patch these locations with info read from the config eeprom */ -/*extern xdata char usb_desc_hw_rev_ascii_patch_location_0[];*/ -/** We patch these locations with info read from the config eeprom */ -extern xdata char usb_desc_serial_number_ascii[]; - Index: gecko3/trunk/gecko3com-fw/firmware/include/fpga_load.h =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/include/fpga_load.h (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/include/fpga_load.h (nonexistent) @@ -1,125 +0,0 @@ -/* GECKO3COM - * - * Copyright (C) 2008 by - * ___ ____ _ _ - * ( _`\ ( __)( ) ( ) - * | (_) )| (_ | |_| | Bern University of Applied Sciences - * | _ <'| _) | _ | School of Engineering and - * | (_) )| | | | | | Information Technology - * (____/'(_) (_) (_) - * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/*********************************************************************/ -/** \file fpga_load.h - ********************************************************************* - * \brief functions to configure an FPGA - * - * use a define to select the handled FPGA \n - * currently following vendors are suported: - * \li XILINX - * \li ALTERA, as stub. needs work - * - * \author GNUradio team, Christoph Zimmermann bfh.ch - * \date 2009-1-19 - * -*/ - -#ifndef INCLUDED_FPGA_LOAD_H -#define INCLUDED_FPGA_LOAD_H - -/** \brief initialize the ports and pins used for fpga configuration */ -void init_fpga_interface(void); - -/** \brief prepares the fpga to accept configuration data */ -uint8_t fpga_load_begin(void); - -/** \brief transfer configuration data to the fpga - * - * \param[in] *p pointer to the buffer to read from. - * normally this is a endpoint buffer. - * \param[in] *offset pointer to the offset, buffer[offset] is - * the current position, anything before this is already consumed. - * \param[in] *bytecount pointer to the length of the whole - * buffer. - * \return returns non-zero if successful, else 0 - */ -uint8_t fpga_load_xfer(xdata unsigned char *p, idata uint16_t *offset,\ - idata uint16_t *bytecount); - -/** \brief finalize the fpga configuration process */ -uint8_t fpga_load_end(void); - -/* ------------------------------------------------------------------------- */ -/* Xilinx stuff. We use slave parallel mode to configure the FPGA - */ -#ifdef XILINX - -#define FPGA_INFO_LEN 19 -#define FPGA_INFO_COMPLETE 1 -#define FPGA_INFO_NOT_COMPLETE -1 - -typedef enum { - FILENAME = 'a', - FPGA_TYPE = 'b', - COMPILE_DATE = 'c', - COMPILE_TIME = 'd', - FILE_LENGTH = 'e', -} Fpga_Info_Type; - -typedef struct { - uint16_t position; /**< current position inside the input buffer */ - Fpga_Info_Type type; /**< type of desired information, like filename, fpga type etc. */ - char info[FPGA_INFO_LEN]; /**< char array that contains the desired information */ -} Fpga_Info; /**< struct used to hold neccesary information to parse the bit file header */ - - -/** \brief function to scan the bit file header - * - * this function scans the provided buffer for the desired information type - * (selected in the Fpga_Info struct) and copies the data to the output array. - * When no data or not the complete data is found, the function returns a - * "FPGA_INFO_NOT_COMPLETE", when exectued the next time, it will continue - * searching or copying the information. \n - * This makes it possible to detect information split over serveral usb packets. - * - * \param[in] *p pointer to the buffer to read from. - * normally this is a endpoint buffer. - * \param[in] *offset pointer to the offset, buffer[offset] is - * the current position, anything before this is already consumed. - * \param[in] *length pointer to the length of the whole buffer. - * \param[in] *info pointer to a Fpga_Info struct which - * contains the desired information and the pointe to the output - * buffer. - * \return FPGA_INFO_NOT_COMPLETE or FPGA_INFO_COMPLETE - */ -int8_t fpga_scan_file(const xdata unsigned char *p, idata uint16_t *offset, \ - idata uint16_t *length, xdata Fpga_Info* info); - - -#define fpga_done() ((XILINX_DONE & bmXILINX_DONE) == bmXILINX_DONE) /**< check if DONE is set */ -#endif - - -/* ------------------------------------------------------------------------- */ -/* Altera stuff. only copied from USRP source code. does not work. only a - * guide to give you a start to port GECKO3COM to other boards using Altera - * devices - */ -#ifdef ALTERA -#define fpga_done() ((status & bmALTERA_CONF_DONE) == bmALTERA_CONF_DONE) /**< check if DONE is set */ -#endif - -#endif /* INCLUDED_FPGA_LOAD_H */ Index: gecko3/trunk/gecko3com-fw/firmware/include/gecko3com_interfaces.h =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/include/gecko3com_interfaces.h (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/include/gecko3com_interfaces.h (nonexistent) @@ -1,45 +0,0 @@ -/* GECKO3COM - * - * Copyright (C) 2008 by - * ___ ____ _ _ - * ( _`\ ( __)( ) ( ) - * | (_) )| (_ | |_| | Berne University of Applied Sciences - * | _ <'| _) | _ | School of Engineering and - * | (_) )| | | | | | Information Technology - * (____/'(_) (_) (_) - * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/*********************************************************************/ -/** \file gecko3com_interfaces.h - ********************************************************************* - * \brief definitions to use the correct interface and/or endpoint - * - * \author Christoph Zimmermann bfh.ch, GNUradio - * \date 2009-1-13 - * -*/ - -#ifndef _GECKO3COM_INTERFACES_H_ -#define _GECKO3COM_INTERFACES_H_ - -#define USB_DFU_RT_INTERFACE 1 /**< usb interface number for DFU runtime mode */ - -#define USB_TMC_INTERFACE 0 /**< usb interface number for USBTMC requests */ -#define USB_TMC_EP_OUT 2 /**< endpoint number for USBTMC OUT messages */ -#define USB_TMC_EP_IN 6 /**< endpoint number for USBTMC IN messages */ - - -#endif /* _GECKO3COM_INTERFACES_H_ */ Index: gecko3/trunk/gecko3com-fw/firmware/include/i2c.h =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/include/i2c.h (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/include/i2c.h (nonexistent) @@ -1,57 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -/************************************************************************/ -/** \file i2c.h - ************************************************************************* - * \brief read and write functions for the i2c bus - * - * \author GNU Radio - * - * \warning This functions are blocking functions, so you have to wait - * until the transfer is finished! - */ - -#ifndef _I2C_H_ -#define _I2C_H_ - -/** - * i2c read function. reads a block of data with the length len - * - * \param[in] i2c_addr device adress on the i2c bus - * \param[out] buf result buffer, contains the readed data when successful - * \param[in] len length of the block to read - * \return returns non-zero if successful, else 0 - */ -unsigned char i2c_read (unsigned char addr, xdata unsigned char *buf, unsigned char len); - -/** - * i2c write function. writes a block of data with the length len - * - * \param[in] i2c_addr device adress on the i2c bus - * \param[in] buf data buffer, contains the data to be written - * \param[in] len length of the block to write - * \return returns non-zero if successful, else 0 - */ -unsigned char i2c_write (unsigned char addr, xdata const unsigned char *buf, unsigned char len); - -#endif /* _I2C_H_ */ Index: gecko3/trunk/gecko3com-fw/firmware/include/eeprom_io.h =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/include/eeprom_io.h (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/include/eeprom_io.h (nonexistent) @@ -1,59 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2006 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -/************************************************************************/ -/** \file eeprom_io.h - ************************************************************************* - * \brief read and write functions for i2c eeproms - * - * \author GNU Radio - * - * \date 2009-01-05 zac1 write function now uses pagewrite - */ - -#ifndef INCLUDED_EEPROM_IO_H -#define INCLUDED_EEPROM_IO_H - -/** - * eeprom read function. reads a block of data with the length len starting from the adress eeprom_offset - * - * \param[in] eeprom_offset memory startadress to start reading from - * \param[out] buf result buffer, contains the readed data when successful - * \param[in] len length of the block to read - * \return returns non-zero if successful, else 0 - */ -uint8_t eeprom_read (uint16_t eeprom_offset, xdata uint8_t *buf, uint8_t len); - -/** - * eeprom write function. writes a block of data with the length len starting from the adress eeprom_offset - * - * \param[in] eeprom_offset memory startadress to start reading from - * \param[in] buf data buffer, contains the data to be written - * \param[in] len length of the block to write - * \return returns non-zero if successful, else 0 - */ -//uint8_t eeprom_write (idata uint8_t i2c_addr, idata uint16_t eeprom_offset, -// const xdata uint8_t *buf, uint8_t len); -uint8_t eeprom_write (uint16_t eeprom_offset, const xdata uint8_t *buf, \ - uint8_t len); - -#endif /* INCLUDED_EEPROM_IO_H */ Index: gecko3/trunk/gecko3com-fw/firmware/include/gecko3com_gpif.h =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/include/gecko3com_gpif.h (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/include/gecko3com_gpif.h (nonexistent) @@ -1,100 +0,0 @@ -/* GECKO3COM - * - * Copyright (C) 2008 by - * ___ ____ _ _ - * ( _`\ ( __)( ) ( ) - * | (_) )| (_ | |_| | Bern University of Applied Sciences - * | _ <'| _) | _ | School of Engineering and - * | (_) )| | | | | | Information Technology - * (____/'(_) (_) (_) - * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/*********************************************************************/ -/** \file gecko3com_gpif.h - ********************************************************************* - * \brief project specific functions to handle the GPIF - * - * - * - * \author GNUradio team, Christoph Zimmermann bfh.ch - * \date 2009-4-16 - * -*/ - -#ifndef INCLUDED_GECKO3COM_GPIF_H -#define INCLUDED_GECKO3COM_GPIF_H - - -#define bmGPIF_READ_IN_PROGRESS 1 -#define bmGPIF_PENDING_DATA 2 - -/** \brief initialize GPIF system - * - * initialize GPIF with waveform data. - * for this init_gpif initializes and hooks up all needed ISR's and configures - * auto OUT/IN mode. - */ -void init_gpif (void); - - -/** \brief aborts any gpif running gpif transaction */ -void abort_gpif(void); - - -/** \brief disables gpif system - * - * disables the GPIF I/O ports, unhooks gpif ISR's and configures - * manual OUT/IN mode. - */ -void deactivate_gpif(void); - - -#ifdef GECKO3MAIN - -/** makro to trigger a fifo read waveform */ -#define gpif_trigger_read() \ - do { \ - GPIFREADYCFG |= bmINTRDY; /* set internal ready (INTRDY) signal */ \ - SYNCDELAY; \ - setup_flowstate_read(); \ - SYNCDELAY; \ - GPIFTCB3 = 0x00; \ - GPIFTCB2 = 0x00; \ - GPIFTCB1 = 0x00; \ - GPIFTCB0 = 0x01; \ - GPIFTRIG = bmGPIF_EP6_START | bmGPIF_READ; /* trigger FIFO out transfer */ \ - /*SYNCDELAY;*/ \ - } while (0) - - -/** makro to trigger a fifo write waveform */ -#define gpif_trigger_write() \ - do { \ - GPIFREADYCFG |= bmINTRDY; /* set internal ready (INTRDY) signal */ \ - SYNCDELAY; \ - setup_flowstate_write(); \ - SYNCDELAY; \ - GPIFTCB3 = 0x00; \ - GPIFTCB2 = 0x00; \ - GPIFTCB1 = 0x00; \ - GPIFTCB0 = 0x01; \ - GPIFTRIG = bmGPIF_EP2_START | bmGPIF_WRITE; /* trigger FIFO out transfer */ \ - /*SYNCDELAY;*/ \ - } while(0) - -#endif /* GECKO3MAIN */ - -#endif /* INCLUDED_GECKO3COM_GPIF_H */ Index: gecko3/trunk/gecko3com-fw/firmware/include/fx2regs.h =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/include/fx2regs.h (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/include/fx2regs.h (nonexistent) @@ -1,738 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -/*********************************************************************/ -/** \file fx2regs.h - ********************************************************************* - * \brief EZ-USB FX2 register declarations and bit mask definitions. - * - * \par FX2 Related Register Assignments - * - * The Ez-USB FX2 registers are defined here. We use FX2regs.h for register - * address allocation by using "#define ALLOCATE_EXTERN". - * When using "#define ALLOCATE_EXTERN", you get (for instance): \n - * xdata volatile BYTE OUT7BUF[64] _at_ 0x7B40; \n - * Such lines are created from FX2.h by using the preprocessor. \n - * Incidently, these lines will not generate any space in the resulting hex - * file; they just bind the symbols to the addresses for compilation. - * You just need to put "#define ALLOCATE_EXTERN" in your main program file; - * i.e. fw.c or a stand-alone C source file. \n - * Without "#define ALLOCATE_EXTERN", you just get the external reference: - * extern xdata volatile BYTE OUT7BUF[64] ;// 0x7B40; - * This uses the concatenation operator "##" to insert a comment "//" - * to cut off the end of the line, "_at_ 0x7B40;", which is not wanted. - * - * \date Date: 2007-07-20 20:44:38 -0700 (Fri, 20 Jul 2007) - * \version 6044 - * \author Copyright (c) 2000 Cypress Semiconductor, All rights reserved - * -*/ - - -#ifndef FX2REGS_H /* Header Sentry */ -#define FX2REGS_H - -#define ALLOCATE_EXTERN /* required for "right thing to happen" with fx2regs.h */ - - -#ifdef ALLOCATE_EXTERN -#define EXTERN -#define _AT_(a) at a -#else -#define EXTERN extern -#define _AT_ ;/ ## / -#endif - -typedef unsigned char BYTE; -typedef unsigned short WORD; - -EXTERN xdata _AT_(0xE400) volatile BYTE GPIF_WAVE_DATA[128]; /**< GPIF Waveform Data Table */ -EXTERN xdata _AT_(0xE480) volatile BYTE RES_WAVEDATA_END ; /**< End of GPIF Waveform Data */ - -/* General Configuration */ - -EXTERN xdata _AT_(0xE600) volatile BYTE CPUCS ; /**< Control & Status */ -EXTERN xdata _AT_(0xE601) volatile BYTE IFCONFIG ; /**< Interface Configuration */ -EXTERN xdata _AT_(0xE602) volatile BYTE PINFLAGSAB ; /**< FIFO FLAGA and FLAGB Assignments */ -EXTERN xdata _AT_(0xE603) volatile BYTE PINFLAGSCD ; /**< FIFO FLAGC and FLAGD Assignments */ -EXTERN xdata _AT_(0xE604) volatile BYTE FIFORESET ; /**< Restore FIFOS to default state */ -EXTERN xdata _AT_(0xE605) volatile BYTE BREAKPT ; /**< Breakpoint */ -EXTERN xdata _AT_(0xE606) volatile BYTE BPADDRH ; /**< Breakpoint Address H */ -EXTERN xdata _AT_(0xE607) volatile BYTE BPADDRL ; /**< Breakpoint Address L */ -EXTERN xdata _AT_(0xE608) volatile BYTE UART230 ; /**< 230 Kbaud clock for T0,T1,T2 */ -EXTERN xdata _AT_(0xE609) volatile BYTE FIFOPINPOLAR ; /**< FIFO polarities */ -EXTERN xdata _AT_(0xE60A) volatile BYTE REVID ; /**< Chip Revision */ -EXTERN xdata _AT_(0xE60B) volatile BYTE REVCTL ; /**< Chip Revision Control */ - -/* Endpoint Configuration */ - -EXTERN xdata _AT_(0xE610) volatile BYTE EP1OUTCFG ; /**< Endpoint 1-OUT Configuration */ -EXTERN xdata _AT_(0xE611) volatile BYTE EP1INCFG ; /**< Endpoint 1-IN Configuration */ -EXTERN xdata _AT_(0xE612) volatile BYTE EP2CFG ; /**< Endpoint 2 Configuration */ -EXTERN xdata _AT_(0xE613) volatile BYTE EP4CFG ; /**< Endpoint 4 Configuration */ -EXTERN xdata _AT_(0xE614) volatile BYTE EP6CFG ; /**< Endpoint 6 Configuration */ -EXTERN xdata _AT_(0xE615) volatile BYTE EP8CFG ; /**< Endpoint 8 Configuration */ -EXTERN xdata _AT_(0xE618) volatile BYTE EP2FIFOCFG ; /**< Endpoint 2 FIFO configuration */ -EXTERN xdata _AT_(0xE619) volatile BYTE EP4FIFOCFG ; /**< Endpoint 4 FIFO configuration */ -EXTERN xdata _AT_(0xE61A) volatile BYTE EP6FIFOCFG ; /**< Endpoint 6 FIFO configuration */ -EXTERN xdata _AT_(0xE61B) volatile BYTE EP8FIFOCFG ; /**< Endpoint 8 FIFO configuration */ -EXTERN xdata _AT_(0xE620) volatile BYTE EP2AUTOINLENH ; /**< Endpoint 2 Packet Length H (IN only) */ -EXTERN xdata _AT_(0xE621) volatile BYTE EP2AUTOINLENL ; /**< Endpoint 2 Packet Length L (IN only) */ -EXTERN xdata _AT_(0xE622) volatile BYTE EP4AUTOINLENH ; /**< Endpoint 4 Packet Length H (IN only) */ -EXTERN xdata _AT_(0xE623) volatile BYTE EP4AUTOINLENL ; /**< Endpoint 4 Packet Length L (IN only) */ -EXTERN xdata _AT_(0xE624) volatile BYTE EP6AUTOINLENH ; /**< Endpoint 6 Packet Length H (IN only) */ -EXTERN xdata _AT_(0xE625) volatile BYTE EP6AUTOINLENL ; /**< Endpoint 6 Packet Length L (IN only) */ -EXTERN xdata _AT_(0xE626) volatile BYTE EP8AUTOINLENH ; /**< Endpoint 8 Packet Length H (IN only) */ -EXTERN xdata _AT_(0xE627) volatile BYTE EP8AUTOINLENL ; /**< Endpoint 8 Packet Length L (IN only) */ -EXTERN xdata _AT_(0xE630) volatile BYTE EP2FIFOPFH ; /**< EP2 Programmable Flag trigger H */ -EXTERN xdata _AT_(0xE631) volatile BYTE EP2FIFOPFL ; /**< EP2 Programmable Flag trigger L */ -EXTERN xdata _AT_(0xE632) volatile BYTE EP4FIFOPFH ; /**< EP4 Programmable Flag trigger H */ -EXTERN xdata _AT_(0xE633) volatile BYTE EP4FIFOPFL ; /**< EP4 Programmable Flag trigger L */ -EXTERN xdata _AT_(0xE634) volatile BYTE EP6FIFOPFH ; /**< EP6 Programmable Flag trigger H */ -EXTERN xdata _AT_(0xE635) volatile BYTE EP6FIFOPFL ; /**< EP6 Programmable Flag trigger L */ -EXTERN xdata _AT_(0xE636) volatile BYTE EP8FIFOPFH ; /**< EP8 Programmable Flag trigger H */ -EXTERN xdata _AT_(0xE637) volatile BYTE EP8FIFOPFL ; /**< EP8 Programmable Flag trigger L */ -EXTERN xdata _AT_(0xE640) volatile BYTE EP2ISOINPKTS ; /**< EP2 (if ISO) IN Packets per frame (1-3) */ -EXTERN xdata _AT_(0xE641) volatile BYTE EP4ISOINPKTS ; /**< EP4 (if ISO) IN Packets per frame (1-3) */ -EXTERN xdata _AT_(0xE642) volatile BYTE EP6ISOINPKTS ; /**< EP6 (if ISO) IN Packets per frame (1-3) */ -EXTERN xdata _AT_(0xE643) volatile BYTE EP8ISOINPKTS ; /**< EP8 (if ISO) IN Packets per frame (1-3) */ -EXTERN xdata _AT_(0xE648) volatile BYTE INPKTEND ; /**< Force IN Packet End */ -EXTERN xdata _AT_(0xE649) volatile BYTE OUTPKTEND ; /**< Force OUT Packet End */ - -/* Interrupts */ - -EXTERN xdata _AT_(0xE650) volatile BYTE EP2FIFOIE ; /**< Endpoint 2 Flag Interrupt Enable */ -EXTERN xdata _AT_(0xE651) volatile BYTE EP2FIFOIRQ ; /**< Endpoint 2 Flag Interrupt Request */ -EXTERN xdata _AT_(0xE652) volatile BYTE EP4FIFOIE ; /**< Endpoint 4 Flag Interrupt Enable */ -EXTERN xdata _AT_(0xE653) volatile BYTE EP4FIFOIRQ ; /**< Endpoint 4 Flag Interrupt Request */ -EXTERN xdata _AT_(0xE654) volatile BYTE EP6FIFOIE ; /**< Endpoint 6 Flag Interrupt Enable */ -EXTERN xdata _AT_(0xE655) volatile BYTE EP6FIFOIRQ ; /**< Endpoint 6 Flag Interrupt Request */ -EXTERN xdata _AT_(0xE656) volatile BYTE EP8FIFOIE ; /**< Endpoint 8 Flag Interrupt Enable */ -EXTERN xdata _AT_(0xE657) volatile BYTE EP8FIFOIRQ ; /**< Endpoint 8 Flag Interrupt Request */ -EXTERN xdata _AT_(0xE658) volatile BYTE IBNIE ; /**< IN-BULK-NAK Interrupt Enable */ -EXTERN xdata _AT_(0xE659) volatile BYTE IBNIRQ ; /**< IN-BULK-NAK interrupt Request */ -EXTERN xdata _AT_(0xE65A) volatile BYTE NAKIE ; /**< Endpoint Ping NAK interrupt Enable */ -EXTERN xdata _AT_(0xE65B) volatile BYTE NAKIRQ ; /**< Endpoint Ping NAK interrupt Request */ -EXTERN xdata _AT_(0xE65C) volatile BYTE USBIE ; /**< USB Int Enables */ -EXTERN xdata _AT_(0xE65D) volatile BYTE USBIRQ ; /**< USB Interrupt Requests */ -EXTERN xdata _AT_(0xE65E) volatile BYTE EPIE ; /**< Endpoint Interrupt Enables */ -EXTERN xdata _AT_(0xE65F) volatile BYTE EPIRQ ; /**< Endpoint Interrupt Requests */ -EXTERN xdata _AT_(0xE660) volatile BYTE GPIFIE ; /**< GPIF Interrupt Enable */ -EXTERN xdata _AT_(0xE661) volatile BYTE GPIFIRQ ; /**< GPIF Interrupt Request */ -EXTERN xdata _AT_(0xE662) volatile BYTE USBERRIE ; /**< USB Error Interrupt Enables */ -EXTERN xdata _AT_(0xE663) volatile BYTE USBERRIRQ ; /**< USB Error Interrupt Requests */ -EXTERN xdata _AT_(0xE664) volatile BYTE ERRCNTLIM ; /**< USB Error counter and limit */ -EXTERN xdata _AT_(0xE665) volatile BYTE CLRERRCNT ; /**< Clear Error Counter EC[3..0] */ -EXTERN xdata _AT_(0xE666) volatile BYTE INT2IVEC ; /**< Interupt 2 (USB) Autovector */ -EXTERN xdata _AT_(0xE667) volatile BYTE INT4IVEC ; /**< Interupt 4 (FIFOS & GPIF) Autovector */ -EXTERN xdata _AT_(0xE668) volatile BYTE INTSETUP ; /**< Interrupt 2&4 Setup */ - -/* Input/Output */ - -EXTERN xdata _AT_(0xE670) volatile BYTE PORTACFG ; /**< I/O PORTA Alternate Configuration */ -EXTERN xdata _AT_(0xE671) volatile BYTE PORTCCFG ; /**< I/O PORTC Alternate Configuration */ -EXTERN xdata _AT_(0xE672) volatile BYTE PORTECFG ; /**< I/O PORTE Alternate Configuration */ -EXTERN xdata _AT_(0xE678) volatile BYTE I2CS ; /**< Control & Status */ -EXTERN xdata _AT_(0xE679) volatile BYTE I2DAT ; /**< Data */ -EXTERN xdata _AT_(0xE67A) volatile BYTE I2CTL ; /**< I2C Control */ -EXTERN xdata _AT_(0xE67B) volatile BYTE XAUTODAT1 ; /**< Autoptr1 MOVX access */ -EXTERN xdata _AT_(0xE67C) volatile BYTE XAUTODAT2 ; /**< Autoptr2 MOVX access */ - -#define EXTAUTODAT1 XAUTODAT1 -#define EXTAUTODAT2 XAUTODAT2 - -/* USB Control */ - -EXTERN xdata _AT_(0xE680) volatile BYTE USBCS ; /**< USB Control & Status */ -EXTERN xdata _AT_(0xE681) volatile BYTE SUSPEND ; /**< Put chip into suspend */ -EXTERN xdata _AT_(0xE682) volatile BYTE WAKEUPCS ; /**< Wakeup source and polarity */ -EXTERN xdata _AT_(0xE683) volatile BYTE TOGCTL ; /**< Toggle Control */ -EXTERN xdata _AT_(0xE684) volatile BYTE USBFRAMEH ; /**< USB Frame count H */ -EXTERN xdata _AT_(0xE685) volatile BYTE USBFRAMEL ; /**< USB Frame count L */ -EXTERN xdata _AT_(0xE686) volatile BYTE MICROFRAME ; /**< Microframe count, 0-7 */ -EXTERN xdata _AT_(0xE687) volatile BYTE FNADDR ; /**< USB Function address */ - -/* Endpoints */ - -EXTERN xdata _AT_(0xE68A) volatile BYTE EP0BCH ; /**< Endpoint 0 Byte Count H */ -EXTERN xdata _AT_(0xE68B) volatile BYTE EP0BCL ; /**< Endpoint 0 Byte Count L */ -EXTERN xdata _AT_(0xE68D) volatile BYTE EP1OUTBC ; /**< Endpoint 1 OUT Byte Count */ -EXTERN xdata _AT_(0xE68F) volatile BYTE EP1INBC ; /**< Endpoint 1 IN Byte Count */ -EXTERN xdata _AT_(0xE690) volatile BYTE EP2BCH ; /**< Endpoint 2 Byte Count H */ -EXTERN xdata _AT_(0xE691) volatile BYTE EP2BCL ; /**< Endpoint 2 Byte Count L */ -EXTERN xdata _AT_(0xE694) volatile BYTE EP4BCH ; /**< Endpoint 4 Byte Count H */ -EXTERN xdata _AT_(0xE695) volatile BYTE EP4BCL ; /**< Endpoint 4 Byte Count L */ -EXTERN xdata _AT_(0xE698) volatile BYTE EP6BCH ; /**< Endpoint 6 Byte Count H */ -EXTERN xdata _AT_(0xE699) volatile BYTE EP6BCL ; /**< Endpoint 6 Byte Count L */ -EXTERN xdata _AT_(0xE69C) volatile BYTE EP8BCH ; /**< Endpoint 8 Byte Count H */ -EXTERN xdata _AT_(0xE69D) volatile BYTE EP8BCL ; /**< Endpoint 8 Byte Count L */ -EXTERN xdata _AT_(0xE6A0) volatile BYTE EP0CS ; /**< Endpoint Control and Status */ -EXTERN xdata _AT_(0xE6A1) volatile BYTE EP1OUTCS ; /**< Endpoint 1 OUT Control and Status */ -EXTERN xdata _AT_(0xE6A2) volatile BYTE EP1INCS ; /**< Endpoint 1 IN Control and Status */ -EXTERN xdata _AT_(0xE6A3) volatile BYTE EP2CS ; /**< Endpoint 2 Control and Status */ -EXTERN xdata _AT_(0xE6A4) volatile BYTE EP4CS ; /**< Endpoint 4 Control and Status */ -EXTERN xdata _AT_(0xE6A5) volatile BYTE EP6CS ; /**< Endpoint 6 Control and Status */ -EXTERN xdata _AT_(0xE6A6) volatile BYTE EP8CS ; /**< Endpoint 8 Control and Status */ -EXTERN xdata _AT_(0xE6A7) volatile BYTE EP2FIFOFLGS ; /**< Endpoint 2 Flags */ -EXTERN xdata _AT_(0xE6A8) volatile BYTE EP4FIFOFLGS ; /**< Endpoint 4 Flags */ -EXTERN xdata _AT_(0xE6A9) volatile BYTE EP6FIFOFLGS ; /**< Endpoint 6 Flags */ -EXTERN xdata _AT_(0xE6AA) volatile BYTE EP8FIFOFLGS ; /**< Endpoint 8 Flags */ -EXTERN xdata _AT_(0xE6AB) volatile BYTE EP2FIFOBCH ; /**< EP2 FIFO total byte count H */ -EXTERN xdata _AT_(0xE6AC) volatile BYTE EP2FIFOBCL ; /**< EP2 FIFO total byte count L */ -EXTERN xdata _AT_(0xE6AD) volatile BYTE EP4FIFOBCH ; /**< EP4 FIFO total byte count H */ -EXTERN xdata _AT_(0xE6AE) volatile BYTE EP4FIFOBCL ; /**< EP4 FIFO total byte count L */ -EXTERN xdata _AT_(0xE6AF) volatile BYTE EP6FIFOBCH ; /**< EP6 FIFO total byte count H */ -EXTERN xdata _AT_(0xE6B0) volatile BYTE EP6FIFOBCL ; /**< EP6 FIFO total byte count L */ -EXTERN xdata _AT_(0xE6B1) volatile BYTE EP8FIFOBCH ; /**< EP8 FIFO total byte count H */ -EXTERN xdata _AT_(0xE6B2) volatile BYTE EP8FIFOBCL ; /**< EP8 FIFO total byte count L */ -EXTERN xdata _AT_(0xE6B3) volatile BYTE SUDPTRH ; /**< Setup Data Pointer high address byte */ -EXTERN xdata _AT_(0xE6B4) volatile BYTE SUDPTRL ; /**< Setup Data Pointer low address byte */ -EXTERN xdata _AT_(0xE6B5) volatile BYTE SUDPTRCTL ; /**< Setup Data Pointer Auto Mode */ -EXTERN xdata _AT_(0xE6B8) volatile BYTE SETUPDAT[8] ; /**< 8 bytes of SETUP data */ - -/* GPIF */ - -EXTERN xdata _AT_(0xE6C0) volatile BYTE GPIFWFSELECT ; /**< Waveform Selector */ -EXTERN xdata _AT_(0xE6C1) volatile BYTE GPIFIDLECS ; /**< GPIF Done, GPIF IDLE drive mode */ -EXTERN xdata _AT_(0xE6C2) volatile BYTE GPIFIDLECTL ; /**< Inactive Bus, CTL states */ -EXTERN xdata _AT_(0xE6C3) volatile BYTE GPIFCTLCFG ; /**< CTL OUT pin drive */ -EXTERN xdata _AT_(0xE6C4) volatile BYTE GPIFADRH ; /**< GPIF Address H */ -EXTERN xdata _AT_(0xE6C5) volatile BYTE GPIFADRL ; /**< GPIF Address L */ -EXTERN xdata _AT_(0xE6CE) volatile BYTE GPIFTCB3 ; /**< GPIF Transaction Count Byte 3 */ -EXTERN xdata _AT_(0xE6CF) volatile BYTE GPIFTCB2 ; /**< GPIF Transaction Count Byte 2 */ -EXTERN xdata _AT_(0xE6D0) volatile BYTE GPIFTCB1 ; /**< GPIF Transaction Count Byte 1 */ -EXTERN xdata _AT_(0xE6D1) volatile BYTE GPIFTCB0 ; /**< GPIF Transaction Count Byte 0 */ - -#define EP2GPIFTCH GPIFTCB1 /**< these are here for backwards compatibility */ -#define EP2GPIFTCL GPIFTCB0 /**< before REVE silicon (ie. REVB and REVD) */ -#define EP4GPIFTCH GPIFTCB1 /**< these are here for backwards compatibility */ -#define EP4GPIFTCL GPIFTCB0 /**< before REVE silicon (ie. REVB and REVD) */ -#define EP6GPIFTCH GPIFTCB1 /**< these are here for backwards compatibility */ -#define EP6GPIFTCL GPIFTCB0 /**< before REVE silicon (ie. REVB and REVD) */ -#define EP8GPIFTCH GPIFTCB1 /**< these are here for backwards compatibility */ -#define EP8GPIFTCL GPIFTCB0 /**< before REVE silicon (ie. REVB and REVD) */ - -/* EXTERN xdata volatile BYTE EP2GPIFTCH _AT_ 0xE6D0;*/ /**< EP2 GPIF Transaction Count High */ -/* EXTERN xdata volatile BYTE EP2GPIFTCL _AT_ 0xE6D1;*/ /**< EP2 GPIF Transaction Count Low */ -EXTERN xdata _AT_(0xE6D2) volatile BYTE EP2GPIFFLGSEL ; /**< EP2 GPIF Flag select */ -EXTERN xdata _AT_(0xE6D3) volatile BYTE EP2GPIFPFSTOP ; /**< Stop GPIF EP2 transaction on prog. flag */ -EXTERN xdata _AT_(0xE6D4) volatile BYTE EP2GPIFTRIG ; /**< EP2 FIFO Trigger */ -/* EXTERN xdata volatile BYTE EP4GPIFTCH _AT_ 0xE6D8;*/ /**< EP4 GPIF Transaction Count High */ -/**< EXTERN xdata volatile BYTE EP4GPIFTCL _AT_ 0xE6D9;*/ /**< EP4 GPIF Transactionr Count Low */ -EXTERN xdata _AT_(0xE6DA) volatile BYTE EP4GPIFFLGSEL ; /**< EP4 GPIF Flag select */ -EXTERN xdata _AT_(0xE6DB) volatile BYTE EP4GPIFPFSTOP ; /**< Stop GPIF EP4 transaction on prog. flag */ -EXTERN xdata _AT_(0xE6DC) volatile BYTE EP4GPIFTRIG ; /**< EP4 FIFO Trigger */ -/**< EXTERN xdata volatile BYTE EP6GPIFTCH _AT_ 0xE6E0;*/ /**< EP6 GPIF Transaction Count High */ -/**< EXTERN xdata volatile BYTE EP6GPIFTCL _AT_ 0xE6E1;*/ /**< EP6 GPIF Transaction Count Low */ -EXTERN xdata _AT_(0xE6E2) volatile BYTE EP6GPIFFLGSEL ; /**< EP6 GPIF Flag select */ -EXTERN xdata _AT_(0xE6E3) volatile BYTE EP6GPIFPFSTOP ; /**< Stop GPIF EP6 transaction on prog. flag */ -EXTERN xdata _AT_(0xE6E4) volatile BYTE EP6GPIFTRIG ; /**< EP6 FIFO Trigger */ -/* EXTERN xdata volatile BYTE EP8GPIFTCH _AT_ 0xE6E8;*/ /**< EP8 GPIF Transaction Count High */ -/* EXTERN xdata volatile BYTE EP8GPIFTCL _AT_ 0xE6E9;*/ /**< EP8GPIF Transaction Count Low */ -EXTERN xdata _AT_(0xE6EA) volatile BYTE EP8GPIFFLGSEL ; /**< EP8 GPIF Flag select */ -EXTERN xdata _AT_(0xE6EB) volatile BYTE EP8GPIFPFSTOP ; /**< Stop GPIF EP8 transaction on prog. flag */ -EXTERN xdata _AT_(0xE6EC) volatile BYTE EP8GPIFTRIG ; /**< EP8 FIFO Trigger */ -EXTERN xdata _AT_(0xE6F0) volatile BYTE XGPIFSGLDATH ; /**< GPIF Data H (16-bit mode only) */ -EXTERN xdata _AT_(0xE6F1) volatile BYTE XGPIFSGLDATLX ; /**< Read/Write GPIF Data L & trigger transac */ -EXTERN xdata _AT_(0xE6F2) volatile BYTE XGPIFSGLDATLNOX ; /**< Read GPIF Data L, no transac trigger */ -EXTERN xdata _AT_(0xE6F3) volatile BYTE GPIFREADYCFG ; /**< Internal RDY,Sync/Async, RDY5CFG */ -EXTERN xdata _AT_(0xE6F4) volatile BYTE GPIFREADYSTAT ; /**< RDY pin states */ -EXTERN xdata _AT_(0xE6F5) volatile BYTE GPIFABORT ; /**< Abort GPIF cycles */ - -/* UDMA */ - -EXTERN xdata _AT_(0xE6C6) volatile BYTE FLOWSTATE ; /**. - */ - -/*********************************************************************/ -/** \file firmware_version.h - ********************************************************************* - * \brief FIRMWARE_VERSION holds the current firmware version - * - * \author Christoph Zimmermann bfh.ch - * \date 2009-03-10 - * -*/ - -#ifndef _FIRMWARE_VERSION_H_ -#define _FIRMWARE_VERSION_H_ - -/** Version number of this firmware release */ -#define FIRMWARE_VERSION "0.4\n" - -#endif Index: gecko3/trunk/gecko3com-fw/firmware/include/gecko3com_common.h =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/include/gecko3com_common.h (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/include/gecko3com_common.h (nonexistent) @@ -1,96 +0,0 @@ -/* GECKO3COM - * - * Copyright (C) 2008 by - * ___ ____ _ _ - * ( _`\ ( __)( ) ( ) - * | (_) )| (_ | |_| | Berne University of Applied Sciences - * | _ <'| _) | _ | School of Engineering and - * | (_) )| | | | | | Information Technology - * (____/'(_) (_) (_) - * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/*********************************************************************/ -/** \file gecko3com_common.h - ********************************************************************* - * \brief common defines and prototypes for GECKO3COM - * - * \author GNUradio, Christoph Zimmermann bfh.ch - * \date - * -*/ - -#ifndef _GECKO3COMCOMMON_H_ -#define _GECKO3COMCOMMON_H_ - -#include -#include "syncdelay.h" -#include "gecko3com_regs.h" -#include "i2c.h" -#include "gecko3com_i2c.h" - -#define TRUE 1 -#define FALSE 0 - -/* Defines for LED output colors */ -#define RED 0x02 /**< Switch bi-color LED to RED */ -#define GREEN 0x04 /**< Switch bi-color LED to GREEN */ -#define ORANGE 0x06 /**< Switch bi-color LED to ORANGE */ -#define LEDS_OFF 0x00 /**< Switch bi-color LED off */ - -extern volatile uint8_t flLED; - - -/* defines and global variable for context switching between EZ-USB and GPIF/FPGA */ -#define GECKO3COM_LOCAL 0 /** firmware parses commands */ -#define GECKO3COM_REMOTE 1 /** no commands parsed, data passed to fpga */ - -extern volatile uint8_t flLOCAL; /**< flag to signal who interpretes TMC messages */ - - - -/** initialize all board specific stuff */ -void init_gecko3com (void); - -/** initialize the GPIF system of the EZ-USB FX2 */ -void init_gpif (void); - -/** resets the connected FPGA and the connected modules */ -void gecko3com_system_reset(void); - -/** switch LED0 on or off - * \param[in] on this value is active low, write 0 to activate LED0 */ -void set_led_0 (const uint8_t on); - -/** switch LED1 on or off - * \param[in] on this value is active low, write 0 to activate LED1 */ -void set_led_1 (const uint8_t on); - -/** toogles LED0. Connected to Port C. Debug purpose only! */ -void toggle_led_0 (void); - -/** toogles LED1 Connected to Port C. Debug purpose only! */ -void toggle_led_1 (void); - -/** initialize the external I2C I/O Expander */ -void init_io_ext (void); - -/** function that write to external LEDs (connected through I2C I/O Expander) */ -void set_led_ext (const uint8_t color); - -/** function that read the external switch (connected through I2C I/O Expander) */ -uint8_t get_switch (void); - -#endif /* _GECKO3COMCOMMON_H_ */ Index: gecko3/trunk/gecko3com-fw/firmware/include/usb_requests.h =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/include/usb_requests.h (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/include/usb_requests.h (nonexistent) @@ -1,106 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -/*********************************************************************/ -/** \file usb_requests.h - ********************************************************************* - * \brief Standard USB requests. - * These are contained in end point 0 setup packets - * - * \author Christoph Zimmermann bfh.ch - * \date 2009-1-13 - * -*/ - - -#ifndef _USB_REQUESTS_H_ -#define _USB_REQUESTS_H_ - -#define bRequestType SETUPDAT[0] -#define bRequest SETUPDAT[1] -#define wValueL SETUPDAT[2] -#define wValueH SETUPDAT[3] -#define wIndexL SETUPDAT[4] -#define wIndexH SETUPDAT[5] -#define wLengthL SETUPDAT[6] -#define wLengthH SETUPDAT[7] - -/* format of bmRequestType byte */ - -#define bmRT_DIR_MASK (0x1 << 7) -#define bmRT_DIR_IN (1 << 7) -#define bmRT_DIR_OUT (0 << 7) - -#define bmRT_TYPE_MASK (0x3 << 5) -#define bmRT_TYPE_STD (0 << 5) -#define bmRT_TYPE_CLASS (1 << 5) -#define bmRT_TYPE_VENDOR (2 << 5) -#define bmRT_TYPE_RESERVED (3 << 5) - -#define bmRT_RECIP_MASK (0x1f << 0) -#define bmRT_RECIP_DEVICE (0 << 0) -#define bmRT_RECIP_INTERFACE (1 << 0) -#define bmRT_RECIP_ENDPOINT (2 << 0) -#define bmRT_RECIP_OTHER (3 << 0) - - -/* standard request codes (bRequest) */ - -#define RQ_GET_STATUS 0 -#define RQ_CLEAR_FEATURE 1 -#define RQ_RESERVED_2 2 -#define RQ_SET_FEATURE 3 -#define RQ_RESERVED_4 4 -#define RQ_SET_ADDRESS 5 -#define RQ_GET_DESCR 6 -#define RQ_SET_DESCR 7 -#define RQ_GET_CONFIG 8 -#define RQ_SET_CONFIG 9 -#define RQ_GET_INTERFACE 10 -#define RQ_SET_INTERFACE 11 -#define RQ_SYNCH_FRAME 12 - -/* standard descriptor types */ - -#define DT_DEVICE 1 -#define DT_CONFIG 2 -#define DT_STRING 3 -#define DT_INTERFACE 4 -#define DT_ENDPOINT 5 -#define DT_DEVQUAL 6 -#define DT_OTHER_SPEED 7 -#define DT_INTERFACE_POWER 8 -#define DT_DFU_FUNCTIONAL 0x21 - -/* standard feature selectors */ - -#define FS_ENDPOINT_HALT 0 /**< recip: endpoint */ -#define FS_DEV_REMOTE_WAKEUP 1 /**< recip: device */ -#define FS_TEST_MODE 2 /**< recip: device */ - -/* Get Status device attributes */ - -#define bmGSDA_SELF_POWERED 0x01 -#define bmGSDA_REM_WAKEUP 0x02 - - -#endif /* _USB_REQUESTS_H_ */ Index: gecko3/trunk/gecko3com-fw/firmware/include/gecko3com_spi.h =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/include/gecko3com_spi.h (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/include/gecko3com_spi.h (nonexistent) @@ -1,45 +0,0 @@ -/* GECKO3COM - * - * Copyright (C) 2008 by - * ___ ____ _ _ - * ( _`\ ( __)( ) ( ) - * | (_) )| (_ | |_| | Berne University of Applied Sciences - * | _ <'| _) | _ | School of Engineering and - * | (_) )| | | | | | Information Technology - * (____/'(_) (_) (_) - * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/*********************************************************************/ -/** \file gecko3com_spi.h - ********************************************************************* - * \brief definitions for the SPI flash file handling - * (length of file slots etc.) - * - * \author Christoph Zimmermann bfh.ch - * -*/ - -#ifndef INCLUDED_GECKO3COM_SPI_H -#define INCLUDED_GECKO3COM_SPI_H - - -#define START_ADRESS_SLOT0 0x0 /**< Start adress of the first fpga configuration file in the spi flash */ -#define START_ADRESS_SLOT1 0x00100000 /**< Start adress of the second fpga configuration file in the spi flash */ - -#define SPIFLASH_SECTOR_LENGTH 0x10000 /**< Length of one sector in the flash, needed for erasing */ -#define SECTORS_PER_SLOT 16 /**< Number of sectors used for each configuration file slot */ - -#endif /* INCLUDED_GECKO3COM_SPI_H */ Index: gecko3/trunk/gecko3com-fw/firmware/include/usb_dfu.h =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/include/usb_dfu.h (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/include/usb_dfu.h (nonexistent) @@ -1,115 +0,0 @@ -/* GECKO3COM - * - * Copyright (C) 2008 by - * ___ ____ _ _ - * ( _`\ ( __)( ) ( ) - * | (_) )| (_ | |_| | Berne University of Applied Sciences - * | _ <'| _) | _ | School of Engineering and - * | (_) )| | | | | | Information Technology - * (____/'(_) (_) (_) - * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/*********************************************************************/ -/** \file usb_dfu.h - ********************************************************************* - * \brief handles the standard requests according to the USB DFU - * class. - * - * \author Christoph Zimmermann bfh.ch - * \date 2009-1-13 - * -*/ - -#ifndef _USB_DFU_H_ -#define _USB_DFU_H_ - -#define DFU_TIMEOUT 255 - -/* format of bmRequestType byte */ -#define bmRT_DFU_OUT 0x21 -#define bmRT_DFU_IN 0xA1 - -/* DFU class commands */ -#define DFU_DETACH 0 -#define DFU_DNLOAD 1 -#define DFU_UPLOAD 2 -#define DFU_GETSTATUS 3 -#define DFU_CLRSTATUS 4 -#define DFU_GETSTATE 5 -#define DFU_ABORT 6 - -/* DFU class status return values */ -#define DFU_STATUS_OK 0x00 -#define DFU_STATUS_errTARGET 0x01 -#define DFU_STATUS_errFILE 0x02 -#define DFU_STATUS_errWRITE 0x03 -#define DFU_STATUS_errERASE 0x04 -#define DFU_STATUS_errCHECK_ERASED 0x05 -#define DFU_STATUS_errPROG 0x06 -#define DFU_STATUS_errVERIFY 0x07 -#define DFU_STATUS_errADDRESS 0x08 -#define DFU_STATUS_errNOTDONE 0x09 -#define DFU_STATUS_errFIRMWARE 0x0a -#define DFU_STATUS_errVENDOR 0x0b -#define DFU_STATUS_errUSBR 0x0c -#define DFU_STATUS_errPOR 0x0d -#define DFU_STATUS_errUNKNOWN 0x0e -#define DFU_STATUS_errSTALLEDPKT 0x0f - -/** \brief device states according to DFU class specificaton - * - * this enum is used for the DFU state mashine */ -enum dfu_state { - DFU_STATE_appIDLE = 0, - DFU_STATE_appDETACH = 1, - DFU_STATE_dfuIDLE = 2, - DFU_STATE_dfuDNLOAD_SYNC = 3, - DFU_STATE_dfuDNBUSY = 4, - DFU_STATE_dfuDNLOAD_IDLE = 5, - DFU_STATE_dfuMANIFEST_SYNC = 6, - DFU_STATE_dfuMANIFEST = 7, - DFU_STATE_dfuMANIFEST_WAIT_RST = 8, - DFU_STATE_dfuUPLOAD_IDLE = 9, - DFU_STATE_dfuERROR = 10, -}; - -/** Global variable for handling the timeout when after an DFU_DETACH - * request no USB reset follows and we continue normal operation*/ -extern volatile uint8_t usb_dfu_timeout; - -/** Global variable that contains our current device status */ -extern volatile uint8_t usb_dfu_status; - -/** Global variable that contains our current device state */ -extern volatile enum dfu_state usb_dfu_state; - -/** Makro to check if this setup package is a DFU request */ -#define usb_dfu_request() ((wIndexL == USB_DFU_RT_INTERFACE && \ - (bRequestType & bmRT_RECIP_INTERFACE) == bmRT_RECIP_INTERFACE) \ - || \ - usb_dfu_state >= DFU_STATE_dfuIDLE \ - ) - -/** \brief general function to handle the DFU requests. Calls the function - * app_firmware_write when needed - */ -uint8_t usb_handle_dfu_packet (void); - -/** \brief Provided by user application to write the firmware into the memory. - * \return returns non-zero if it handled the command. */ -uint8_t app_firmware_write (void); - -#endif /* _USB_DFU_H_ */ Index: gecko3/trunk/gecko3com-fw/firmware/include/ser.h =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/include/ser.h (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/include/ser.h (nonexistent) @@ -1,23 +0,0 @@ -/*********************************************************************/ -/** \file ser.h - ********************************************************************** - * - * \date 04/26/99 we update - * \date 04/27/99 we add comments/header - ********************************************************************** - * \version 4498 - * \date 2006-12-02 11:53:42Z - * \author MaartenBrock - */ - -#ifndef _SER_H_ -#define _SER_H_ - -void ser_init(void); -void isr_SERIAL_0(void) interrupt; -void ser_putc(unsigned char); -unsigned char ser_getc(void); -void ser_printString(char *String); -char ser_charAvail(void); - -#endif Index: gecko3/trunk/gecko3com-fw/firmware/include/gecko3com_regs.h =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/include/gecko3com_regs.h (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/include/gecko3com_regs.h (nonexistent) @@ -1,330 +0,0 @@ -/* GECKO3COM - * - * Copyright (C) 2008 by - * ___ ____ _ _ - * ( _`\ ( __)( ) ( ) - * | (_) )| (_ | |_| | Bern University of Applied Sciences - * | _ <'| _) | _ | School of Engineering and - * | (_) )| | | | | | Information Technology - * (____/'(_) (_) (_) - * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/*********************************************************************/ -/** \file gecko3com_regs.h - ********************************************************************* - * \brief register and bit mask definitions for the GECKO3COM project - * class. - * - * Here are all board specific definitions. If you try to - * port the GECKO3COM firmware to another board, start here! - * - * \author Christoph Zimmermann bfh.ch - * \date 2009-1-13 - * -*/ - -#ifndef _GECKO3COM_REGS_H_ -#define _GECKO3COM_REGS_H_ - -#include "fx2regs.h" - - -/* ------------------------------------------------------------------------- */ -#ifdef GECKO3MAIN - -#define PORT_A IOA /**< Port A */ -#define PORT_A_OE OEA /**< Port A direction register */ - -#define PORT_B IOB /**< Port B */ -#define PORT_B_OE OEB /**< Port B direction register */ - -#define PORT_C IOC /**< Port C */ -#define PORT_C_OE OEC /**< Port C direction register */ - -/* Port GPIF CTL outputs */ -#define PORT_CTL GPIFIDLECTL /**< GPIF control pin port */ -#define PORT_CTL_OE GPIFCTLCFG /**< GPIF CTL port direction register */ - - -/* define stuff for system reset */ -#define RESET PORT_A /**< System reset signal is connected here */ -#define RESET_OE OEA /**< Reset port direction register */ -#define bmRESET bmBIT6 /**< bitmask to access system reset */ - - - -/* define connections for the SPI bus */ -#define SPI_PORT PORT_A /**< SPI signals are connected to this port */ -#define SPI_OE OEA /**< SPI port direction register */ -#define bmSPI_CLK bmBIT0 /**< bitmask for SPI serial clock pin */ -#define bmSPI_MOSI bmBIT1 /**< bitmask for SPI MOSI pin, Master Out, Slave In */ -#define bmSPI_MISO bmBIT2 /**< bitmask for SPI MISO pin, Master In, Slave Out */ -#define bmSPI_MASK (bmSPI_CLK | bmSPI_MOSI | bmSPI_MISO)/**< SPI bus pin mask */ - -sbit at 0x80+0 bitSPI_CLK; /**< \define 0x80 is the bit address of PORT A */ -sbit at 0x80+1 bitSPI_MOSI; /**< \define Output from FX2 point of view, Master Out, Slave In */ -sbit at 0x80+2 bitSPI_MISO; /**< \define In from FX2 point of view, Master In, Slave Out */ - -/* SPI related chipselect defines */ -#define SPI_CS_PORT PORT_A /**< SPI chip select signals are connected to this port */ -#define SPI_CS_OE OEA /**< SPI chip select port direction register */ -#define bmSPI_CS_FLASH bmBIT3 /**< bitmask to enable the SPI Flash */ -#define bmSPI_CS_MASK (bmSPI_CS_FLASH)/**< SPI chip select pin mask */ - - -/* define stuff for Xilinx FPGA configuration */ - -/** select FPGA vendor */ -#define XILINX - -#define XILINX_DATA PORT_B /**< Data line port */ - -#define XILINX_DONE PORT_A /**< Done signal is connected here */ -#define bmXILINX_DONE bmBIT7 /**< bitmask to access Done */ - -#define XILINX_PROG_B PORT_A /**< Prog_b signal is connected here */ -#define bmXILINX_PROG_B bmBIT5 /**< bitmask to access Prog_b */ - -#define XILINX_INIT_B PORT_A /**< Init_b signal is connected here */ -#define bmXILINX_INIT_B bmBIT4 /**< bitmask to access Init_b */ - -#define XILINX_CCLK GPIFIDLECTL /**< Cclk signal is connected here */ -#define bmXILINX_CCLK bmBIT0 /**< bitmask to access Cclk */ - -#define XILINX_RDWR_B GPIFIDLECTL /**< Rdwr_b signal is connected here */ -#define bmXILINX_RDWR_B bmBIT1 /**< bitmask to access Rdwr_b */ - -#define XILINX_CS_B GPIFIDLECTL /**< Cs_b signal is connected here */ -#define bmXILINX_CS_B bmBIT2 /**< bitmask to access Cs_b */ - -#define XILINX_BUSY GPIFREADYSTAT /**< Busy signal is connected here */ -#define bmXILINX_BUSY bmBIT1 /**< bitmask to access busy */ - - -/* - * Port A (bit addressable): - */ - -/* set here the direction and initial values of the pins */ - -#define bmPORT_A_OUTPUTS (bmSPI_CLK \ - | bmSPI_MOSI \ - | bmSPI_CS_FLASH \ - | bmXILINX_PROG_B \ - ) - -#define bmPORT_A_INITIAL (bmXILINX_PROG_B) - - - -/* Port B: GPIF FD[7:0] and used for FPGA configuration */ -#define bmPORT_B_OUTPUTS (0xFF ) -#define bmPORT_B_INITIAL (0x00) - - - -/* - * Port C (bit addressable): - * not available on the 56 pin EZ-USB FX2 - * used for debuging purposes only on the GECKO3main prototype board - */ - -#define LED_PORT PORT_C -#define bmPC_LED0 bmBIT6 /* active low */ -#define bmPC_LED1 bmBIT7 /* active low */ - -#define ISR_DEBUG_PORT PORT_C -#define bmGPIF_DONE bmBIT0 -#define bmGPIF_WF bmBIT1 -#define bmFIFO_PF bmBIT2 - -sbit at 0xA0+6 bitPC_LED0; /* 0xA0 is the bit address of PORT C */ -sbit at 0xA0+7 bitPC_LED1; - -#define bmPORT_C_OUTPUTS (bmPC_LED0 \ - | bmPC_LED1 \ - | bmGPIF_DONE \ - | bmGPIF_WF \ - | bmFIFO_PF \ - ) - -#define bmPORT_C_INITIAL (bmPC_LED0 | bmPC_LED1) - - - -/* Port D: GPIF FD[15:8] */ - -/* Port E: not available on the 56 pin EZ-USB FX2, not used */ - - - -/* Port GPIF CTL outputs */ -#define PORT_CTL GPIFIDLECTL -#define PORT_CTL_OE GPIFCTLCFG - -#define bmPORT_CTL_OUTPUTS (0x00) // TRICTL = 0, CTL 0..2 as CMOS, Not Tristatable -#define bmPORT_CTL_INITIAL (bmBIT2 | bmBIT1 | bmBIT0) - - -#endif /* GECKO3MAIN */ - - - -/* ------------------------------------------------------------------------- */ -/* not supported, only an example. only copied from USRP source code. - * does not work. only a guide to give you a start to port GECKO3COM to - * other boards using an EZ-USB FX2 device - */ - -#ifdef USRP2 - -/** select FPGA vendor */ -#define ALTERA - -/* - * Port A (bit addressable): - */ - -#define bmPA_S_CLK bmBIT0 // SPI serial clock -#define bmPA_S_DATA_TO_PERIPH bmBIT1 // SPI SDI (peripheral rel name) -#define bmPA_S_DATA_FROM_PERIPH bmBIT2 // SPI SDO (peripheral rel name) -#define bmPA_SEN_FPGA bmBIT3 // serial enable for FPGA (active low) -#define bmPA_SEN_CODEC_A bmBIT4 // serial enable AD9862 A (active low) -#define bmPA_SEN_CODEC_B bmBIT5 // serial enable AD9862 B (active low) -//#define bmPA_FX2_2 bmBIT6 // misc pin to FPGA (overflow) -//#define bmPA_FX2_3 bmBIT7 // misc pin to FPGA (underflow) -#define bmPA_RX_OVERRUN bmBIT6 // misc pin to FPGA (overflow) -#define bmPA_TX_UNDERRUN bmBIT7 // misc pin to FPGA (underflow) - - -sbit at 0x80+0 bitS_CLK; // 0x80 is the bit address of PORT A -sbit at 0x80+1 bitS_OUT; // out from FX2 point of view -sbit at 0x80+2 bitS_IN; // in from FX2 point of view - - -/* all outputs except S_DATA_FROM_PERIPH, FX2_2, FX2_3 */ - -#define bmPORT_A_OUTPUTS (bmPA_S_CLK \ - | bmPA_S_DATA_TO_PERIPH \ - | bmPA_SEN_FPGA \ - | bmPA_SEN_CODEC_A \ - | bmPA_SEN_CODEC_B \ - ) - -#define bmPORT_A_INITIAL (bmPA_SEN_FPGA | bmPA_SEN_CODEC_A | bmPA_SEN_CODEC_B) - - -/* Port B: GPIF FD[7:0] */ - -/* - * Port C (bit addressable): - * 5:1 FPGA configuration - */ - -#define PORT_C IOC // Port C -#define PORT_C_OE OEC // Port C direction register - -#define ALTERA_CONFIG PORT_C - -#define bmPC_nRESET bmBIT0 // reset line to codecs (active low) -#define bmALTERA_DATA0 bmBIT1 -#define bmALTERA_NCONFIG bmBIT2 -#define bmALTERA_DCLK bmBIT3 - -#define bmALTERA_CONF_DONE bmBIT4 -#define bmALTERA_NSTATUS bmBIT5 -#define bmPC_LED0 bmBIT6 // active low -#define bmPC_LED1 bmBIT7 // active low - -sbit at 0xA0+1 bitALTERA_DATA0; // 0xA0 is the bit address of PORT C -sbit at 0xA0+3 bitALTERA_DCLK; - - -#define bmALTERA_BITS (bmALTERA_DATA0 \ - | bmALTERA_NCONFIG \ - | bmALTERA_DCLK \ - | bmALTERA_CONF_DONE \ - | bmALTERA_NSTATUS) - -#define bmPORT_C_OUTPUTS (bmPC_nRESET \ - | bmALTERA_DATA0 \ - | bmALTERA_NCONFIG \ - | bmALTERA_DCLK \ - | bmPC_LED0 \ - | bmPC_LED1 \ - ) - -#define bmPORT_C_INITIAL (bmPC_LED0 | bmPC_LED1) - - -#define LED_PORT PORT_C -#define bmLED0 bmPC_LED0 -#define bmLED1 bmPC_LED1 - - -/* Port D: GPIF FD[15:8] */ - -/* Port E: not bit addressible */ - -#define PORT_E IOE // Port E -#define PORT_E_OE OEE // Port E direction register - -#define bmPE_PE0 bmBIT0 // GPIF debug output -#define bmPE_PE1 bmBIT1 // GPIF debug output -#define bmPE_PE2 bmBIT2 // GPIF debug output -#define bmPE_FPGA_CLR_STATUS bmBIT3 // misc pin to FPGA (clear status) -#define bmPE_SEN_TX_A bmBIT4 // serial enable d'board TX A (active low) -#define bmPE_SEN_RX_A bmBIT5 // serial enable d'board RX A (active low) -#define bmPE_SEN_TX_B bmBIT6 // serial enable d'board TX B (active low) -#define bmPE_SEN_RX_B bmBIT7 // serial enable d'board RX B (active low) - - -#define bmPORT_E_OUTPUTS (bmPE_FPGA_CLR_STATUS \ - | bmPE_SEN_TX_A \ - | bmPE_SEN_RX_A \ - | bmPE_SEN_TX_B \ - | bmPE_SEN_RX_B \ - ) - - -#define bmPORT_E_INITIAL (bmPE_SEN_TX_A \ - | bmPE_SEN_RX_A \ - | bmPE_SEN_TX_B \ - | bmPE_SEN_RX_B \ - ) - -/* - * FPGA output lines that are tied to FX2 RDYx inputs. - * These are readable using GPIFREADYSTAT. - */ -#define bmFPGA_HAS_SPACE bmBIT0 // usbrdy[0] has room for 512 byte packet -#define bmFPGA_PKT_AVAIL bmBIT1 // usbrdy[1] has >= 512 bytes available -// #define bmTX_UNDERRUN bmBIT2 // usbrdy[2] D/A ran out of data -// #define bmRX_OVERRUN bmBIT3 // usbrdy[3] A/D ran out of buffer - -/* - * FPGA input lines that are tied to the FX2 CTLx outputs. - * - * These are controlled by the GPIF microprogram... - */ -// WR bmBIT0 // usbctl[0] -// RD bmBIT1 // usbctl[1] -// OE bmBIT2 // usbctl[2] - -#endif /* USRP2 */ - - -#endif /* _GECKO3COM_REGS_H_ */ Index: gecko3/trunk/gecko3com-fw/firmware/include/spi.h =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/include/spi.h (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/include/spi.h (nonexistent) @@ -1,100 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -/************************************************************/ -/** \file spi.h - ************************************************************* - * \brief SPI bus functions - * - * \details Library to communicate with SPI devices - * - * \author GNU Radio guys - * - * \note to use this SPI library you have to define the following - * keywords in your pinmapping header file. For GECKO3COM - * this is the "gecko3com_regs.h" file. \n - * \li SPI_PORT, SPI signals are connected to this port - * \li SPI_OE, SPI port direction register - * \li bmSPI_CLK, bitmask for SPI serial clock pin - * \li bmSPI_MOSI, bitmask for SPI MOSI pin, Master Out, Slave In - * \li bmSPI_MISO, bitmask for SPI MISO pin, Master In, Slave Out - * \li bitSPI_CLK, bitadress of the SPI CLK pin - * \li bitSPI_MOSI, bitadress of the SPI MOSI pin - * \li bitSPI_MISO, bitadress of the SPI MISO pin - * \li SPI_CS_PORT, SPI chip select signals are connected to this port - * \li bmSPI_CS_FLASH, bitmask to enable the SPI Flash - * \li bmSPI_CS_MASK, bit mask to select the SPI chip select pins - */ - -#ifndef INCLUDED_SPI_H -#define INCLUDED_SPI_H - -#include "gecko3com_regs.h" - - -/* - * SPI_FMT_* goes in wIndexL - */ -#define bmSPI_FORMAT 0x80 -# define bmSPI_FORMAT_LSB 0x80 /**< least signficant bit first */ -# define bmSPI_FORMAT_MSB 0x00 /**< most significant bit first */ -#define bmSPI_HEADER 0x60 -# define bmSPI_HEADER_0 0x00 /**< 0 header bytes */ -# define bmSPI_HEADER_1 0x20 /**< 1 header byte */ -# define bmSPI_HEADER_2 0x40 /**< 2 header bytes */ - - -/** one time call to init SPI subsystem */ -void init_spi (void); - -/** \brief basic function to read data from the SPI bus - * \param[in] unsigned char header_hi, high byte of the header to send - * \param[in[ unsigned char header_lo, low byte of the header to send - * \param[in] unsigned char enables, bitmask with the correct device selected - * \param[in] unsigned char format, bitmask byte to select byte order - * and number of header bytes - * \param[out]*buf pointer to a buffer to write the received data in it - * \param[in] unsigned char len, number of bytes to be read from bus - * - * \return returns non-zero if successful, else 0 */ -unsigned char -spi_read (unsigned char header_hi, unsigned char header_lo, - unsigned char enables, unsigned char format, - xdata unsigned char *buf, unsigned char len); - -/** \brief basic function to write data to the SPI bus - * \param[in] unsigned char header_hi, high byte of the header to send - * \param[in[ unsigned char header_lo, low byte of the header to send - * \param[in] unsigned char enables, bitmask with the correct device selected - * \param[in] unsigned char format, bitmask byte to select byte order - * and number of header bytes - * \param[in]*buf pointer to a buffer which holds the data to send - * \param[in] unsigned char len, number of bytes to be written to the bus - * - * \return returns non-zero if successful, else 0 */ -unsigned char -spi_write (unsigned char header_hi, unsigned char header_lo, - unsigned char enables, unsigned char format, - const xdata unsigned char *buf, unsigned char len); - - -#endif /* INCLUDED_SPI_H */ Index: gecko3/trunk/gecko3com-fw/firmware/include/gecko3com_commands.h =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/include/gecko3com_commands.h (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/include/gecko3com_commands.h (nonexistent) @@ -1,79 +0,0 @@ -/*********************************************************** - * Gecko3 SoC HW/SW Development Board - * ___ ___ _ _ - * ( _`\ ( __)( ) ( ) - * | (_) )| ( | |_| | Berne University of Applied Sciences - * | _ <'| _) | _ | School of Engineering and - * | (_) )| | | | | | Information Technology - * (____/'(_) (_) (_) - * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/************************************************************/ -/** \file gecko3com_commands.h - ************************************************************* - * \brief Commands used by GECKO3COM - * - * Here are the definitions of the commands interpreted - * by the GECKO3COM firmware. - * Mainly these are IEEE488 messages used with the USB - * Test and Measurement Class (TMC). - * We implemented also a few vendor specific USB commands - * to write the serial number and the FPGA type. - * - * \author Christoph Zimmermann bfh.ch - * \date 17.09.2007 first version - * - */ - -#ifndef _GECKO3COM_COMMANDS_H_ -#define _GECKO3COM_COMMANDS_H_ - -#include - -#define MAX_EP0_PKTSIZE 64 /* max size of EP0 packet on FX2 */ - -/* ---------------------------------------------------------------- - * Vendor bmRequestType's - * --------------------------------------------------------------*/ - -#define VRT_VENDOR_IN 0xC0 -#define VRT_VENDOR_OUT 0x40 - -/* ---------------------------------------------------------------- - * GECKO3COM Vendor Requests - * - * Note that Cypress reserves [0xA0,0xAF]. - * 0xA0 is the firmware load function. - * --------------------------------------------------------------*/ - - -/* IN commands */ - -/* #define VRQ_GET_STATUS 0x80 */ - - -/* OUT commands */ - -#define VRQ_SET_SERIAL 0x01 - -#define VRQ_SET_HW_REV 0x02 - -#define VRQ_SET_FPGA_TYPE 0x03 - -#define VRQ_SET_FPGA_IDCODE 0x04 - - -#endif /* _GECKO3COM_COMMANDS_H_ */ Index: gecko3/trunk/gecko3com-fw/firmware/include/syncdelay.h =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/include/syncdelay.h (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/include/syncdelay.h (nonexistent) @@ -1,76 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -/************************************************************************/ -/** \file syncdelay.h - ************************************************************************* - * - * \author GNU Radio - * - */ - -#ifndef _SYNCDELAY_H_ -#define _SYNCDELAY_H_ - -/** - * \brief Magic delay required between access to certain xdata registers (TRM page 15-106). - * - * For our configuration, 48 MHz FX2 / 48 MHz IFCLK, we need three cycles. Each - * NOP is a single cycle.... - * - * From TRM page 15-105: - * - * Under certain conditions, some read and write access to the FX2 registers must - * be separated by a "synchronization delay". The delay is necessary only under the - * following conditions: - * - * - between a write to any register in the 0xE600 - 0xE6FF range and a write to one - * of the registers listed below. - * - * - between a write to one of the registers listed below and a read from any register - * in the 0xE600 - 0xE6FF range. - * - * Registers which require a synchronization delay: - * - * FIFORESET FIFOPINPOLAR - * INPKTEND EPxBCH:L - * EPxFIFOPFH:L EPxAUTOINLENH:L - * EPxFIFOCFG EPxGPIFFLGSEL - * PINFLAGSAB PINFLAGSCD - * EPxFIFOIE EPxFIFOIRQ - * GPIFIE GPIFIRQ - * UDMACRCH:L GPIFADRH:L - * GPIFTRIG EPxGPIFTRIG - * OUTPKTEND REVCTL - * GPIFTCB3 GPIFTCB2 - * GPIFTCB1 GPIFTCB0 - * - * - * FIXME ensure that the peep hole optimizer isn't screwing us - */ -#define SYNCDELAY _asm nop; nop; nop; _endasm - -/** no operation, idle for ony cycle */ -#define NOP _asm nop; _endasm - - -#endif /* _SYNCDELAY_H_ */ Index: gecko3/trunk/gecko3com-fw/firmware/include/usb_tmc.h =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/include/usb_tmc.h (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/include/usb_tmc.h (nonexistent) @@ -1,291 +0,0 @@ -/* GECKO3COM - * - * Copyright (C) 2008 by - * ___ ____ _ _ - * ( _`\ ( __)( ) ( ) - * | (_) )| (_ | |_| | Berne University of Applied Sciences - * | _ <'| _) | _ | School of Engineering and - * | (_) )| | | | | | Information Technology - * (____/'(_) (_) (_) - * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/*********************************************************************/ -/** \file usb_tmc.h - ********************************************************************* - * \brief header file for the USB Test and Measurement Class (TMC) - * functions. - * - * According to USBTMC Specification Revision 1.0 and - * USBTMC-USB488 Subclass Specification Revision 1.0. - * - * \author Christoph Zimmermann bfh.ch, Eldo José dos Santos - * \date 2009-02-04 - * -*/ - -#ifndef _USBTMC_H_ -#define _USBTMC_H_ - -/** length of the buffer to hold the response messages to be sent to the host */ -#define TMC_RESPONSE_QUEUE_LENGTH 256 - -/*****************************************************************************/ -/* definitions, data structures and related stuff - * according to USBTMC standard */ - -#define USB_TMC_HEADER_SIZE 12 /**< length of a USBTMC header */ - - -/* USBTMC MsgID. Values, Ref.: Table 2 */ -#define DEV_DEP_MSG_OUT 1 /**< device dependent command message */ -#define REQUEST_DEV_DEP_MSG_IN 2 /**< command message that requests the device to send a USBTMC response */ -#define DEV_DEP_MSG_IN 2 /**< response message to the REQUEST_DEV_DEP_MSG_IN */ -#define VENDOR_SPECIFIC_OUT 126 /**< vendor specific command message */ -#define REQUEST_VENDOR_SPECIFIC_IN 127 /**< command message that requests the device to send a vendor specific USBTMC response */ -#define VENDOR_SPECIFIC_IN 127 /**< response message to the REQUEST_VENDOR_SPECIFIC_IN */ - - -/* format of bmRequestType byte */ -#define bmRT_TMC_OUT 0x21 -#define bmRT_TMC_IN 0xA1 - - -/* USBTMC commands (bRequest values, Ref.: Table 15) */ -#define INITIATE_ABORT_BULK_OUT 1 -#define CHECK_ABORT_BULK_OUT_STATUS 2 -#define INITIATE_ABORT_BULK_IN 3 -#define CHECK_ABORT_BULK_IN_STATUS 4 -#define INITIATE_CLEAR 5 -#define CHECK_CLEAR_STATUS 6 -#define GET_CAPABILITIES 7 -#define INDICATOR_PULSE 64 - -/* USBTMC USB488 Subclass commands (bRequest values, Ref.: Table 9) */ -#define READ_STATUS_BYTE 128 -#define REN_CONTROL 160 -#define GO_TO_LOCAL 161 -#define LOCAL_LOCKOUT 162 - -/* bmTransfer attributes */ -#define bmTA_EOM 0x01 /**< bmTransfer Attribute: End of Message */ -#define bmTA_TERMCHAR 0x02 /**< bmTransfer Attribute: Terminate transfer with Terminate Character */ - -/** \brief status values according to USBTMC specificaton, Ref.: Table 16 */ -typedef enum { - TMC_STATUS_SUCCESS = 0x01, - TMC_STATUS_PENDING = 0x02, - - /* USB488 defined USBTMC status values */ - TMC_STATUS_INTERRUPT_IN_BUSY = 0x20, - - TMC_STATUS_FAILED = 0x80, - TMC_STATUS_TRANSFER_NOT_IN_PROGRESS = 0x81, - TMC_STATUS_SPLIT_NOT_IN_PROGRESS = 0x82, - TMC_STATUS_SPLIT_IN_PROGRESS = 0x83, -} TMC_Status; - -/* defines for the device capablilities, Ref.: Table 37 and Table 8 USB488 */ -#define HAS_INDICATOR_PULSE 0x04 -#define TALK_ONLY 0x02 -#define LISTEN_ONLY 0x01 -#define TERMCHAR_BULKIN 0x01 -#define IS_488_2 0x04 -#define ACCEPTS_LOCAL_LOCKOUT 0x02 -#define TRIGGER 0x01 -#define SCPI_COMPILIANT 0x08 -#define SR1_CAPABLE 0x04 -#define RL1_CAPABLE 0x02 -#define DT1_CAPABLE 0x01 - -/** \brief Structure to handle get_capabilities command. - * - * contains all required parameters for a correct device specification */ -typedef struct { - uint8_t USBTMC_status; - uint8_t reserved0; - uint8_t bcdUSBTMC_lsb; - uint8_t bcdUSBTMC_msb; - uint8_t TMCInterface; - uint8_t TMCDevice; - uint8_t reserved1[6]; - /* place here USB488 subclass capabilities */ - uint8_t bcdUSB488_lsb; - uint8_t bcdUSB488_msb; - uint8_t USB488Interface; - uint8_t USB488Device; - uint8_t reserved2[8]; -} USB_TMC_Capabilities; - -/* Structure to handle Bulk-OUT Header for a DEV_DEP_MSG - * - * Ref.: Table 3 or Bulk-IN Header for a DEV_DEP_MSG, Ref.: Table 9 */ -typedef struct -{ - uint32_t TransferSize; - int8_t bmTransferAttributes; - int8_t Reserved[3]; -} DEV_DEP_MSG_OUT_Header, /**< \brief Bulk-OUT Header for a DEV_DEP_MSG, Ref.: Table 3 */ - DEV_DEP_MSG_IN_Header; /**< \brief Bulk-IN Header for a DEV_DEP_MSG, Ref.: Table 9 */ - -/** \brief Structure to handle USBTMC device dependent message IN requests. - * - * Ref.: Table 4 */ -typedef struct -{ - uint32_t TransferSize; - int8_t bmTransferAttributes; - int8_t TermChar; - int8_t Reserved[2]; -} REQUEST_DEV_DEP_MSG_IN_Header; /* Ref.: Table 4 */ - -/* \brief structure to handle vendor specific IN/OUT or REQUESTS according - * to USBTMC */ -typedef struct -{ - uint32_t TransferSize; - int8_t Reserved[4]; -} VENDOR_SPECIFIC_OUT_Header, /**< \brief structure to handle vendor specific - *IN/OUT or REQUESTS according to Ref.: Table 5 */ - REQUEST_VENDOR_SPECIFIC_IN_Header, /**< \brief structure to handle vendor - * specific IN/OUT or REQUESTS according - * Ref.: Table 6 */ - VENDOR_SPECIFIC_IN_Header; /**< \brief structure to handle vendor specific - * IN/OUT or REQUESTS according Ref.: Table 10 */ - -/** \brief general Header structure for USBTMC bulk messages. The MsgID value - * determines the type of the msg_specific part of these structure */ -typedef struct _tHeader -{ - int8_t MsgID; /**< The MsgID value determines the type of the - * msg_specific part of these structure */ - int8_t bTag; - int8_t bTagInverse; - int8_t Reserved; - int8_t msg_specific[8]; - -} BulkOUT_Header, /**< \brief According to USBTMC Ref.: Table 1 */ - BulkIN_Header, /**< \brief According to USBTMC Ref.: Table 8 */ - tHeader; /**< \brief general Header structure for USBTMC bulk messages. */ - - -/*****************************************************************************/ -/* IEEE488 related stuff */ - -#define bmPOWER_ON 0x80 -#define bmUSER_REQUEST 0x40 -#define bmCOMMAND_ERROR 0x20 -#define bmEXECUTION_ERROR 0x10 -#define bmDEVICEDEPENDENT_ERROR 0x08 -#define bmQUERY_ERROR 0x04 -#define bmREQUEST_CONTROL 0x02 -#define bmOPERATION_COMPLETE 0x01 - -/** \brief struct that contains all registers needed for the IEEE488.2 - * compiliant status reporting */ -typedef struct { - uint8_t EventStatusRegister; - uint8_t EventStatusEnable; - uint8_t StatusByteRegister; - uint8_t ServiceRequestEnable; - uint8_t OPC_Received; -} IEEE488_status_registers; - - -/*****************************************************************************/ -/* internal definitions and typedef's needed for this implementation */ - -#define NEWTRANSFER 1 - -/** \brief Internal state of tmc system. - * - * used by this implementation, no reference in standard */ -typedef enum { - TMC_STATE_IDLE = 0x01, - TMC_STATE_OUT_TRANSFER = 0x02, - TMC_STATE_IN_TRANSFER = 0x03, - TMC_STATE_ABORTING_OUT = 0x04, - TMC_STATE_ABORTING_IN = 0x05, - TMC_STATE_HALT = 0x06, -} TMC_State; - -/** \brief struct to hold all usb tmc transfer relevant information */ -typedef struct { - uint8_t bTag; /**< contains the bTag value of the currently active transfer */ - uint32_t transfer_size; - uint8_t new_transfer; /**< flag to signal the start of a new transfer, else 0 */ - uint32_t nbytes_rxd; /**< contains the number of bytes received in active tmc OUT transfer */ - uint32_t nbytes_txd; /**< contains the number of bytes transmitted in active tmc IN transfer */ - -} TMC_Transfer_Info; - - -/** \brief response queue to hold the data for requests */ -typedef struct { - unsigned char buf[TMC_RESPONSE_QUEUE_LENGTH]; /**< message buffer */ - uint16_t length; /**< length of message. is 0 when no message is available */ -} TMC_Response_Queue; - - -/* Global variables */ -extern volatile static TMC_Status usb_tmc_status; /**< Global variable contains the status of the last tmc operation. normally USB_TMC_SUCCESS */ -extern volatile TMC_State usb_tmc_state; /**< Global variable contains the state of the tmc system. Example USB_TMC_IDLE or USB_TMC_IN_TRANSFER */ -extern volatile idata TMC_Transfer_Info usb_tmc_transfer; /** Global struct to hold all usb tmc transfer relevant information */ -extern volatile idata IEEE488_status_registers ieee488_status; /**< Struct that contains all status and enable registers for the IEEE488 status reporting capabilities */ - - -/** Makro to check if this setup package is a USBTMC request */ -#define usb_tmc_request() ((wIndexL == USB_TMC_INTERFACE && \ - (bRequestType & bmRT_RECIP_INTERFACE) == bmRT_RECIP_INTERFACE) \ - || \ - (wIndexL == USB_TMC_EP_OUT && \ - (bRequestType & bmRT_RECIP_ENDPOINT) == bmRT_RECIP_ENDPOINT) \ - || \ - (wIndexL == (bmRT_DIR_IN | USB_TMC_EP_IN) && \ - (bRequestType & bmRT_RECIP_ENDPOINT) == bmRT_RECIP_ENDPOINT) \ - ) - -/** \brief general function to handle the TMC requests. - * - * Parses the TMC header to provide needed information to the - * following message parser. - * \return returns non-zero if it handled the command successfully. - */ -uint8_t usb_handle_tmc_packet (void); - - -/** \brief clears all global variables to known states. sets the POWER_ON bit */ -void init_usb_tmc(); - -/** set the mav bit (Message available or "Queue not empty") in the IEEE488 status structure */ -#define IEEE488_set_mav() (ieee488_status.StatusByteRegister |= 0x10) - -/** clear the mav bit (Message available or "Queue not empty") in the IEEE488 status structure */ -#define IEEE488_clear_mav() (ieee488_status.StatusByteRegister &= 0xEF) - -/** \brief evalutates the status IEEE488 status byte. represents the current - * device state - * - * executes the process to evaluate the current state of the status byte - * according to the IEEE488.2 standard status reporting capabilities. - * Reference: IEC60488-2:2004 figure 4-1 - * - * \param[in] *status pointer to a IEEE488_status_registers struct. - * Status byte in the struct is updated - * \return return value is the current value of the status byte - */ -uint8_t IEEE488_status_query(idata IEEE488_status_registers *status); - -#endif Index: gecko3/trunk/gecko3com-fw/firmware/include/isr.h =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/include/isr.h (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/include/isr.h (nonexistent) @@ -1,176 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _ISR_H_ -#define _ISR_H_ - -/************************************************************************/ -/** \file isr.h - ************************************************************************* - * \brief routines for managing interrupt services routines - * - * The FX2 has three discrete sets of interrupt vectors. - * The first set is the standard 8051 vector (13 8-byte entries). - * The second set is USB interrupt autovector (32 4-byte entries). - * The third set is the FIFO/GPIF autovector (14 4-byte entries). - * - * Since all the code we're running in the FX2 is ram based, we - * forego the typical "initialize the interrupt vectors at link time" - * strategy, in favor of calls at run time that install the correct - * pointers to functions. - * - * \author GNU Radio - */ - -/* - * Standard Vector numbers - */ - -#define SV_INT_0 0x03 /**< INT0 Pin */ -#define SV_TIMER_0 0x0b /**< Timer 0 Overflow */ -#define SV_INT_1 0x13 /**< INT1 Pin */ -#define SV_TIMER_1 0x1b /**< Timer 1 Overflow */ -#define SV_SERIAL_0 0x23 /**< USART 0 Rx & Tx */ -#define SV_TIMER_2 0x2b /**< Timer 2 Overflow */ -#define SV_RESUME 0x33 /**< WAKEUP / WU2 Pin or USB Resume */ -#define SV_SERIAL_1 0x3b /**< USART 1 Rx & Tx */ -#define SV_INT_2 0x43 /**< (INT_2) points at USB autovector */ -#define SV_I2C 0x4b /**< I2C Bus */ -#define SV_INT_4 0x53 /**< (INT_4) points at FIFO/GPIF autovector */ -#define SV_INT_5 0x5b /**< INT5 Pin */ -#define SV_INT_6 0x63 /**< INT6 Pin */ - -#define SV_MIN SV_INT_0 -#define SV_MAX SV_INT_6 - -/* - * USB Auto Vector numbers - */ - -#define UV_SUDAV 0x00 /**< SETUP Data Available */ -#define UV_SOF 0x04 /**< Start of Frame (or Microframe) */ -#define UV_SUTOK 0x08 /**< Setup Token Received */ -#define UV_SUSPEND 0x0c /**< USB Suspend request */ -#define UV_USBRESET 0x10 /**< Bus Reset */ -#define UV_HIGHSPEED 0x14 /**< Entered high speed operation */ -#define UV_EP0ACK 0x18 /**< EZ-USB ACK'd the CONTROL Handshake */ -#define UV_SPARE_1C 0x1c -#define UV_EP0IN 0x20 /**< EP0-IN ready to be loaded with data */ -#define UV_EP0OUT 0x24 /**< EP0-OUT has USB data */ -#define UV_EP1IN 0x28 /**< EP1-IN ready to be loaded with data */ -#define UV_EP1OUT 0x2c /**< EP1-OUT has USB data */ -#define UV_EP2 0x30 /**< IN: buffer available. OUT: buffer has data */ -#define UV_EP4 0x34 /**< IN: buffer available. OUT: buffer has data */ -#define UV_EP6 0x38 /**< IN: buffer available. OUT: buffer has data */ -#define UV_EP8 0x3c /**< IN: buffer available. OUT: buffer has data */ -#define UV_IBN 0x40 /**< IN-Bulk-NAK (any IN endpoint) */ -#define UV_SPARE_44 0x44 -#define UV_EP0PINGNAK 0x48 /**< EP0 OUT was Pinged and it NAK'd */ -#define UV_EP1PINGNAK 0x4c /**< EP1 OUT was Pinged and it NAK'd */ -#define UV_EP2PINGNAK 0x50 /**< EP2 OUT was Pinged and it NAK'd */ -#define UV_EP4PINGNAK 0x54 /**< EP4 OUT was Pinged and it NAK'd */ -#define UV_EP6PINGNAK 0x58 /**< EP6 OUT was Pinged and it NAK'd */ -#define UV_EP8PINGNAK 0x5c /**< EP8 OUT was Pinged and it NAK'd */ -#define UV_ERRLIMIT 0x60 /**< Bus errors exceeded the programmed limit */ -#define UV_SPARE_64 0x64 -#define UV_SPARE_68 0x68 -#define UV_SPARE_6C 0x6c -#define UV_EP2ISOERR 0x70 /**< ISO EP2 OUT PID sequence error */ -#define UV_EP4ISOERR 0x74 /**< ISO EP4 OUT PID sequence error */ -#define UV_EP6ISOERR 0x78 /**< ISO EP6 OUT PID sequence error */ -#define UV_EP8ISOERR 0x7c /**< ISO EP8 OUT PID sequence error */ - -#define UV_MIN UV_SUDAV -#define UV_MAX UV_EP8ISOERR - -/* - * FIFO/GPIF Auto Vector numbers - */ - -#define FGV_EP2PF 0x00 /**< Endpoint 2 Programmable Flag */ -#define FGV_EP4PF 0x04 /**< Endpoint 4 Programmable Flag */ -#define FGV_EP6PF 0x08 /**< Endpoint 6 Programmable Flag */ -#define FGV_EP8PF 0x0c /**< Endpoint 8 Programmable Flag */ -#define FGV_EP2EF 0x10 /**< Endpoint 2 Empty Flag */ -#define FGV_EP4EF 0x14 /**< Endpoint 4 Empty Flag */ -#define FGV_EP6EF 0x18 /**< Endpoint 6 Empty Flag */ -#define FGV_EP8EF 0x1c /**< Endpoint 8 Empty Flag */ -#define FGV_EP2FF 0x20 /**< Endpoint 2 Full Flag */ -#define FGV_EP4FF 0x24 /**< Endpoint 4 Full Flag */ -#define FGV_EP6FF 0x28 /**< Endpoint 6 Full Flag */ -#define FGV_EP8FF 0x2c /**< Endpoint 8 Full Flag */ -#define FGV_GPIFDONE 0x30 /**< GPIF Operation Complete */ -#define FGV_GPIFWF 0x34 /**< GPIF Waveform */ - -#define FGV_MIN FGV_EP2PF -#define FGV_MAX FGV_GPIFWF - - -/** - * \brief Hook standard interrupt vector. - * - * \param[in] vector_number is from the SV_ list above. - * \param[in] addr is the address of the interrupt service routine. - */ -void hook_sv (unsigned char vector_number, unsigned short addr); - -/** - * \brief Hook usb interrupt vector. - * - * \param[in] vector_number is from the UV_ list above. - * \param[in] addr is the address of the interrupt service routine. - */ -void hook_uv (unsigned char vector_number, unsigned short addr); - -/** - * \brief Hook fifo/gpif interrupt vector. - * - * \param[in] vector_number is from the FGV_ list above. - * \param[in] addr is the address of the interrupt service routine. - */ -void hook_fgv (unsigned char vector_number, unsigned short addr); - -/** - * One time call to enable autovectoring for both USB and FIFO/GPIF - */ -void setup_autovectors (void); - - -/** - * Makro to clear the pending USB interrrupt - * - * \warning Must be called in each usb interrupt handler - */ -#define clear_usb_irq() \ - EXIF &= ~bmEXIF_USBINT; \ - INT2CLR = 0 - -/** - * Makro to clear the pending FIFO/GPIF interrupt - * - * \warning Must be called in each fifo/gpif interrupt handler - */ -#define clear_fifo_gpif_irq() \ - EXIF &= ~bmEXIF_IE4; \ - INT4CLR = 0 - -#endif /* _ISR_H_ */ Index: gecko3/trunk/gecko3com-fw/firmware/include/delay.h =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/include/delay.h (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/include/delay.h (nonexistent) @@ -1,50 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -/************************************************************************/ -/** \file delay.h - ************************************************************************* - * \brief delay routines for Cypress EZ-USB FX2 - * - * \details provides functions for a 1 us and a 1 ms delay - * - * \author GNU Radio - */ - -#ifndef _DELAY_H_ -#define _DELAY_H_ - -/** - * delay for approximately usecs microseconds - * \param[in] unsigned char usecs number of microseconds to wait - * \warning limit of 255 usecs. - */ -void udelay (unsigned char usecs); - -/** - * delay for approximately msecs milliseconds - * \param[in] unsigned short msecs number of milliseconds to wait - */ -void mdelay (unsigned short msecs); - - -#endif /* _DELAY_H_ */ Index: gecko3/trunk/gecko3com-fw/firmware/include/usb_common.h =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/include/usb_common.h (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/include/usb_common.h (nonexistent) @@ -1,72 +0,0 @@ -/* -*- c -*- */ -/* - * Copyright 2003 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -/*********************************************************************/ -/** \file usb_common.h - ********************************************************************* - * \brief basic functions to setup and enable USB functionality - * - * usb_common provides the basic functions and interrupt - * routines to enable USB communication and handling of all - * basic functions like standard requests, USB reset, - * descriptor handling etc.\n - * When a USB Class command or a USB Vendor specific command - * is received usb_common calls the app_class_cmd or the - * app_vendor_cmd function. These functions are not implemented - * here. This is done by the user programm. - * - * \author GNUradio, Christoph Zimmermann bfh.ch - * -*/ - -#ifndef _USB_COMMON_H_ -#define _USB_COMMON_H_ - -/** Global variable set by SUDAV isr (USB SETUP Data Available) */ -extern volatile bit _usb_got_SUDAV; - -/** Provided by user application to handle CLASS commands. - * \return returns non-zero if it handled the command. */ -unsigned char app_class_cmd (void); - -/** Provided by user application to handle VENDOR commands. - * \return returns non-zero if it handled the command. */ -unsigned char app_vendor_cmd (void); - -/** Installs the interrupt handlers to handle the standard USB interrupts */ -void usb_install_handlers (void); - -/** Handles the setup package and the basic device requests like reading - * descriptors, get/set confifuration etc. \n - * Also calls the app_class_cmd or app_vendor_cmd functions when needed. */ -void usb_handle_setup_packet (void); - -#ifdef USB_DFU_SUPPORT -/** Changes the interrupt handlers from runtime mode to DFU mode handlers - * and the oposite. */ -void usb_toggle_dfu_handlers (void); -#endif - -/** makro to check if new setup data is available */ -#define usb_setup_packet_avail() _usb_got_SUDAV - -#endif /* _USB_COMMON_H_ */ Index: gecko3/trunk/gecko3com-fw/firmware/include/debugprint.h =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/include/debugprint.h (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/include/debugprint.h (nonexistent) @@ -1,77 +0,0 @@ -/* GECKO3COM - * - * Copyright (C) 2008 by - * ___ ____ _ _ - * ( _`\ ( __)( ) ( ) - * | (_) )| (_ | |_| | Berne University of Applied Sciences - * | _ <'| _) | _ | School of Engineering and - * | (_) )| | | | | | Information Technology - * (____/'(_) (_) (_) - * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/** - ********************************************************************* - * \file debugprint.h - ********************************************************************* - * \brief Makro definitions to print debug information when needed. - * - * Supporting three different levels: Error, Warning, Info. - * Define the desired Value in the Makefile by the define - * DEBUG_LEVEL_[INFO | WARN | ERROR] - * - * \date 2008-12-16 - * - * \author Christoph Zimmermann -*/ - -#ifndef _DEBUGPRINT_H_ -#define _DEBUGPRINT_H_ - -#include -#include "ser.h" - -#ifdef DEBUG_LEVEL_WARN -#define DEBUG_LEVEL_ERROR -#endif - -#ifdef DEBUG_LEVEL_INFO -#define DEBUG_LEVEL_WARN -#define DEBUG_LEVEL_ERROR -#endif - -#ifdef DEBUG_LEVEL_INFO -/** print debug information */ -#define print_info(String) ser_printString("INFO: "); printf_tiny(String) -#else -#define print_info(String) -#endif - -#ifdef DEBUG_LEVEL_WARN -/** print debug warnings */ -#define print_warn(String) ser_printString("WARNING: "); printf_tiny(String) -#else -#define print_warn(String) -#endif - -#ifdef DEBUG_LEVEL_ERROR -/* print debug errors */ -#define print_err(String) ser_printString("ERROR: "); printf_tiny(String) -#else -#define print_err(String) -#endif - - -#endif /* _DEBUGPRINT_H_ */ Index: gecko3/trunk/gecko3com-fw/firmware/include/gecko3com_i2c.h =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/include/gecko3com_i2c.h (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/include/gecko3com_i2c.h (nonexistent) @@ -1,56 +0,0 @@ -/* GECKO3COM - * - * Copyright (C) 2008 by - * ___ ____ _ _ - * ( _`\ ( __)( ) ( ) - * | (_) )| (_ | |_| | Berne University of Applied Sciences - * | _ <'| _) | _ | School of Engineering and - * | (_) )| | | | | | Information Technology - * (____/'(_) (_) (_) - * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/*********************************************************************/ -/** \file gecko3com_i2c.h - ********************************************************************* - * \brief adresses of the I2C devices - * - * \author GNUradio, Christoph Zimmermann bfh.ch - * -*/ - -#ifndef INCLUDED_GECKO3COM_I2C_H -#define INCLUDED_GECKO3COM_I2C_H - - -#define I2C_DEV_EEPROM 0x50 /**< base adress of a I2C EEPROM: 7-bits 1010xxx */ - -#define I2C_ADDR_BOOT (I2C_DEV_EEPROM | 0x1) /**< adress of the Boot EEPROM */ - -#define I2C_DEV_IO 0x41 /**< base adress of a I2C IO expander: 7-bits 1000001 */ - -/** - * offsets into boot eeprom for configuration values - */ -#define FPGA_TYPE_OFFSET 0x3FDD /**< ASCII string with the fpga type as it is in the bit file */ -#define FPGA_TYPE_LEN 16 -#define FPGA_IDCODE_OFFSET 0x3FED /**< the JTAG chip IDCODE is a 32 bit integer stored as 0x11223344 */ -#define FPGA_IDCODE_LEN 10 -#define HW_REV_OFFSET 0x3FF7 -#define SERIAL_NO_OFFSET 0x3FF8 -#define SERIAL_NO_LEN 8 - -#endif /* INCLUDED_GECKO3COM_I2C_H */ - Index: gecko3/trunk/gecko3com-fw/firmware/include/spi_flash.h =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/include/spi_flash.h (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/include/spi_flash.h (nonexistent) @@ -1,253 +0,0 @@ -/*********************************************************** - * Gecko3 SoC HW/SW Development Board - * ___ ___ _ _ - * ( _`\ ( __)( ) ( ) - * | (_) )| ( | |_| | Berne University of Applied Sciences - * | _ <'| _) | _ | School of Engineering and - * | (_) )| | | | | | Information Technology - * (____/'(_) (_) (_) - * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/************************************************************/ -/** \file spi_flash.h - ************************************************************* - * \author Christoph Zimmermann - * \date Date of creation: 17.09.2007 - * \brief Headerfile for the spi-flash Library - * - * \details Library to access the SPI Flash devices from ST - * Microelectronics (now Numonyx) or Spansion. - * Supported densities: - * 8, 16, 32 Mbit - * - * \note to use this SPI/SPI Flash library you have to define the following - * keywords in your pinmapping header file. For GECKO3COM - * this is the "gecko3com_regs.h" file. \n - * \li SPI_PORT, SPI signals are connected to this port - * \li SPI_OE, SPI port direction register - * \li bmSPI_CLK, bitmask for SPI serial clock pin - * \li bmSPI_MOSI, bitmask for SPI MOSI pin, Master Out, Slave In - * \li bmSPI_MISO, bitmask for SPI MISO pin, Master In, Slave Out - * \li bitSPI_CLK, bitadress of the SPI CLK pin - * \li bitSPI_MOSI, bitadress of the SPI MOSI pin - * \li bitSPI_MISO, bitadress of the SPI MISO pin - * \li SPI_CS_PORT, SPI chip select signals are connected to this port - * \li bmSPI_CS_FLASH, bitmask to enable the SPI Flash - * \li bmSPI_CS_MASK, bit mask to select the SPI chip select pins - * - * \date 17.09.2007 first version - * - */ - -#ifndef SPI_FLASH /* prevent circular inclusions */ -#define SPI_FLASH /* by using protection macros */ - -#include -//#include "spi.h" - -/**************************** Type Definitions *******************************/ - -/** - * \brief This typedef contains configuration information for the device. - */ -typedef struct -{ - uint32_t maxAdress; /**< highest available adress */ - uint32_t capacity; /**< memory capacity in bytes */ - uint16_t pages; /**< number of available pages */ - uint8_t sectors; /**< number of available sectors */ - uint8_t isBusy; /**< acivity indicator */ -} SPI_flash; - - -#define FLASH_WRITE_BUFFER_SIZE 0x100 /**< Write Buffer = 256 bytes */ - -#define MANUFACTURER_STM 0x20 /**< id of ST microelectronics */ -#define MEMTYPE_STM 0x20 /**< Memory type of M25PXX */ -#define MEMCAPACITY_8MBIT_STM 0x14 /**< 8 MBit memory capacity */ -#define MEMCAPACITY_16MBIT_STM 0x15 /**< 16 MBit memory capacity */ -#define MEMCAPACITY_32MBIT_STM 0x16 /**< 32 MBit memory capacity */ - -#define MANUFACTURER_SPA 0x01 /**< id of SPANSION */ -#define MEMTYPE_SPA 0x02 /**< Memory type of S25FLXX */ -#define MEMCAPACITY_8MBIT_SPA 0x13 /**< 8 MBit memory capacity */ -#define MEMCAPACITY_16MBIT_SPA 0x14 /**< 16 MBit memory capacity */ -#define MEMCAPACITY_32MBIT_SPA 0x15 /**< 32 MBit memory capacity */ - - -#define MAXADRESS_8MBIT 0x0FFFFF -#define FLASH_SIZE_8MBIT (0x0100000) /**< Total 8 Mbit device size in Bytes */ -#define FLASH_PAGE_COUNT_8MBIT (0x01000) /**< Total 8 Mbit device size in Pages */ -#define FLASH_SECTOR_COUNT_8MBIT (0x10) /**< Total 8 Mbit device size in Sectors */ - -#define MAXADRESS_16MBIT 0x1FFFFF -#define FLASH_SIZE_16MBIT (0x0200000) /**< Total 16 Mbit device size in Bytes */ -#define FLASH_PAGE_COUNT_16MBIT (0x02000) /**< Total 16 Mbit device size in Pages */ -#define FLASH_SECTOR_COUNT_16MBIT (0x20) /**< Total 16 Mbit device size in Sectors */ - -#define MAXADRESS_32MBIT 0x3FFFFF -#define FLASH_SIZE_32MBIT (0x0400000) /**< Total 32 Mbit device size in Bytes */ -#define FLASH_PAGE_COUNT_32MBIT (0x04000) /**< Total 32 Mbit device size in Pages */ -#define FLASH_SECTOR_COUNT_32MBIT (0x40) /**< Total 32 Mbit device size in Sectors */ - - /* Return Codes */ -#define GOOD 0 /**< anything ok */ -#define BAD 1 /**< error */ -#define NOINSTANCE 99 /**< no device found */ -#define UNSUPPORTED_TYPE 5 /**< a device was found but it is not supported */ -#define OVERFLOW 10 /**< an overflow occoured */ - - - /* flash memory opcodes */ -#define WREN 0x06 /**< Flash Opcode: Write Enable */ -#define WRDI 0x04 /**< Flash Opcode: Write Disable */ -#define RDID 0x9F /**< Flash Opcode: Read Identification */ -#define RDSR 0x05 /**< Flash Opcode: Read Status Register */ -#define WRSR 0x01 /**< Flash Opcode: Write Status Register */ -#define READ 0x03 /**< Flash Opcode: Read Data bytes */ -#define FAST_READ 0x0B /**< Flash Opcode: Read Data bytes at higher speed */ -#define PP 0x02 /**< Flash Opcode: Page Programm */ -#define SE 0xD8 /**< Flash Opcode: Sector Erase */ -#define BE 0xC7 /**< Flash Opcode: Bulk Erase */ -#define DP 0xB9 /**< Flash Opcode: Deep Power-down */ -#define RES 0xAB /**< Flash Opcode: Release from Deep Power-down */ - - -/***************** Macros (Inline Functions) Definitions *********************/ - -/** \brief check if it is a sane pointer - * \param[in] ptr pointer to a SPI_flash struct - */ -#define ptrCheck(ptr) \ - { \ - if (ptr == 0) \ - { \ - return NOINSTANCE; \ - } \ - } - - -/** \brief check if a overflow would occour with the given parameters - * - * \param[in] flashPtr pointer to a initialized SPI_flash struct - * \param[in] adr adress somewhere in the flash - * \param[in] byteCount number of bytes to process - * \exception breaks the operations and returns the OVERFLOW error code - */ -#define adrCheck(flashPtr, adr, byteCount) \ - { \ - if (adr + byteCount >= flashPtr->maxAdress) \ - { \ - return OVERFLOW; \ - } \ - } - - - -/** returns the start adress of the sector that belongs to this adress - * \param[in] adr adress somewhere in the flash - */ -#define sectorStart(adr) ((adr) & 0xFFFF0000) - - -/** returns the end adress of the sector that belongs to this adress - * \param[in] adr adress somewhere in the flash - */ -#define sectorEnd(adr) ((adr) | 0x0000FFFF) - - -/** returns the start adress of the page that belongs to this adress - * \param[in] adr adress somewhere in the flash - */ -#define pageStart(adr) ((adr) & 0xFFFFFF00) - - -/** returns the end adress of the page that belongs to this adress - * \param[in] adr adress somewhere in the flash - */ -#define pageEnd(adr) ((adr) | 0x000000FF) - - -extern SPI_flash xdata flash_dr; - -/************************** Function Prototypes ******************************/ - -/** \brief Checks if the SPI flash is busy - * - * \param[in] flashPtr pointer to an SPI_flash struct - * \return returns non-zero if SPI flash is busy, else 0 - */ -int8_t spiflash_is_busy(xdata SPI_flash *flashPtr); - - -/** \brief Initalizes the values in the SPI_flash struct after reading - * the device ID - * - * \param[in] flashPtr pointer to an uninitialized SPI_flash struct - * \return returns GOOD (0) or an Error Code (non-zero) - */ -int8_t init_spiflash(xdata SPI_flash *flashPtr); - - -/** \brief Reads data from the SPI flash - * - * \param[in] xdata SPI_flash flashPtr pointer to an SPI_flash struct - * \param[in] xdata uint32_t *adress pointer to the flash start adress to read - * from - * \param[out] xdata uint8_t *buffer, pointer to a buffer to write the data into - * \param[in] length of the data to read - * \return returns non-zero if successful, else 0 - */ -int8_t spiflash_read(xdata SPI_flash *flashPtr, xdata uint32_t *adress, xdata uint8_t *buffer, const idata uint16_t length); - - -/** \brief deletes the whole SPI flash - * - * \param[in] *flashPtr pointer to an SPI_flash struct - * \return returns non-zero if successful, else 0 - */ -int8_t spiflash_erase_bulk(xdata SPI_flash *flashPtr); - - -/** \brief deletes one sector (64 kbyte) of the SPI flash - * - * \param[in] *flashPtr flashPtr pointer to an SPI_flash struct - * \param[in] *adress pointer to the flash adress in the sector to be erased - * \return returns non-zero if successful, else 0 - */ -int8_t spiflash_erase(xdata SPI_flash *flashPtr, xdata uint32_t *adress); - - -/** \brief Writes data to the SPI flash - * - * This write function handles if you write data over the page adress - * boundary. It splits it into seperate page program commands. - * \note Don't forget to erase a sector before you try to write to it! - * - * \param[in] *flashPtr pointer to an SPI_flash struct - * \param[in] *adress pointer to the flash start adress to - * write to - * \param[out] *buffer pointer to a buffer to write the data into - * \param[in] length of the data to read - * \return returns non-zero if successful, else 0 - */ -int8_t spiflash_write(xdata SPI_flash *flashPtr, xdata uint32_t *adress, xdata uint8_t *buffer, uint16_t length); - -#ifdef __cplusplus -} -#endif - -#endif Index: gecko3/trunk/gecko3com-fw/firmware/lib/usb_common.c =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/lib/usb_common.c (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/lib/usb_common.c (nonexistent) @@ -1,434 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#include -#include - -#include "usb_common.h" -#include "fx2regs.h" -#include "syncdelay.h" -#include "fx2utils.h" -#include "isr.h" -#include "usb_descriptors.h" -#include "usb_requests.h" -#include "debugprint.h" -#ifdef USB_DFU_SUPPORT -#include "usb_dfu.h" -#endif - -extern xdata char str0[]; -extern xdata char str1[]; -extern xdata char str2[]; -extern xdata char str3[]; -extern xdata char str4[]; -extern xdata char str5[]; - - -#define MSB(x) (((unsigned short) x) >> 8) -#define LSB(x) (((unsigned short) x) & 0xff) - -volatile bit _usb_got_SUDAV; - -unsigned char _usb_config = 0; -unsigned char _usb_alt_setting = 0; // FIXME really 1/interface - -xdata unsigned char *current_device_descr; -xdata unsigned char *current_devqual_descr; -xdata unsigned char *current_config_descr; -xdata unsigned char *other_config_descr; - -static void -setup_descriptors (void) -{ - if (USBCS & bmHSM){ // high speed mode - current_device_descr = high_speed_device_descr; - current_devqual_descr = high_speed_devqual_descr; - current_config_descr = high_speed_config_descr; - other_config_descr = full_speed_config_descr; - } - else { - current_device_descr = full_speed_device_descr; - current_devqual_descr = full_speed_devqual_descr; - current_config_descr = full_speed_config_descr; - other_config_descr = high_speed_config_descr; - } - - // whack the type fields - // FIXME, may not be required. - // current_config_descr[1] = DT_CONFIG; - // other_config_descr[1] = DT_OTHER_SPEED; -} - -static void -isr_SUDAV (void) interrupt -{ - clear_usb_irq (); - _usb_got_SUDAV = 1; -} - -static void -isr_USBRESET (void) interrupt -{ - clear_usb_irq (); - setup_descriptors (); - -#ifdef USB_DFU_SUPPORT - usb_dfu_state = DFU_STATE_appIDLE; -#endif -} - -static void -isr_HIGHSPEED (void) interrupt -{ - clear_usb_irq (); - setup_descriptors (); -#ifdef USB_DFU_SUPPORT - usb_dfu_state = DFU_STATE_appIDLE; -#endif -} - -void -usb_install_handlers (void) -{ - setup_descriptors (); // ensure that they're set before use - - hook_uv (UV_SUDAV, (unsigned short) isr_SUDAV); - hook_uv (UV_USBRESET, (unsigned short) isr_USBRESET); - hook_uv (UV_HIGHSPEED, (unsigned short) isr_HIGHSPEED); - - USBIE = bmSUDAV | bmURES | bmHSGRANT; -} - -/** On the FX2 the only plausible endpoints are 0, 1, 2, 4, 6, 8 - * This doesn't check to see that they're enabled */ -unsigned char -plausible_endpoint (unsigned char ep) -{ - ep &= ~0x80; // ignore direction bit - - if (ep > 8) - return 0; - - if (ep == 1) - return 1; - - return (ep & 0x1) == 0; // must be even -} - -/** return pointer to control and status register for endpoint. - * only called with plausible_endpoints */ -xdata volatile unsigned char * -epcs (unsigned char ep) -{ - if (ep == 0x01) // ep1 has different in and out CS regs - return &EP1OUTCS; - - if (ep == 0x81) - return &EP1INCS; - - ep &= ~0x80; // ignore direction bit - - if (ep == 0x00) // ep0 - return &EP0CS; - - //return EP2CS + (ep >> 1); // 2, 4, 6, 8 are consecutive - return &EP1INCS + (ep >> 1); // EP2CS -1; 2, 4, 6, 8 are consecutive -} - -#ifdef USB_DFU_SUPPORT -static void -setup_dfu_descriptors (void) -{ - current_device_descr = dfu_mode_device_descr; - current_config_descr = dfu_mode_config_descr; -} - -static void -isr_DFURESET (void) interrupt -{ - clear_usb_irq (); - setup_dfu_descriptors (); - usb_dfu_state = DFU_STATE_dfuIDLE; -} - -void -usb_toggle_dfu_handlers (void) -{ - if(usb_dfu_state == DFU_STATE_appIDLE){ - hook_uv (UV_USBRESET, (unsigned short) isr_DFURESET); - hook_uv (UV_HIGHSPEED, (unsigned short) isr_DFURESET); - } - else { - hook_uv (UV_USBRESET, (unsigned short) isr_USBRESET); - hook_uv (UV_HIGHSPEED, (unsigned short) isr_HIGHSPEED); - usb_dfu_state = DFU_STATE_appIDLE; - } -} -#endif - -void -usb_handle_setup_packet (void) -{ - _usb_got_SUDAV = 0; - - switch (bRequestType & bmRT_TYPE_MASK){ - - case bmRT_TYPE_CLASS: - // call the application code class requests. - // If it handles the command it returns non-zero - - if (!app_class_cmd ()) - fx2_stall_ep0 (); - break; - - case bmRT_TYPE_RESERVED: - fx2_stall_ep0 (); // we don't handle these. indicate error - break; - - case bmRT_TYPE_VENDOR: - // call the application code for vendor commands. - // If it handles the command it returns non-zero - - if (!app_vendor_cmd ()) - fx2_stall_ep0 (); - break; - - case bmRT_TYPE_STD: - // these are the standard requests... - - if ((bRequestType & bmRT_DIR_MASK) == bmRT_DIR_IN){ - - //////////////////////////////////// - // handle the IN requests - //////////////////////////////////// - - switch (bRequest){ - - case RQ_GET_CONFIG: - EP0BUF[0] = _usb_config; // FIXME app should handle - EP0BCH = 0; - EP0BCL = 1; - break; - - // -------------------------------- - - case RQ_GET_INTERFACE: - EP0BUF[0] = _usb_alt_setting; // FIXME app should handle - EP0BCH = 0; - EP0BCL = 1; - break; - - // -------------------------------- - - case RQ_GET_DESCR: - switch (wValueH){ - - case DT_DEVICE: - SUDPTRH = MSB (current_device_descr); - SUDPTRL = LSB (current_device_descr); - break; - - case DT_DEVQUAL: - SUDPTRH = MSB (current_devqual_descr); - SUDPTRL = LSB (current_devqual_descr); - break; - - case DT_CONFIG: - if (0 && wValueL != 1) // FIXME only a single configuration - fx2_stall_ep0 (); - else { - SUDPTRH = MSB (current_config_descr); - SUDPTRL = LSB (current_config_descr); - } - break; - - case DT_OTHER_SPEED: - if (0 && wValueL != 1) // FIXME only a single configuration - fx2_stall_ep0 (); - else { - SUDPTRH = MSB (other_config_descr); - SUDPTRL = LSB (other_config_descr); - } - break; - - case DT_STRING: - if (wValueL >= nstring_descriptors) - fx2_stall_ep0 (); - else { - xdata char *p = string_descriptors[wValueL]; - SUDPTRH = MSB (p); - SUDPTRL = LSB (p); - } - break; - -#ifdef USB_DFU_SUPPORT - case DT_DFU_FUNCTIONAL: - SUDPTRH = MSB (dfu_mode_functional_descr); - SUDPTRL = LSB (dfu_mode_functional_descr); - break; -#endif - - default: - fx2_stall_ep0 (); // invalid request - break; - } - break; - - // -------------------------------- - - case RQ_GET_STATUS: - switch (bRequestType & bmRT_RECIP_MASK){ - case bmRT_RECIP_DEVICE: - EP0BUF[0] = bmGSDA_SELF_POWERED; // FIXME app should handle - EP0BUF[1] = 0; - EP0BCH = 0; - EP0BCL = 2; - break; - - case bmRT_RECIP_INTERFACE: - EP0BUF[0] = 0; - EP0BUF[1] = 0; - EP0BCH = 0; - EP0BCL = 2; - break; - - case bmRT_RECIP_ENDPOINT: - if (plausible_endpoint (wIndexL)){ - EP0BUF[0] = *epcs (wIndexL) & bmEPSTALL; - EP0BUF[1] = 0; - EP0BCH = 0; - EP0BCL = 2; - } - else - fx2_stall_ep0 (); - break; - - default: - fx2_stall_ep0 (); - break; - } - break; - - // -------------------------------- - - case RQ_SYNCH_FRAME: // not implemented - default: - fx2_stall_ep0 (); - break; - } - } - - else { - - //////////////////////////////////// - // handle the OUT requests - //////////////////////////////////// - - switch (bRequest){ - - case RQ_SET_CONFIG: - _usb_config = wValueL; // FIXME app should handle - break; - - case RQ_SET_INTERFACE: - _usb_alt_setting = wValueL; // FIXME app should handle - break; - - // -------------------------------- - - case RQ_CLEAR_FEATURE: - switch (bRequestType & bmRT_RECIP_MASK){ - - case bmRT_RECIP_DEVICE: - switch (wValueL){ - case FS_DEV_REMOTE_WAKEUP: - default: - fx2_stall_ep0 (); - } - break; - - case bmRT_RECIP_ENDPOINT: - if (wValueL == FS_ENDPOINT_HALT && plausible_endpoint (wIndexL)){ - *epcs (wIndexL) &= ~bmEPSTALL; - EP2CS &= ~bmEPSTALL; - fx2_reset_data_toggle (wIndexL); - } - else - fx2_stall_ep0 (); - break; - - default: - fx2_stall_ep0 (); - break; - } - break; - - // -------------------------------- - - case RQ_SET_FEATURE: - switch (bRequestType & bmRT_RECIP_MASK){ - - case bmRT_RECIP_DEVICE: - switch (wValueL){ - case FS_TEST_MODE: - // hardware handles this after we complete SETUP phase handshake - break; - - case FS_DEV_REMOTE_WAKEUP: - default: - fx2_stall_ep0 (); - break; - } - } - break; - - case bmRT_RECIP_ENDPOINT: - switch (wValueL){ - case FS_ENDPOINT_HALT: - if (plausible_endpoint (wIndexL)) - *epcs (wIndexL) |= bmEPSTALL; - else - fx2_stall_ep0 (); - break; - - default: - fx2_stall_ep0 (); - break; - } - break; - - // -------------------------------- - - case RQ_SET_ADDRESS: // handled by fx2 hardware - case RQ_SET_DESCR: // not implemented - default: - fx2_stall_ep0 (); - } - - } - break; - - } // bmRT_TYPE_MASK - - // ack handshake phase of device request - EP0CS |= bmHSNAK; -} Index: gecko3/trunk/gecko3com-fw/firmware/lib/usb_dfu.c =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/lib/usb_dfu.c (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/lib/usb_dfu.c (nonexistent) @@ -1,151 +0,0 @@ -/* GECKO3COM - * - * Copyright (C) 2008 by - * ___ ____ _ _ - * ( _`\ ( __)( ) ( ) - * | (_) )| (_ | |_| | Berne University of Applied Sciences - * | _ <'| _) | _ | School of Engineering and - * | (_) )| | | | | | Information Technology - * (____/'(_) (_) (_) - * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -//#define USB_DFU_SUPPORT - -#include -#include "fx2regs.h" -#include "isr.h" -#include "usb_requests.h" -#include "usb_common.h" -#include "usb_dfu.h" -#include "debugprint.h" - -volatile uint8_t usb_dfu_status = DFU_STATUS_OK; -volatile enum dfu_state usb_dfu_state = DFU_STATE_appIDLE; -volatile uint8_t usb_dfu_timeout = DFU_TIMEOUT; - -uint8_t usb_handle_dfu_packet (void) -{ - if ((bRequestType & bmRT_DIR_MASK) == bmRT_DIR_IN){ - /********************************* - * handle the DFU IN requests - ********************************/ - - switch (bRequest){ - - case DFU_UPLOAD: - usb_dfu_status == DFU_STATUS_errSTALLEDPKT; - return 0; - break; - - case DFU_GETSTATUS: - EP0BUF[0] = usb_dfu_status; - EP0BUF[1] = 0; - EP0BUF[2] = 0; - EP0BUF[3] = 0xff; - EP0BUF[4] = usb_dfu_state; - EP0BUF[5] = 0; - EP0BCH = 0; - EP0BCL = 6; - break; - - case DFU_GETSTATE: - EP0BUF[0] = usb_dfu_state; - EP0BCH = 0; - EP0BCL = 1; - break; - - default: - return 0; - } - } - - else if ((bRequestType & bmRT_DIR_MASK) == bmRT_DIR_OUT){ - - /*********************************** - * handle the DFU OUT requests - **********************************/ - - switch (bRequest){ - case DFU_DETACH: - if(usb_dfu_state == DFU_STATE_appIDLE){ - usb_toggle_dfu_handlers(); - usb_dfu_state = DFU_STATE_appDETACH; - usb_dfu_timeout = DFU_TIMEOUT; - - /* FIXME start watchdog for usb reset */ - } - else { - usb_dfu_status = DFU_STATUS_errSTALLEDPKT; - return 0; - } - break; - - case DFU_DNLOAD: - if((usb_dfu_state == DFU_STATE_dfuIDLE || - usb_dfu_state == DFU_STATE_dfuDNLOAD_IDLE) && - wLengthL > 0){ - if(!app_firmware_write()){ - usb_dfu_status = DFU_STATUS_errWRITE; - usb_dfu_state = DFU_STATE_dfuERROR; - return 0; - } - usb_dfu_state = DFU_STATE_dfuDNLOAD_IDLE; - } - else if(usb_dfu_state == DFU_STATE_dfuDNLOAD_IDLE && - wLengthL == 0){ - usb_toggle_dfu_handlers(); - usb_dfu_state = DFU_STATE_dfuMANIFEST_WAIT_RST; - } - else { - usb_dfu_status = DFU_STATUS_errSTALLEDPKT; - return 0; - } - break; - - case DFU_CLRSTATUS: - if(usb_dfu_state == DFU_STATE_dfuERROR){ - usb_dfu_status = DFU_STATUS_OK; - usb_dfu_state = DFU_STATE_dfuIDLE; - } - else { - usb_dfu_status = DFU_STATUS_errSTALLEDPKT; - return 0; - } - break; - - case DFU_ABORT: - if(usb_dfu_state != DFU_STATE_appIDLE && \ - usb_dfu_state != DFU_STATE_appDETACH){ - /*FIXME stop all pending operations */ - usb_dfu_status = DFU_STATUS_OK; - usb_dfu_state = DFU_STATE_dfuIDLE; - } - else { - usb_dfu_status = DFU_STATUS_errSTALLEDPKT; - return 0; - } - break; - - default: - usb_dfu_status = DFU_STATUS_errSTALLEDPKT; - return 0; - } - } - else - return 0; /* invalid bRequestType */ - - return 1; -} Index: gecko3/trunk/gecko3com-fw/firmware/lib/ser.c =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/lib/ser.c (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/lib/ser.c (nonexistent) @@ -1,223 +0,0 @@ -/* GECKO3COM - * - * Copyright (C) 2008 by - * ___ ____ _ _ - * ( _`\ ( __)( ) ( ) - * | (_) )| (_ | |_| | Berne University of Applied Sciences - * | _ <'| _) | _ | School of Engineering and - * | (_) )| | | | | | Information Technology - * (____/'(_) (_) (_) - * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/********************************************************************/ -/** \file ser.c - ********************************************************************* - * This file contains a simple interrupt driven serial driver with - * buffer (no check for overflow!!!). - ********************************************************************* - * \note: - * Remember to enable all interrupts (EA=1) outside of this module!! - ********************************************************************/ - -#include "fx2regs.h" -#include "ser.h" -#include "isr.h" - -/** enable non blocking operation of the ser_getc function */ -#define NON_BLOCKING - -/** Transmit buffer write pointer */ -unsigned char __xdata ser_txIndexIn; -/** Transmit butter read pointer */ -unsigned char __xdata ser_txIndexOut; -/** Receive buffer write pointer */ -unsigned char __xdata ser_rxIndexIn; -/** Receive buffer read pointer */ -unsigned char __xdata ser_rxIndexOut; - -/** Transmitt buffer */ -unsigned char __xdata ser_txBuffer[0x100]; -/** Receive buffer */ -unsigned char __xdata ser_rxBuffer[0x100]; - -/** Transmitt Busy flag */ -static __bit ser_txBusy; - -/************************************************************************/ -/** Initializes the UART - * Initializes the UART for the serial Port 0 with 115,2 Kbaud, 1 start, - * 1 stop and no parity bit. - ************************************************************************* - * \param[in] - * \param[out] - * \return - ************************************************************************* - * \author Christoph Zimmermann, SDCC Team - * \date 21.Nov.2008 - ************************************************************************/ -void -ser_init(void) -{ - ES0 = 0; - - ser_txBusy = 0; - - ser_txIndexIn = 0; - ser_txIndexOut = 0; - ser_rxIndexIn = 0; - ser_rxIndexOut = 0; - - UART230 = 0x01; /*enable high speed baud rate generator, 115,2 kbaud*/ - - /*T2CON = 0x30; /*select timer 2 as baudrate generator*/ - /* Baudrate = 19200, oscillator frq. of my processor is 21.4772 MHz */ - /*RCAP2H = 0xFF;*/ - /*RCAP2L = 0xDD;*/ - /* enable counter */ - /*T2CON = 0x34;*/ - - SCON0 = 0x50; /*Serial Port 0 in Mode 1 (async,1 start, 1 stop, no parity)*/ - - if (TI) { - TI = 0; - } - if (RI) { - RI = 0; - } - - hook_sv(SV_SERIAL_0, (unsigned short) isr_SERIAL_0); - - ES0=1; -} - -/************************************************************************/ -/** \brief Interrupt service routine for RS232 handling - * if there is data to send it copies the next char from the send buffer - * to the uart - * if data is received it will be copyied to the receive buffer. - ************************************************************************* - * \author Christoph Zimmermann, SDCC Team - * \date 21.Nov.2008 - ************************************************************************/ -void -isr_SERIAL_0(void) interrupt -{ - ES0=0; - - if (RI) { - RI = 0; - ser_rxBuffer[ser_rxIndexIn++] = SBUF0; - } - - if (TI) { - TI = 0; - if (ser_txIndexIn == ser_txIndexOut) { - ser_txBusy = 0; - } - else { - SBUF0 = ser_txBuffer[ser_txIndexOut++]; - } - } - - ES0=1; -} - -/************************************************************************/ -/** \brief sends one char over the serial line - ************************************************************************* - * \param[in] c character to send - ************************************************************************* - * \author Christoph Zimmermann, SDCC Team - * \date 21.Nov.2008 - ************************************************************************/ -void -ser_putc(unsigned char c) -{ - ES0=0; - - if (ser_txBusy) { - ser_txBuffer[ser_txIndexIn++] = c; - } - else { - ser_txBusy = 1; - SBUF0 = c; - } - - ES0=1; -} - -/************************************************************************/ -/** \brief receives one char from the serial line - ************************************************************************* - * \return receive character - ************************************************************************* - * \author Christoph Zimmermann, SDCC Team - * \date 21.Nov.2008 - ************************************************************************/ -unsigned char -ser_getc(void) -{ - char tmp; - -#ifdef NON_BLOCKING - if (ser_rxIndexIn != ser_rxIndexOut) { - tmp = ser_rxBuffer[ser_rxIndexOut++]; - } - else { - tmp = 0; - } -#endif - - return(tmp); -} - -/************************************************************************/ -/** \brief sends a string of characters over the serial line - ************************************************************************* - * \param[in] string to send - ************************************************************************* - * \author Christoph Zimmermann, SDCC Team - * \date 21.Nov.2008 - ************************************************************************/ -void -ser_printString(char *String) -{ - while (*String) { - ser_putc(*String++); - } -} - -/************************************************************************/ -/** \brief function to check if there is a new character to read - ************************************************************************* - * \return returns 1 if a new character is available else 0 - ************************************************************************* - * \author Christoph Zimmermann, SDCC Team - * \date 21.Nov.2008 - ************************************************************************/ -char -ser_charAvail(void) -{ - char ret = 0; - - if (ser_rxIndexIn != ser_rxIndexOut) { - ret = 1; - } - - return(ret); -} - -/*********************End of File************************************/ Index: gecko3/trunk/gecko3com-fw/firmware/lib/Makefile =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/lib/Makefile (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/lib/Makefile (nonexistent) @@ -1,59 +0,0 @@ -PACKAGE = libfx2.lib - -#DEBUG = --debug -DDEBUG_LEVEL_ERROR -DEBUG = - -FEATURES = -DUSB_DFU_SUPPORT -#FEATURES = - -BUILD_DIR = build -INCLUDE_DIR = ../include -CC = sdcc - -SRCS_C = \ - i2c.c \ - delay.c \ - fx2utils.c \ - isr.c \ - timer.c \ - usb_common.c \ - usb_dfu.c \ - ser.c -SRCS_ASM = \ - -ASFLGS = -plosgff - -CFLAGS = --opt-code-size --no-xinit-opt -mmcs51 --model-small $(FEATURES) $(DEBUG) - -INCLUDE_DIR = ../include -LIB_DIR = ../lib -LIB = libfx2 -BUILD_DIR = build -CC = sdcc - - -OBJS = $(SRCS_C:.c=.rel) $(SRCS_ASM:.asm=.rel) - -all : $(BUILD_DIR) $(PACKAGE) - -$(BUILD_DIR) : - mkdir $@ - -$(BUILD_DIR)/%.rel : %.c - $(CC) -c $(CFLAGS) -I$(INCLUDE_DIR) -o $@ $< - -$(BUILD_DIR)/%.rel : %.asm - cp $< $(BUILD_DIR)/; \ - cd $(BUILD_DIR); \ - asx8051 $(ASFLGS) $(BUILD_DIR)/$< - -$(PACKAGE) : $(patsubst %,$(BUILD_DIR)/%,$(OBJS)) - for obj in $^; do sdcclib $@ $$obj; done - - -clean : - rm -f $(PACKAGE) $(BUILD_DIR)/* - -run : all - -.PHONY : clean all Index: gecko3/trunk/gecko3com-fw/firmware/lib/isr.c =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/lib/isr.c (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/lib/isr.c (nonexistent) @@ -1,167 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#include "isr.h" -#include "fx2regs.h" -#include "syncdelay.h" - -extern xdata unsigned char _standard_interrupt_vector[]; -extern xdata unsigned char _usb_autovector[]; -extern xdata unsigned char _fifo_gpif_autovector[]; - -#define LJMP_OPCODE 0x02 - -/* - * Hook standard interrupt vector. - * - * vector_number is from the SV_ list. - * addr is the address of the interrupt service routine. - */ -void -hook_sv (unsigned char vector_number, unsigned short addr) -{ - bit t; - - // sanity checks - - if (vector_number < SV_MIN || vector_number > SV_MAX) - return; - - if ((vector_number & 0x0f) != 0x03 && (vector_number & 0x0f) != 0x0b) - return; - - t = EA; - EA = 0; - _standard_interrupt_vector[vector_number] = LJMP_OPCODE; - _standard_interrupt_vector[vector_number + 1] = addr >> 8; - _standard_interrupt_vector[vector_number + 2] = addr & 0xff; - EA = t; -} - -/* - * Hook usb interrupt vector. - * - * vector_number is from the UV_ list. - * addr is the address of the interrupt service routine. - */ -void -hook_uv (unsigned char vector_number, unsigned short addr) -{ - bit t; - - // sanity checks - - if (vector_number < UV_MIN || vector_number > UV_MAX) - return; - - if ((vector_number & 0x3) != 0) - return; - - t = EA; - EA = 0; - _usb_autovector[vector_number] = LJMP_OPCODE; - _usb_autovector[vector_number + 1] = addr >> 8; - _usb_autovector[vector_number + 2] = addr & 0xff; - EA = t; -} - -/* - * Hook fifo/gpif interrupt vector. - * - * vector_number is from the FGV_ list. - * addr is the address of the interrupt service routine. - */ -void -hook_fgv (unsigned char vector_number, unsigned short addr) -{ - bit t; - - // sanity checks - - if (vector_number < FGV_MIN || vector_number > FGV_MAX) - return; - - if ((vector_number & 0x3) != 0) - return; - - t = EA; - EA = 0; - _fifo_gpif_autovector[vector_number] = LJMP_OPCODE; - _fifo_gpif_autovector[vector_number + 1] = addr >> 8; - _fifo_gpif_autovector[vector_number + 2] = addr & 0xff; - EA = t; -} - -/* - * One time call to enable autovectoring for both USB and FIFO/GPIF. - * - * This disables all USB and FIFO/GPIF interrupts and clears - * any pending interrupts too. It leaves the master USB and FIFO/GPIF - * interrupts enabled. - */ -void -setup_autovectors (void) -{ - // disable master usb and fifo/gpif interrupt enables - EIUSB = 0; - EIEX4 = 0; - - hook_sv (SV_INT_2, (unsigned short) _usb_autovector); - hook_sv (SV_INT_4, (unsigned short) _fifo_gpif_autovector); - - // disable all fifo interrupt enables - SYNCDELAY; - EP2FIFOIE = 0; SYNCDELAY; - EP4FIFOIE = 0; SYNCDELAY; - EP6FIFOIE = 0; SYNCDELAY; - EP8FIFOIE = 0; SYNCDELAY; - - // clear all pending fifo irqs - EP2FIFOIRQ = 0xff; SYNCDELAY; - EP4FIFOIRQ = 0xff; SYNCDELAY; - EP6FIFOIRQ = 0xff; SYNCDELAY; - EP8FIFOIRQ = 0xff; SYNCDELAY; - - IBNIE = 0; - IBNIRQ = 0xff; - NAKIE = 0; - NAKIRQ = 0xff; - USBIE = 0; - USBIRQ = 0xff; - EPIE = 0; - EPIRQ = 0xff; - SYNCDELAY; GPIFIE = 0; - SYNCDELAY; GPIFIRQ = 0xff; - USBERRIE = 0; - USBERRIRQ = 0xff; - CLRERRCNT = 0; - - INTSETUP = bmAV2EN | bmAV4EN | bmINT4IN; - - // clear master irq's for usb and fifo/gpif - EXIF &= ~bmEXIF_USBINT; - EXIF &= ~bmEXIF_IE4; - - // enable master usb and fifo/gpif interrrupts - EIUSB = 1; - EIEX4 = 1; -} Index: gecko3/trunk/gecko3com-fw/firmware/lib/i2c.c =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/lib/i2c.c (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/lib/i2c.c (nonexistent) @@ -1,122 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#include "i2c.h" -#include "fx2regs.h" -#include - -// issue a stop bus cycle and wait for completion - - -// returns non-zero if successful, else 0 -unsigned char -i2c_read (unsigned char addr, xdata unsigned char *buf, unsigned char len) -{ - volatile unsigned char junk; - - if (len == 0) // reading zero bytes always works - return 1; - - while (I2CS & bmSTOP) // wait for stop to clear - ; - - I2CS = bmSTART; - I2DAT = (addr << 1) | 1; // write address and direction (1's the read bit) - - while ((I2CS & bmDONE) == 0) - ; - - if ((I2CS & bmBERR) || (I2CS & bmACK) == 0) // no device answered... - goto fail; - - if (len == 1) - I2CS |= bmLASTRD; - - junk = I2DAT; // trigger the first read cycle - - while (--len != 0){ - while ((I2CS & bmDONE) == 0) - ; - - if (I2CS & bmBERR) - goto fail; - - if (len == 1) - I2CS |= bmLASTRD; - - *buf++ = I2DAT; // get data, trigger another read - } - - // wait for final byte - - while ((I2CS & bmDONE) == 0) - ; - - if (I2CS & bmBERR) - goto fail; - - I2CS |= bmSTOP; - *buf = I2DAT; - - return 1; - - fail: - I2CS |= bmSTOP; - return 0; -} - - - -// returns non-zero if successful, else 0 -unsigned char -i2c_write (unsigned char addr, xdata const unsigned char *buf, unsigned char len) -{ - while (I2CS & bmSTOP) // wait for stop to clear - ; - - I2CS = bmSTART; - I2DAT = (addr << 1) | 0; // write address and direction (0's the write bit) - - while ((I2CS & bmDONE) == 0) - ; - - if ((I2CS & bmBERR) || (I2CS & bmACK) == 0) // no device answered... - goto fail; - - while (len > 0){ - I2DAT = *buf++; - len--; - - while ((I2CS & bmDONE) == 0) - ; - - if ((I2CS & bmBERR) || (I2CS & bmACK) == 0) // no device answered... - goto fail; - } - - I2CS |= bmSTOP; - return 1; - - fail: - I2CS |= bmSTOP; - return 0; -} Index: gecko3/trunk/gecko3com-fw/firmware/lib/delay.c =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/lib/delay.c (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/lib/delay.c (nonexistent) @@ -1,76 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -/* - * Delay approximately 1 microsecond (including overhead in udelay). - */ -static void -udelay1 (void) _naked -{ - _asm ; lcall that got us here took 4 bus cycles - ret ; 4 bus cycles - _endasm; -} - -/* - * delay for approximately usecs microseconds - */ -void -udelay (unsigned char usecs) -{ - do { - udelay1 (); - } while (--usecs != 0); -} - - -/* - * Delay approximately 1 millisecond. - * We're running at 48 MHz, so we need 48,000 clock cycles. - * - * Note however, that each bus cycle takes 4 clock cycles (not obvious, - * but explains the factor of 4 problem below). - */ -static void -mdelay1 (void) _naked -{ - _asm - mov dptr,#(-1200 & 0xffff) -002$: - inc dptr ; 3 bus cycles - mov a, dpl ; 2 bus cycles - orl a, dph ; 2 bus cycles - jnz 002$ ; 3 bus cycles - - ret - _endasm; -} - -void -mdelay (unsigned int msecs) -{ - do { - mdelay1 (); - } while (--msecs != 0); -} - - Index: gecko3/trunk/gecko3com-fw/firmware/lib/fx2utils.c =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/lib/fx2utils.c (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/lib/fx2utils.c (nonexistent) @@ -1,54 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#include "fx2utils.h" -#include "fx2regs.h" -#include "delay.h" - -void -fx2_stall_ep0 (void) -{ - EP0CS |= bmEPSTALL; -} - -void -fx2_reset_data_toggle (unsigned char ep) -{ - TOGCTL = ((ep & 0x80) >> 3 | (ep & 0x0f)); - TOGCTL |= bmRESETTOGGLE; -} - -void -fx2_renumerate (void) -{ - USBCS |= bmDISCON | bmRENUM; - - // mdelay (1500); // FIXME why 1.5 seconds? - mdelay (250); // FIXME why 0.25 seconds? - - USBIRQ = 0xff; // clear any pending USB irqs... - EPIRQ = 0xff; // they're from before the renumeration - - EXIF &= ~bmEXIF_USBINT; - - USBCS &= ~bmDISCON; // reconnect USB -} Index: gecko3/trunk/gecko3com-fw/firmware/lib/timer.c =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/lib/timer.c (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/lib/timer.c (nonexistent) @@ -1,52 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -/************************************************************************/ -/** \file timer.c - ************************************************************************/ - -#include "timer.h" -#include "fx2regs.h" -#include "isr.h" - -/** - * Arrange to have isr_tick_handler called at 100 Hz. - * - * The cpu clock is running at 48e6. The input to the timer - * is 48e6 / 12 = 4e6. - * - * We arrange to have the timer overflow every 40000 clocks == 100 Hz - */ -#define RELOAD_VALUE ((unsigned short) -40000) - -void -hook_timer_tick (unsigned short isr_tick_handler) -{ - ET2 = 0; /* disable timer 2 interrupts */ - hook_sv (SV_TIMER_2, isr_tick_handler); - - RCAP2H = RELOAD_VALUE >> 8; /* setup the auto reload value */ - RCAP2L = RELOAD_VALUE; - - T2CON = 0x04; /* interrupt on overflow; reload; run */ - ET2 = 1; /* enable timer 2 interrupts */ -} Index: gecko3/trunk/gecko3com-fw/firmware/src/scpi_parser.c =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/src/scpi_parser.c (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/src/scpi_parser.c (nonexistent) @@ -1,421 +0,0 @@ -/* GECKO3COM - * - * Copyright (C) 2009 by - * ___ ____ _ _ - * ( _`\ ( __)( ) ( ) - * | (_) )| (_ | |_| | Berne University of Applied Sciences - * | _ <'| _) | _ | School of Engineering and - * | (_) )| | | | | | Information Technology - * (____/'(_) (_) (_) - * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/*********************************************************************/ -/** \file scpi_parser.c - ********************************************************************* - * \brief Parser for the SCPI commands. - * - * The supported commands are defined here in the parser. - * So if you would like to extend the known set of commands, - * you have to add them here. \n - * The parser excecutes the necessary Function(s) for the - * detected command or it sets the "action" enum - * variable to signal wich command was parsed. - * In these way this parser handles most IEEE488.2 and SCPI 1999.0 - * mandatory commands and SCPI 1999.0 itself. - * - * \note when used with USB 1.1 systems, the maximum command length - * you can define is limited to 52 characters because we only - * parse commands in the first packet. - * - * - * \author Christoph Zimmermann bfh.ch * \date 2009-02-04 - * -*/ - -#include -#include -#include - -#include "scpi_parser.h" -#include "usb_tmc.h" -#include "usb_descriptors.h" -#include "firmware_version.h" -#include "debugprint.h" - - -#define SCPI_VERSION "1999.0\n" /**< Version of the SCPI standard this device complies to */ - -#define MAXFILL 12 /**< Maximum length of the longest command, defines the buffer size of the parser */ - - -/** helper function to convert a unsigned byte to an ascii string - * - * \param[in] byte unsigned byte to convert - * \param[out] ascii string with "\n" at the end - * \return length of string - */ -static uint8_t byte2ascii(uint8_t byte, xdata unsigned char *ascii) { - idata unsigned char first_digit, second_digit, third_digit; - - first_digit = byte % 10; - byte -= first_digit; - byte /= 10; - second_digit = byte % 10; - if(second_digit == 0) { - ascii[0] = first_digit + '0'; - ascii[1] = '\n'; - return 2; - } - byte -= second_digit; - byte /= 10; - third_digit = byte % 10; - if(third_digit == 0) { - ascii[0] = second_digit + '0'; - ascii[1] = first_digit + '0'; - ascii[2] = '\n'; - return 3; - } - ascii[0] = third_digit + '0'; - ascii[1] = second_digit + '0'; - ascii[2] = first_digit + '0'; - ascii[3] = '\n'; - return 4; -} - -/** helper function to convert an ascii string to a unsigned byte - * - * \param[in] ascii string with '\n' or '\0' at the end - * \return byte result unsigned byte, 0 if case of error - */ -static uint8_t ascii2byte(const xdata unsigned char *ascii) { - idata uint8_t byte = 0, i = 0; - idata unsigned char local_char; - - for(i; i<4;i++) { - local_char = ascii[i]; - if(local_char >= '0' && local_char <= '9') { - byte = byte*10 + (local_char - '0'); - } - else if(local_char == '\n' || local_char == '\0') { - return byte; - } - else { - ieee488_status.EventStatusRegister |= bmEXECUTION_ERROR; - return 0; - } - } - - ieee488_status.EventStatusRegister |= bmEXECUTION_ERROR; - return 0; -} - - -/** helper function to copy unicode 16 chars from the usb descriptor to an - * ascii string to form the *idn? response - * - * \param[in] pointer to string to fill - * \param[in] pointer to usb string descriptor to read from - * \return pointer that points to the last character in the string (one before \0) - */ -static char* descr2string(char *target, const xdata char *descriptor) { - uint8_t i, j, descriptor_length; - - /* the first byte in the descriptor is the length, second byte is the type */ - descriptor_length = (uint8_t)descriptor[0] - 2; - descriptor_length >>= 1; - - for (i = 0; i < descriptor_length; i++){ - j = i << 1; - j += 2; - target[i] = descriptor[j]; - } - target[i+1] = '\0'; - - return &target[i]; -} - - -/* -------------------------------------------------------------------- */ -/** \brief SCPI command parser */ -int8_t scpi_scan(idata uint16_t *offset, xdata Scanner *s, xdata TMC_Response_Queue *queue){ - - xdata unsigned char buffer[MAXFILL]; - unsigned char *string_index; - uint8_t i; - char * xdata srcPtr = s->source; - xdata unsigned char * xdata bufferPtr = buffer; - - xdata uint16_t * xdata localqueuelength = &queue->length; - xdata uint8_t * xdata localqueue = queue->buf; - - srcPtr += *offset; - - for(i=0;ilength = byte2ascii(ieee488_status.EventStatusRegister,queue->buf); - IEEE488_set_mav(); - ieee488_status.EventStatusRegister = 0; - usb_tmc_state = TMC_STATE_IDLE; - return 1; - } - - if(!strncmp("idn?", bufferPtr, 4)) { - /** \li *idn?, identification query */ - string_index = descr2string((char*)queue->buf, \ - string_descriptors[(uint8_t)full_speed_device_descr[14]] \ - ); - *string_index = ','; - string_index++; - string_index = descr2string(string_index, \ - string_descriptors[(uint8_t)full_speed_device_descr[15]] \ - ); - *string_index = ','; - string_index++; - string_index = descr2string(string_index, \ - string_descriptors[(uint8_t)full_speed_device_descr[16]]\ - ); - - strcat((char*)queue->buf, ","); - strcat((char*)queue->buf, FIRMWARE_VERSION); - - queue->length = strlen((char*)queue->buf); - - usb_tmc_state = TMC_STATE_IDLE; - IEEE488_set_mav(); - return 1; - } - - if(!strncmp("opc", bufferPtr, 3)) { - bufferPtr += 3; - if(*bufferPtr == '?') { - /** \li *opc?, operation complete query */ - queue->buf[0] = '1'; - queue->buf[1] = '\n'; - queue->length = 2; - usb_tmc_state = TMC_STATE_IDLE; - IEEE488_set_mav(); - return 1; - } - else { - /** \li *opc, operation complete command */ - ieee488_status.OPC_Received = 1; - usb_tmc_state = TMC_STATE_IDLE; - return 1; - } - } - - if(!strncmp("rst", bufferPtr, 3)) { - /** \li *rst, reset command. resets the FPGA and connected modules */ - s->action = SYSTEM_RESET; - return 1; - } - - if(!strncmp("sre", bufferPtr, 3)) { - bufferPtr += 3; - if(*bufferPtr == ' ') { - /** \li *sre, service request enable command */ - ieee488_status.ServiceRequestEnable = ascii2byte(bufferPtr+1); - usb_tmc_state = TMC_STATE_IDLE; - return 1; - } - else if(*bufferPtr == '?') { - /** \li *sre?, service request enable query */ - queue->length = byte2ascii(ieee488_status.ServiceRequestEnable,queue->buf); - usb_tmc_state = TMC_STATE_IDLE; - return 1; - } - else { - return 0; - } - } - - if(!strncmp("stb?", bufferPtr, 4)) { - /** \li *stb?, read status byte query */ - queue->length = byte2ascii(IEEE488_status_query(&ieee488_status),queue->buf); - usb_tmc_state = TMC_STATE_IDLE; - IEEE488_set_mav(); - return 1; - } - - if(!strncmp("wai", bufferPtr, 3)) { - /** \li *wai, wait-to-continue command */ - /* we excecute only sequential commands, so we are always finished */ - return 1; - } - - else { - return 0; - } - } - - /* -------------------------------------------------------------------- */ - /* this set of regular expressions are for the mandatory SCPI 99 commands. - * many are missing because we have not enought memory - */ - if(!strncmp("syst:", bufferPtr, 5)) { - bufferPtr += 5; - - if(!strncmp("err?", bufferPtr, 4)) { - /** \li syst:err?, gets an error message if there is one */ - if(ieee488_status.EventStatusRegister & bmCOMMAND_ERROR){ - strcpy((char*)queue->buf, "-100, \"Command error\"\n"); - queue->length = 22; - ieee488_status.EventStatusRegister &= ~bmCOMMAND_ERROR; - } - else if(ieee488_status.EventStatusRegister & bmEXECUTION_ERROR){ - strcpy((char*)queue->buf, "-200, \"Execution error\"\n"); - queue->length = 24; - ieee488_status.EventStatusRegister &= ~bmEXECUTION_ERROR; - } - else { - strcpy((char*)queue->buf, "0, \"No error\"\n"); - queue->length = 14; - } - usb_tmc_state = TMC_STATE_IDLE; - IEEE488_set_mav(); - return 1; - } - - if(!strncmp("vers?", bufferPtr, 5)) { - /** \li syst:vers?, returns the SCPI standard version number */ - strcpy((char*)queue->buf, SCPI_VERSION); - queue->length = 7; - usb_tmc_state = TMC_STATE_IDLE; - IEEE488_set_mav(); - return 1; - } - - else { - return 0; - } - } - - /* -------------------------------------------------------------------- */ - /* this set of regular expressions are for the device functions */ - if(!strncmp("fpga:", bufferPtr, 5)) { - bufferPtr += 5; - - if(!strncmp("conf ", bufferPtr, 5)) { - /** \li fpga:conf, configures the fpga with the following bitfile */ - s->action = FPGA_CONFIGURE; - *offset += 10; - return 1; - } - - if(!strncmp("type?", bufferPtr, 5)) { - /** \li fpga:type?, returns the fpga type as string */ - s->action = rqFPGA_TYPE; - *offset += 10; - return 1; - } - - if(!strncmp("id?", bufferPtr, 3)) { - /** \li fpga:id?, returns the jtag id code of the fpga as 32bit int */ - s->action = rqFPGA_IDCODE; - *offset += 8; - return 1; - } - - if(!strncmp("done?", bufferPtr, 5)) { - /** \li fpga:done?, is true when the fpga is configured */ - s->action = rqFPGA_DONE; - *offset += 10; - return 1; - } - - if(!strncmp("data", bufferPtr, 4)) { - /** \li fpga:data, context switch to fpga. After this command you - * communicate directly with the fpga. The GECKO3COM firmware does - * not interprete the SCPI commands anymore. */ - s->action = FPGA_COMMUNICATION; - *offset += 9; - return 1; - } - - else { - return 0; - } - } - - if(!strncmp("mem:", bufferPtr, 4)) { - bufferPtr += 4; - - if(!strncmp("data ", bufferPtr, 5)) { - /** \li mem:data, receives a bitfile to store in SPI flash. - * available memory slots are 0 and 1 */ - s->action = SPI_WRITE; - *offset += 9; - - return 1; - } - - if(!strncmp("del ", bufferPtr, 4)) { - /** \li mem:del, DEPRICATED deletes the desired fpga configuration, - * available memory slots are 0 and 1 */ - s->action = SPI_DELETE; - *offset += 8; - - return 1; - } - - else { - return 0; - } - } - - /* matches all. when no command is parsed return an error */ - - return 0; -} - Index: gecko3/trunk/gecko3com-fw/firmware/src/build_eeprom.py =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/src/build_eeprom.py (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/src/build_eeprom.py (nonexistent) @@ -1,182 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2004,2006 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -import re -import sys -import os, os.path -from optparse import OptionParser - -# USB Vendor and Product ID's - -VID = 0xfffe # Free Software Folks -PID = 0x0002 # Universal Software Radio Peripheral - - -def hex_to_bytes (s): - if len (s) & 0x1: - raise ValueError, "Length must be even" - r = [] - for i in range (0, len(s), 2): - r.append (int (s[i:i+2], 16)) - return r - -def msb (x): - return (x >> 8) & 0xff - -def lsb (x): - return x & 0xff - -class ihx_rec (object): - def __init__ (self, addr, type, data): - self.addr = addr - self.type = type - self.data = data - -class ihx_file (object): - def __init__ (self): - self.pat = re.compile (r':[0-9A-F]{10,}') - def read (self, file): - r = [] - for line in file: - line = line.strip().upper () - if not self.pat.match (line): - raise ValueError, "Invalid hex record format" - bytes = hex_to_bytes (line[1:]) - sum = reduce (lambda x, y: x + y, bytes, 0) % 256 - if sum != 0: - raise ValueError, "Bad hex checksum" - lenx = bytes[0] - addr = (bytes[1] << 8) + bytes[2] - type = bytes[3] - data = bytes[4:-1] - if lenx != len (data): - raise ValueError, "Invalid hex record (bad length)" - if type != 0: - break; - r.append (ihx_rec (addr, type, data)) - - return r - -def get_code (filename): - """Read the intel hex format file FILENAME and return a tuple - of the code starting address and a list of bytes to load there. - """ - f = open (filename, 'r') - ifx = ihx_file () - r = ifx.read (f) - r.sort (lambda a,b: a.addr - b.addr) - code_start = r[0].addr - code_end = r[-1].addr + len (r[-1].data) - code_len = code_end - code_start - code = [0] * code_len - for x in r: - a = x.addr - l = len (x.data) - code[a-code_start:a-code_start+l] = x.data - return (code_start, code) - - -def build_eeprom_image (filename, rev): - """Build a ``C2 Load'' EEPROM image. - - For details on this format, see section 3.4.3 of - the EZ-USB FX2 Technical Reference Manual - """ - # get the code we want to run - (start_addr, bytes) = get_code (filename) - - devid = rev - - rom_header = [ - 0xC2, # boot from EEPROM - lsb (VID), - msb (VID), - lsb (PID), - msb (PID), - lsb (devid), - msb (devid), - 0 # configuration byte - ] - - # 4 byte header that indicates where to load - # the immediately follow code bytes. - code_header = [ - msb (len (bytes)), - lsb (len (bytes)), - msb (start_addr), - lsb (start_addr) - ] - - # writes 0 to CPUCS reg (brings FX2 out of reset) - trailer = [ - 0x80, - 0x01, - 0xe6, - 0x00, - 0x00 - ] - - image = rom_header + code_header + bytes + trailer - - assert (len (image) <= 256) - return image - -def build_shell_script (out, ihx_filename, rev): - - image = build_eeprom_image (ihx_filename, rev) - - out.write ('#!/bin/sh\n') - out.write ('usrper -x load_firmware /usr/local/share/usrp/rev%d/std.ihx\n' % rev) - out.write ('sleep 1\n') - - # print "len(image) =", len(image) - - i2c_addr = 0x50 - rom_addr = 0x00 - - hex_image = map (lambda x : "%02x" % (x,), image) - - while (len (hex_image) > 0): - l = min (len (hex_image), 16) - out.write ('usrper i2c_write 0x%02x %02x%s\n' % - (i2c_addr, rom_addr, ''.join (hex_image[0:l]))) - hex_image = hex_image[l:] - rom_addr = rom_addr + l - out.write ('sleep 1\n') - -if __name__ == '__main__': - usage = "usage: %prog -r REV [options] bootfile.ihx" - parser = OptionParser (usage=usage) - parser.add_option ("-r", "--rev", type="int", default=-1, - help="Specify USRP revision number REV (2 or 4)") - (options, args) = parser.parse_args () - if len (args) != 1: - parser.print_help () - sys.exit (1) - if options.rev < 0: - sys.stderr.write ( - "You must specify the USRP revision number (2 or 4) with -r REV\n") - sys.exit (1) - - ihx_filename = args[0] - - build_shell_script (sys.stdout, ihx_filename, options.rev) Index: gecko3/trunk/gecko3com-fw/firmware/src/fpga_load.c =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/src/fpga_load.c (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/src/fpga_load.c (nonexistent) @@ -1,409 +0,0 @@ -/* GECKO3COM - * - * Copyright (C) 2008 by - * ___ ____ _ _ - * ( _`\ ( __)( ) ( ) - * | (_) )| (_ | |_| | Bern University of Applied Sciences - * | _ <'| _) | _ | School of Engineering and - * | (_) )| | | | | | Information Technology - * (____/'(_) (_) (_) - * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/*********************************************************************/ -/** \file fpga_load.c - ********************************************************************* - * \brief functions to programm an FPGA - * - * These functions handle the bit file for an Xilinx Spartan3 - * FPGA and programm it in parallel slave mode. - * - * \note Currently only Xilinx FPGA's are supported, function stubs - * to handle Altera are provided as a guide for porting. - * - * \author GNUradio team, Matthias Zurbrügg bfh.ch, - * Christoph Zimmermann bfh.ch - * \date 2009-1-13 - * -*/ - -#include "gecko3com_common.h" -#include "gecko3com_regs.h" -#include "fpga_load.h" -#include "delay.h" -#include "debugprint.h" - -/* ------------------------------------------------------------------------- */ -/* Xilinx stuff. We use slave parallel mode (select map) to configure the FPGA - */ -#ifdef XILINX - -/** makro to toggle the configuration clock line */ -#define toggle_cclk() { \ - XILINX_CCLK &= ~bmXILINX_CCLK; /* bring CCLK low */ \ - XILINX_CCLK |= bmXILINX_CCLK; /* bring CCLK high */ \ -} - - -void init_fpga_interface(void) { - - /* IFCLK is generated internally and runs at 48 MHz; IO Pins configured as normal Ports */ - //IFCONFIG = bmIFCLKSRC | bm3048MHZ | bmIFCLKOE; - IFCONFIG = bmIFCLKSRC | bmIFCLKOE; - SYNCDELAY; -} - - -int8_t fpga_scan_file(const xdata unsigned char *p, idata uint16_t *offset, \ - idata uint16_t *length, xdata Fpga_Info* info) -{ - idata uint8_t string_length = 0, chars_left_to_read = 0; - xdata uint16_t local_position = *offset; - - for(local_position; local_position < *length; local_position++) { - //printf_tiny("fi: %d\n",local_position); - /* information found, copy data to output array */ - if(chars_left_to_read < string_length) { - info->info[chars_left_to_read++] = p[local_position]; - - /* end of information, return successfull */ - if(chars_left_to_read == string_length) { - info->position = local_position; - *offset = local_position+1; - return FPGA_INFO_COMPLETE; - } - else { - continue; /* ignore rest of these loop, load next character */ - } - } - - /* search for the start of the desired type of information */ - if(chars_left_to_read == 0 && p[local_position] == info->type){ - chars_left_to_read = 1; - continue; /* ignore rest of these loop, load next character */ - } - - /* start character found, check next character if it is \0 */ - if(chars_left_to_read == 1) { - if(p[local_position] == 0) { - chars_left_to_read = 2; - - } - else { - /* false alert, continue searching */ - chars_left_to_read = 0; - } - continue; /* ignore rest of these loop, load next character */ - } - - /* start of information found, copy length of following string */ - if(chars_left_to_read == 2) { - chars_left_to_read = 0; - - if(p[local_position] > FPGA_INFO_LEN) { - string_length = FPGA_INFO_LEN; - } - else { - string_length = p[local_position]; - } - - /* exception: file length has a fixed length */ - if(info->type == FILE_LENGTH) { - string_length = 3; - chars_left_to_read = 1; - info->info[0] = p[local_position]; - } - } - - /* end of for loop. nothing found yet, load next character */ - } - - - /* end of packet reached, no info found or not finished copying string */ - info->position = local_position; - *offset = local_position; - return FPGA_INFO_NOT_COMPLETE; -} - - -uint8_t fpga_load_begin(void) -{ - idata uint8_t i; - - /* enable autopointer 0 */ - AUTOPTRSETUP = bmAPTREN | bmAPTR1INC; - - /* CS_B, RDWR_B should be high after board initialization - * but when something went wrong during fpga config the state is unknown */ - if(!(XILINX_CS_B | bmXILINX_CS_B) || !(XILINX_RDWR_B | bmXILINX_RDWR_B)) { - /* bring first RDWR_B high to signal ABORT to the FPGA */ - XILINX_RDWR_B |= bmXILINX_RDWR_B; - - /* toggle CCLK four times more to complete the abort sequenze */ - for(i=0; i<4; i++) { - toggle_cclk(); - } - XILINX_CS_B |= bmXILINX_CS_B; - } - - /* bring Prog_B low brings the device in the initalisation mode */ - XILINX_PROG_B &= ~bmXILINX_PROG_B; - udelay(100); // and hold it there - - /* bring Prog_B bit high */ - XILINX_PROG_B |= bmXILINX_PROG_B; - - /* if Init_B goes high the device is in the configuration load mode */ - for(i=0;i<50;i++) { - if(XILINX_INIT_B & bmXILINX_INIT_B) { - //if(1) { /* this line is needed for LA tests, uncomment this and comment the line befor */ - - /* bring CS_B, RDWR_B low */ - XILINX_RDWR_B &= ~bmXILINX_RDWR_B; - XILINX_CS_B &= ~bmXILINX_CS_B; - - return 1; - } - mdelay(1); - } - - /* FPGA not ready to configure */ - return 0; -} - - -uint8_t fpga_load_xfer(xdata unsigned char *p, idata uint16_t *offset, \ - idata uint16_t *bytecount) -{ - idata uint16_t local_count; - uint8_t local_data; - - //printf_tiny("off %d ",local_count); - //printf_tiny("c %d\n",*bytecount); - - local_count = *offset; - - /* setup autopointer source adress from parameter p and the offset */ - AUTOPTRH1 = ((uintptr_t)p >> 8); - AUTOPTRL1 = ((uintptr_t)p & 0xFF); - AUTOPTRH1 += (local_count >> 8); - AUTOPTRL1 += (local_count & 0xFF); - - /* setup a for loop to send the data to the fpga data port */ - for(local_count; local_count < *bytecount; local_count++ ) { - //XILINX_DATA = AUTODAT1; // drive Data Port with data - local_data = AUTODAT1; - XILINX_DATA = local_data; - - toggle_cclk(); - - //printf_tiny("0x%x ",local_data); - - /* no need for us because we are way to slow that a busy occours */ - /* loop while busy is true */ - /*while((XILINX_BUSY & bmXILINX_BUSY) == bmXILINX_BUSY) { - // if FPGA busy, toggle CCLK - toggle_cclk(); - } - */ - } - - *offset += *bytecount; - return 1; -} - - -/* - * check for successful load... - */ -uint8_t -fpga_load_end(void) -{ - idata uint8_t i; - - /* toggle CCLK four times more to complete the startup sequenze */ - for(i=0; i<4; i++) { - toggle_cclk(); - } - - /* bring CS_B, RDWR_B high */ - XILINX_CS_B |= bmXILINX_CS_B; - XILINX_RDWR_B |= bmXILINX_RDWR_B; - - if(!fpga_done()) { - /* if not DONE, an error occoured during configuration */ - print_err("fin.\n"); - return 0; - } - - return 1; -} -#endif /* XILINX */ - - -/* ------------------------------------------------------------------------- */ -/* Altera stuff. only copied from USRP source code. does not work. only a - * guide to give you a start to port GECKO3COM to other boards using Altera - * devices - */ - -#ifdef ALTERA -/* - * setup altera FPGA serial load (PS). - * - * On entry: - * don't care - * - * On exit: - * ALTERA_DCLK = 0 - * ALTERA_NCONFIG = 1 - * ALTERA_NSTATUS = 1 (input) - */ -uint8_t -fpga_load_begin(void) -{ - ALTERA_CONFIG &= ~bmALTERA_BITS; // clear all bits (NCONFIG low) - udelay (40); // wait 40 us - ALTERA_CONFIG |= bmALTERA_NCONFIG; // set NCONFIG high - - if (UC_BOARD_HAS_FPGA){ - // FIXME should really cap this loop with a counter so we - // don't hang forever on a hardware failure. - while ((USRP_ALTERA_CONFIG & bmALTERA_NSTATUS) == 0) // wait for NSTATUS to go high - ; - } - - // ready to xfer now - - return 1; -} - -/* - * clock out the low bit of bits. - * - * On entry: - * ALTERA_DCLK = 0 - * ALTERA_NCONFIG = 1 - * ALTERA_NSTATUS = 1 (input) - * - * On exit: - * ALTERA_DCLK = 0 - * ALTERA_NCONFIG = 1 - * ALTERA_NSTATUS = 1 (input) - */ - -static void -clock_out_config_byte(const uint8_t bits) _naked -{ - _asm - mov a, dpl - - rrc a - mov _bitALTERA_DATA0,c - setb _bitALTERA_DCLK - clr _bitALTERA_DCLK - - rrc a - mov _bitALTERA_DATA0,c - setb _bitALTERA_DCLK - clr _bitALTERA_DCLK - - rrc a - mov _bitALTERA_DATA0,c - setb _bitALTERA_DCLK - clr _bitALTERA_DCLK - - rrc a - mov _bitALTERA_DATA0,c - setb _bitALTERA_DCLK - clr _bitALTERA_DCLK - - rrc a - mov _bitALTERA_DATA0,c - setb _bitALTERA_DCLK - clr _bitALTERA_DCLK - - rrc a - mov _bitALTERA_DATA0,c - setb _bitALTERA_DCLK - clr _bitALTERA_DCLK - - rrc a - mov _bitALTERA_DATA0,c - setb _bitALTERA_DCLK - clr _bitALTERA_DCLK - - rrc a - mov _bitALTERA_DATA0,c - setb _bitALTERA_DCLK - clr _bitALTERA_DCLK - - ret - - _endasm; -} - -static void -clock_out_bytes(const uint8_t bytecount, - uint8_t xdata *p) -{ - while (bytecount-- > 0) - clock_out_config_byte (*p++); -} - -/* - * Transfer block of bytes from packet to FPGA serial configuration port - * - * On entry: - * ALTERA_DCLK = 0 - * ALTERA_NCONFIG = 1 - * ALTERA_NSTATUS = 1 (input) - * - * On exit: - * ALTERA_DCLK = 0 - * ALTERA_NCONFIG = 1 - * ALTERA_NSTATUS = 1 (input) - */ -uint8_t -fpga_load_xfer(const xdata uint8_t *p, const uint8_t bytecount) -{ - clock_out_bytes (bytecount, p); - return 1; -} - -/* - * check for successful load... - */ -uint8_t -fpga_load_end(void) -{ - uint8_t status = ALTERA_CONFIG; - - if (!UC_BOARD_HAS_FPGA) // always true if we don't have FPGA - return 1; - - if ((status & bmALTERA_NSTATUS) == 0) // failed to program - return 0; - - if ((status & bmALTERA_CONF_DONE) == bmALTERA_CONF_DONE) - return 1; // everything's cool - - // I don't think this should happen. It indicates that - // programming is still in progress. - - return 0; -} - -#endif /* ALTERA */ Index: gecko3/trunk/gecko3com-fw/firmware/src/gecko3com_main.c =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/src/gecko3com_main.c (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/src/gecko3com_main.c (nonexistent) @@ -1,992 +0,0 @@ -/* GECKO3COM - * - * Copyright (C) 2008 by - * ___ ____ _ _ - * ( _`\ ( __)( ) ( ) - * | (_) )| (_ | |_| | Bern University of Applied Sciences - * | _ <'| _) | _ | School of Engineering and - * | (_) )| | | | | | Information Technology - * (____/'(_) (_) (_) - * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/*********************************************************************/ -/** \file gecko3com_main.c - ********************************************************************* - * \brief main file for the GECKO3COM project - * - * \author Christoph Zimmermann bfh.ch - * \date 2009-1-22 - * -*/ - -/** enable DFU class support */ -#define USB_DFU_SUPPORT - -#include -#include - -#include "fx2utils.h" -#include "timer.h" -#include "spi_flash.h" -#include "i2c.h" -#include "isr.h" -#include "eeprom_io.h" -#include "delay.h" - -#include "gecko3com_i2c.h" -#include "gecko3com_spi.h" -#include "gecko3com_common.h" -#include "gecko3com_interfaces.h" -#include "gecko3com_commands.h" -#include "fpga_load.h" - -#include "gecko3com_gpif.h" -#include "gpif_data.h" - -#include "usb_common.h" -#include "usb_requests.h" -#include "usb_descriptors.h" -#include "usb_dfu.h" -#include "usb_tmc.h" -#include "scpi_parser.h" - -#include "firmware_version.h" -#include "debugprint.h" -#ifdef DEBUG_LEVEL_ERROR -#include "ser.h" -#endif - -/* -------------------------------------------------------------------- */ - -#define WATCHDOG_TIME 100 /**< time until the watchdog times out, 100 equals 1 second */ - -/* Global variables */ -volatile uint8_t watchdog_count = WATCHDOG_TIME; -idata int32_t file_size; -xdata uint32_t flash_adress; -xdata unsigned char *buffer; -xdata TMC_Response_Queue response_queue; - - -/** \brief with executing this function, we confirm that we handled the - * endpoint 0 data and that we are ready to get new data (rearm the endpoint). - */ -static void get_ep0_data (void) -{ - EP0BCL = 0; /* arm EP0 for OUT xfer. This sets the busy bit */ - - while (EP0CS & bmEPBUSY) /* wait for busy to clear */ - ; -} - - -/* - * enable debug output through the serial uart - */ -#ifdef DEBUG_LEVEL_ERROR - -/** \brief simple wraper to provide putchar function over serial line */ -void putchar (char p) -{ - ser_putc((unsigned char) p); -} - - -/** \brief simple wraper to provide getchar function over serial line */ -char getchar (void) -{ - return (char) ser_getc(); -} -#endif - - -#ifdef USB_DFU_SUPPORT -/** \brief this function writes the new firmware data in endpoint 0 to the I2C eeprom - * \note this function is only available when the DFU (device firware upgrade) class - * support is enabled. - */ -uint8_t app_firmware_write (void) -{ - static uint16_t eeprom_offset; - - get_ep0_data(); - - if(usb_dfu_state == DFU_STATE_dfuIDLE){ - eeprom_offset = 0; - } - - // if(!eeprom_write(I2C_ADDR_BOOT, eeprom_offset, EP0BUF, wLengthL)){ - if(!eeprom_write(eeprom_offset, EP0BUF, wLengthL)){ - usb_dfu_status = DFU_STATUS_errWRITE; - return 0; - } - - eeprom_offset += wLengthL; - return 1; -} -#endif - - -/** \brief analyze the header from the fpga configuration file and compares the - * the fpga type with the on board fpga and returs the configuration file size. - * - * \param[in] xdata unsigned char *buffer pointer to the buffer to read from - * (normally endpoint buffer) - * \param[in] idata uint16_t *offset pointer to the offset, buffer[offset] - * is the current position, anything before this is already consumed. - * \param[in] idata uint16_t *byte_count pointer to the length of the whole - * buffer. - * \return returns non-zero if successful, else 0 - */ -uint8_t app_check_fpga_type_from_header(/*xdata unsigned char *buffer,*/ \ - idata uint16_t *offset, \ - idata uint16_t *byte_count) -{ - static xdata Fpga_Info fpga_file_header; - xdata char fpga_type[FPGA_TYPE_LEN]; - static int8_t continue_analyse; - - /* check if this is the first attempt to analyse the bit file header*/ - if(usb_tmc_transfer.new_transfer == NEWTRANSFER) { - continue_analyse = 0; - fpga_file_header.type = FPGA_TYPE; - } - - /* first value to read from the header file is the fpga type */ - if(fpga_file_header.type == FPGA_TYPE){ - if(fpga_scan_file(buffer, offset, byte_count, &fpga_file_header) \ - == FPGA_INFO_COMPLETE) { - - /* compare fpga type from header with value in eeprom */ - if(!eeprom_read(FPGA_TYPE_OFFSET, fpga_type, FPGA_TYPE_LEN)){ - return 0; - } - - if(strncmp(fpga_file_header.info, fpga_type, FPGA_TYPE_LEN)) { - //print_err("!FPGA\n"); - return 0; - } - - /* next value to read from the header is the file length */ - fpga_file_header.type = FILE_LENGTH; - continue_analyse = FPGA_INFO_COMPLETE; - } - else { - continue_analyse = FPGA_INFO_NOT_COMPLETE; - } - } - - /* second value to read from the header file is the file length */ - if(fpga_file_header.type == FILE_LENGTH){ - if(fpga_scan_file(buffer, offset, byte_count, &fpga_file_header) \ - == FPGA_INFO_COMPLETE) { - - ((uint8_t*)&file_size)[0] = fpga_file_header.info[2]; - ((uint8_t*)&file_size)[1] = fpga_file_header.info[1]; - ((uint8_t*)&file_size)[2] = fpga_file_header.info[0]; - ((uint8_t*)&file_size)[3] = 0; - - continue_analyse = FPGA_INFO_COMPLETE; - } - else { - continue_analyse = FPGA_INFO_NOT_COMPLETE; - } - } - - /* adjust the offset and byte_count variables to point to the - * binary data after the header */ - usb_tmc_transfer.transfer_size += USB_TMC_HEADER_SIZE; - usb_tmc_transfer.transfer_size -= *offset; - - return continue_analyse; -} - - -/** \brief function to configure an fpga with data from usb - * - * \param[in] xdata unsigned char *buffer pointer to the buffer to read from - * (normally endpoint buffer) - * \param[in] idata uint16_t *offset pointer to the offset, buffer[offset] - * is the current position, anything before this is already consumed. - * \param[in] idata uint16_t *byte_count pointer to the length of the whole - * buffer. - * \return returns non-zero if successful, else 0 - */ -uint8_t app_configure_fpga(/* xdata unsigned char *buffer,*/ \ - idata uint16_t *offset, \ - idata uint16_t *byte_count) -{ - /* Is this the first part of configuration? */ - if(usb_tmc_transfer.nbytes_rxd == 0) { - /* setup all stuff */ - file_size = 0; - } - - /* do we still analyze the file header? */ - if(file_size == 0) { - if(!app_check_fpga_type_from_header(offset, byte_count)) { - return 0; - } - - /* are we now finished analyzing? */ - if(file_size != 0) { - /* if yes, intialize fpga for configuration */ - //print_info("begin\n"); - fpga_load_begin(); - } - } - - /* anything ready, transfer data to fpga */ - if(file_size != 0) { - /* transmitt config data to fpga */ - usb_tmc_transfer.transfer_size -= *byte_count; - usb_tmc_transfer.transfer_size += *offset; - file_size -= *byte_count; - file_size += *offset; - - fpga_load_xfer(buffer, offset, byte_count); - - //printf_tiny("buffer[0], %d\n",buffer[0]); - - /* transfer finished, finishing configuration */ - if(file_size == 0) { - if(!fpga_load_end()) { - return 0; - } - usb_tmc_state = TMC_STATE_IDLE; - } - } - - return 1; -} - - -/** \brief function to write an fpga configuration from usb to the spi flash - * - * \detail The SPI flash is big enough to hold store two different fpga - * configuration files. To handle this, we split the SPI flash address - * space simply at the half. \n - * The data structure in the SPI flash is really simple:\n - * \li 32bit file size value (little endian, as used by the fx2) - * \li binary data from the fpga configuration file - * - * \param[in] xdata unsigned char *buffer pointer to the buffer to read from - * (normally endpoint buffer) - * \param[in] idata uint16_t *offset pointer to the offset, buffer[offset] - * is the current position, anything before this is already consumed. - * \param[in] idata uint16_t *byte_count pointer to the length of the whole - * buffer. - * \return returns non-zero if successful, else 0 - */ -uint8_t app_write_conf_to_flash(/* xdata unsigned char *buffer,*/ \ - idata uint16_t *offset, \ - idata uint16_t *byte_count) -{ - idata uint16_t length; - xdata uint32_t local_uint32_var; - xdata unsigned char *local_buffer_ptr; - - /* Is this the first part of configuration? */ - if(usb_tmc_transfer.nbytes_rxd == 0) { - /* setup all stuff */ - file_size = 0; - - /* select which file slot we have to delete */ - if(buffer[*offset] == '0') { - flash_adress = START_ADRESS_SLOT0; - } - else if(buffer[*offset] == '1'){ - flash_adress = START_ADRESS_SLOT1; - } - else { - //print_err("slot\n"); - ieee488_status.EventStatusRegister |= bmCOMMAND_ERROR; - usb_tmc_state = TMC_STATE_IDLE; - return 0; - } - - *offset += 2; - } - - /* do we still analyze the file header? */ - if(file_size == 0) { - if(!app_check_fpga_type_from_header(offset, byte_count)) { - return 0; - } - - /* are we now finished analyzing? */ - if(file_size != 0) { - /* if yes, write file size information to the SPI flash */ - //print_info("begin\n"); - spiflash_erase(&flash_dr, &flash_adress); - local_uint32_var = file_size; - spiflash_write(&flash_dr, &flash_adress, (uint8_t*)&local_uint32_var, \ - sizeof(file_size)); - } - } - - /* anything ready, write data to the SPI flash */ - if(file_size != 0) { - //printf_tiny("off: %d\n",*offset); - //printf_tiny("ad: %x,",((uint8_t*)&flash_adress)[3]); - //printf_tiny("%x,",((uint8_t*)&flash_adress)[2]); - //printf_tiny("%x,",((uint8_t*)&flash_adress)[1]); - //printf_tiny("%x\n",((uint8_t*)&flash_adress)[0]); - - - length = *byte_count - *offset; - - /* check if we have data to be written to the next flash sector: */ - local_uint32_var = flash_adress + *byte_count; - if(sectorStart(local_uint32_var) != sectorStart(flash_adress)) { - /* before we can write to the next flash sector, we have to erase it */ - spiflash_erase(&flash_dr, &local_uint32_var); - } - - /* write data to the SPI flash */ - local_buffer_ptr = buffer; - local_buffer_ptr += *offset; - spiflash_write(&flash_dr, &flash_adress, local_buffer_ptr, length); - - /* adjust the file- and transfersize */ - usb_tmc_transfer.transfer_size -= length; - file_size -= length; - - //printf_tiny("le, %d\n",length); - - /* if transfer finished, back to TMC idle state */ - if(file_size <= 0) { - file_size = 0; - usb_tmc_state = TMC_STATE_IDLE; - } - } - - return 1; -} - - -/** \brief erases the desired file slot in spi flash - * \detail send the erase command for one spi flash memory block and loop - * through the main_loop untill we finished erasing the whole fpga - * configuration file slot. - * - * \param[in] xdata unsigned char *buffer pointer to the buffer to read from - * (normally endpoint buffer) - * \param[in] idata uint16_t *offset pointer to the offset, buffer[offset] - * is the current position, anything before this is already consumed. - * \return returns non-zero if successful, else 0 - * - * \todo uncomment this function after finishing debuging, else no space left! - */ -uint8_t app_gecko3com_flash_delete(/* uint8_t *buffer,*/ idata uint16_t *offset) { - - xdata uint32_t flash_adress; - xdata uint32_t local_uint32_var; - char slot; - - /* send the delete command for each block and loop through the main_loop */ - /* check busy and set usb_tmc_state back to idle when finished file delete */ - if(usb_tmc_transfer.new_transfer == NEWTRANSFER) { - //print_info("new\n"); - - /* select which file slot we have to delete */ - slot = buffer[*offset]; - if(slot == '0') { - flash_adress = START_ADRESS_SLOT0; - } - else if(slot == '1'){ - flash_adress = START_ADRESS_SLOT1; - } - else { - //print_err("del\n"); - ieee488_status.EventStatusRegister |= bmCOMMAND_ERROR; - usb_tmc_state = TMC_STATE_IDLE; - return 0; - } - } - - /* to "delete" means to set the file_size at the beginning of the confguration - file slot to zero */ - local_uint32_var = 0; - spiflash_write(&flash_dr, &flash_adress, (uint8_t*)&local_uint32_var,4); - usb_tmc_state = TMC_STATE_IDLE; - - return 1; -} - - -/** \brief Handle the class commands on endpoint 0. - * - * \return If we handle this one, return non-zero. - */ -unsigned char app_class_cmd (void) -{ -#ifdef USB_DFU_SUPPORT - if (usb_dfu_request()){ - if(!usb_handle_dfu_packet()){ - //print_err("dfu request\n"); - return 0; - } - } - - else -#endif - if (usb_tmc_request()){ - if(!usb_handle_tmc_packet()){ - //print_err("tmc request\n"); - return 0; - } - } - else { - //print_err("invalid class request\n"); - return 0; /* invalid class request */ - } - - return 1; -} - - -/** \brief Handle our "Vendor Extension" commands on endpoint 0. - * - * \return If we handle this one, return non-zero. - */ -unsigned char app_vendor_cmd (void) -{ - /* vendor commands are only used after production - * starting with firmware version 0.4 we remove the vendor commands - * to save memory for more importand functions! - - if (bRequestType == VRT_VENDOR_IN){ */ - /********************************* - * handle the IN requests - ********************************/ - /* - switch (bRequest){ - - default: - return 0; - } - } - - else if (bRequestType == VRT_VENDOR_OUT){ */ - /*********************************** - * handle the OUT requests - **********************************/ - /* - switch (bRequest){ - case VRQ_SET_SERIAL: - get_ep0_data(); - if(wLengthL > SERIAL_NO_LEN){ - return 0; - } - if(!eeprom_write(I2C_ADDR_BOOT, SERIAL_NO_OFFSET, EP0BUF, wLengthL)){ - return 0; - } - break; - - case VRQ_SET_HW_REV: - get_ep0_data(); - if(!eeprom_write(I2C_ADDR_BOOT, HW_REV_OFFSET, EP0BUF, 1)){ - return 0; - } - break; - - case VRQ_SET_FPGA_TYPE: - get_ep0_data(); - if(wLengthL > FPGA_TYPE_LEN){ - return 0; - } - if(!eeprom_write(I2C_ADDR_BOOT, FPGA_TYPE_OFFSET, EP0BUF, wLengthL)){ - return 0; - } - break; - - case VRQ_SET_FPGA_IDCODE: - get_ep0_data(); - if(!eeprom_write(I2C_ADDR_BOOT, FPGA_IDCODE_OFFSET, EP0BUF, FPGA_IDCODE_LEN)){ - return 0; - } - break; - - default: - return 0; - - } - } - - else */ - return 0; /* invalid bRequestType */ - - //return 1; -} - - -/** \brief Read h/w rev code and serial number out of boot eeprom and - * patch the usb descriptors with these values. - */ -void patch_usb_descriptors(void) -{ - xdata uint8_t hw_rev; - xdata unsigned char serial_no[SERIAL_NO_LEN]; - unsigned char ch; - uint8_t i,j; - - /* hardware revision */ - eeprom_read(HW_REV_OFFSET, &hw_rev, 1); /* LSB of device id */ - usb_desc_hw_rev_binary_patch_location_0[0] = hw_rev; - usb_desc_hw_rev_binary_patch_location_1[0] = hw_rev; - - /* serial number */ - eeprom_read(SERIAL_NO_OFFSET, serial_no, SERIAL_NO_LEN); - - for (i = 0; i < SERIAL_NO_LEN; i++){ - ch = serial_no[i]; - if (ch == 0xff) /* make unprogrammed EEPROM default to '0' */ - ch = '0'; - - j = i << 1; - usb_desc_serial_number_ascii[j] = ch; - } -} - - -/** \brief we do all the work here. infinite loop */ -static void main_loop (void) -{ - tHeader *tmc_header, *tmc_response_header; - idata uint16_t offset, byte_count; - static idata uint32_t transfer_size; - xdata Scanner scpi_scanner; - - uint16_t index; - - buffer = EP2FIFOBUF; - scpi_scanner.action = NOACTION; - - while (1){ - - usb_tmc_transfer.new_transfer = 0; - - /* -------------------------------------------------------------------- */ - /* SETUP Package on Endpoint 0. Handle if we received one */ - if (usb_setup_packet_avail()) - usb_handle_setup_packet(); - - /* -------------------------------------------------------------------- */ - /* Let's do some work when an Endpoint has data */ - if (!(EP2468STAT & bmEP2EMPTY) && flLOCAL == GECKO3COM_LOCAL){ - offset = 0; - - if(usb_tmc_state == TMC_STATE_IDLE || usb_tmc_transfer.transfer_size == 0){ - - /* start to analyze the data in Endpoint 2 if it is a correct TMC header */ - tmc_header = (tHeader*)EP2FIFOBUF; - - /* bTag sanity check. store bTag for correct IN transfer response */ - if (tmc_header->bTag == ~tmc_header->bTagInverse) { - usb_tmc_transfer.bTag = tmc_header->bTag; - - /* TMC header is correct. Now find out what we have to do: */ - - /* check if this transfer is a DEV_DEP_MSG_OUT message */ - if(tmc_header->MsgID == DEV_DEP_MSG_OUT){ - usb_tmc_transfer.transfer_size = \ - ((DEV_DEP_MSG_OUT_Header*)tmc_header->msg_specific)->TransferSize; - usb_tmc_transfer.new_transfer = NEWTRANSFER; - offset = USB_TMC_HEADER_SIZE; - - /* Decide if we should start the SCPI parser or not - * if not IDLE, the transfer size was 0 and we continue - * to exectue the action and don't try to parse a new command */ - if(usb_tmc_state == TMC_STATE_IDLE) { - - /* fresh OUT Transfer: handle device dependent command message */ - usb_tmc_state = TMC_STATE_OUT_TRANSFER; - usb_tmc_transfer.nbytes_rxd = 0; - - /* when we receive an new out message before we sent the response, - * we have to clear the response queue first*/ - IEEE488_clear_mav(); - usb_tmc_transfer.nbytes_txd = 0; - response_queue.length = 0; - - - /* setup variables for scpi parser. - * offset points to first command byte in endpoint buffer */ - scpi_scanner.source = EP2FIFOBUF; - scpi_scanner.action = NOACTION; - - /* start SCPI parser */ - if(!scpi_scan(&offset, &scpi_scanner, &response_queue)){ - /* the parser returned an error. set flags */ - ieee488_status.EventStatusRegister |= bmCOMMAND_ERROR; - usb_tmc_state = TMC_STATE_IDLE; - scpi_scanner.action = NOACTION; - usb_tmc_transfer.new_transfer = 0; - //print_err("syntax failure\n"); - } - } - } - /* finished handling an DEV_DEP_MSG_OUT message */ - - /* ---------------------------------------------------------------- */ - /* check if this transfer is a IN request and we have a IN response - * queued */ - else if(tmc_header->MsgID == REQUEST_DEV_DEP_MSG_IN \ - && response_queue.length > 0) { - - /* IN Transfer: Handle response message to a device dependent - * command message. For this we change the TMC state. - * Sending the requested data to the IN endpoint - * happens further below */ - usb_tmc_state = TMC_STATE_IN_TRANSFER; - usb_tmc_transfer.transfer_size = \ - ((REQUEST_DEV_DEP_MSG_IN_Header*) tmc_header->msg_specific)\ - ->TransferSize; - usb_tmc_transfer.nbytes_txd = 0; - - } - else { - /* TMC header error: unknown message ID */ - EP2CS |= bmEPSTALL; - //print_err("ID\n"); - } - } - - else { - /* TMC header error: bTag and bTagInverse don't match */ - EP2CS |= bmEPSTALL; - //print_err("bTag\n"); - } - } - - /* -------------------------------------------------------------------- */ - /* OUT Transfer: The SCPI parser has detected a application specific - * command. Here we execute the desired functions for these commands: */ - if(usb_tmc_state == TMC_STATE_OUT_TRANSFER){ - - /* set the correct byte_count value */ - /* read byte counter register of EP2FIFOBUF */ - byte_count = (EP2BCH << 8) + EP2BCL; - - /* decide which value is the smaller one */ - if((byte_count - offset) > usb_tmc_transfer.transfer_size) { - byte_count = usb_tmc_transfer.transfer_size; - /* transfer_size does not includ the header length: */ - byte_count += offset; - } - - /* select what we have to to according to the parsed scpi command */ - switch (scpi_scanner.action) { - - case SYSTEM_RESET: - /* Send a global reset signal to the FPGA and all connected modules */ - gecko3com_system_reset(); - usb_tmc_state = TMC_STATE_IDLE; - break; - - case rqFPGA_IDCODE: - /* Request to read the FPGA JTAG ID code */ - eeprom_read(FPGA_IDCODE_OFFSET, response_queue.buf, FPGA_IDCODE_LEN); - response_queue.buf[FPGA_IDCODE_LEN] = '\n'; - response_queue.length = FPGA_IDCODE_LEN+1; - IEEE488_set_mav(); - usb_tmc_state = TMC_STATE_IDLE; - break; - - case rqFPGA_TYPE: - /* Request to read the FPGA type string */ - eeprom_read(FPGA_TYPE_OFFSET, response_queue.buf, FPGA_TYPE_LEN); - response_queue.buf[FPGA_TYPE_LEN] = '\n'; - response_queue.length = FPGA_TYPE_LEN+1; - IEEE488_set_mav(); - usb_tmc_state = TMC_STATE_IDLE; - break; - - case rqFPGA_DONE: - /* Is the FPGA configured or not? Check the "done" pin*/ - if(fpga_done()) { - response_queue.buf[0] = '1'; - } - else { - response_queue.buf[0] = '0'; - } - response_queue.buf[1] = '\n'; - response_queue.length = 2; - usb_tmc_state = TMC_STATE_IDLE; - break; - - case FPGA_CONFIGURE: - /* Configure the FPGA directly */ - if(!app_configure_fpga(&offset, &byte_count)) { - //print_err("conf\n"); - ieee488_status.EventStatusRegister |= bmEXECUTION_ERROR; - usb_tmc_state = TMC_STATE_IDLE; - } - break; - - case FPGA_COMMUNICATION: - /* Switch the context from the FX2 to the FPGA. - * After this command all endpoint 2 and 6 data goes directly to the - * FPGA, the FX2 doesn't parse commands anymore. Use endpoint 0 TMC - * commands to switch back */ - init_gpif(); - flLOCAL = GECKO3COM_REMOTE; - usb_tmc_state = TMC_STATE_IDLE; - break; - - case SPI_DELETE: - /* Erases one of the file spaces in the SPI flash */ - if(!app_gecko3com_flash_delete(&offset)) { - ieee488_status.EventStatusRegister |= bmEXECUTION_ERROR; - } - usb_tmc_state = TMC_STATE_IDLE; - break; - - case SPI_WRITE: - /* Writes a FPGA configuration file into a file space in the - * SPI flash. */ - if(!app_write_conf_to_flash(&offset, &byte_count)) { - ieee488_status.EventStatusRegister |= bmEXECUTION_ERROR; - usb_tmc_state = TMC_STATE_IDLE; - } - break; - - default: - - usb_tmc_state = TMC_STATE_IDLE; - } - } - - usb_tmc_transfer.nbytes_rxd += ((EP2BCH << 8) + EP2BCL - USB_TMC_HEADER_SIZE); - - /* finished handling usb package. - * rearm OUT endpoint to receive new data */ - OUTPKTEND = bmSKIP | USB_TMC_EP_OUT; - - } /* end of OUT Transfer clause */ - - - /* -------------------------------------------------------------------- */ - /* Let's continue to send data when an Endpoint is free */ - /* IN Transfer: Generate a valid TMC IN header and send the response - * message data to the endpoint */ - if (!(EP2468STAT & bmEP6FULL) && usb_tmc_state == TMC_STATE_IN_TRANSFER){ - - /* fresh IN transfer, send first header */ - if(usb_tmc_transfer.nbytes_txd == 0) { - index = 0; - tmc_response_header = (tHeader*)EP6FIFOBUF; - tmc_response_header->MsgID = REQUEST_DEV_DEP_MSG_IN; - tmc_response_header->bTag = usb_tmc_transfer.bTag; - tmc_response_header->bTagInverse = ~usb_tmc_transfer.bTag; - tmc_response_header->Reserved = 0; - ((DEV_DEP_MSG_IN_Header*)tmc_response_header->msg_specific)-> \ - TransferSize = response_queue.length; - ((DEV_DEP_MSG_IN_Header*)tmc_response_header->msg_specific)->\ - Reserved[0] = 0; - ((DEV_DEP_MSG_IN_Header*)tmc_response_header->msg_specific)->\ - Reserved[1] = 0; - ((DEV_DEP_MSG_IN_Header*)tmc_response_header->msg_specific)->\ - Reserved[2] = 0; - - /* if we can send all data in one usb packet, - set EOM (end of message) bit */ - /* WARNING: set EOM bit in the LAST tmc transfer. - * we transmitt anything in one transfer so we set this bit always. */ - /*if(USBCS & bmHSM && response_queue.length <= 500 | \ - response_queue.length <= 56)*/ - ((DEV_DEP_MSG_OUT_Header*)tmc_response_header->msg_specific)->\ - bmTransferAttributes = bmTA_EOM; - /*else - ((DEV_DEP_MSG_OUT_Header*)tmc_response_header->msg_specific)->\ - bmTransferAttributes = 0;*/ - - index = USB_TMC_HEADER_SIZE; - } /* finished writing header */ - - - /* Transmit data */ - for(usb_tmc_transfer.nbytes_txd; \ - usb_tmc_transfer.nbytes_txd <= response_queue.length; \ - usb_tmc_transfer.nbytes_txd++){ - - /* copy the data from the response queue to the IN endpoint */ - EP6FIFOBUF[index++] = response_queue.buf[usb_tmc_transfer.nbytes_txd]; - - /* we send any response in one packet so we don't have to check if - * the endpoint buffer is full */ - /*if(!(USBCS & bmHSM) && index == 64 | \ - index == 512) - break; - */ - } - - EP6BCH = index >> 8; - EP6BCL = index & 0xFF; - index = 0; - - /* detect end of transfer */ - if(usb_tmc_transfer.nbytes_txd >= response_queue.length){ - usb_tmc_state = TMC_STATE_IDLE; - IEEE488_clear_mav(); - response_queue.length = 0; - } - } /* end of IN Transfer clause */ - - /* if the LED flag is set to off, disable the external LED */ - if(flLED == LEDS_OFF) { - set_led_ext(LEDS_OFF); - } - - /* resets the watchdog timer back to the initial value */ - watchdog_count = WATCHDOG_TIME; - - } /* end of infinite main loop */ -} - - -/** \brief ISR called at 100 Hz from timer2 interrupt - * - * Toggle led 0 - */ -void isr_tick (void) interrupt -{ - static uint8_t count = 1; - - if (--count == 0){ - count = 50; - toggle_led_0(); - flLED = LEDS_OFF; - } - - // if (--watchdog_count == 0){ - // clear_timer_irq(); - // #ifdef DEBUG_LEVEL_ERROR - // print_err("Watchdog timed out! System reset\n"); - //mdelay(100); /* wait 100 ms to give the uart some time to transmit */ - // #endif - - /* simulate CPU reset */ /* FIXME this stuff here does not work. no idea how to simulate an CPU reset instead... */ - /* _asm - ljmp __reset_vector - _endasm;*/ - //} - -#ifdef USB_DFU_SUPPORT - if (usb_dfu_state == DFU_STATE_appDETACH){ - if (--usb_dfu_timeout == 0){ - usb_toggle_dfu_handlers(); - } - } -#endif - - clear_timer_irq(); -} - - -/** \brief starting point of execution. - * - * we initialize all system components here. after that we go to the main_loop - * function there all the work is done. - */ -void main(void) -{ - /* variables needed for the stand-alone fpga configuration */ - uint8_t led_color; - idata uint16_t i, local_offset; - xdata uint32_t spi_base_adress; - - init_gecko3com(); - init_io_ext(); - init_usb_tmc(); - init_fpga_interface(); - init_spiflash(&flash_dr); - - /* disconnect USB, so the host doesn't wait for us during the fpga - *configuration process (takes up to 20s) */ - USBCS |= bmDISCON; - -#ifdef DEBUG_LEVEL_ERROR - ser_init(); - printf_tiny("hi\n"); -#endif - - /* set the context switch flag to local operation, not fpga */ - flLOCAL = GECKO3COM_LOCAL; - - /* enable GPIF state output for debuging */ - IFCONFIG |= bmGSTATE; - - EA = 0; /* disable all interrupts */ - - patch_usb_descriptors(); - setup_autovectors(); - usb_install_handlers(); - hook_timer_tick((unsigned short) isr_tick); - - EA = 1; /* global interrupt enable */ - - /* finished initializing GECKO3COM system */ - /*------------------------------------------------------------------------*/ - - /* start to configure the FPGA from the configuration SPI flash */ - /* read which configuration, the first or second, we should use */ - if(get_switch()){ - led_color = GREEN; - spi_base_adress = START_ADRESS_SLOT0; - } - else { - led_color = RED; - spi_base_adress = START_ADRESS_SLOT1; - } - - /* read the configuration file size from the spi flash */ - spiflash_read(&flash_dr, &spi_base_adress, response_queue.buf, 4); - ((idata uint8_t*)&file_size)[0] = response_queue.buf[0]; - ((idata uint8_t*)&file_size)[1] = response_queue.buf[1]; - ((idata uint8_t*)&file_size)[2] = response_queue.buf[2]; - ((idata uint8_t*)&file_size)[3] = response_queue.buf[3]; - spi_base_adress += 4; - - /* there is nothing to configure when the filesize is 0 or 0xFFFFFFFF */ - if(file_size == 0 || file_size == 0xFFFFFFFF) { - /* show that we don't load a config */ - set_led_ext(ORANGE); - } - else { - fpga_load_begin(); - i = TMC_RESPONSE_QUEUE_LENGTH-1; - while(file_size > 0) { - set_led_ext(led_color); /* show which config we load */ - - if(i > file_size) { - i = (uint8_t)file_size; - } - spiflash_read(&flash_dr, &spi_base_adress, response_queue.buf, i); - - local_offset = 0; - fpga_load_xfer(response_queue.buf, &local_offset, &i); - file_size -= i; - spi_base_adress += i; - } - fpga_load_end(); - } - - USBCS &= ~bmDISCON; /* reconnect USB */ - - main_loop(); -} Index: gecko3/trunk/gecko3com-fw/firmware/src/eeprom_io.c =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/src/eeprom_io.c (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/src/eeprom_io.c (nonexistent) @@ -1,102 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2006 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -/************************************************************************/ -/** \file eeprom_io.c - ************************************************************************* - * \brief read and write functions for i2c eeproms - * - * \author GNU Radio - */ - -#include -#include -#include "gecko3com_i2c.h" /* in this file are the device adresses defined */ -#include "eeprom_io.h" -#include "i2c.h" -#include "delay.h" -#include "debugprint.h" - -#define EEPROM_HIGH_ADDR 0x3FFF -#define PAGE_LEN 0x40 -#define PAGE_START_MASK 0xFFC0 -#define PAGE_MASK 0x003F - - -/* returns non-zero if successful, else 0 */ -uint8_t eeprom_read (uint16_t eeprom_offset, xdata uint8_t *buf, uint8_t len) -{ - /* We setup a random read by first doing a "zero byte write". - Writes carry an address. Reads use an implicit address. */ - - static xdata uint8_t cmd[2]; - cmd[0] = eeprom_offset>>8; - cmd[1] = eeprom_offset & 0xFF; - if (!i2c_write(I2C_ADDR_BOOT, cmd, 2)) - return 0; - - return i2c_read(I2C_ADDR_BOOT, buf, len); -} - - -/* returns non-zero if successful, else 0 */ -//uint8_t eeprom_write (idata uint8_t i2c_addr, idata uint16_t eeprom_offset, -// const xdata uint8_t *buf, uint8_t len) -uint8_t eeprom_write (uint16_t eeprom_offset, const xdata uint8_t *buf, \ - uint8_t len) -{ - uint8_t i = 0, byte_count; - static xdata uint8_t cmd[66]; - - if(eeprom_offset > EEPROM_HIGH_ADDR){ - return 0; - } - //print_info("w\n"); - while (len > 0){ - - if(eeprom_offset + len > (eeprom_offset & PAGE_START_MASK) + PAGE_LEN){ - byte_count = PAGE_LEN - (eeprom_offset & PAGE_MASK); - } - else if(len < PAGE_LEN){ - byte_count = len; - } - else { - byte_count = PAGE_LEN; - } - - cmd[0] = eeprom_offset>>8; - cmd[1] = eeprom_offset & 0xFF; - - for(i=0; i < byte_count;i++) { - cmd[i+2] = buf[i]; - } - - if (!i2c_write(I2C_ADDR_BOOT, cmd, byte_count+2)) - return 0; - - len -= byte_count; - eeprom_offset += byte_count; - mdelay(8); /* delay 8ms worst case write time */ - } - return 1; -} - Index: gecko3/trunk/gecko3com-fw/firmware/src/usb_descriptors.a51 =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/src/usb_descriptors.a51 (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/src/usb_descriptors.a51 (nonexistent) @@ -1,543 +0,0 @@ -;;; -*- asm -*- - -;;; GECKO3COM -;;; -;;; Copyright (C) 2008 by -;;; ___ ____ _ _ -;;; ( _`\ ( __)( ) ( ) -;;; | (_) )| (_ | |_| | Berne University of Applied Sciences -;;; | _ <'| _) | _ | School of Engineering and -;;; | (_) )| | | | | | Information Technology -;;; (____/'(_) (_) (_) -;;; -;;; -;;; This program is free software: you can redistribute it and/or modify -;;; it under the terms of the GNU General Public License as published by -;;; the Free Software Foundation, either version 3 of the License, or -;;; (at your option) any later version. -;;; -;;; This program is distributed in the hope that it will be useful, -;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. -;;; You should have received a copy of the GNU General Public License -;;; along with this program. If not, see . -;;; -;;;******************************************************************** -;;; As vendor ID we use the ID from Anchor Chips (0x4705) which is now Cypress, so -;;; they don't need there old ID anymore. -;;; -;;; This device works with USB full and high speed hosts. -;;; -;;; Endpoint configuration is according to USB TMC specification 1.0 -;;; - - - .module usb_descriptors - - VID_FREE = 0x0547 ; Anchor Chips (now Cypress) nobody using it anymore - PID_GECKO = 0x0002 ; GECKO3COM using USB TMC - PID_DFU = 0x0003 ; Different PID for DFU mode, some OS have problems when you use the same PID - - ;; We distinguish configured from unconfigured GECKO3main's using the Device ID. - ;; If the MSB of the DID is 0, the device is unconfigured. - ;; The LSB of the DID is reserved for hardware revs. - - DID_GECKO = 0x0100 ; Device ID (bcd) - - - DSCR_DEVICE = 1 ; Descriptor type: Device - DSCR_CONFIG = 2 ; Descriptor type: Configuration - DSCR_STRING = 3 ; Descriptor type: String - DSCR_INTRFC = 4 ; Descriptor type: Interface - DSCR_ENDPNT = 5 ; Descriptor type: Endpoint - DSCR_DEVQUAL = 6 ; Descriptor type: Device Qualifier - DSCR_DFUFUNC = 0x21 ; Descriptor type: DFU Functional - - DSCR_DEVICE_LEN = 18 - DSCR_CONFIG_LEN = 9 - DSCR_INTRFC_LEN = 9 - DSCR_ENDPNT_LEN = 7 - DSCR_DEVQUAL_LEN = 10 - DSCR_DFUFUNC_LEN = 9 - - ET_CONTROL = 0 ; Endpoint type: Control - ET_ISO = 1 ; Endpoint type: Isochronous - ET_BULK = 2 ; Endpoint type: Bulk - ET_INT = 3 ; Endpoint type: Interrupt - - - ;; configuration attributes - bmSELF_POWERED = 1 << 6 - -;;; -------------------------------------------------------- -;;; external ram data -;;;-------------------------------------------------------- - - .area USBDESCSEG (XDATA) - -;;; ---------------------------------------------------------------- -;;; descriptors used when operating at high speed (480Mb/sec) -;;; ---------------------------------------------------------------- - - .even ; descriptors must be 2-byte aligned for SUDPTR{H,L} to work - - ;; The .even directive isn't really honored by the linker. Bummer! - ;; (There's no way to specify an alignment requirement for a given area, - ;; hence when they're concatenated together, even doesn't work.) - ;; - ;; We work around this by telling the linker to put USBDESCSEG - ;; at 0xE000 absolute. This means that the maximimum length of this - ;; segment is 480 bytes, leaving room for the two hash slots - ;; at 0xE1EO to 0xE1FF. - ;; - ;; As of March 9, 2009, this segment is 398 bytes long - -_high_speed_device_descr:: - .db DSCR_DEVICE_LEN - .db DSCR_DEVICE - .db <0x0200 ; Specification version (LSB) - .db >0x0200 ; Specification version (MSB) - .db 0x00 ; device class (see interface) - .db 0x00 ; device subclass (see interface) - .db 0x00 ; device protocol (see interface) - .db 64 ; bMaxPacketSize0 for endpoint 0 - .db VID_FREE ; idVendor - .db PID_GECKO ; idProduct -_usb_desc_hw_rev_binary_patch_location_0:: - .db DID_GECKO ; bcdDevice - .db SI_VENDOR ; iManufacturer (string index) - .db SI_PRODUCT ; iProduct (string index) - .db SI_SERIAL ; iSerial number (string index) - .db 1 ; bNumConfigurations - -;;; describes the other speed (12Mb/sec) - .even -_high_speed_devqual_descr:: - .db DSCR_DEVQUAL_LEN - .db DSCR_DEVQUAL - .db <0x0200 ; bcdUSB (LSB) - .db >0x0200 ; bcdUSB (MSB) - .db 0x00 ; bDeviceClass - .db 0x00 ; bDeviceSubClass - .db 0x00 ; bDeviceProtocol - .db 64 ; bMaxPacketSize0 - .db 1 ; bNumConfigurations (one config at 12Mb/sec) - .db 0 ; bReserved - - .even -_high_speed_config_descr:: - .db DSCR_CONFIG_LEN - .db DSCR_CONFIG - .db <(_high_speed_config_descr_end - _high_speed_config_descr) ; LSB - .db >(_high_speed_config_descr_end - _high_speed_config_descr) ; MSB - .db 2 ; bNumInterfaces - .db 1 ; bConfigurationValue - .db 0 ; iConfiguration - .db 0x80 | bmSELF_POWERED ; bmAttributes - .db 0 ; bMaxPower - - ;; interface descriptor 0 (USB TMC, ep2 OUT BULK, ep6 IN BULK) - - .db DSCR_INTRFC_LEN - .db DSCR_INTRFC - .db 0 ; bInterfaceNumber (zero based) - .db 0 ; bAlternateSetting - .db 2 ; bNumEndpoints - .db 0xfe ; bInterfaceClass (application class) - .db 0x03 ; bInterfaceSubClass (USB TMC) - .db 0x01 ; bInterfaceProtocol (USB TMC USB488 subclass device) - .db SI_USB_TMC ; iInterface (description) - - ;; interface 0's OUT end point - - .db DSCR_ENDPNT_LEN - .db DSCR_ENDPNT - .db 0x02 ; bEndpointAddress (ep 2 OUT) - .db ET_BULK ; bmAttributes - .db <512 ; wMaxPacketSize (LSB) - .db >512 ; wMaxPacketSize (MSB) - .db 0 ; bInterval (iso only) - - ;; interface 0's IN end point - - .db DSCR_ENDPNT_LEN - .db DSCR_ENDPNT - .db 0x86 ; bEndpointAddress (ep 6 IN) - .db ET_BULK ; bmAttributes - .db <512 ; wMaxPacketSize (LSB) - .db >512 ; wMaxPacketSize (MSB) - .db 0 ; bInterval (iso only) - - ;; interface descriptor 1 (command & status, ep0 COMMAND) - -;; disabled since firmware version 0.4, use version 0.3 after production to set parameters -;; .db DSCR_INTRFC_LEN -;; .db DSCR_INTRFC -;; .db 1 ; bInterfaceNumber (zero based) -;; .db 0 ; bAlternateSetting -;; .db 0 ; bNumEndpoints -;; .db 0xff ; bInterfaceClass (vendor specific) -;; .db 0xff ; bInterfaceSubClass (vendor specific) -;; .db 0xff ; bInterfaceProtocol (vendor specific) -;; .db SI_COMMAND_AND_STATUS ; iInterface (description) - - ;; interface descriptor 2 (Run-Time DFU Interface descriptor) - - .db DSCR_INTRFC_LEN - .db DSCR_INTRFC - .db 1 ; bInterfaceNumber (zero based) - .db 0 ; bAlternateSetting - .db 0 ; bNumEndpoints - .db 0xfe ; bInterfaceClass (application specific) - .db 0x01 ; bInterfaceSubClass (device firmware upgrade) - .db 0x01 ; bInterfaceProtocol (runtime protocol) - .db SI_DFU ; iInterface (description) - - ;; interface 2's functional descriptor - - .db DSCR_DFUFUNC_LEN - .db DSCR_DFUFUNC - .db 0x01 ; bmAttributes: no auto detach, no upload, yes download - .db <500 ; wDetachTimeOut (LSB) - .db >500 ; wDetachTimeOut (MSB) - .db <64 ; wMaxPacketSize (LSB) - .db >64 ; wMaxPacketSize (MSB) - .db <0x0001 ; bcdDFUVersion (LSB) - .db >0x0001 ; bcdDFUVersion (MSB) -_high_speed_config_descr_end: - -;;; ---------------------------------------------------------------- -;;; descriptors used when operating at full speed (12Mb/sec) -;;; ---------------------------------------------------------------- - - .even -_full_speed_device_descr:: - .db DSCR_DEVICE_LEN - .db DSCR_DEVICE - .db <0x0200 ; Specification version (LSB) - .db >0x0200 ; Specification version (MSB) - .db 0x00 ; device class (see interface) - .db 0x00 ; device subclass (see interface) - .db 0x00 ; device protocol (see interface) - .db 64 ; bMaxPacketSize0 for endpoint 0 - .db VID_FREE ; idVendor - .db PID_GECKO ; idProduct -_usb_desc_hw_rev_binary_patch_location_1:: - .db DID_GECKO ; bcdDevice - .db SI_VENDOR ; iManufacturer (string index) - .db SI_PRODUCT ; iProduct (string index) - .db SI_SERIAL ; iSerial number (None) - .db 1 ; bNumConfigurations - - -;;; describes the other speed (480Mb/sec) - .even -_full_speed_devqual_descr:: - .db DSCR_DEVQUAL_LEN - .db DSCR_DEVQUAL - .db <0x0200 ; bcdUSB - .db >0x0200 ; bcdUSB - .db 0x00 ; bDeviceClass - .db 0x00 ; bDeviceSubClass - .db 0x00 ; bDeviceProtocol - .db 64 ; bMaxPacketSize0 - .db 1 ; bNumConfigurations (one config at 480Mb/sec) - .db 0 ; bReserved - - .even -_full_speed_config_descr:: - .db DSCR_CONFIG_LEN - .db DSCR_CONFIG - .db <(_full_speed_config_descr_end - _full_speed_config_descr) ; LSB - .db >(_full_speed_config_descr_end - _full_speed_config_descr) ; MSB - .db 3 ; bNumInterfaces - .db 1 ; bConfigurationValue - .db 0 ; iConfiguration - .db 0x80 | bmSELF_POWERED ; bmAttributes - .db 0 ; bMaxPower - - ;; interface descriptor 0 (USB TMC, ep2 OUT BULK, ep6 IN BULK) - - .db DSCR_INTRFC_LEN - .db DSCR_INTRFC - .db 0 ; bInterfaceNumber (zero based) - .db 0 ; bAlternateSetting - .db 2 ; bNumEndpoints - .db 0xfe ; bInterfaceClass (application class) - .db 0x03 ; bInterfaceSubClass (USB TMC) - .db 0x01 ; bInterfaceProtocol (USB TMC USB488 subclass device) - .db SI_USB_TMC ; iInterface (description) - - ;; interface 0's OUT end point - - .db DSCR_ENDPNT_LEN - .db DSCR_ENDPNT - .db 0x02 ; bEndpointAddress (ep 2 OUT) - .db ET_BULK ; bmAttributes - .db <64 ; wMaxPacketSize (LSB) - .db >64 ; wMaxPacketSize (MSB) - .db 0 ; bInterval (iso only) - - ;; interface 1's IN end point - - .db DSCR_ENDPNT_LEN - .db DSCR_ENDPNT - .db 0x86 ; bEndpointAddress (ep 6 IN) - .db ET_BULK ; bmAttributes - .db <64 ; wMaxPacketSize (LSB) - .db >64 ; wMaxPacketSize (MSB) - .db 0 ; bInterval (iso only) - - ;; interface descriptor 1 (command & status, ep0 COMMAND) - -;; disabled since firmware version 0.4, use version 0.3 after production to set parameters -;; .db DSCR_INTRFC_LEN -;; .db DSCR_INTRFC -;; .db 1 ; bInterfaceNumber (zero based) -;; .db 0 ; bAlternateSetting -;; .db 0 ; bNumEndpoints -;; .db 0xff ; bInterfaceClass (vendor specific) -;; .db 0xff ; bInterfaceSubClass (vendor specific) -;; .db 0xff ; bInterfaceProtocol (vendor specific) -;; .db SI_COMMAND_AND_STATUS ; iInterface (description) - - ;; interface descriptor 2 (Run-Time DFU Interface descriptor) - - .db DSCR_INTRFC_LEN - .db DSCR_INTRFC - .db 1 ; bInterfaceNumber (zero based) - .db 0 ; bAlternateSetting - .db 0 ; bNumEndpoints - .db 0xfe ; bInterfaceClass (application specific) - .db 0x01 ; bInterfaceSubClass (device firmware upgrade) - .db 0x01 ; bInterfaceProtocol (runtime protocol) - .db SI_DFU ; iInterface (description) - - ;; interface 2's functional descriptor - - .db DSCR_DFUFUNC_LEN - .db DSCR_DFUFUNC - .db 0x01 ; bmAttributes: no auto detach, no upload, yes download - .db <500 ; wDetachTimeOut (LSB) - .db >500 ; wDetachTimeOut (MSB) - .db <64 ; wMaxPacketSize (LSB) - .db >64 ; wMaxPacketSize (MSB) - .db <0x0001 ; bcdDFUVersion (LSB) - .db >0x0001 ; bcdDFUVersion (MSB) -_full_speed_config_descr_end: - -;;; ---------------------------------------------------------------- -;;; descriptors used when operating in DFU class mode -;;; ---------------------------------------------------------------- - - .even -_dfu_mode_device_descr:: - .db DSCR_DEVICE_LEN - .db DSCR_DEVICE - .db <0x0100 ; Specification version (LSB) - .db >0x0100 ; Specification version (MSB) - .db 0x00 ; device class (see interface) - .db 0x00 ; device subclass (see interface) - .db 0x00 ; device protocol (see interface) - .db 64 ; bMaxPacketSize0 for endpoint 0 - .db VID_FREE ; idVendor - .db PID_DFU ; idProduct -_usb_desc_hw_rev_binary_patch_location_2:: - .db DID_GECKO ; bcdDevice - .db SI_VENDOR ; iManufacturer (string index) - .db SI_PRODUCT ; iProduct (string index) - .db SI_SERIAL ; iSerial number (None) - .db 1 ; bNumConfigurations - - .even -_dfu_mode_config_descr:: - .db DSCR_CONFIG_LEN - .db DSCR_CONFIG - .db <(_dfu_mode_config_descr_end - _dfu_mode_config_descr) ; LSB - .db >(_dfu_mode_config_descr_end - _dfu_mode_config_descr) ; MSB - .db 1 ; bNumInterfaces - .db 1 ; bConfigurationValue - .db 0 ; iConfiguration - .db 0x80 | bmSELF_POWERED ; bmAttributes - .db 0 ; bMaxPower - - ;; interface descriptor 0 (command & status, ep0 COMMAND) - - .db DSCR_INTRFC_LEN - .db DSCR_INTRFC - .db 0 ; bInterfaceNumber (zero based) - .db 0 ; bAlternateSetting - .db 0 ; bNumEndpoints - .db 0xfe ; bInterfaceClass (vendor specific) - .db 0x01 ; bInterfaceSubClass (vendor specific) - .db 0x02 ; bInterfaceProtocol (vendor specific) - .db SI_DFU ; iInterface (description) -_dfu_mode_config_descr_end: - -_dfu_mode_functional_descr:: - .db DSCR_DFUFUNC_LEN - .db DSCR_DFUFUNC - .db 0x01 ; bmAttributes: no auto detach, no upload, yes download - .db <500 ; wDetachTimeOut (LSB) - .db >500 ; wDetachTimeOut (MSB) - .db <64 ; wMaxPacketSize (LSB) - .db >64 ; wMaxPacketSize (MSB) - .db <0x0001 ; bcdDFUVersion (LSB) - .db >0x0001 ; bcdDFUVersion (MSB) - - -;;; ---------------------------------------------------------------- -;;; string descriptors -;;; ---------------------------------------------------------------- - -_nstring_descriptors:: - .db (_string_descriptors_end - _string_descriptors) / 2 - -_string_descriptors:: - .db str0 - .db str1 - .db str2 - .db str3 - .db str4 - .db str5 - .db str6 -_string_descriptors_end: - - SI_NONE = 0 - ;; str0 contains the language ID's. - .even -str0: .db str0_end - str0 - .db DSCR_STRING - .db 0 - .db 0 - .db <0x0409 ; magic code for US English (LSB) - .db >0x0409 ; magic code for US English (MSB) -str0_end: - - SI_VENDOR = 1 - .even -str1: .db str1_end - str1 - .db DSCR_STRING - .db 'M, 0 ; 16-bit unicode - .db 'i, 0 - .db 'c, 0 - .db 'r, 0 - .db 'o, 0 - .db 'L, 0 - .db 'a, 0 - .db 'b, 0 - .db ' , 0 - .db 'B, 0 - .db 'F, 0 - .db 'H, 0 - .db '-, 0 - .db 'T, 0 - .db 'I, 0 -str1_end: - - SI_PRODUCT = 2 - .even -str2: .db str2_end - str2 - .db DSCR_STRING - .db 'G, 0 - .db 'E, 0 - .db 'C, 0 - .db 'K, 0 - .db 'O, 0 - .db '3, 0 - .db 'C, 0 - .db 'O, 0 - .db 'M, 0 -str2_end: - - SI_COMMAND_AND_STATUS = 3 - .even -str3: .db str3_end - str3 - .db DSCR_STRING - .db 'C, 0 - .db 'o, 0 - .db 'm, 0 - .db 'm, 0 - .db 'a, 0 - .db 'n, 0 - .db 'd, 0 - .db ' , 0 - .db '&, 0 - .db ' , 0 - .db 'S, 0 - .db 't, 0 - .db 'a, 0 - .db 't, 0 - .db 'u, 0 - .db 's, 0 -str3_end: - - SI_USB_TMC = 4 - .even -str4: .db str4_end - str4 - .db DSCR_STRING - .db 'U, 0 - .db 'S, 0 - .db 'B, 0 - .db 'T, 0 - .db 'M, 0 - .db 'C, 0 - .db ' , 0 - .db 'U, 0 - .db 'S, 0 - .db 'B, 0 - .db '4, 0 - .db '8, 0 - .db '8, 0 -str4_end: - - SI_DFU = 5 - .even -str5: .db str5_end - str5 - .db DSCR_STRING - .db 'G, 0 - .db 'E, 0 - .db 'C, 0 - .db 'K, 0 - .db 'O, 0 - .db '3, 0 - .db 'C, 0 - .db 'O, 0 - .db 'M, 0 - .db ' , 0 - .db 'F, 0 - .db 'W, 0 - .db ' , 0 - .db 'U, 0 - .db 'P, 0 - .db 'D, 0 - .db 'A, 0 - .db 'T, 0 - .db 'E, 0 -str5_end: - - SI_SERIAL = 6 - .even -str6: .db str6_end - str6 - .db DSCR_STRING -_usb_desc_serial_number_ascii:: - .db '3, 0 - .db '., 0 - .db '1, 0 - .db '4, 0 - .db '1, 0 - .db '5, 0 - .db '9, 0 - .db '3, 0 -str6_end: - Index: gecko3/trunk/gecko3com-fw/firmware/src/gecko3com_gpif.c =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/src/gecko3com_gpif.c (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/src/gecko3com_gpif.c (nonexistent) @@ -1,291 +0,0 @@ -/* GECKO3COM - * - * Copyright (C) 2008 by - * ___ ____ _ _ - * ( _`\ ( __)( ) ( ) - * | (_) )| (_ | |_| | Bern University of Applied Sciences - * | _ <'| _) | _ | School of Engineering and - * | (_) )| | | | | | Information Technology - * (____/'(_) (_) (_) - * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/*********************************************************************/ -/** \file gecko3com_gpif.c - ********************************************************************* - * \brief project specific functions to handle the GPIF - * - * - * - * \author GNUradio team, Christoph Zimmermann bfh.ch - * \date 2009-4-16 - * - * \note Comments from the original GNU radio source: \n - * The GPIF Designer tool is kind of screwed up, in that it doesn't - * configure some of the ports correctly. We just use their tables and - * handle the initialization ourselves. They also declare that their - * static initialized data is in xdata, which screws us too. - * -*/ - -#include -#include "gecko3com_gpif.h" -#include "gpif_data.h" -#include "isr.h" -#include "delay.h" -#include "fx2regs.h" -#include "gecko3com_regs.h" -#include "gecko3com_interfaces.h" -#include "syncdelay.h" -#include "debugprint.h" - - -/* These are the tables generated by the Cypress GPIF Designer */ - -/** \brief Waveform data generated by the Cypress GPIF Designer - * - * this table is defined in the gpif_data.c file. provide the - * desired file for your board - */ -extern const char WaveData[128]; - -/** \brief Flowstate data generated by the Cypress GPIF Designer - * - * this table is defined in the gpif_data.c file. provide the - * desired file for your board - */ -extern const char FlowStates[36]; - -/** \brief Init values generated by the Cypress GPIF Designer - * and the edit-gpif script - * - * this table is defined in the gpif_data.h file. provide the - * desired file for your board - */ -extern const char InitData[7]; - - -/** private flag to signal, that the GPIF receives data from the FPGA */ -volatile static uint8_t flGPIF; - - - -/** - * \brief exectuted when the gpif wafeform terminates - */ -void -isr_gpif_done (void) interrupt -{ - ISR_DEBUG_PORT |= bmGPIF_DONE; - - clear_fifo_gpif_irq(); - - if((flGPIF & bmGPIF_PENDING_DATA) == bmGPIF_PENDING_DATA) { - flGPIF &= ~bmGPIF_PENDING_DATA; - gpif_trigger_write(); - } - else { - INPKTEND = 0x06; - gpif_trigger_read(); - } - - ISR_DEBUG_PORT &= ~bmGPIF_DONE; -} - - -/** - * \brief exectuted when data is available in the OUT endpoint - */ -void -isr_endpoint_out_data (void) interrupt -{ - ISR_DEBUG_PORT |= bmFIFO_PF; - - clear_fifo_gpif_irq(); - - if((GPIFIDLECTL & bmBIT3) == bmBIT3) { - flGPIF |= bmGPIF_PENDING_DATA; - } - else { - EA = 0; /* disable all interrupts */ - GPIFABORT = 0xFF; - SYNCDELAY; - EA = 1; /* global interrupt enable */ - - gpif_trigger_write(); - } - - ISR_DEBUG_PORT &= ~bmFIFO_PF; -} - - -/** \brief initialize GPIF system */ -void init_gpif (void) -{ - uint8_t i; - -#ifdef GECKO3MAIN - /* IFCLK is generated internally and runs at 48 MHz; GPIF "master mode" */ - IFCONFIG = bmIFCLKSRC | bm3048MHZ | bmIFCLKOE | bmGSTATE | bmIFGPIF; - SYNCDELAY; - - /* we have to commit the currently processed packet BEFORE we switch to auto out mode */ - OUTPKTEND = bmSKIP | USB_TMC_EP_OUT; - - /*FIXME only here for testing */ - EP6AUTOINLENH = (20) >> 8; SYNCDELAY; /* this is the length for high speed */ - EP6AUTOINLENL = (20) & 0xff; SYNCDELAY; - - /* enable autoout and autoin feature of the endpoints */ - EP2FIFOCFG |= bmAUTOOUT; - SYNCDELAY; - EP6FIFOCFG |= bmAUTOIN; - SYNCDELAY; - - /* set endpoint 2 fifo (out) programmable flag to "higher or equal 3" - * we use the programmable flag as interrupt source to detect if data for the FPGA - * is available and as GPIF flag to stop the flowstate, for this the flag has to change - * one cycle before the FIFO is completly empty, else we transfer one word too much */ - EP2FIFOPFH = bmDECIS; - EP2FIFOPFL = 1; - SYNCDELAY; - - EP2GPIFFLGSEL = bmFLAG_PROGRAMMABLE; - // EP2GPIFFLGSEL = bmFLAG_EMPTY; - SYNCDELAY; - EP6GPIFFLGSEL = bmFLAG_FULL; - SYNCDELAY; - - EP2GPIFPFSTOP = 0; - EP6GPIFPFSTOP = 0; - -#endif - - GPIFABORT = 0xFF; /* abort any waveforms pending */ - SYNCDELAY; - - GPIFREADYCFG = InitData[ 0 ]; - GPIFCTLCFG = InitData[ 1 ]; - GPIFIDLECS = InitData[ 2 ]; - GPIFIDLECTL = InitData[ 3 ]; - /* Hmmm, what's InitData[ 4 ] ... */ - GPIFWFSELECT = InitData[ 5 ]; - /* GPIFREADYSTAT = InitData[ 6 ]; */ /* I think this register is read only... */ - - for (i = 0; i < 128; i++){ - GPIF_WAVE_DATA[i] = WaveData[i]; - } - - setup_flowstate_common(); - - FLOWSTATE = 0; /* ensure it's off */ - - GPIFREADYCFG |= bmINTRDY; /* set the internal ready signal */ - - /* unset gpif flags */ - flGPIF = 0; - - - EA = 0; /* disable all interrupts */ - - /* hook gpif interupt services */ - - /* due to big problems with the done interrupt, we use the WAVEFORM interrupt - to signal the firmware that the GPIF is done */ - hook_fgv(FGV_GPIFWF,(unsigned short) isr_gpif_done); - hook_fgv(FGV_EP2PF,(unsigned short) isr_endpoint_out_data); - - EP2FIFOIE = bmFIFO_PF; - GPIFIE = bmGPIFWF; - - EA = 1; /* global interrupt enable */ - - - /* start gpif read, default state of the gpif to wait for fpga data */ - gpif_trigger_read(); - -} - - -/** \brief aborts any gpif running gpif transaction */ -void abort_gpif(void) { - -#ifdef GECKO3MAIN - - /* signal an abort condition to the FPGA */ - //if(!(GPIFTRIG & bmGPIF_IDLE)) { - //GPIFREADYCFG &= ~bmINTRDY; - //udelay(10); - //} -#endif - EA = 0; /* disable all interrupts */ - - flGPIF = 0; - - GPIFABORT = 0xFF; - SYNCDELAY; - while(!(GPIFTRIG & bmGPIF_IDLE)); - print_info("gpif aborted\n"); - - EA = 1; /* global interrupt enable */ - - - gpif_trigger_read(); -} - - -/** \brief disables gpif system */ -void deactivate_gpif(void) { - -#ifdef GECKO3MAIN - - /* signal an abort condition to the FPGA */ - //if(!(GPIFTRIG & bmGPIF_IDLE)) { - //GPIFREADYCFG &= ~bmINTRDY; - //udelay(10); - //} -#endif - - - EA = 0; /* disable all interrupts */ - - EP2FIFOIE = 0; /* disable FIFO interrupt */ - SYNCDELAY; - GPIFIE = 0; /* disable all GPIF interrupts */ - SYNCDELAY; - - GPIFTCB0 = 0x00; - EP2GPIFPFSTOP = 1; - EP6GPIFPFSTOP = 1; - - GPIFABORT = 0xFF; /* abort pending GPIF transaction */ - SYNCDELAY; - - flGPIF = 0; /* unset all internal GPIF flags */ - -#ifdef GECKO3MAIN - //EP2FIFOCFG &= ~bmOEP; - EP2FIFOCFG &= ~bmAUTOOUT; /* disable AutoOUT feature */ - SYNCDELAY; - //EP6FIFOCFG &= ~bmINFM; - EP6FIFOCFG &= ~bmAUTOIN; /* disable AutoIN feature */ - -#endif - - EA = 1; /* global interrupt enable */ - - - print_info("gpif deactivated\n"); -} Index: gecko3/trunk/gecko3com-fw/firmware/src/gecko3com.ihx =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/src/gecko3com.ihx (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/src/gecko3com.ihx (nonexistent) @@ -1,1703 +0,0 @@ -:0600000002356302006BF3 -:03000B0002006B85 -:0300130002006B7D -:03001B0002006B75 -:0300230002006B6D -:03002B0002006B65 -:0300330002006B5D -:03003B0002006B55 -:0300430002006B4D -:03004B0002006B45 -:0300530002006B3D -:03005B0002006B35 -:0300630002006B2D -:01006B003262 -:0900800002006B0002006B00029B -:08008900006B0002006B000295 -:08009100006B0002006B00028D -:08009900006B0002006B000285 -:0800A100006B0002006B00027D -:0800A900006B0002006B000275 -:0700B100006B0002006B0070 -:0901000002006B0002006B00021A -:08010900006B0002006B000214 -:08011100006B0002006B00020C -:08011900006B0002006B000204 -:08012100006B0002006B0002FC -:08012900006B0002006B0002F4 -:08013100006B0002006B0002EC -:08013900006B0002006B0002E4 -:08014100006B0002006B0002DC -:08014900006B0002006B0002D4 -:08015100006B0002006B0002CC -:08015900006B0002006B0002C4 -:08016100006B0002006B0002BC -:08016900006B0002006B0002B4 -:08017100006B0002006B0002AC -:07017900006B0002006B00A7 -:0801800078B0E84403600C793B -:0C01880004903800E4F0A3D8FCD9FAD0B1 -:0E01940083D082F6D8FDC082C083758200221F -:0CE0000012010002000000404705020071 -:06E00C0000010102060103 -:0AE012000A060002000000400100B1 -:0EE01C0009023B00030100C0000904000002DD -:0EE02A00FE030104070502020002000705863E -:0EE03800020002000904010000FFFFFF0309BF -:0EE0460004020000FE010105092101F4014061 -:03E05400000001C8 -:0CE0580012010002000000404705020019 -:06E06400000101020601AB -:0AE06A000A06000200000040010059 -:0EE0740009023200030100C00009040000028E -:0EE08200FE03010407050202400000070586A8 -:0EE09000024000000904010000FFFFFF030929 -:08E09E0004020000FE0101056F -:0CE0A600120100010000004047050300CB -:06E0B2000001010206015D -:0EE0B80009021200010100C00009040000006E -:04E0C600FE01020550 -:09E0CA00092101F40140000001EC -:01E0D3000745 -:02E0D400E2E088 -:02E0D600E8E080 -:02E0D80008E15D -:02E0DA001CE147 -:02E0DC003EE123 -:02E0DE005AE105 -:02E0E0007CE1E1 -:06E0E20006030000090422 -:0EE0E80020034D006900630072006F004C00C1 -:0EE0F6006100620020004200460048002D003C -:04E10400540049007A -:0EE1080014034700450043004B004F00330056 -:06E1160043004F004D0024 -:0EE11C00220343006F006D006D0061006E0075 -:0EE12A006400200026002000530074006100F5 -:06E1380074007500730085 -:0EE13E001C0355005300420054004D004300E6 -:0EE14C00200055005300420034003800380017 -:0EE15A0022034700450043004B004F003300F6 -:0EE1680043004F004D002000450045005000D0 -:06E1760052004F004D00B5 -:02E17C0012038C -:0EE17E0033002E00310034003100350039002E -:02E18C0033005E -:0A01A200AA82AB09903800EBF0AB25 -:0701AC0008903801EBF0752B -:0301B3004F007585 -:0301B60050387549 -:0C01B90051028A82C002122C68E582D03C -:0601C500027003F5822226 -:0401CB00850A4F85CD -:0301CF000B50854D -:0501D2000C518A8202BD -:0201D7002BA853 -:0A01D900AA82C374FF950D743F95D0 -:0701E3000E5004758200229A -:0701EA00E511700302029F02 -:0A01F100AB117C00EB250DFBEC3593 -:0801FB000EFC74C0550DFDAEB1 -:0C0203000E74402DFDE43EFEC3ED9BEEAA -:0C020F009C500E743F550DFB7C007440A9 -:05021B00C39BFB800CF9 -:0A02200074C025114004AB118002E8 -:02022A007B4017 -:08022C00AC0E903802ECF0ACBE -:0A0234000D7D00903803ECF07C0013 -:0C023E00C3EC9B501E74022C2402FDE453 -:0A024A003438FEEC250FF582E43590 -:0C02540010F583E0FF8D828E83F00C809B -:01026000DDC0 -:04026100754F02755E -:06026500503874022BF575 -:0C026B00518A82C002C003122C68E58298 -:09027700D003D0027003F58222CD -:0A028000E511C39BF5117C00EB258E -:05028A000DF50DEC353F -:09028F000EF50E900008C00212E9 -:070298003508D0020201EA63 -:04029F007582012241 -:0E02A300903844E4F0903845F0A3F0A3F0A3A7 -:0E02B100F0903849E4F090384AF0A3F0A3F042 -:0E02BF00A3F090384EE4F0A3F0A3F0A3F07586 -:0602CD001201751301751A -:0602D30014807515007592 -:0602D9001600751700225B -:0E02DF00AA82AB83ACF0123547FD74012AFEF3 -:0E02ED00E43BFF8C008E828F8388F012354731 -:0902FB00FE5D6005430520800250 -:020304007D007A -:0E0306008A828B838CF0ED1233B674022AFFCC -:0E031400E43BF88C018F82888389F012354714 -:0E032200FD74032AFAE43BFB8A828B838CF085 -:0E033000123547FE74BF5DFA8A0574BF5E5A2F -:0D033E00600D4305408F82888389F0ED1229 -:02034B0033B6C7 -:03034D008D82227C -:0D03500090E6B8E0FA530280BA8002800304 -:03035D000206583D -:0A03600090E6B9E0FABA0102804508 -:06036A00BA0203020425A3 -:06037000BA030302049130 -:06037600BA04030204F8C2 -:06037C00BA05030205644E -:06038200BA06030205C9E2 -:06038800BA07030205E4C0 -:06038E00BA400302060262 -:06039400BA800302061E00 -:06039A00BAA00302066F89 -:0603A000BAA10302064CA5 -:0603A600BAA2030206509A -:0303AC00020654F2 -:0903AF007401B51A0B75120175F9 -:0703B800130112199E804998 -:0E03BF00903844E0FA90E6BAE0FBEAB5033865 -:0A03CD0075120175130190E6047427 -:0E03D70080F00090E6047482F00090E6497415 -:0E03E50082F00090E6497482F00090E64974C0 -:0E03F30082F00090E6497482F00090E604E487 -:04040100F000800384 -:03040500751281EC -:0C04080090E740E512F0903844E0FA90D4 -:0E041400E741F090E68AE4F090E68B7402F087 -:0304220002066F60 -:0A04250075120190E740E512F09017 -:0D042F00E741E4F090E742F090E743F090E1 -:0E043C00384AE0FAA3E0A3E0A3E090E744EA28 -:0E044A00F090384AE0A3E0FBA3E0A3E08B02B1 -:0E04580090E745EAF090384AE0A3E0A3E0FC0C -:0E046600A3E08C0290E746EAF090384AE0A34B -:0E047400E0FBA3E0FCA3E0FD8D0290E747EA69 -:0D048200F090E68AE4F090E68B7408F0023A -:02048F00066FF6 -:090491007401B51A2675120175FB -:0C049A00130112199E90E6047480F0001B -:0E04A60090E6047486F00090E6487486F0003C -:0804B40090E604E4F000801F53 -:0E04BC00903844E0FA90E6BAE0FBEAB5030E91 -:0904CA0075120175130174EF5560 -:0504D30016F516800380 -:0304D80075128119 -:0C04DB0090E740E512F090E6BAE0FA90DD -:0E04E700E741F090E68AE4F090E68B7402F0B4 -:0304F50002066F8D -:0A04F80075120190E740E512F09044 -:0D050200E741E4F090E742F090E743F0900D -:0E050F00384EE0FAA3E0A3E0A3E090E744EA50 -:0E051D00F090384EE0A3E0FBA3E0A3E08B02D9 -:0E052B0090E745EAF090384EE0A3E0A3E0FC34 -:0E053900A3E08C0290E746EAF090384EE0A373 -:0E054700E0FBA3E0FCA3E0FD8D0290E747EA95 -:0D055500F090E68AE4F090E68B7408F00266 -:02056200066F22 -:0905640075120175130174EF55C5 -:06056D0016F5167401B53D -:060573001A09121A0775B7 -:050579001A001214D36A -:0E057E0090E6047480F00090E6047482F000B1 -:0E058C0090E6047486F00090E6497482F00058 -:0E059A0090E6497482F00090E6497482F00009 -:0E05A80090E6497482F00090E604E4F00090C2 -:0B05B600E740E512F090E68AE4F090C8 -:0805C100E68B7401F002066FE5 -:0A05C90075120190E740E512F09072 -:0E05D300E741E4F090E68AF090E68B7402F0C7 -:0305E10002066FA0 -:0605E4007512017A967BFE -:0905EA003590E6B3EBF07A967B44 -:0C05F300357B007C007D0090E6B4EAF04F -:0305FF0002066F82 -:0C060200758206121B8475120190E740FF -:0C060E00E512F090E68AE4F090E68B74B0 -:04061A0001F080511A -:0A061E0075120190E740E512F0901C -:0E062800E6BAE090E741F090001475F0401241 -:0E06360002DFAA8290E742EAF090E68AE4F042 -:0806440090E68B7403F08023A3 -:04064C007582002291 -:04065000758200228D -:040654007582002289 -:0D06580090E6B8E0FA20E70B90E6B9E075F7 -:06066500128075820022E4 -:04066B007582002272 -:04066F00758201226D -:0E359600010000010400000000000000000120 -:0A35A400000000000000000000001D -:0E067300AA8275F00AEA84A9F0EAC39975F02C -:0D0681000A84FA75F00A84E5F0FC7027ADDC -:04068E004FAE50AF6C -:0C06920051743029F88D828E838FF01295 -:07069E0033B60DBD00010E93 -:0E06A5008D828E838FF0740A1233B675820236 -:0106B3002224 -:0E06B400EAC39C75F00A8475F00A84E5F0FA3A -:0706C200703DAD4FAE50AFDB -:0B06C9005174302C8D828E838FF01254 -:0E06D40033B674012DFAE43EFC8F0074302919 -:0E06E2008A828C8388F01233B674022DFDE4F8 -:0E06F0003EFE8D828E838FF0740A1233B67533 -:0306FE0082032252 -:05070100AB4FAD50AE4E -:0B0706005174302A8B828D838EF0121C -:0E07110033B674012BFAE43DFF8E0074302CD9 -:0E071F008A828F8388F01233B674022BFAE4BC -:0E072D003DFC8E077430298A828C838FF01277 -:0E073B0033B674032BFBE43DFD8B828D838E61 -:0A074900F0740A1233B67582042220 -:0807530085824F85835085F07B -:08075B00517552007E007F0081 -:03076300BF0400D0 -:0A076600505CEF254FFDE43550FA1A -:0C077000AB518D828A838BF0123547FA62 -:03077C00BA300090 -:0C077F004014EA24C6400FE55275F00A51 -:0A078B00A4FBEA24D02BF552802ACB -:09079500EE254FFAE43550FBACEF -:0C079E00518A828B838CF0123547FABA26 -:0407AA000A028003BC -:0307AE00EA7004EA -:0407B10085528222C9 -:0A07B50074104514F514758200223B -:0507BF000F8F06809F72 -:0A07C40074104514F514758200222C -:0807CE0085825285835385F0FA -:0407D60054AD4FAE21 -:0507DA0050AF51780052 -:0E07DF008D828E838FF01235477A0024FEF94A -:0E07ED00EA34FFFA88037C00C3EB99EC6480C9 -:0D07FB008AF063F08095F05038E8C31325B4 -:0508080052F555E43536 -:04080D0053F55685C4 -:0A081100545774022BFBE43CFCEB8F -:0E081B002DFBEC3EFC8F028B828C838AF01248 -:070829003547FB8555828570 -:0608300056838557F0120B -:0608360033B6080880A3A0 -:0D083C00E8C313FA8A037C000BBB00010C1B -:09084900EB2552FBEC3553FCAD2C -:0C085200548B828C838DF0E41233B6EAE4 -:08085E002552FAE43553FBAC0E -:08086600548A828B838CF0227E -:0E086E00AA82AB83ACF0123547FDA3123547CA -:08087C00FEA3123547FF7800CE -:0A088400C3E895255069E82522F528 -:05088E0026E43523F50E -:0308930027852492 -:0C089600288D828E838FF0123547F5828A -:0E08A200C002C003C004C005C006C007C000ED -:0E08B00012351BE582D000D007D006D005D04F -:0E08BE0004D003D002600F8D828E838FF01263 -:0808CC003547F9430120800AC1 -:0A08D4008D828E838FF0123547F9F4 -:0708DE008526828527838532 -:0B08E50028F0E91233B60DBD00010E33 -:0308F000088091EC -:0D08F3008A828B838CF0ED1233B6A3EE12D7 -:0E09000033B6A3EF1233B674062AFDE43BFEB5 -:0B090E008C078D828E838FF0E5221293 -:0609190033B6A3E5231232 -:06091F0033B6A3E524122B -:0C09250033B674092AFAE43BFBE52525F3 -:0709310022FDE43523FEAFB7 -:0C093800248A828B838CF0ED1233B6A36E -:0A094400EE1233B6A3EF1233B685AE -:06094E002282852383854F -:0309540024F0226A -:0809570085822C85832D85F0BB -:08095F002E7406252CFDE43581 -:050967002DFEAF2E750E -:03096C002252759F -:03096F00233875B5 -:06097200240075250C8530 -:060978002C82852D838511 -:0C097E002EF0C005C006C00712086EAACB -:0E098A0082AB83ACF0D007D006D0058D828EF4 -:0E099800838FF0EA1233B6A3EB1233B6A3EC52 -:0A09A6001233B67406252CFAE4356E -:0A09B0002DFBAC2E8A828B838CF0A5 -:0709BA00123547F52FA312CF -:0609C1003547F530A312DA -:0509C7003547F5318504 -:0609CC002F8285308385B7 -:0B09D20031F0123547FDBD2A02800302 -:0309DD00020FC83E -:0A09E0007401252FFDE43530FEAF51 -:0C09EA00318A828B838CF0ED1233B6A3AF -:0A09F600EE1233B6A3EF1233B68DF4 -:040A00004F8E508F36 -:060A040051755203E4F5F8 -:0C0A0A00539035AE75F080C002C003C0F0 -:0E0A160004122A02E5828583F0D004D003D0BA -:0A0A24000245F0700BF514F516758D -:060A2E0013017582012294 -:0C0A34008A828B838CF0123547F54FA3AB -:070A4000123547F550A31227 -:050A47003547F5517573 -:060A4C005203E4F5539093 -:0E0A520035B275F080C002C003C004122A0243 -:0E0A6000E5828583F0D004D003D00245F0601B -:040A6E0003020B363E -:0E0A72008A828B838CF0123547FDA312354724 -:0E0A8000FEA3123547FF74032DFDE43EFE8AEF -:0E0A8E00828B838CF0ED1233B6A3EE1233B6DA -:0E0A9C00A3EF1233B68A828B838CF01235479B -:070AAA00F532A3123547F5F8 -:060AB10033A3123547F5E6 -:0C0AB700348D828E838FF0123547FDBD18 -:0A0AC300201F74012532FDE43533D5 -:0C0ACD00FEAF348D828E838FF012075331 -:0A0AD900E582F51575130175820121 -:010AE30022F0 -:070AE4008532828533838512 -:0A0AEB0034F0123547FDBD3F3EAA6E -:040AF50029AB2AAC53 -:070AF9002B8A3574012BF577 -:040B0000368C378573 -:050B040015828A4F8BF1 -:040B0900508C5112A9 -:0A0B0D000673AD827E0085358285F7 -:070B170036838537F0ED1273 -:0A0B1E0033B6A3EE1233B67410458F -:040B280016F5167533 -:060B2C0013017582012295 -:040B320075820022A6 -:0C0B36008A828B838CF0123547F54FA3A8 -:070B4200123547F550A31224 -:050B49003547F5517570 -:060B4E005204E4F553908F -:0E0B540035B675F080C002C003C004122A023C -:0E0B6200E5828583F0D004D003D00245F07008 -:060B700041AA29AB2AACEA -:070B76002B8A3274012BF5FC -:040B7D00338C3485FC -:050B810014828A4F8B75 -:040B8600508C51122C -:0A0B8A000673AD827E00853282857D -:070B940033838534F0ED12FC -:0A0B9B0033B6A3EE1233B674104512 -:040BA50016F51675B6 -:090BA9001400751301758201228C -:0C0BB2008A828B838CF0123547F54FA32C -:070BBE00123547F550A312A8 -:050BC5003547F55175F4 -:060BCA005204E4F5539013 -:0E0BD00035BB75F080C002C003C004122A02BB -:0E0BDE00E5828583F0D004D003D00245F0609C -:040BEC0003020CFFF5 -:050BF000AA29AB2AACAC -:0A0BF5002B90E066E075F002A424E6 -:0A0BFF00D4F58274E035F0F583E0D0 -:090C0900FDA3E0FE8D4F8E507535 -:0C0C120051008A828B838CF01207CEAA5E -:0E0C1E0082AB83ACF0742C1233B674012AF54D -:060C2C0035E43BF5368CB7 -:0A0C32003790E067E075F002A4249B -:0A0C3C00D4F58274E035F0F583E092 -:090C4600FDA3E0FE8D4F8E5075F8 -:060C4F005100853582858D -:060C550036838537F01222 -:0E0C5B0007CEAA82AB83ACF0742C1233B60A1B -:040C6900BA00010BC1 -:0C0C6D0090E068E075F002A424D4F58249 -:0C0C790074E035F0F583E0FDA3E0FE8D93 -:040C85004F8E5075C9 -:0C0C890051008A828B838CF01207CEADE4 -:040C950029AE2AAFAB -:030C99002B754F69 -:030C9C00C07550D0 -:0A0C9F00357551808D828E838FF031 -:060CA900122CE1AD29AEA2 -:040CAF002AAF2B75C8 -:030CB3004FC275B8 -:030CB60050357541 -:0C0CB90051808D828E838FF0122CE1AAF6 -:040CC50029AB2AAC81 -:070CC9002B8A3274012BF5A8 -:0A0CD000338C348A828B838CF0127F -:0A0CDA00352FAD82AE83853282858E -:070CE40033838534F0ED12AB -:080CEB0033B6A3EE1233B67517 -:070CF300130174104516F512 -:050CFA001675820122C5 -:0C0CFF008A828B838CF0123547F54FA3DE -:070D0B00123547F550A31259 -:050D12003547F55175A5 -:060D17005203E4F55390C5 -:0E0D1D0035C775F080C002C003C004122A0260 -:0E0D2B00E5828583F0D004D003D00245F0604D -:040D390003020DB5EF -:0E0D3D008A828B838CF0123547FDA312354756 -:0E0D4B00FEA3123547FF74032DFDE43EFE8A21 -:0E0D5900828B838CF0ED1233B6A3EE1233B60C -:0E0D6700A3EF1233B68D828E838FF0123547C4 -:090D7500FDBD3F32AD29AE2AAFED -:0C0D7E002B8D828E838FF074311233B6FF -:0D0D8A0074012EFE8D828E838FF074011295 -:080D970033B6A3E41233B67574 -:070D9F00130174104516F565 -:050DA600167582012218 -:0A0DAB00751801751301758201220D -:0C0DB5008A828B838CF0123547F54FA327 -:070DC100123547F550A312A3 -:050DC8003547F55175EF -:060DCD005203E4F553900F -:0E0DD30035CB75F080C002C003C004122A02A6 -:0E0DE100E5828583F0D004D003D00245F07087 -:0A0DEF001A740C252CFDE4352DFECE -:0B0DF900AF2E8D828E838FF0740112EC -:060E040033B675820122E5 -:0C0E0A008A828B838CF0123547F54FA3D1 -:070E1600123547F550A3124D -:050E1D003547F5517599 -:060E22005203E4F55390B9 -:0E0E280035CF75F080C002C003C004122A024C -:0E0E3600E5828583F0D004D003D00245F06041 -:040E440003020F0690 -:0E0E48008A828B838CF0123547FDA31235474A -:0E0E5600FEA3123547FF74032DFDE43EFE8A15 -:0E0E6400828B838CF0ED1233B6A3EE1233B600 -:0E0E7200A3EF1233B68A828B838CF0123547C1 -:070E8000F535A3123547F51B -:060E870036A3123547F509 -:0C0E8D00378D828E838FF0123547FDBD3B -:0A0E9900201F74012535FDE43536F5 -:0C0EA300FEAF378D828E838FF012075354 -:0A0EAF00E582F51775130175820145 -:010EB9002216 -:070EBA008535828536838532 -:0A0EC10037F0123547FDBD3F38AA97 -:040ECB0029AB2AAC79 -:070ECF002B8A3274012BF5A0 -:040ED600338C3485A0 -:050EDA0017828A4F8B16 -:040EDF00508C5112D0 -:0A0EE3000673AD827E008532828521 -:070EED0033838534F0ED12A0 -:080EF40033B6A3EE1233B6750C -:060EFC00130175820122C2 -:040F020075820022D2 -:0C0F06008A828B838CF0123547F54FA3D4 -:070F1200123547F550A31250 -:050F19003547F551759C -:060F1E005204E4F55390BB -:0E0F240035D375F080C002C003C004122A024B -:0E0F3200E5828583F0D004D003D00245F07034 -:060F400050AA29AB2AAC07 -:070F46002B8A3274012BF528 -:040F4D00338C34901D -:0E0F5100001475F040C002C003C0041202DF9D -:0A0F5F00D004D003D0028A4F8B505B -:0A0F69008C51120673AD827E0085E4 -:060F730032828533838504 -:090F790034F0ED1233B6A3EE12C0 -:080F820033B67513017410452C -:070F8A0016F5167582012225 -:0C0F91008A828B838CF0123547F54FA349 -:070F9D00123547F550A312C5 -:050FA4003547F5517511 -:060FA9005203E4F5539031 -:0E0FAF0035D875F080122A02E5828583F04560 -:070FBD00F0700475820122AF -:040FC4007582002210 -:040FC800852F4F859D -:030FCC003050851D -:030FCF0031517528 -:060FD2005205E4F5539006 -:0E0FD80035DC75F080C002C003C004122A028E -:0E0FE600E5828583F0D004D003D00245F06090 -:040FF4000302117F64 -:0E0FF8008A828B838CF0123547FDA312354799 -:0E100600FEA3123547FF74052DFDE43EFE8A61 -:0E101400828B838CF0ED1233B6A3EE1233B64E -:08102200A3EF1233B68D4F8ECF -:04102A00508F51751D -:06102E005204E4F55390AA -:0E10340035E275F080C002C003C004122A022B -:0E104200E5828583F0D004D003D00245F06033 -:041050000302110E78 -:08105400E51430E539AD29AEC9 -:04105C002AAF2B7517 -:031060004FE775E2 -:0310630050357590 -:0C10660051808D828E838FF012297CADAA -:07107200297401252AFEAFDD -:0C1079002B8D828E838FF074161233B61C -:0A108500A3E41233B674DF5514F52E -:03108F0014806F5B -:08109200E51430E439AD29AE8C -:04109A002AAF2B75D9 -:03109E004FFE758D -:0310A10050357552 -:0C10A40051808D828E838FF012297CAD6C -:0710B000297401252AFEAF9F -:0C10B7002B8D828E838FF074181233B6DC -:0A10C300A3E41233B674EF5514F5E0 -:0310CD001480315B -:0510D000AD29AE2AAFBE -:0310D5002B754F29 -:0310D80017755039 -:0A10DB00367551808D828E838FF0F0 -:0810E50012297CAD29740125DC -:0A10ED002AFEAF2B8D828E838FF058 -:0A10F700740E1233B6A3E41233B6F0 -:0811010075130174104516F589 -:051109001675820122B1 -:0C110E008A828B838CF0123547F54FA3CA -:07111A00123547F550A31246 -:051121003547F5517592 -:061126005205E4F55390B0 -:0E112C00362675F080122A02E5828583F04592 -:08113A00F0703EAD29AE2AAFB2 -:031142002B754FBB -:031145002C7550B6 -:0A114800367551808D828E838FF082 -:0811520012297CAD297401256E -:0A115A002AFEAF2B8D828E838FF0EA -:0B11640074071233B6A3E41233B67513 -:07116F00130174104516F591 -:05117600167582012244 -:04117B007582002257 -:0C117F008A828B838CF0123547F54FA359 -:07118B00123547F550A312D5 -:051192003547F5517521 -:061197005205E4F553903F -:0E119D00363475F080C002C003C004122A026E -:0E11AB00E5828583F0D004D003D00245F060C9 -:0411B9000302137C9E -:0E11BD008A828B838CF0123547FDA3123547D2 -:0E11CB00FEA3123547FF74052DFDE43EFE8A9B -:0E11D900828B838CF0ED1233B6A3EE1233B688 -:0811E700A3EF1233B68D4F8E09 -:0411EF00508F517557 -:0611F3005205E4F55390E3 -:0E11F900363A75F080C002C003C004122A020C -:0E120700E5828583F0D004D003D00245F0705C -:0A1215001A740C252CFDE4352DFEA3 -:0B121F00AF2E8D828E838FF0740512BD -:06122A0033B675820122BB -:0C1230008A828B838CF0123547F54FA3A7 -:07123C00123547F550A31223 -:051243003547F551756F -:061248005205E4F553908D -:0E124E00364075F080C002C003C004122A02B0 -:0E125C00E5828583F0D004D003D00245F07007 -:0A126A001A740C252CFDE4352DFE4E -:0B127400AF2E8D828E838FF07403126A -:06127F0033B67582012266 -:0C1285008A828B838CF0123547F54FA352 -:07129100123547F550A312CE -:051298003547F551751A -:06129D005203E4F553903A -:0E12A300364675F080C002C003C004122A0255 -:0E12B100E5828583F0D004D003D00245F070B2 -:0A12BF001A740C252CFDE4352DFEF9 -:0B12C900AF2E8D828E838FF074021216 -:0612D40033B67582012211 -:0C12DA008A828B838CF0123547F54FA3FD -:0712E600123547F550A31279 -:0512ED003547F55175C5 -:0612F2005205E4F55390E3 -:0E12F800364A75F080C002C003C004122A02FC -:0E130600E5828583F0D004D003D00245F0705C -:0A1314001A740C252CFDE4352DFEA3 -:0B131E00AF2E8D828E838FF0740412BE -:0613290033B675820122BB -:0C132F008A828B838CF0123547F54FA3A7 -:07133B00123547F550A31223 -:051342003547F551756F -:061347005204E4F553908E -:0E134D00365075F080122A02E5828583F04545 -:0A135B00F0701A740C252CFDE43527 -:0A1365002DFEAF2E8D828E838FF0D7 -:09136F0074061233B675820122E6 -:041378007582002258 -:0C137C008A828B838CF0123547F54FA35A -:07138800123547F550A312D6 -:05138F003547F5517522 -:061394005204E4F5539041 -:0E139A00365575F080C002C003C004122A024E -:0E13A800E5828583F0D004D003D00245F060CA -:0413B600030214CF4B -:0E13BA008A828B838CF0123547FDA3123547D3 -:0E13C800FEA3123547FF74042DFDE43EFE8A9D -:0E13D600828B838CF0ED1233B6A3EE1233B689 -:0813E400A3EF1233B68D4F8E0A -:0413EC00508F517558 -:0613F0005205E4F55390E4 -:0E13F600365A75F080C002C003C004122A02ED -:0E140400E5828583F0D004D003D00245F0705D -:0A1412001A740C252CFDE4352DFEA4 -:0B141C00AF2E8D828E838FF0740912BA -:0614270033B675820122BC -:0C142D008A828B838CF0123547F54FA3A8 -:07143900123547F550A31224 -:051440003547F5517570 -:061445005204E4F553908F -:0E144B00366075F080C002C003C004122A0291 -:0E145900E5828583F0D004D003D00245F07008 -:0A1467001A740C252CFDE4352DFE4F -:0B147100AF2E8D828E838FF074081266 -:06147C0033B67582012267 -:0C1482008A828B838CF0123547F54FA353 -:07148E00123547F550A312CF -:051495003547F551751B -:06149A005204E4F553903A -:0E14A000366575F080122A02E5828583F045DC -:0A14AE00F0701A740C252CFAE435D6 -:0A14B8002DFBAC2E8A828B838CF092 -:0914C20074071233B67582012291 -:0414CB007582002204 -:0414CF007582002200 -:0435AE00636C7300D7 -:0435B20065736500D8 -:0535B6006573723F0087 -:0535BB0069646E3F0091 -:0235C0002C00DD -:0535C200302E330A0069 -:0435C7006F706300BE -:0435CB0072737400A3 -:0435CF0073726500AE -:0535D3007374623F006B -:0435D80077616900AE -:0635DC00737973743A00DC -:0535E2006572723F005C -:0E35E7002D3130302C2022436F6D6D616E64EB -:0935F500206572726F72220A0057 -:0E35FE002D3230302C202245786563757469BB -:0B360C006F6E206572726F72220A0060 -:0E361700302C20224E6F206572726F72220AD4 -:0136250000A4 -:06362600766572733F009F -:08362C00313939392E300A0052 -:06363400667067613A00B8 -:06363A00636F6E662000C4 -:06364000747970653F0083 -:0436460069643F0074 -:06364A00646F6E653F0095 -:053650006461746100DB -:053655006D656D3A00F7 -:06365A00646174612000B0 -:0536600064656C200010 -:053665006361743F00E9 -:0814D30090E60174E0F0002234 -:0814DB0085825485835585F0DC -:0514E30056755700756D -:0514E8005800AF51A8FF -:0514ED0052A953E4F5D3 -:0714F2005BF55C74022FF5AD -:0614F9005DE438F55E8998 -:0914FF005F74032FF560E438F579 -:05150800618962E4F5B9 -:03150D0059F55A33 -:06151000C3E559954FE50B -:061516005A95504003024B -:02151C00163C7B -:0A151E00C3E5589557505DC007C0A3 -:0915280000C001AB580558EB2589 -:0715310060FBE43561FCAE34 -:0415380062E55925EA -:05153C0054FAE55A35E8 -:0A15410055FDAF568A828D838FF0AE -:0E154B00123547FA8B828C838EF01233B6E590 -:0815590057B55804740180012C -:01156100E4A5 -:0B156200D001D000D007700302162B50 -:0C156D008F82888389F0E55B1233B6A3FF -:09157900E55C1233B67582012213 -:07158200E558702DE5592525 -:0515890054FAE55A359B -:0A158E0055FBAC568A828B838CF06B -:08159800123547FA855D8285DA -:0615A0005E83855FF0127E -:0B15A6003547FBEAB50306755801024B -:0215B100162BF7 -:0815B3007401B55821E559252A -:0515BB0054FAE55A3569 -:0A15C00055FBAC568A828B838CF039 -:0A15CA00123547700575580280576E -:0515D400755800805273 -:0915D9007402B5584D755800E587 -:0515E200592554FAE553 -:0515E7005A3555FBAC74 -:0C15EC00568A828B838CF0123547FA245B -:0815F800EC5005755713800249 -:021600008A5707 -:07160200855D82855E838592 -:0A1609005FF0123547FBBB65197551 -:0A161300570375580174032FFBE420 -:0E161D0038FC89058B828C838DF0EA1233B67F -:07162B000559E4B559020561 -:011632005A5D -:0416330085595B85F5 -:031637005A5C02F8 -:02163A00151089 -:0C163C008F82888389F0E55B1233B6A32F -:09164800E55C1233B67582FF2245 -:0E16510075AF0390E6C2E0FA43020490E6C2D1 -:0E165F00EAF0EA601090E6C2E0FA4302029060 -:07166D00E6C2EAF0EA702575 -:0916740090E6C2E04402F07A00A5 -:03167D00BA0400AC -:0E168000500F90E6C2E054FEF0E0FB4401F093 -:03168E000A80ECE3 -:0816910090E6C2E0FA4404F007 -:0E169900E5807580007582641234F543802070 -:0216A7007A00C7 -:0316A900BA320052 -:0E16AC005025E58030E41390E6C2E090E6C2DF -:0C16BA00E4F0E090E6C2E4F0758201224A -:0D16C600900001C002123508D0020A80D643 -:0416D30075820022FA -:0E16D700AA82AB838B9A7C007D008A9B7A00EE -:0216E5007B0088 -:0A16E700C3EA954FEB9550501685AD -:0E16F1009C9090E6C2E054FEF0E0FC4401F054 -:0716FF000ABA00E40B80E1D0 -:0417060075820122C5 -:02170A007A0063 -:03170C00BA04001C -:0E170F00500F90E6C2E054FEF0E0FB4401F003 -:03171D000A80EC53 -:0E17200090E6C2E04404F090E6C2E04402F01D -:0A172E0074805580FABA800280042E -:041738007582002294 -:04173C00758201228F -:0E366A008F01BF0101010107010003020202EE -:0E36780002000004040404040400000000002A -:0E3686000000003F3911BB1F010101070101C7 -:0E369400030100000000000202060606060008 -:0E36A20040090F090000003F0802019C0101D1 -:0E36B0003F07011000030610010000080C0C7B -:0E36BE000C000000000000000000003F390179 -:0E36CC001323AC3F3F0701000103071101006B -:0E36DA00000202020200000000000009360992 -:0236E800003FA1 -:0E36EA000000000000000000000000000000D2 -:0E36F800000000008336040003230302008458 -:08370600090202022303020084 -:07370E00E0000000EE4E0098 -:0E174000C0E0C082C083C002C0D075D000439C -:0C174E00A0015391BF75A2007402551950 -:0C175A00FABA02435319FD90E6F3E0FADE -:0E1766004480F00090E6C67484F090E6C774EC -:0E17740009F090E6C87402F090E6C97402F025 -:0D17820090E6CA7402F00090E6CEE4F0900C -:0E178F00E6CFF090E6D0F090E6D17401F07550 -:04179D00BB00803DD0 -:0E17A10090E6F3E0FA4480F00090E6C6748310 -:0E17AF00F090E6C77436F090E6C87404F0902F -:0E17BD00E6C9E4F090E6CA7403F00090E6CEB0 -:0E17CB00E4F090E6CFF090E6D0F090E6D17416 -:0517D90001F075BB06E4 -:0E17DE0053A0FED0D0D002D083D082D0E03213 -:0E17EC00C0E0C082C083C002C0D075D00043F0 -:0E17FA00A0045391BF75A20090E6C2E0FA531E -:0A1808000208BA08054319028049DE -:0E181200C2AF90E6F574FFF000D2AF90E6F39F -:0D182000E0FA4480F00090E6C67484F09079 -:0E182D00E6C77409F090E6C87402F090E6C9B0 -:0E183B007402F090E6CA7402F00090E6CEE46B -:0E184900F090E6CFF090E6D0F090E6D174017A -:04185700F075BB006D -:0E185B0053A0FBD0D0D002D083D082D0E03298 -:0E18690090E60174E6F00090E618E0FA4410F4 -:0E187700F00090E61AE0FA4408F00090E6D285 -:0E1885007401F00090E6E27402F00090E6D3E9 -:0E1893007401F090E6E37401F090E63074808A -:0E18A100F090E6317401F00090E6F574FFF06F -:0E18AF000090370EE49390E6F3F090370FE4CC -:0E18BD009390E6C3F0903710E49390E6C1F0EC -:0E18CB00903711E49390E6C2F0903713E49347 -:0618D90090E6C0F07A0069 -:0318DF00BA8000CC -:0E18E20050128A037CE4EA90366A93FD8B82F2 -:0618F0008C83F00A80E980 -:0D18F60090E6C67483F090E6C77436F0905B -:0E190300E6C87404F090E6C9E4F090E6CA74F9 -:0E19110003F090E6CB7423F090E6CC7403F064 -:0E191F0090E6CD7402F090E60CE4F090E6C67F -:0C192D00F090E6F3E04480F0751900C271 -:05193900AF754F407581 -:06193E00501775823412FF -:041944002DEC754FC2 -:03194800EC7550EB -:0C194B0017758200122DEC90E650740419 -:0E195700F090E6607402F0D2AF90E6F3E0FA92 -:0E1965004480F00090E6C67483F090E6C774EC -:0E19730036F090E6C87404F090E6C9E4F090F7 -:0E198100E6CA7403F00090E6CEE4F090E6CFE4 -:0E198F00F090E6D0F090E6D17401F075BB0642 -:01199D002227 -:0C199E00C2AF75190090E6F574FFF00070 -:0E19AA00E5BB30E7FB90371575F08012293A47 -:0919B800741CC0E07437C0E01299 -:0E19C10033CF15811581D2AF90E6F3E0FA44E2 -:0E19CF0080F00090E6C67483F090E6C7743690 -:0D19DD00F090E6C87404F090E6C9E4F090C4 -:0E19EA00E6CA7403F00090E6CEE4F090E6CF7B -:0E19F800F090E6D0F090E6D17401F075BB06D9 -:011A060022BD -:0E1A0700C2AF90E650E4F00090E660E4F0001C -:0D1A150090E6D17401F090E6D37401F090DA -:0D1A2200E6E37401F090E6F574FFF0007546 -:0C1A2F00190090E618E0FA54EFF0009067 -:0E1A3B00E61AE054F7F0D2AF90371575F08040 -:081A490012293A742AC0E0746E -:0B1A510037C0E01233CF158115812251 -:07371500494E464F3A200027 -:0E371C00677069662061626F727465640A00EE -:0E372A00677069662064656163746976617416 -:0437380065640A00BA -:0E1A5C0090E6007410F0758E0075802075B253 -:0E1A6A002375900075B3FF75A0C075B4C790CA -:0E1A7800E6C27407F090E6C3E4F090E60B744B -:0E1A860003F00090E610E4F00090E611E4F0AA -:0E1A94000090E61274A0F00090E613E4F0005B -:0E1AA20090E61474E0F00090E615E4F0009079 -:0E1AB000E6047480F00090E6047402F00090EA -:0D1ABE00E6047406F00090E604E4F00090E9 -:0E1ACB00E6187401F00090E61A7401F0009025 -:0E1AD900E68AE4F00090E68BE4F00090E64927 -:0E1AE7007482F00090E6497482F00090E649A7 -:0E1AF5007482F00090E6497482F00090E6D210 -:0E1B03007401F00090E6E27402F00090E680BB -:0D1B1100E0FA30E70E90E6247402F0009038 -:061B1E00E625E4F00022C0 -:0E1B240090E6247440F00090E6257440F00036 -:011B32002290 -:0E1B33005380BF43B24090000112350843803A -:051B41004053B2BF2279 -:091B4600E582FA700443A040227C -:041B4F0053A0BF22BE -:091B5300E582FA700443A080222F -:041B5C0053A07F22F1 -:041B600063A040221C -:041B640063A08022D8 -:011B6800225A -:0D1B690090385E7403F090385F7401F075E1 -:031B76004F5E754A -:031B79005038756C -:081B7C005102758241022C6840 -:0E1B8400AA829038607401F0903861EAF07522 -:031B92004F60752C -:031B950050387550 -:091B98005102758241122C68759E -:031BA1001BFF2205 -:071BA400903862E4F0754F78 -:031BAB0062755010 -:081BAE003875510175824112E6 -:041BB6002C68754FD3 -:031BBA0062755001 -:081BBD003875510175824112D7 -:0E1BC5002BA8903862E0FA530201BA010475B1 -:031BD3008201226A -:041BD60075820022F2 -:0335780002358099 -:0635630075440175386497 -:0335930002357B83 -:05357B0012280280FE91 -:051BDA0090E68BE4F031 -:091BDF0090E6A0E0FA20E1F822F2 -:031BE8000228EBE5 -:031BEB00022911BB -:091BEE00121BDA7402B51D079008 -:061BF7003863E4F0A3F0E6 -:091BFD00903863E0F50DA3E0F55A -:051C06000E750F407592 -:0A1C0B0010E790E6BEE0F5117582C7 -:0C1C1500511201D9E5827006751C03F520 -:021C210082221D -:0E1C230090E6BEE0FA7B00903863E0FCA3E0A0 -:0E1C3100FD903863EA2CF0EB3DA3F0758201C4 -:011C3F002282 -:0E1C400090E690E0FA8A037A0090E691E07D4B -:091C4E00002AF539ED3BF53A904E -:091C57003849E0FCBC01028003E5 -:031C6000021D6BF7 -:0E1C630090384AE0FCA3E0FDA3E0FEA3E0FF02 -:091C7100EC4D4E4F6003021D2AE8 -:0E1C7A0090387FE4F0903845E0FCA3E0FDA335 -:0A1C8800E0FEA3E0FFA839A93A7AB4 -:0E1C9200007B00C3E89CE99DEA9EEB9F502A70 -:0A1CA000E53924F4FAE53A34FFFBBD -:0E1CAA007C007D0090384AEAF0A3EBF0A3EC3A -:0A1CB800F0A3EDF0E53924EAF53958 -:081CC200E53A34FFF53A802EEB -:0E1CCA00903845E0FAA3E0FBA3E0FCA3E0FDA8 -:0E1CD80090384AEAF0A3EBF0A3ECF0A3EDF095 -:0E1CE600903845E0FAA3E0FBA3E0FCA3E0FD8C -:041CF4008A398B3A64 -:0C1CF800753B16903845E0FBA3E0FCA310 -:0E1D0400E0FDA3E0FEEB24F6FBEC34FFFCED6B -:0E1D120034FFFDEE34FFFE903845EBF0A3ECFD -:0A1D2000F0A3EDF0A3EEF0021E01A7 -:081D2A00753B0CE53924F4F5CA -:061D320039E53A34FFF52B -:0C1D38003A90384AE0FBA3E0FCA3E0FD79 -:0A1D4400A3E0FEAF39A83AE4F9FA73 -:0D1D4E00EF2BFBE83CFCE93DFDEA3EFE907A -:0E1D5B00384AEBF0A3ECF0A3EDF0A3EEF0029B -:021D69001E0159 -:0C1D6B00753B00903845E0FAA3E0FBA3B4 -:0A1D7700E0FCA3E0FDAE39AF3A78BE -:0E1D8100007900C3EE9AEF9BE89CE99D502A82 -:0E1D8F0090384AE0FAA3E0FBA3E0FCA3E0FDDD -:0D1D9D00EE2AFEEF3BFFE83CF8E93DF9902F -:0E1DAA00384AEEF0A3EFF0A3E8F0A3E9F080D2 -:011DB80048E2 -:0E1DB90090384AE0FAA3E0FBA3E0FCA3E0FDB3 -:0E1DC700903845E0FEA3E0FFA3E0F8A3E0F9AA -:0D1DD500EE2AFAEF3BFBE83CFCE93DFD90F7 -:0E1DE200384AEAF0A3EBF0A3ECF0A3EDF0908A -:0E1DF0003845E0FAA3E0FBA3E0FCA3E0FD8A87 -:031DFE00398B3AE4 -:0E1E010090387FE0FAC374808AF063F0809519 -:061E0F00F05003021F7CED -:091E1500EA70069038677462F06F -:0C1E1E00903867E0FABA6278AA3B7BF0CB -:061E2A007C007551657596 -:031E3000523875B0 -:041E3300530085399A -:031E37004F853A9A -:0C1E3A00508A828B838CF01214DBAA8289 -:071E4600BA014F750A807517 -:031E4D000B3875DA -:061E500008DD75093F7575 -:0C1E56000C107582511201A2E58270038D -:031E6200F58222E4 -:041E6500754F8075C0 -:031E690050387579 -:071E6C005100755210E4F56E -:081E73005390386875F000126D -:0E1E7B002A02E5828583F045F060047582003E -:011E89002236 -:0E1E8A009038677465F090387F7401F0800620 -:061E980090387F74FFF09A -:0C1E9E00903867E0FABA656AAA3B7BF056 -:061EAA007C007551657516 -:031EB00052387530 -:041EB300530085391A -:031EB7004F853A1A -:0C1EBA00508A828B838CF01214DBAA8209 -:0C1EC600BA014190386AE090387BF0903F -:0C1ED2003869E0FA90387C75F000EA12E4 -:081EDE0033B6903868E0FA9079 -:0A1EE600387D75F000EA1233B69063 -:091EF000387EE4F5F01233B6125D -:091EF9001651E5827003F5822206 -:081F020090387F7401F08006A5 -:061F0A0090387F74FFF027 -:0C1F1000903865E0FAA3E0FBEA253BF501 -:061F1C003BE539C39AF514 -:051F220039E53A9BF5D2 -:0C1F27003A90384AE0FCA3E0FDA3E0FE85 -:0E1F3300A3E0FFE4F8F9EA2CFCEB3DFDE83EEC -:0E1F4100FEE93FFF90384AECF0A3EDF0A3EE6E -:0E1F4F00F0A3EFF0903845E0FCA3E0FDA3E026 -:0E1F5D00FEA3E0FFECC39AFAED9BFBEE98F8B2 -:0E1F6B00EF99F9903845EAF0A3EBF0A3E8F007 -:031F7900A3E9F0E9 -:0E1F7C0090387FE0FAC374808AF063F080959D -:061F8A00F0400302204BB1 -:081F9000AA3B7BF07C008539BF -:031F98004F853A38 -:0C1F9B00508A828B838CF01216D7E582EE -:051FA7007003F5822229 -:0E1FAC00903845E0FAA3E0FBA3E0FCA3E0FDC3 -:0A1FBA00AE39AF3AE4F8F9EAC39E2D -:0E1FC400FAEB9FFBEC98FCED99FD903845EA96 -:0E1FD200F0A3EBF0A3ECF0A3EDF090387BE071 -:0C1FE000FAA3E0FBA3E0FCA3E0FDAE3997 -:0C1FEC00AF3A7800790090387BEAC39E81 -:0E1FF800F0EB9FA3F0EC98A3F0ED99A3F0900E -:0E200600387BE0FAA3E0FBA3E0FCA3E0FDC3FF -:0E201400E49AE49BE49C74808DF063F0809568 -:0E202200F0402612170AE582701C90373C75BC -:0A203000F08012293A7444C0E074F5 -:0C203A0037C0E01233CF1581158175828C -:02204600002276 -:032048007513010C -:04204B007582012277 -:0E204F0090E6BCE0FABA020D90E6B8E0FA5353 -:07205D000201BA0102800636 -:0620640074FE251D50264C -:0A206A00122A82E582600302210AB7 -:0A20740090373C75F08012293A7491 -:08207E0055C0E07437C0E01208 -:0A20860033CF158115817582002209 -:0E20900090E6BCE0700D90E6B8E0FA53020155 -:05209E00BA01028028D8 -:0E20A30090E6BCE0FABA020D90E6B8E0FA53FF -:0720B1000202BA02028013D3 -:0E20B80090E6BCE0FABA862E90E6B8E0FA5345 -:0520C6000202BA022332 -:0E20CB00120350E582703890373C75F0801299 -:0720D900293A7462C0E074B3 -:0C20E00037C0E01233CF158115817582E6 -:0220EC000022D0 -:0A20EE0090373C75F08012293A7417 -:0820F8006FC0E07437C0E01274 -:0A21000033CF15811581758200228E -:04210A0075820122B7 -:0E210E0090E6B8E0FABAC00890E6B9E0758233 -:02211C0000229F -:0A211E0090E6B8E0FABA4002800330 -:032128000221ECA5 -:0A212B0090E6B9E0FABA0102801351 -:05213500BA0202804126 -:05213A00BA0302805B06 -:06213F00BA04030221C9ED -:032145000221E88C -:0E214800121BDA90E6BEE0FA24F7500475820E -:02215600002265 -:0A215800750F407510E790E6BEE039 -:06216200F511750DF87582 -:0C2168000E3F7582511201D9E582600320 -:032174000221F055 -:04217700758200224B -:07217B00121BDA750F40751D -:0621820010E7750DF77572 -:092188000E3F7511017582511220 -:0921910001D9E5827059F58222A2 -:0E219A00121BDA90E6BEE0FA24EF50047582C4 -:0221A800002213 -:0A21AA00750F407510E790E6BEE0E7 -:0621B400F511750DDD754B -:0C21BA000E3F7582511201D9E582702A97 -:0321C600F582227D -:0721C900121BDA750F4075CF -:0621D00010E7750DED752E -:0921D6000E3F75110A75825112C9 -:0921DF0001D9E582700BF58222A2 -:0421E80075820022DA -:0421EC0075820022D6 -:0421F00075820122D1 -:0421F400750A907563 -:0321F8000B38752C -:0621FB0008F775093F75AD -:092201000C017582511201A2903A -:09220A003890E0FA90E00CF0902D -:06221300E064EAF0750A28 -:0322190091750BB1 -:05221C00387508F8759B -:09222100093F750C087582511289 -:04222A0001A27A0093 -:03222E00BA0800EB -:0A2231005029EA2491F582E43438C4 -:09223B00F583E0FBBBFF027B30E0 -:0C2244008A04E4CC25E0CC33FDEC247EC1 -:0C225000F582ED34E1F583EBF00A80D25A -:01225C00225F -:05225D009039ABE4F034 -:09226200903849E4F03004031245 -:02226B0030BA87 -:08226D00E5AA30E0030225BAE6 -:07227500E51A60030225BA1F -:0A227C0090378675F08012293A743D -:082286008DC0E07437C0E012C6 -:0C228E0033CF158115817401B513028057 -:01229A00172C -:0E229B00903845E0FAA3E0FBA3E0FCA3E0FDD1 -:0922A900EA4B4C4D600302242EA7 -:0E22B20090F00175F000123547FA90F00275B9 -:0E22C000F000123547FB3395E0FCEBF4FBEC2D -:0E22CE00F4FCEAFD3395E0FEEDB50306EEB537 -:0422DC000402800375 -:0322E00002240FC6 -:0E22E300903844EAF090F000E0FABA01028070 -:0122F10003E9 -:0322F2000223A91B -:0E22F50090F00475F000123547FBA312354738 -:0C230300FCA3123547FDA3123547FE90E5 -:0E230F003845EBF0A3ECF0A3EDF0A3EEF09058 -:0C231D0038497401F07401B5130280030C -:0323290002242E5D -:0C232C0075130290384AE4F0A3F0A3F00F -:09233800A3F074EF5516F51690A0 -:0E234100384EE4F0A3F0A3F0A3F090399DE431 -:0E234F00F0A3F090399F740CF0A374F0F0A38B -:08235D00E4F09039ABF07529A2 -:032365009D752A39 -:0523680038752B009008 -:0D236D00399F75F000120957E582600302E8 -:02237A00242E0F -:07237C0074204514F51475EF -:0823830013019039ABE4F09066 -:0A238B003849F090373C75F08012DD -:07239500293A7494C0E074C2 -:0B239C0037C0E01233CF15811581021D -:0223A700242EE2 -:0E23A900BA024290399DE0FAA3E0FB4A603789 -:0C23B70075130390F00475F00012354718 -:0D23C300FAA3123547FBA3123547FCA31205 -:0E23D0003547FD903845EAF0A3EBF0A3ECF0A2 -:0E23DE00A3EDF090384EE4F0A3F0A3F0A3F0CE -:0223EC0080402F -:0E23EE0090E6A3E04401F090373C75F08012B9 -:0723FC00293A74A4C0E0744B -:0C24030037C0E01233CF15811581801F17 -:0E240F0090E6A3E04401F090373C75F0801297 -:07241D00293A74B8C0E07415 -:0A24240037C0E01233CF1581158197 -:07242E007402B513028003E4 -:032435000225B4C9 -:0C2438009039ABE0FA24F650030225B105 -:07244400EA2A2A90244B73E1 -:07244B000225B10224690221 -:0624520024720224A20224 -:0624580024D20224FD0263 -:06245E00251302251F02F8 -:05246400259B0225ACE0 -:07246900121B337513010281 -:0224700025B491 -:04247200750A9D75D5 -:032476000B3875AB -:0624790008ED75093F7536 -:09247F000C0A7582511201A290B1 -:0E24880038A7740AF090399D740BF0A3E4F0AD -:0724960074104516F51675E0 -:05249D0013010225B44B -:0424A200750A9D75A5 -:0324A6000B38757B -:0624A90008DD75093F7516 -:0924AF000C107582511201A2907B -:0E24B80038AD740AF090399D7411F0A3E4F071 -:0724C60074104516F51675B0 -:0524CD0013010225B41B -:0E24D20074805580FABA800890389D7431F0FD -:0224E000800674 -:0624E20090389D7430F0FB -:0E24E80090389E740AF090399D7402F0A3E4BF -:0724F600F07513010225B48B -:0A24FD00121C40E58260030225B4C2 -:0725070074104514F5147572 -:05250E0013010225B4D9 -:07251300121869751A017529 -:05251A0013010225B4CD -:04251F007A007B00C3 -:0E252300C3EA9414EB940050128A8274F02BD9 -:0D253100F5838A04ECF00ABA00E80B80E59F -:0D253E0090F01474FFF090F01574FFF09011 -:0E254B00E690E4F090E6917414F012199E9060 -:0E255900E6F3E0FA4480F00090E6C67484F0E9 -:0D25670090E6C77409F090E6C87402F09089 -:0D257400E6C97402F090E6CA7402F000900F -:0D258100E6CEE4F090E6CFF090E6D0F090CA -:0C258E00E6D17401F075BB0075130180EC -:01259A001927 -:0D259B0090E6F07455F090E6F174AAF0752A -:0425A8001301800893 -:0525AC0075130180031E -:0325B1007513019E -:0625B40090E6497482F07C -:0825BA00E5AA30E503022798B1 -:0725C2007403B5130280034E -:0325C9000227984E -:0E25CC0090384EE0FAA3E0FBA3E0FCA3E0FD94 -:0925DA00EA4B4C4D60030226910E -:0E25E30090F8007402F0903844E0FA90F8018D -:0E25F10075F000EA1233B6903844E0F4FA9028 -:0E25FF00F80275F000EA1233B690F803E4F526 -:0E260D00F01233B690399DE0FAA3E0FB8A0488 -:0E261B008B057E007F0090F80475F000EC1235 -:0A26290033B6A3ED1233B6A3EE1290 -:0E26330033B6A3EF1233B690F809E4F5F012B7 -:0E26410033B690F80AE4F5F01233B690F80BB9 -:0E264F00E4F5F01233B690E680E0FC30E725AB -:0E265D00C374F49A74019BB3E433FCC3743865 -:0E266B009AE49BB3E433FA4C600D90F80875C6 -:09267900F00074011233B680096F -:0926820090F808E4F5F01233B6FB -:06268B00753C0CE4F53D76 -:0C26910090384EE0A3E0A3E0A3E0AA3CD8 -:02269D00AB3D53 -:0E269F00C002C00390384EE0FCA3E0FDA3E0B3 -:0D26AD00FEA3E0FF90399DE0FAA3E0FB8A58 -:0426BA003E8B3F759F -:0726BE004000754100C3E577 -:0626C5003E9CE53F9DE58F -:0A26CB00409EE5419FE433D003D0A8 -:0626D50002600302275C15 -:0926DB008A048B050ABA00010B08 -:0826E4008C4274F82DF54390BF -:0E26EC00384EE0FEA3E0FFA3E0A3E0FDEE24E5 -:0A26FA009DF582EF3438F583E0858A -:0A2704004282854383F090E680E0F6 -:0E270E00FC30E71E90399DE0FCA3E0FDE4BC2A -:06271C000004BD020104EF -:09272200FEE4BC4004BD0001040A -:05272B004E6002802C4D -:0E27300090384EE0FCA3E0FDA3E0FEA3E0FF26 -:0D273E000CBC00090DBD00050EBE00010F12 -:0E274B0090384EECF0A3EDF0A3EEF0A3EFF00B -:0327590002269FB6 -:0C275C0090E698EBF090E699EAF0E4F5C6 -:042768003CF53D906F -:0E276C00384EE0FAA3E0FBA3E0FCA3E0FDC3BF -:08277A00EA953EEB953FEC955A -:0727820040ED954140107588 -:07278900130174EF5516F572 -:082790001690399DE4F0A3F05E -:09279800E51B7005F582121B849B -:0627A1007538640222629B -:0C27A700C021C0E0C0F0C082C083C002AE -:0E27B300C003C004C005C006C007C000C001BE -:0A27C100C0D075D0001544E5447047 -:0827CB0009754432121B607510 -:0227D3001B00E9 -:0827D5007401B51D09151EE594 -:0627DD001E7003123082A1 -:0E27E300C2CFD0D0D001D000D007D006D00594 -:0E27F100D004D003D002D083D082D0F0D0E04C -:0327FF00D02132B4 -:07280200121A5C121B69129F -:0628090002A31214D375B6 -:0C280F001A0012284E90E601E04404F08C -:09281B00C2AF1221F4122E3E128C -:052824002FB97AA77B2B -:0B282900278A828B831234D8D2AF12B2 -:0E2834001BA4E5826008758204121B848006D6 -:06284200758202121B84E6 -:062848001229DE02225DF0 -:08373C004552524F523A2000A1 -:0E37440066696E616C697A696E67204650474F -:03375200410A0029 -:0D37550064667520726571756573740A00F5 -:0D376200746D6320726571756573740A00E3 -:0E376F00696E76616C696420636C617373200F -:09377D00726571756573740A0030 -:07378600494E464F3A2000B6 -:07378D006C6F63616C0A0020 -:0E37940073796E746178206661696C75726578 -:0237A2000A001B -:0E37A400756E6B6E6F776E206D657373616767 -:0637B200652049440A00F5 -:0E37B8006254616720696E76616C69640A0074 -:0A284E00C2ACC2009039ACE4F09077 -:0828580039ADF09039AEF090AB -:0E28600039AFF090E6087401F07598501099A9 -:03286E00028000E5 -:05287100109802800038 -:04287600754F8575A0 -:06287A00502875822312B4 -:052880002D37D2AC224F -:0E288500C0E0C082C083C002C003C0D075D0C6 -:0828930000C2AC10980280178E -:0C289B009039AEE0FA9039AE04F0EA2467 -:0A28A700B0F582E4343AF583E599B8 -:0128B100F036 -:0528B2001099028025D1 -:0E28B7009039ACE0FA9039ADE0FBEAB50304CD -:0428C500C2008013BA -:0C28C9009039ADEB04F0EB24B0F582E494 -:0728D5003439F583E0F599A9 -:0E28DC00D2ACD0D0D003D002D083D082D0E0D6 -:0128EA0032BB -:0C28EB00AA82C2AC3000189039ACE0FBAF -:0C28F7009039AC04F0EB24B0F582E4341E -:0729030039F583EAF08004BE -:04290A00D2008A99D4 -:03290E00D2AC2226 -:0E2911009039AEE0FA9039AFE0FBEAB5030270 -:02291F00801422 -:0C2921009039AFEB04F0EB24B0F582E439 -:08292D00343AF583E0FA800260 -:022935007A0026 -:032937008A82226F -:06293A00AA82AB83ACF0A1 -:0E2940008A828B838CF0123547FD60188D82E1 -:05294E000ABA00010BB4 -:0E295300C002C003C0041228EBD004D003D091 -:032961000280DC15 -:012964002250 -:0E2965007A009039AEE0FB9039AFE0FCEBB5A4 -:0429730004028002D8 -:022977007A01E3 -:032979008A82222D -:08297C0085825285835385F02A -:0429840054AD4FAE51 -:0429880050AF51A853 -:04298C0052A953AA4F -:0129900054F2 -:0E2991008D828E838FF0123547FBA3AD82AE90 -:0E299F0083888289838AF0EB1233B6A3A88264 -:0A29AD00A983EB70DF855282855389 -:0529B700838554F022AD -:0829BC0090E6A0E04401F022C6 -:0E29C400AA8274805AC423541FFB740F5A90C9 -:0C29D200E6834BF090E683E04420F02206 -:0E29DE0090E680E0440AF09000FA123508906E -:0E29EC00E65D74FFF090E65F74FFF05391EF2C -:0829FA0090E680E054F7F022A2 -:0A2A0200AA82AB83ACF0E552455305 -:062A0C007004900000229E -:052A1200AD4FAE50AF16 -:042A170051A852A9C7 -:012A1B005367 -:052A1C0018B8FF0119CC -:0E2A2100E84960378A828B838CF0123547F5C6 -:0A2A2F0054E5546028C000C0018D7A -:0C2A3900828E838FF0123547F8B55404EC -:042A45007401800197 -:012A4900E4A8 -:0B2A4A00D001D000600C0ABA00010BA4 -:072A55000DBD00C30E80C09F -:0E2A5C008A828B838CF0123547FA3395E0FBAB -:0E2A6A008D828E838FF0123547FD3395E0FC90 -:0A2A7800EAC39DF582EB9CF5832272 -:06358D00E478FFF6D8FD12 -:07356900751C00751D0075C3 -:023570001EFF3C -:0E2A820090E6B8E0FA530280BA805F90E6B9A1 -:072A9000E0FABA0202800A1D -:052A9700BA0302800BF0 -:052A9C00BA054980337A -:062AA100E51C7582002215 -:0C2AA70090E740E51CF090E741E4F0905F -:0D2AB300E742F090E74374FFF090E744E540 -:0C2AC0001DF090E745E4F090E68AF090ED -:082ACC00E68B7406F0022BA456 -:0C2AD40090E740E51DF090E68AE4F090E9 -:082AE000E68B7401F0022BA447 -:042AE80075820022D1 -:0B2AEC0090E6B8E0FA30E703022BA0F0 -:0C2AF70090E6B9E0FA6013BA01028025F5 -:052B0300BA040280612C -:062B0800BA0603022B7D5A -:032B0E00022B99FE -:082B1100E51D700C1230827505 -:062B19001D01751EFF0204 -:022B1F002BA4E5 -:072B2100751C0F75820022F4 -:072B28007402B51D028005D7 -:052B2F007405B51D1B3B -:0E2B340090E6BEE06015121BEEE5827009759A -:082B42001C03751D0AF5822237 -:052B4A00751D0580551A -:0C2B4F007405B51D0E90E6BEE070081283 -:072B5B003082751D08804265 -:072B6200751C0F75820022B3 -:092B6900740AB51D08751C007505 -:042B72001D02802E92 -:072B7600751C0F758200229F -:062B7D00E4B51D02800F0B -:072B83007401B51D0280087A -:082B8A00751C00751D0280128C -:072B9200751C0F7582002283 -:072B9900751C0F758200227C -:042BA0007582002218 -:042BA4007582012213 -:0A2BA800AA82E55170047582012233 -:0E2BB20090E678E0FB20E6F890E6787480F07C -:0A2BC000EA2AFA90E67974014AF05F -:0E2BCA0090E678E0FA30E0F890E678E0FA3035 -:052BD800E203022C5D88 -:0B2BDD0090E678E0FA20E103022C5D96 -:0C2BE8007401B5510890E678E0FA442032 -:012BF400F0F0 -:092BF50090E679E0F552AA4FAB1D -:032BFE0050AC5187 -:042C0100DC02803041 -:0E2C050090E678E0FD30E0F890E678E0FD2003 -:0D2C1300E248BC010890E678E0FD4420F0A6 -:0E2C200090E679E0FD8A828B83F0A3AA82AB56 -:072C2E00838A4F8B5080CC1C -:0E2C350090E678E0FA30E0F890E678E0FA20D9 -:0C2C4300E21890E678E04440F0AA4FABA5 -:0C2C4F005090E679E08A828B83F0758259 -:022C5B00012254 -:0B2C5D0090E678E04440F07582002211 -:022C6800AA823E -:0E2C6A0090E678E0FB20E6F890E6787480F0C3 -:072C7800EA2AFA90E679F068 -:0E2C7F0090E678E0FA30E0F890E678E0FA208F -:0C2C8D00E24790E678E0FA30E13FAA4F01 -:042C9900AB50AC513F -:0E2C9D00EC602B8A828B83E0FDA3AA82AB83BE -:062CAB0090E679EDF01C3B -:0E2CB10090E678E0FD30E0F890E678E0FD2057 -:0C2CBF00E21590E678E0FD20E1D4800BE7 -:0B2CCB0090E678E04440F075820122A2 -:0B2CD60090E678E04440F07582002298 -:082CE10085825285835385F0C2 -:042CE90054AD52AEE6 -:032CED0053AF548E -:0E2CF0008D828E838FF012354760070DBD0078 -:042CFE00F10E80EE65 -:052D0200A84FA950AA32 -:052D0700518E048F0352 -:0E2D0C00888289838AF0123547FEA3A882A927 -:0E2D1A00838D828C838BF0EE1233B6A3AD82D4 -:0A2D2800AC83EE70DF855282855304 -:052D3200838554F0222E -:052D3700AA82BA0300AE -:072D3C004005EA249C500150 -:012D4300226D -:092D4400740F5AFBBB0302800767 -:072D4D00740F5AFBBB0B459C -:0A2D5400A2AF9201C2AFEA2400F51D -:0C2D5E0082E43400F5837402F07B007402 -:0C2D6A00012AFCE43BFDEC2400F582EDA6 -:0A2D76003400F583E550FCF0740210 -:0C2D80002AFAE43BFBEA2400F582EB3465 -:0A2D8C0000F583AA4F7B00EAF0A2D5 -:032D96000192AFF8 -:012D99002217 -:082D9A00E582FA2483500122B6 -:072DA20074035AFB600122DB -:0A2DA900A2AF9202C2AFEA2400F5C7 -:0C2DB30082E43401F5837402F07B0074AC -:0C2DBF00012AFCE43BFDEC2400F582ED51 -:0A2DCB003401F583E550F074022A8C -:0B2DD500FAE43BFBEA2400F582EB343B -:082DE00001F583AA4FEAF0A2FD -:042DE8000292AF2282 -:082DEC00E582FA24CB5001221C -:072DF40074035AFB60012289 -:0A2DFB00A2AF9203C2AFEA2480F5F4 -:0C2E050082E43400F5837402F07B00745A -:0C2E1100012AFCE43BFDEC2480F582ED7E -:0A2E1D003400F583E550F074022A3A -:0B2E2700FAE43BFBEA2480F582EB3468 -:082E320000F583AA4FEAF0A2AB -:042E3A000392AF222E -:082E3E00C2E8C2EA754F0075FD -:062E4600500175824312E9 -:042E4C002D37754F5A -:032E50008075503A -:0C2E530000758253122D370090E650E409 -:0E2E5F00F00090E652E4F00090E654E4F0003B -:0E2E6D0090E656E4F00090E65174FFF00090FD -:0E2E7B00E65374FFF00090E65574FFF00090EF -:0E2E8900E65774FFF00090E658E4F090E6592A -:0E2E970074FFF090E65AE4F090E65B74FFF0F2 -:0E2EA50090E65CE4F090E65D74FFF090E65E6F -:0E2EB300E4F090E65F74FFF00090E660E4F05B -:0D2EC1000090E66174FFF090E662E4F0908E -:0E2ECE00E66374FFF090E665E4F090E6687449 -:0A2EDC000BF05391AFD2E8D2EA22C6 -:06357200754500754600DE -:0A2EE60090E680E0FA30E719754726 -:032EF00000754822 -:032EF300E075493E -:032EF60012754A08 -:032EF900E0754B36 -:032EFC001C754CF6 -:032EFF00E0754D2E -:032F020074754E95 -:022F0500E022C8 -:042F0700754758753D -:032F0B0048E07526 -:032F0E00496A7598 -:032F11004AE0751E -:032F14004B747586 -:032F17004CE07516 -:032F1A004D1C75D6 -:032F1D004EE02261 -:092F20005391EF75A100D20432B7 -:0C2F2900C021C0E0C0F0C082C083C00224 -:0E2F3500C003C004C005C006C007C000C00134 -:0E2F4300C0D075D0005391EF75A100122EE69C -:0C2F5100751D00D0D0D001D000D007D0FA -:0E2F5D0006D005D004D003D002D083D082D09D -:062F6B00F0D0E0D021329D -:0C2F7100C021C0E0C0F0C082C083C002DC -:0E2F7D00C003C004C005C006C007C000C001EC -:0E2F8B00C0D075D0005391EF75A100122EE654 -:0C2F9900751D00D0D0D001D000D007D0B2 -:0E2FA50006D005D004D003D002D083D082D055 -:062FB300F0D0E0D0213255 -:052FB900122EE6754F29 -:032FBE002075502B -:082FC1002F758200122D9A7594 -:032FC9004F297518 -:062FCC00502F7582101267 -:042FD2002D9A754F70 -:032FD600717550C2 -:0C2FD9002F758214122D9A90E65C743162 -:022FE500F022D8 -:0D2FE700E582547FFA24F750047582002221 -:072FF400BA010475820122FD -:082FFB00530201E4BA000104D5 -:03300300F5822231 -:09300600AA82BA010490E6A1229D -:07300F00BA810490E6A22241 -:0A30160053027FEA700490E6A02246 -:0D302000EAC31324A2F582E434E6F583220E -:04302D007547A675C8 -:0330310048E075FF -:033034004BB87521 -:033037004CE02248 -:0C303A00C021C0E0C0F0C082C083C00212 -:0E304600C003C004C005C006C007C000C00122 -:0E305400C0D075D0005391EF75A10012302D41 -:0C306200751D02D0D0D001D000D007D0E6 -:0E306E0006D005D004D003D002D083D082D08B -:06307C00F0D0E0D021328B -:06308200E51D7018754FFA -:033088003A755046 -:08308B0030758210122D9A75B8 -:033093004F3A753C -:06309600503075821402A7 -:02309C002D9A6B -:04309E00754F2975CC -:0630A200502F7582101290 -:0430A8002D9A754F99 -:0330AC00717550EB -:0830AF002F758214122D9A7591 -:0330B7001D0022D7 -:0C30BA00C20490E6B8E0FA530260BA00CD -:0330C6000280384D -:0530C900BA2002800D99 -:0530CE00BA4002801E63 -:0530D300BA6002801349 -:0330D8000233AE12 -:0A30DB0012204FE58260030233AEBD -:0630E5001229BC0233AE0B -:0630EB001229BC0233AE05 -:0A30F10012210EE58260030233AEE7 -:0630FB001229BC0233AEF5 -:0D31010090E6B8E0FA530280BA8002800325 -:03310E000232A8E2 -:0B31110090E6B9E0FABA000302321F9A -:05311C00BA0602803537 -:05312100BA080280085D -:05312600BA0A02801747 -:03312B000232A2CB -:0C312E0090E740E545F090E68AE4F09060 -:08313A00E68B7401F00233AED4 -:0C31420090E740E546F090E68AE4F0904B -:08314E00E68B7401F00233AEC0 -:0A31560090E6BBE0FABA0102801D0A -:05316000BA0202803EEE -:05316500BA0302805FC7 -:05316A00BA06028021FD -:05316F00BA07028042D6 -:06317400BA210302320241 -:03317A0002321905 -:0A317D00AA47AB4890E6B3EBF07BE5 -:093187000090E6B4EAF00233AE58 -:0A319000AA49AB4A90E6B3EBF07BCE -:09319A000090E6B4EAF00233AE45 -:0A31A300AA4BAB4C90E6B3EBF07BB7 -:0931AD000090E6B4EAF00233AE32 -:0A31B600AA4DAB4E90E6B3EBF07BA0 -:0931C0000090E6B4EAF00233AE1F -:0E31C90090E6BAE0FA90E0D3E0FBC3EA9B4048 -:0731D700061229BC0233AE11 -:0C31DE0090E6BAE075F002A424D4F5825B -:0B31EA0074E035F0F583E0FAA3E090FC -:0D31F500E6B3F07B0090E6B4EAF00233AEE2 -:0A3202007ACA7BE090E6B3EBF07AA5 -:0A320C00CA7BE07B0090E6B4EAF014 -:033216000233AED2 -:063219001229BC0233AED5 -:0D321F0090E6B8E0FA53021FBA0002800AE0 -:05322C00BA0102801D43 -:05323100BA0268802EC6 -:0E32360090E7407401F090E741E4F090E68AE2 -:0A324400F090E68B7402F00233AE46 -:0E324E0090E740E4F090E741F090E68AF090BF -:08325C00E68B7402F00233AEB0 -:0E32640090E6BCE0F582122FE7E5826025902F -:0E327200E6BCE0F582123006E0FA530201904D -:0E328000E740EAF090E741E4F090E68AF09033 -:08328E00E68B7402F00233AE7E -:063296001229BC0233AE58 -:06329C001229BC0233AE52 -:0632A2001229BC0233AE4C -:0C32A80090E6B9E0FA24F450030233ABC6 -:0732B400EA2A2A9032BB73E5 -:0732BB000233AB0232F10205 -:0632C200337302335402D5 -:0632C80033AB0233AB0240 -:0632CE0033AB0233AB023A -:0632D40033AB0232DF0201 -:0532DA0033AB0232E8F5 -:0932DF0090E6BAE0F5450233AEB9 -:0932E80090E6BAE0F5460233AEAF -:0D32F10090E6B8E0FA53021FBA0002800513 -:0532FE00BA024E800A37 -:0A33030090E6BAE01229BC0233AED6 -:0D330D0090E6BAE0703790E6BCE0F5821261 -:0D331A002FE7E582602A90E6BCE0F5821204 -:0E3327003006AA82AB83E0FC5304FE8A828B40 -:0E33350083ECF090E6A3E054FEF090E6BCE0DE -:07334300F5821229C4806429 -:05334A001229BC805FA8 -:05334F001229BC805AA8 -:0E33540090E6B8E0FA53021FBA004F90E6BAB6 -:07336200E0FABA0102800548 -:05336900BA02028040E1 -:05336E001229BC803BA8 -:0E33730090E6BAE0FA702C90E6BCE0F582120B -:0D3381002FE7E582601A90E6BCE0F58212AD -:0E338E003006AA82AB83E0FC4304018A828BE6 -:05339C0083ECF0800D40 -:0533A1001229BC8008A8 -:0533A6001229BC8003A8 -:0333AB001229BC28 -:0833AE0090E6A0E04480F0224B -:0E33B60020F71030F6118883A88220F507F664 -:0533C400A883758300E1 -:0133C90022E1 -:0333CA00F280F797 -:0233CD00F022EC -:0533CF00C01F85811FF5 -:0B33D400E51F24FDF886831886821890 -:0E33DF00E493A324DB600C242560051234BDAA -:0233ED0080F06E -:0333EF000234D5D0 -:0933F200D2D5E493A3C083C0828C -:0333FB00B4731494 -:0933FE0086F018868318868218F7 -:0B3407001235476054A31234BD80F55D -:0B341200B4630818E6181234BD8043B4 -:0E341D00B46417E630E74618E6F42401F6081A -:0C342B00E6F43400F6742D1234BD80333A -:0A343700B4782D868318868218E40D -:0B3441001234AEE5831234ADE58312B7 -:0A344C0034AEE5821234ADE58212C1 -:0A34560034AE30D50574301234BDD9 -:07346000D082D0830233DFAC -:03346700B475F643 -:06346A00E6FA18E6F9186D -:0D3470007C107D27123498FF7CE87D03124C -:0E347D003498C4F5837C647D00123498428339 -:0D348B00E975F00A84C445F0F582EF80A9D0 -:023498007B00B7 -:0E349A000BC3E99CF9EA9DFA50F61BE92CF9E8 -:0534A800EA3DFAEB22F1 -:0134AD00C45A -:0734AE00540F700320D51F2D -:0834B500C2D52490D43440D4A8 -:0E34BD00C083C082C0F0F582E8C0E0121BE8B8 -:0934CB00D0E0F8D0F0D082D083EB -:0134D40022D5 -:0334D500D01F22E3 -:0A34D800AA82AB83C2AD8A4F8B506D -:0E34E20075822B122D3775CB6375CAC075C865 -:0434F00004D2AD2233 -:0134F40022B5 -:0234F500AA82A9 -:0634F7001234F4DAFB229E -:0334FD0090FB50F1 -:08350000A3E582458370F92266 -:04350800AA82AB8365 -:08350C001234FD1ABAFF011B85 -:07351400BA00F5BB00F22232 -:05351B00AA82BA410084 -:0B3520004009EA24A540047582012246 -:04352B007582002283 -:04352F00AA82AB833E -:083533001235476003A380F884 -:0C353B00C3E5829AF582E5839BF58322AC -:03358000758162F0 -:0A358300120180E582600302357B2F -:0E35470020F71430F6148883A88220F507E6DA -:06355500A883758300222B -:03355B00E280F714 -:03355E00E49322D1 -:02356100E02266 -:00000001FF Index: gecko3/trunk/gecko3com-fw/firmware/src/check_udelay.c =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/src/check_udelay.c (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/src/check_udelay.c (nonexistent) @@ -1,37 +0,0 @@ -/* - * USRP - Universal Software Radio Peripheral - * - * Copyright (C) 2003 Free Software Foundation, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA - */ - -#include "usrp_common.h" -#include "delay.h" - -void -main (void) -{ - init_usrp (); - - // CPUCS = 0; // 12 MHz - // CPUCS = bmCLKSPD0; // 24 MHz - CPUCS = bmCLKSPD1; // 48 MHz - - while (1){ - USRP_LED_REG ^= bmLED0; - udelay (250); - } -} Index: gecko3/trunk/gecko3com-fw/firmware/src/gecko3com_common.c =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/src/gecko3com_common.c (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/src/gecko3com_common.c (nonexistent) @@ -1,219 +0,0 @@ -/* GECKO3COM - * - * Copyright (C) 2008 by - * ___ ____ _ _ - * ( _`\ ( __)( ) ( ) - * | (_) )| (_ | |_| | Bern University of Applied Sciences - * | _ <'| _) | _ | School of Engineering and - * | (_) )| | | | | | Information Technology - * (____/'(_) (_) (_) - * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/*********************************************************************/ -/** \file gecko3com_common.c - ********************************************************************* - * \brief common defines and prototypes for GECKO3COM - * - * \author GNUradio, Christoph Zimmermann bfh.ch - * \date - * -*/ - -#include "gecko3com_common.h" -#include "delay.h" - -volatile uint8_t flLOCAL; -volatile uint8_t flLED; - -void -init_gecko3com (void) -{ - CPUCS = bmCLKSPD1; /* CPU runs @ 48 MHz */ - CKCON = 0; /* MOVX takes 2 cycles */ - - - /* configure IO ports. */ -#ifdef PORT_A - PORT_A = bmPORT_A_INITIAL; /* Port A initial state */ - PORT_A_OE = bmPORT_A_OUTPUTS; /* Port A direction register */ -#endif - -#ifdef PORT_B - PORT_B = bmPORT_B_INITIAL; /* Port B initial state */ - PORT_B_OE = bmPORT_B_OUTPUTS; /* Port B direction register */ -#endif - -#ifdef PORT_C - PORT_C = bmPORT_C_INITIAL; /* Port C initial state */ - PORT_C_OE = bmPORT_C_OUTPUTS; /* Port C direction register */ -#endif - -#ifdef PORT_E - PORT_E = bmPORT_E_INITIAL; /* Port E initial state */ - PORT_E_OE = bmPORT_E_OUTPUTS; /* Port E direction register */ -#endif - -#ifdef PORT_CTL - PORT_CTL = bmPORT_CTL_INITIAL; /* Port GPIF CTL outputs initial state */ - PORT_CTL_OE = bmPORT_CTL_OUTPUTS; /* Port GPIF CTL outputs direction register */ -#endif - - /* ------------------------------------------------------------------------ */ - /* Initialize USB interface. Configures endpoints, resets FIFOs and sets - * packet size according to the connection (USB 1.1 or 2.0) - */ - - REVCTL = bmDYN_OUT | bmENH_PKT; /* highly recommended by docs */ - SYNCDELAY; - - /* configure end points */ - - /* EP1OUTCFG = bmVALID | bmBULK; SYNCDELAY; */ - EP1OUTCFG = 0; SYNCDELAY; - /* EP1INCFG = bmVALID | bmBULK | bmIN; SYNCDELAY; */ - EP1INCFG = 0; SYNCDELAY; - - EP2CFG = bmVALID | bmBULK | bmQUADBUF; SYNCDELAY; /* 512 quad bulk OUT */ - EP4CFG = 0; SYNCDELAY; /* disabled */ - EP6CFG = bmVALID | bmBULK | bmQUADBUF | bmIN; SYNCDELAY; /* 512 quad bulk IN */ - EP8CFG = 0; SYNCDELAY; /* disabled */ - - /* reset FIFOs */ - - FIFORESET = bmNAKALL; SYNCDELAY; - FIFORESET = 2; SYNCDELAY; - /* FIFORESET = 4; SYNCDELAY; */ - FIFORESET = 6; SYNCDELAY; - /* FIFORESET = 8; SYNCDELAY; */ - FIFORESET = 0; SYNCDELAY; - - /* configure end point FIFOs */ - - /* let core see 0 to 1 transistion of autoout bit */ - - EP2FIFOCFG = bmWORDWIDE; SYNCDELAY; - EP6FIFOCFG = bmWORDWIDE; SYNCDELAY; - - - - /* prime the pump */ - EP0BCH = 0; SYNCDELAY; - EP0BCL = 0; SYNCDELAY; - OUTPKTEND = bmSKIP | 2; SYNCDELAY; /* because we use quad buffering we have to flush all for buffers before use */ - OUTPKTEND = bmSKIP | 2; SYNCDELAY; - OUTPKTEND = bmSKIP | 2; SYNCDELAY; - OUTPKTEND = bmSKIP | 2; SYNCDELAY; - - - /* set autoout length for EP2 and autoin length for EP6 */ - if(USBCS & bmHSM){ - EP6AUTOINLENH = (512) >> 8; SYNCDELAY; /* this is the length for high speed */ - EP6AUTOINLENL = (512) & 0xff; SYNCDELAY; - } - else { - EP6AUTOINLENH = 0; SYNCDELAY; /* this is the length for full speed */ - EP6AUTOINLENL = 64; SYNCDELAY; - } -} - -void -gecko3com_system_reset(void) -{ - /* resets are normaly active low, so we first set RESET to 0 */ - RESET &= ~bmRESET; - - /* enable reset output */ - RESET_OE |= bmRESET; - - mdelay(1); - - /* disable reset output */ - RESET |= bmRESET; - RESET_OE &= ~bmRESET; -} - -void -set_led_0 (const uint8_t on) -{ - if (!on) /* active low */ - LED_PORT |= bmPC_LED0; - else - LED_PORT &= ~bmPC_LED0; -} - -void -set_led_1 (const uint8_t on) -{ - if (!on) /* active low */ - LED_PORT |= bmPC_LED1; - else - LED_PORT &= ~bmPC_LED1; -} - -void -toggle_led_0 (void) -{ - LED_PORT ^= bmPC_LED0; -} - -void -toggle_led_1 (void) -{ - LED_PORT ^= bmPC_LED1; -} - -void -set_sleep_bits (uint8_t bits, uint8_t mask) -{ - /* NOP on GECKO3COM */ -} - -void -init_io_ext (void) -{ - xdata uint8_t cmd[2]; - cmd[0] = 0x03; /* write to configuration register */ - cmd[1] = 0x01; /* set Bit 0 (LSB) as input and Bit 1,2 as output, others be irrelevant */ - i2c_write(I2C_DEV_IO, cmd, 2); -} - -void -set_led_ext (const uint8_t color) -{ - xdata uint8_t cmd[2]; - cmd[0] = 0x01; /* write to output port register */ - cmd[1] = color; /* set LED */ - i2c_write(I2C_DEV_IO, cmd, 2); - flLED = ~LEDS_OFF; -} - -uint8_t -get_switch (void) -{ - xdata uint8_t cmd[1]; - - cmd[0] = 0x00; /* set command byte to input port register */ - - i2c_write(I2C_DEV_IO, cmd, 1); - - i2c_read(I2C_DEV_IO, cmd, 1); - - if((cmd[0] & 0x01) == 1){ /* only bit 0 in the input register is used */ - return 1; - } - - return 0; -} Index: gecko3/trunk/gecko3com-fw/firmware/src/fpgaconfworking.hex =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/src/fpgaconfworking.hex (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/src/fpgaconfworking.hex (nonexistent) @@ -1,1793 +0,0 @@ -:060000000236F602006B5F -:03000B0002006B85 -:0300130002006B7D -:03001B0002006B75 -:0300230002006B6D -:03002B0002006B65 -:0300330002006B5D -:03003B0002006B55 -:0300430002006B4D -:03004B0002006B45 -:0300530002006B3D -:03005B0002006B35 -:0300630002006B2D -:01006B003262 -:0900800002006B0002006B00029B -:08008900006B0002006B000295 -:08009100006B0002006B00028D -:08009900006B0002006B000285 -:0800A100006B0002006B00027D -:0800A900006B0002006B000275 -:0700B100006B0002006B0070 -:0901000002006B0002006B00021A -:08010900006B0002006B000214 -:08011100006B0002006B00020C -:08011900006B0002006B000204 -:08012100006B0002006B0002FC -:08012900006B0002006B0002F4 -:08013100006B0002006B0002EC -:08013900006B0002006B0002E4 -:08014100006B0002006B0002DC -:08014900006B0002006B0002D4 -:08015100006B0002006B0002CC -:08015900006B0002006B0002C4 -:08016100006B0002006B0002BC -:08016900006B0002006B0002B4 -:08017100006B0002006B0002AC -:07017900006B0002006B00A7 -:0801800078CAE84403600C7921 -:0C01880004903A00E4F0A3D8FCD9FAD0AF -:0E01940083D082F6D8FDC082C083758200221F -:0CE0000012010002000000404705020071 -:06E00C0000010102060103 -:0AE012000A060002000000400100B1 -:0EE01C0009023200020100C0000904000002E7 -:0EE02A00FE030104070502020002000705863E -:0EE03800020002000904010000FE01010509BA -:08E046002101F401400001007A -:0CE04E0012010002000000404705020023 -:06E05A00000101020601B5 -:0AE060000A06000200000040010063 -:0EE06A0009023200030100C000090400000298 -:0EE07800FE03010407050202400000070586B2 -:0EE08600024000000904010000FE010105092E -:08E094002101F401400001002C -:0CE09C00120100010000004047050300D5 -:06E0A80000010102060167 -:0EE0AE0009021200010100C000090400000078 -:04E0BC00FE0102055A -:09E0C000092101F40140000100F6 -:01E0C900074F -:02E0CA00D8E09C -:02E0CC00DEE094 -:02E0CE00FEE072 -:02E0D00012E15B -:02E0D20034E137 -:02E0D40050E119 -:02E0D60078E1EF -:06E0D8000603000009042C -:0EE0DE0020034D006900630072006F004C00CB -:0EE0EC006100620020004200460048002D0046 -:04E0FA005400490085 -:0EE0FE0014034700450043004B004F00330061 -:06E10C0043004F004D002E -:0EE11200220343006F006D006D0061006E007F -:0EE120006400200026002000530074006100FF -:06E12E007400750073008F -:0EE134001C0355005300420054004D004300F0 -:0EE14200200055005300420034003800380021 -:0EE1500028034700450043004B004F003300FA -:0EE15E0043004F004D002000460057002000F7 -:0CE16C00550050004400410054004500E4 -:02E17800120390 -:0EE17A0033002E003100340031003500390032 -:02E18800330062 -:0A01A200AA82AB09903A00EBF0AB23 -:0701AC0008903A01EBF07529 -:0301B3006D007567 -:0301B6006E3A7529 -:0C01B9006F028A82C002122DFFE582D086 -:0601C500027003F5822226 -:0401CB00850A6D85AF -:0301CF000B6E852F -:0501D2000C6F8A82029F -:0201D7002D3FBA -:0A01D900AA82C374FF950D743F95D0 -:0701E3000E5004758200229A -:0701EA00E511700302029F02 -:0A01F100AB117C00EB250DFBEC3593 -:0801FB000EFC74C0550DFDAEB1 -:0C0203000E74402DFDE43EFEC3ED9BEEAA -:0C020F009C500E743F550DFB7C007440A9 -:05021B00C39BFB800CF9 -:0A02200074C025114004AB118002E8 -:02022A007B4017 -:08022C00AC0E903A02ECF0ACBC -:0A0234000D7D00903A03ECF07C0011 -:0C023E00C3EC9B501E74022C2402FDE453 -:0A024A00343AFEEC250FF582E4358E -:0C02540010F583E0FF8D828E83F00C809B -:01026000DDC0 -:04026100756D027540 -:060265006E3A74022BF555 -:0C026B006F8A82C002C003122DFFE582E2 -:09027700D003D0027003F58222CD -:0A028000E511C39BF5117C00EB258E -:05028A000DF50DEC353F -:09028F000EF50E900008C00212E9 -:07029800369DD0020201EACD -:04029F007582012241 -:0E02A300903A44E4F0903A45F0A3F0A3F0A3A3 -:0E02B100F0903A49E4F0903A4AF0A3F0A3F03E -:0E02BF00A3F0903A4EE4F0A3F0A3F0A3F07584 -:0602CD001201751301751A -:0602D30014807515007592 -:0602D9001600751700225B -:0E02DF00AA82AB83ACF01236DAFD74012AFE5F -:0E02ED00E43BFF8C008E828F8388F01236DA9D -:0902FB00FE5D6005430520800250 -:020304007D007A -:0E0306008A828B838CF0ED12354B74022AFF35 -:0E031400E43BF88C018F82888389F01236DA80 -:0E032200FD74032AFAE43BFB8A828B838CF085 -:0E0330001236DAFE74BF5DFAFD74BF5E5A60CD -:0E033E000D4305408F82888389F0ED12354B08 -:03034C008D82227D -:0D034F0090E6B8E0FA530280BA8002800305 -:03035C0002068511 -:0A035F0090E6B9E0FABA0102804509 -:06036900BA0203020424A5 -:06036F00BA030302048F33 -:06037500BA04030204F6C5 -:06037B00BA050302056152 -:06038100BA06030205C6E6 -:06038700BA07030205E1C4 -:06038D00BA400302062F36 -:06039300BA800302064BD4 -:06039900BAA00302069C5D -:06039F00BAA10302067979 -:0603A500BAA20302067D6E -:0303AB00020681C6 -:0903AE007401B51B0B75120175F9 -:0703B7001301121D4D8049E6 -:0E03BE00903A44E0FA90E6BAE0FBEAB5033864 -:0A03CC0075120175130190E6047428 -:0E03D60080F00090E6047482F00090E6497416 -:0E03E40082F00090E6497482F00090E64974C1 -:0E03F20082F00090E6497482F00090E604E488 -:04040000F000800385 -:03040400751281ED -:0C04070090E740E512F0903A44E0FA90D3 -:0E041300E741F090E68AE4F090E68B7402F088 -:0304210002069C34 -:0A04240075120190E740E512F09018 -:0D042E00E741E4F090E742F090E743F090E2 -:0E043B003A4AE0FAA3E0A3E0A3E090E744EA27 -:0E044900F0903A4AE0A3E0FBA3E0A3E08B02B0 -:0E04570090E745EAF0903A4AE0A3E0A3E0FC0B -:0E046500A3E08C0290E746EAF0903A4AE0A34A -:0E047300E0FBA3E0FCA3E0FDFA90E747EAF00F -:0E04810090E68AE4F090E68B7408F002069C88 -:09048F007401B51B2675120175FC -:0C0498001301121D4D90E6047480F0006A -:0E04A40090E6047486F00090E6487486F0003E -:0804B20090E604E4F000801F55 -:0E04BA00903A44E0FA90E6BAE0FBEAB5030E91 -:0904C80075120175130174EF5562 -:0504D10016F516800382 -:0304D6007512811B -:0C04D90090E740E512F090E6BAE0FA90DF -:0E04E500E741F090E68AE4F090E68B7402F0B6 -:0304F30002069C62 -:0A04F60075120190E740E512F09046 -:0D050000E741E4F090E742F090E743F0900F -:0E050D003A4EE0FAA3E0A3E0A3E090E744EA50 -:0E051B00F0903A4EE0A3E0FBA3E0A3E08B02D9 -:0E05290090E745EAF0903A4EE0A3E0A3E0FC34 -:0E053700A3E08C0290E746EAF0903A4EE0A373 -:0E054500E0FBA3E0FCA3E0FDFA90E747EAF03C -:0E05530090E68AE4F090E68B7408F002069CB5 -:0905610075120175130174EF55C8 -:06056A0016F5167401B540 -:060570001B09121DB67507 -:050576001B001211ED55 -:0E057B0090E6047480F00090E6047482F000B4 -:0E05890090E6047486F00090E6497482F0005B -:0E05970090E6497482F00090E6497482F0000C -:0E05A50090E6497482F00090E604E4F00090C5 -:0B05B300E740E512F090E68AE4F090CB -:0805BE00E68B7401F002069CBB -:0A05C60075120190E740E512F09075 -:0E05D000E741E4F090E68AF090E68B7402F0CA -:0305DE0002069C76 -:0605E100751201751900FE -:0A05E70074E825194034E51924409A -:0A05F100FBE434E7FC7D297E37E5CA -:0C05FB001975F004A42DF582EE35F0F522 -:0E06070083E493FDA3E493FEA3E493FFA3E436 -:0C06150093FA8B828C83EDF0051980C6EF -:0E06210090E68AE4F090E68B7418F002069CD6 -:0C062F00758206121F2375120190E7402F -:0C063B00E512F090E68AE4F090E68B7483 -:0406470001F08051ED -:0A064B0075120190E740E512F090EF -:0E065500E6BAE090E741F090001475F0401214 -:0E06630002DFAA8290E742EAF090E68AE4F015 -:0806710090E68B7403F0802376 -:040679007582002264 -:04067D007582002260 -:04068100758200225C -:0D06850090E6B8E0FA20E70B90E6B9E075CA -:06069200128075820022B7 -:040698007582002245 -:04069C007582012240 -:0E37290001000001040000000000000000018B -:0A3737000000000000000000000088 -:0C06A000AA8275F00AEA8485F070EAC3B3 -:0C06AC00957075F00A84FA75F00A84E578 -:0906B800F0FC7028AD6DAE6EAFD0 -:0A06C1006F74302570F88D828E836F -:0A06CB008FF012354B0DBD00010E3B -:0E06D5008D828E838FF0740A12354B7582026F -:0106E30022F4 -:0E06E400EAC39C75F00A8475F00A84E5F0FA0A -:0706F2007043AD6DAE6EAF69 -:0B06F9006F74302C8D828E838FF01206 -:0A070400354B74012DF571E43EF54C -:06070E00728F73743025A8 -:05071400708571828573 -:0607190072838573F012EB -:0E071F00354B74022DFDE43EFE8D828E838FDD -:0A072D00F0740A12354B75820322A6 -:05073700AB6DAD6EAEDC -:0B073C006F74302A8B828D838EF012C8 -:0E074700354B74012BFAE43DFF8E0074302C0C -:0E0755008A828F8388F012354B74022BFAE4EF -:0C0763003DFC8E07743025708A828C8368 -:0E076F008FF012354B74032BFBE43DFD8B82A3 -:0D077D008D838EF0740A12354B75820422B4 -:08078A0085826D85836E85F008 -:050792006F7D007E00F8 -:03079700BE04009D -:0A079A005043EE256DFFE4356EFAC2 -:0C07A400AB6F8F828A838BF01236DAFA7A -:0307B000BA30005C -:0E07B3004012EA24C6400DED75F00AA4FBEAE0 -:0607C10024D02BFD801581 -:0507C700BA0A028003E4 -:0307CC00EA7003CD -:0307CF008D8222F6 -:0A07D20074104514F514758200221E -:0307DC000E80B8D4 -:0A07DF0074104514F5147582002211 -:0807E90085827085837185F0A3 -:0407F10072AD6DAECA -:0A07F5006EAF6F8D828E838FF012BD -:0A07FF0036DAF824FEF574C313F592 -:04080900747573008F -:08080D00C3E57395745037E553 -:07081500732573F80808E5E4 -:04081C00732570F5DB -:0508200075E43571F5DF -:0308250076857263 -:0C08280077E82DF8E43EF98F0288828901 -:0B083400838AF01236DAF885758285A1 -:06083F0076838577F012BC -:06084500354B057380C273 -:09084B00A9737A0009B900010A41 -:09085400E92570F9EA3571FAABEF -:0C085D007289828A838BF0E412354BE52F -:06086900732570FAE4356E -:0A086F0071FBAC728A828B838CF05F -:01087900225C -:07087A008582288583298592 -:03088100223D8590 -:03088400233E858B -:03088700243F8586 -:06088A003D82853E8385DE -:060890003FF01236DAF51C -:060896002BA31236DAF577 -:06089C002CA31236DAF570 -:0308A2002D752E83 -:0308A50052752F5A -:0508A8003A75300085E7 -:0308AD0025378567 -:0308B00026388562 -:0308B3002739855D -:0508B60037317401253B -:0408BB0038F5328555 -:0308BF0039338545 -:0308C200313A8543 -:0308C500323B853E -:0308C800333C8539 -:0308CB003734853A -:0308CE0038358535 -:0308D10039368530 -:0A08D4002882852983E0FAA3E0FBE7 -:0708DE00EA252BF52BEB3599 -:0408E5002CF52CAA18 -:0408E9002BAB2CAF5A -:0408ED002D752A003B -:0908F10074F4252A4057E52A247D -:0A08FA0052FDE4343AFE8A828B833B -:0E0904008FF01236DAF582C002C003C005C0C3 -:0E09120006C0071236AEE582D007D006D0052B -:0D092000D003D002600F8A828B838FF0120B -:08092D0036DAFC430420800AC5 -:0A0935008A828B838FF01236DAFC01 -:0B093F008D828E83ECF00ABA00010BE1 -:04094A00052A80A357 -:07094E00852E82852F8385B1 -:0B09550030F01236DAFABA2A028003F2 -:03096000020DB7CE -:0A09630090374175F080122AD47419 -:08096D0048C0E07437C0E0123D -:0A097500356415811581052EE4B5E7 -:04097F002E02052F10 -:04098300852E6D85CB -:030987002F6E854B -:03098A00306F7556 -:06098D007003E4F5719017 -:0E099300374A75F080122B9CE5828583F04573 -:0809A100F0700BF514F516755A -:0609A9001301758201221A -:0409AF00852E6D859F -:0309B3002F6E851F -:0309B600306F752A -:0609B9007003E4F57190EB -:0E09BF00374E75F080122B9CE5828583F04543 -:0609CD00F06003020A5372 -:0809D3007403252EF52EE43516 -:0409DB002FF52F8540 -:0609DF002E82852F8385A6 -:0C09E50030F01236DAFABA201F74012537 -:0709F1002EFAE4352FFBACE8 -:0C09F800308A828B838CF012078AE58223 -:090A0400F515751301758201223C -:070A0D00852E82852F8385F1 -:0A0A140030F01236DAFABA3F3285EC -:040A1E001582853484 -:030A22006D8535AA -:030A25006E8536A5 -:090A28006F1206A0AA827B008572 -:060A31003A82853B83853B -:090A37003CF0EA12354BA3EB126E -:070A4000354B74104516F55B -:080A47001675130175820122EE -:040A4F00758200228A -:040A5300852E6D85FA -:030A57002F6E857A -:030A5A00306F7585 -:060A5D007004E4F5719045 -:0E0A6300375275F080122B9CE5828583F0459A -:080A7100F07035851482853711 -:030A79006D853850 -:030A7C006E85394B -:090A7F006F1206A0AA827B00851B -:060A8800318285328385F6 -:090A8E0033F0EA12354BA3EB1220 -:070A9700354B74104516F504 -:050A9E0016751400753F -:060AA3001301758201221F -:040AA900852E6D85A4 -:030AAD002F6E8524 -:030AB000306F752F -:060AB3007004E4F57190EF -:0E0AB900375775F080122B9CE5828583F0453F -:060AC700F06003020BE8E1 -:0A0ACD0090374175F080122AD474AE -:080AD7005CC0E07437C0E012BE -:0E0ADF0035641581158190E05CE075F002A48D -:0A0AED0024CAF58274E035F0F583A9 -:0A0AF700E0FAA3E0FB8A6D8B6E7538 -:060B01006F0085378285BC -:060B070038838539F0126D -:0E0B0D0007E9ACF0742C12354BA3AA82AB831F -:0C0B1B0090E05DE075F002A424CAF582B1 -:0C0B270074E035F0F583E0FDA3E0FE8DE6 -:040B33006D8E6E75E0 -:0C0B37006F008A828B838CF01207E9ACFF -:0E0B4300F0742C12354BA3AA82AB8390E05EB7 -:0A0B5100E075F002A424CAF58274D6 -:0B0B5B00E035F0F583E0FDA3E0FE8D27 -:040B66006D8E6E75AD -:0C0B6A006F008A828B838CF01207E9AACE -:040B760025AB26ACD9 -:030B7A0027756D6F -:030B7D0061756E31 -:0A0B800037756F808A828B838CF03A -:060B8A00122E78AA25AB33 -:040B900026AC2775F3 -:030B94006D637519 -:030B97006E377541 -:0C0B9A006F808A828B838CF0122E78AA68 -:040BA60025AB26ACA9 -:0C0BAA00278A0574012BFE8C078A828BC1 -:0E0BB600838CF0C005C006C0071236C2AA82AA -:0E0BC400AB83D007D006D0058D828E838FF0D4 -:0A0BD200EA12354BA3EB12354B7508 -:070BDC00130174104516F52A -:050BE3001675820122DD -:040BE800852E6D8564 -:030BEC002F6E85E4 -:030BEF00306F75EF -:060BF2007003E4F57190B0 -:0E0BF800376975F080122B9CE5828583F045ED -:0A0C0600F070537403252EF52EE460 -:050C1000352FF52F85D2 -:060C15002E82852F83856D -:0A0C1B0030F01236DAFABA3F2E85E7 -:060C25003782853883854B -:080C2B0039F0743112354B85DC -:060C330031828532838549 -:0A0C390033F0740112354BA3E412EE -:080C4300354B751301741045D7 -:070C4B0016F5167582012267 -:0A0C52007518017513017582012267 -:040C5C00852E6D85EF -:030C60002F6E856F -:030C6300306F757A -:060C66007003E4F571903B -:0E0C6C00376D75F080122B9CE5828583F04574 -:0A0C7A00F0701A7403253DFAE4350A -:0A0C84003EFBAC3F8A828B838CF0AC -:090C8E00740112354B758201223C -:040C9700852E6D85B4 -:030C9B002F6E8534 -:030C9E00306F753F -:060CA1007003E4F5719000 -:0E0CA700377175F080122B9CE5828583F04535 -:060CB500F06003020D35A2 -:080CBB007403252EF52EE4352B -:040CC3002FF52F8555 -:060CC7002E82852F8385BB -:0C0CCD0030F01236DAFABA201F7401254C -:070CD9002EFAE4352FFBACFD -:0C0CE000308A828B838CF012078AE58238 -:090CEC00F5177513017582012250 -:070CF500852E82852F838507 -:0A0CFC0030F01236DAFABA3F2C8508 -:040D06001782853794 -:030D0A006D8538BC -:030D0D006E8539B7 -:090D10006F1206A0AA827B008587 -:060D190031828532838562 -:090D1F0033F0EA12354BA3EB128C -:090D2800354B751301758201229F -:040D310075820022A5 -:040D3500852E6D8515 -:030D39002F6E8595 -:030D3C00306F75A0 -:060D3F007004E4F5719060 -:0E0D4500377575F080122B9CE5828583F04592 -:0D0D5300F0703890001475F0401202DF853A -:030D6000376D8567 -:030D6300386E8562 -:030D6600396F12D0 -:0A0D690006A0AA827B008531828576 -:070D730032838533F0EA1220 -:080D7A00354BA3EB12354B755C -:070D8200130174104516F582 -:050D8900167582012235 -:040D8E00852E6D85BC -:030D92002F6E853C -:030D9500306F7547 -:060D98007003E4F5719008 -:0E0D9E00377A75F080122B9CE5828583F04534 -:070DAC00F0700475820122C2 -:040DB3007582002223 -:040DB700852E6D8593 -:030DBB002F6E8513 -:030DBE00306F751E -:060DC1007005E4F57190DD -:0E0DC700377E75F080122B9CE5828583F04507 -:060DD500F06003020F1B99 -:080DDB007405252EF52EE43508 -:040DE3002FF52F8534 -:030DE7002E6D85E9 -:030DEA002F6E85E4 -:030DED00306F75EF -:060DF0007004E4F57190AF -:0E0DF600378475F080122B9CE5828583F045D2 -:060E0400F06003020EBBCA -:070E0A00E51430E536756DBB -:030E110089756E72 -:050E140037756F8085B9 -:060E190037828538838555 -:060E1F0039F0122B16AAA7 -:070E25002574012526FBAC3A -:0C0E2C00278A828B838CF0741612354BE1 -:0A0E3800A3E412354B74DF5514F5E6 -:030E4200148069B0 -:070E4500E51430E436756D81 -:030E4C00A0756E20 -:050E4F0037756F80857E -:060E54003782853883851A -:060E5A0039F0122B16AA6C -:070E60002574012526FBACFF -:0C0E6700278A828B838CF0741812354BA4 -:0A0E7300A3E412354B74EF5514F59B -:030E7D0014802EB0 -:040E8000756DB9755E -:030E84006E377551 -:060E87006F8085378285B3 -:060E8D0038838539F012E4 -:070E93002B16AA25740125AE -:0A0E9A0026FBAC278A828B838CF0C4 -:0A0EA400740E12354BA3E412354B17 -:080EAE0075130174104516F5DF -:050EB600167582012207 -:040EBB00852E6D858E -:030EBF002F6E850E -:030EC200306F7519 -:060EC5007005E4F57190D8 -:0E0ECB0037C875F080122B9CE5828583F045B8 -:070ED900F0703B756DCE7552 -:030EE0006E3775F5 -:060EE3006F808537828557 -:060EE90038838539F01288 -:070EEF002B16AA2574012552 -:0A0EF60026FBAC278A828B838CF068 -:0B0F0000740712354BA3E412354B754B -:070F0B00130174104516F5F7 -:050F12001675820122AA -:040F170075820022BD -:040F1B00852E6D852D -:030F1F002F6E85AD -:030F2200306F75B8 -:060F25007005E4F5719077 -:0E0F2B0037D675F080122B9CE5828583F04549 -:060F3900F0600302110646 -:080F3F007405252EF52EE435A2 -:040F47002FF52F85CE -:030F4B002E6D8583 -:030F4E002F6E857E -:030F5100306F7589 -:060F54007005E4F5719048 -:0E0F5A0037DC75F080122B9CE5828583F04514 -:0A0F6800F070377403253DFAE435FC -:0A0F72003EFBAC3F8A828B838CF0BB -:090F7C00740512354B85288285AD -:0C0F85002983E0FAA3E0FB740A2AFAE4D6 -:0A0F91003BFB852882852983EAF0E6 -:070F9B00A3EBF075820122B7 -:040FA200852E6D85A6 -:030FA6002F6E8526 -:030FA900306F7531 -:060FAC007005E4F57190F0 -:0E0FB20037E275F080122B9CE5828583F045B6 -:0A0FC000F070377403253DFAE435A4 -:0A0FCA003EFBAC3F8A828B838CF063 -:090FD400740312354B8528828557 -:0C0FDD002983E0FAA3E0FB740A2AFAE47E -:0A0FE9003BFB852882852983EAF08E -:070FF300A3EBF0758201225F -:040FFA00852E6D854E -:030FFE002F6E85CE -:03100100306F75D8 -:061004007003E4F5719099 -:0E100A0037E875F080122B9CE5828583F04557 -:0A101800F070377403253DFAE4354B -:0A1022003EFBAC3F8A828B838CF00A -:09102C00740212354B85288285FF -:0C1035002983E0FAA3E0FB74082AFAE427 -:0A1041003BFB852882852983EAF035 -:07104B00A3EBF07582012206 -:04105200852E6D85F5 -:031056002F6E8575 -:03105900306F7580 -:06105C007005E4F571903F -:0E10620037EC75F080122B9CE5828583F045FB -:0A107000F070377403253DFAE435F3 -:0A107A003EFBAC3F8A828B838CF0B2 -:09108400740412354B85288285A5 -:0C108D002983E0FAA3E0FB740A2AFAE4CD -:0A1099003BFB852882852983EAF0DD -:0710A300A3EBF075820122AE -:0410AA00852E6D859D -:0310AE002F6E851D -:0310B100306F7528 -:0610B4007004E4F57190E8 -:0E10BA0037F275F080122B9CE5828583F0459D -:0A10C800F070377403253DFAE4359B -:0A10D2003EFBAC3F8A828B838CF05A -:0910DC00740612354B852882854B -:0C10E5002983E0FAA3E0FB74092AFAE476 -:0A10F1003BFB852882852983EAF085 -:0710FB00A3EBF07582012256 -:0411020075820022D0 -:04110600852E6D8540 -:03110A002F6E85C0 -:03110D00306F75CB -:061110007004E4F571908B -:0E11160037F775F080122B9CE5828583F0453B -:06112400F060030211E976 -:08112A007404252EF52EE435B6 -:041132002FF52F85E1 -:031136002E6D8596 -:031139002F6E8591 -:03113C00306F759C -:06113F007005E4F571905B -:0E11450037FC75F080122B9CE5828583F04507 -:0A115300F070377403253DFAE4350F -:0A115D003EFBAC3F8A828B838CF0CE -:09116700740912354B85288285BC -:0C1170002983E0FAA3E0FB74092AFAE4EA -:0A117C003BFB852882852983EAF0F9 -:07118600A3EBF075820122CA -:04118D00852E6D85B9 -:031191002F6E8539 -:03119400306F7544 -:061197007004E4F5719004 -:0E119D00380275F080122B9CE5828583F045A8 -:0A11AB00F070377403253DFAE435B7 -:0A11B5003EFBAC3F8A828B838CF076 -:0911BF00740812354B8528828565 -:0C11C8002983E0FAA3E0FB74082AFAE493 -:0A11D4003BFB852882852983EAF0A1 -:0711DE00A3EBF07582012272 -:0411E50075820022ED -:0411E90075820022E9 -:07374100494E464F3A2000FB -:023748002A0055 -:04374A00636C730039 -:04374E00657365003A -:053752006573723F00E9 -:0537570069646E3F00F3 -:05375C0069646E0A0023 -:023761002C003A -:06376300302E33390A008C -:043769006F7063001A -:04376D0072737400FF -:04377100737265000A -:053775007374623F00C7 -:04377A00776169000A -:06377E00737973743A0038 -:053784006572723F00B8 -:0E3789002D3130302C2022436F6D6D616E6447 -:09379700206572726F72220A00B3 -:0E37A0002D3230302C20224578656375746917 -:0B37AE006F6E206572726F72220A00BD -:0E37B900302C20224E6F206572726F72220A31 -:0137C7000001 -:0637C800766572733F00FC -:0837CE00313939392E300A00AF -:0637D600667067613A0015 -:0637DC00636F6E66200021 -:0637E200747970653F00E0 -:0437E80069643F00D1 -:0637EC00646F6E653F00F2 -:0537F200646174610038 -:0537F7006D656D3A0054 -:0637FC006461746120000D -:0538020064656C20006C -:0811ED0090E60174A0F000225D -:0811F50085827285837385F089 -:0511FD0074757500751A -:051202007600AF6FA8AB -:0712070070A97174022FF5BC -:06120E0077E438F5788951 -:091214007974032FF57AE438F532 -:05121D007B897CE4F573 -:031222007DF57ED9 -:06122500C3E57D956DE5B7 -:06122B007E956E400302F7 -:02123100134C5C -:0A123300C3E5769575505EC007C054 -:09123D0000C001AD760576ED2537 -:071246007AFDE4357BFAABF1 -:04124D007CE57D259A -:0512510072FCE57E3592 -:0A12560073FEAF748C828E838FF05C -:0E1260001236DAFC8D828A838BF012354BE554 -:06126E0075B5760280094F -:09127400D001D000D007021341A3 -:0D127D00D001D000D0078F82888389F0E572 -:06128A007D12354BA3E5C7 -:081290007E12354B758201222C -:07129800E576702DE57D25D0 -:05129F0072FAE57E3546 -:0A12A40073FBAC748A828B838CF01C -:0812AE001236DAFA8577828519 -:0612B60078838579F01237 -:0B12BC0036DAFBEAB503067576010286 -:0212C7001341D1 -:0812C9007401B57621E57D25D5 -:0512D10072FAE57E3514 -:0A12D60073FBAC748A828B838CF0EA -:0A12E0001236DA70057576028057A9 -:0512EA00757600805242 -:0912EF007402B5764D757600E538 -:0512F8007D2572FAE5FE -:0512FD007E3573FBAC1F -:0C130200748A828B838CF01236DAFA2495 -:08130E00EC5005757513800217 -:021316008A75D6 -:07131800857782857883854B -:0A131F0079F01236DAFBBB65197590 -:0A132900750375760174032FFBE4D1 -:0E13330038FC89058B828C838DF0EA12354BD5 -:07134100057DE4B57D020506 -:011348007E26 -:0313490002122568 -:0C134C008F82888389F0E57D12354BA369 -:09135800E57E12354B7582FF227F -:0E13610075AF0390E6C2E0FA43020490E6C2C4 -:0E136F00EAF0EA601090E6C2E0FA4302029053 -:07137D00E6C2EAF0EA702568 -:0913840090E6C2E04402F07A0098 -:03138D00BA04009F -:0E139000500F90E6C2E054FEF0E0FB4401F086 -:03139E000A80ECD6 -:0813A10090E6C2E0FA4404F0FA -:0E13A900E58075800075826412368A438020CC -:0213B7007A00BA -:0313B900BA320045 -:0E13BC005025E58030E41390E6C2E090E6C2D2 -:0C13CA00E4F0E090E6C2E4F0758201223D -:0D13D600900001C00212369DD0020A80D6A0 -:0413E30075820022ED -:0E13E700AA82AB838B9A7C007D008A9B7A00E1 -:0213F5007B007B -:0A13F700C3EA956DEB956E50168564 -:0E1401009C9090E6C2E054FEF0E0FC4401F046 -:07140F000ABA00E40B80E1C2 -:0414160075820122B8 -:02141A007A0056 -:03141C00BA04000F -:0E141F00500F90E6C2E054FEF0E0FB4401F0F6 -:03142D000A80EC46 -:0E14300090E6C2E04404F090E6C2E04402F010 -:0A143E0074805580FABA8002800421 -:041448007582002287 -:04144C007582012282 -:0A145000AA827B00EA30E0027B0173 -:05145A00EA30E1010B86 -:05145F00EA30E2010B80 -:05146400EA30E3010B7A -:05146900EA30E4010B74 -:05146E00EA30E5010B6E -:05147300EA30E6010B68 -:05147800EA30E7010B62 -:03147D008B82223D -:0E148000AA82C002121450AB82D002EB24FEEE -:03148E00500122E8 -:0E14910043B207530208438008EAF45280EA8F -:03149F0042B22234 -:0E14A200AA82AB83740B2AFAE43BFB8A828B8E -:0E14B00083E0605390380775F080C002C003DF -:0814BE00122AD4740EC0E07480 -:0C14C60038C0E012356415811581758274 -:0B14D200081214807582051219BC7509 -:0614DD005402903A6A126D -:0E14E3001ABB758200121480D003D00253B2DF -:0E14F100F8903A6BE0FC530401BC01047582D4 -:0214FF000122C8 -:061501008A828B83E4F0F6 -:0415070075820022C7 -:0A150B00AA82AB837C6C7D3A7E005F -:0E151500758200C002C003C004C005C00612EB -:0E1523001480D006D005D004D003D00253B2FD -:0B153100F8C281EA4B7004758263224F -:0E153C00758208C002C003C004C005C00612BC -:09154A00148075829F1219BC7512 -:061553005403903A6C12F3 -:0E1559001ABB758200121480D006D005D00493 -:0E156700D003D00253B2F88C828D838EF01226 -:0815750036DAFFBF20028008F6 -:05157D00BF0102800324 -:031582000216D37B -:051585000CBC00010D8B -:0E158A008C828D838EF01236DAFFBF20079020 -:061598003A6FE4F0800F41 -:0B159E00BF0208903A6F7401F0800457 -:0415A9007582052220 -:0515AD000CBC00010D63 -:0E15B2008C828D838EF01236DAFC903A6FE058 -:0E15C000FD903A6FEC2DF0903A6FE0FCBC14F9 -:0315CE0002806533 -:0515D100BC150280348E -:0515D600BC16028003B9 -:0315DB0002166293 -:0E15DE00903A7074FFF0A3F0A3743FF0A3E402 -:0E15EC00F0903A74F0A3F0A37440F0A3E4F082 -:0E15FA00903A78F0A37440F0903A7A7440F082 -:02160800805C04 -:0E160A00903A7074FFF0A3F0A3741FF0A3E4F5 -:0E161800F0903A74F0A3F0A37420F0A3E4F075 -:0E162600903A78F0A37420F0903A7A7420F095 -:02163400803004 -:0E163600903A7074FFF0A3F0A3740FF0A3E4D9 -:0E164400F0903A74F0A3F0A37410F0A3E4F059 -:0E165200903A78F0A37410F0903A7A7410F089 -:02166000800404 -:041662007582052266 -:0E166600903A70E0FCA3E0FDA3E0FEA3E0FFDD -:0E1674008A828B83ECF0A3EDF0A3EEF0A3EFDF -:0E168200F074042AFCE43BFD903A74E0FEA3F1 -:0E169000E0FFA3E0F8A3E0F98C828D83EEF07A -:0E169E00A3EFF0A3E8F0A3E9F074082AFCE43F -:0E16AC003BFD903A78E0FEA3E0FF8C828D8338 -:0D16BA00EEF0A3EFF0740A2AFAE43BFB9077 -:0C16C7003A7AE08A828B83F07582002260 -:0416D30075820522F5 -:0416D700AA82AB83B5 -:0E16DB008A828B83C002C0031214A2E582D063 -:0E16E90003D00270ED90380775F080122AD4FD -:0916F7007411C0E07438C0E01267 -:09170000356415811581AA40AB86 -:0C170900418A828B83E0FCA3E0FDA3E09A -:0E171500FEA3E07F008A828B83ECF0A3EDF050 -:0E172300A3EEF0A3EFF04307038A828B83EC62 -:0E173100F0A3EDF0A3EEF0A3EFF0758208C078 -:0E173F0002C003121480D003D0028A828B8372 -:07174D00755304121A56E562 -:06175400444545600C85D0 -:03175A004454856F -:06175D0042828543831265 -:021763001ABBAF -:0D17650075820012148053B2F875820122C3 -:04177200AA82AB8319 -:0E1776008A828B83C002C0031214A2E582D0C7 -:0D17840003D00270ED758208C002C0031290 -:0C17910014807582061219BC75820012CB -:08179D00148053B2F8AC46AD14 -:0C17A500478C828D83E0FEA3E0FFA3E0F0 -:0E17B100F8A3E079008C828D83EEF0A3EFF0B8 -:0E17BF00A3E8F0A3E9F04301D88C828D83EEFD -:0E17CD00F0A3EFF0A3E8F0A3E9F09038077561 -:0C17DB00F080C004C005122AD47414C0B1 -:0C17E700E07438C0E012356415811581F3 -:0E17F300758208121480D005D0048C828D837C -:0A180100755304121A567582001286 -:0E180B001480D003D00253B2F8740B2AF58279 -:0B181900E43BF5837401F075820122AE -:04182400AA82AB8366 -:0E1828008A828B83C002C0031214A2E582D014 -:0D18360003D00270ED758208C002C00312DD -:0C18430014807582061219BC7582001218 -:0E184F00148053B2F87582081214807582C797 -:0E185D001219BC758200121480D003D0025301 -:0E186B00B2F8740B2AF582E43BF5837401F0A9 -:041879007582012251 -:06187D0085824E85834FB9 -:07188300E54C454D70030226 -:02188A0019B88B -:07188C00854E82854F831297 -:0E18930014A2E58270F375820812148075822B -:0E18A100061219BC75820012148053B2F8852D -:0318AF0048508519 -:0318B20049518514 -:0A18B5005082855183E0FEA3E0FF9E -:0E18BF00A3E0F8A3E0F97AFF8F0388048905FF -:0E18CD00EAC39EFEEB9FFFEC98F8ED99F90E32 -:0418DB00BE00010F3B -:0A18DF00C3EE954CEF954D5025E542 -:0618E9004CC39EF54CE526 -:0A18EF004D9FF54D8E02EFCA25E073 -:0C18F900CA33CA25E0CA33FBEA2550F5CB -:0519050048EB3551F52F -:03190A0049800908 -:06190D00AE4CAF4DE4F505 -:031913004CF54D43 -:0E19160090380775F080C006C007122AD474FE -:0819240017C0E07438C0E012A6 -:0C192C00356415811581D007D006AA484B -:0C193800AB498A828B83E0FCA3E0FDA396 -:0E194400E0F8A3E079008A828B83ECF0A3ED3B -:0E195200F0A3E8F0A3E9F04301028A828B8340 -:0E196000ECF0A3EDF0A3E8F0A3E9F075820827 -:0E196E00C002C003C006C007121480D007D00C -:0C197C0006D003D0028A828B83755304CE -:0C198800C006C007121A56D007D0068E09 -:0519940052854A828526 -:091999004B83121A2B7582001217 -:0C19A200148053B2F8740B254EF582E45B -:0A19AE00354FF5837401F002188331 -:0419B8007582012211 -:0D19BC00AA828A037C00C002C003C004742C -:0819C9001AC0E07438C0E012FE -:0E19D1003564E58124FCF581D002EA23FA1387 -:0E19DF009281D280C280EA23FA139281D280D4 -:0E19ED00C280EA23FA139281D280C280EA23DC -:0E19FB00FA139281D280C280EA23FA139281FD -:0E1A0900D280C280EA23FA139281D280C2807A -:0E1A1700EA23FA139281D280C280EA2313924E -:061A250081D280C2802284 -:061A2B00AA82AB83AC525D -:0E1A31008C051CED601E8A828B83E0FDA3AA4B -:0E1A3F0082AB838D82C002C003C0041219BCAA -:081A4D00D004D003D00280DCBC -:011A5500226E -:061A5600AA82AB83AC5331 -:0E1A5C008C051CED601CEC2AF582E43BF58342 -:0E1A6A00E0F582C002C003C0041219BCD00413 -:061A7800D003D00280DE65 -:011A7E002245 -:0E1A7F00E4D280A28233C280D280A28233C21F -:0E1A8D0080D280A28233C280D280A28233C275 -:0E1A9B0080D280A28233C280D280A28233C267 -:0E1AA90080D280A28233C280D280A28233C259 -:041AB70080F5822212 -:061ABB00AA82AB83AC54CB -:0E1AC1008C051CED6012121A7FAD828A828B9A -:0A1ACF0083EDF0A3AA82AB8380E848 -:011AD90022EA -:07380700494E464F3A200034 -:03380E00620A004B -:03381100720A0038 -:03381400650A0042 -:03381700770A002D -:05381A00307825780064 -:0E381F008F01BF010101010701000302020237 -:0E382D00020000040404040404000000000073 -:0E383B000000003F3911BB1F01010107010110 -:0E384900030100000000000202060606060051 -:0E38570040090F090000003F0802019C013FDC -:0E386500BF07010000031601010000080C0C53 -:0E3873000C000000000000000000003F3901C2 -:0E3881001323A53F3F070100010303170100B9 -:0E388F000002020202000000000000093609DB -:02389D00003FEA -:0E389F0000000000000000000000000000001B -:0E38AD000000000083360400032303020084A1 -:0838BB000902020223030200CE -:0738C300E0000000EE4E00E2 -:0E1ADA00C0E0C082C083C002C0D075D00043FF -:0C1AE800A0015391BF75A2007402551AB2 -:0C1AF400FABA0243531AFD90E6F3E0FA40 -:0E1B00004480F00090E6C67484F090E6C7744E -:0E1B0E0009F090E6C87402F090E6C97402F087 -:0D1B1C0090E6CA7402F00090E6CEE4F0906E -:0E1B2900E6CFF090E6D0F090E6D17401F075B2 -:041B3700BB0080432C -:0E1B3B0090E6487406F090E6F3E0FA4480F07D -:0E1B49000090E6C67483F090E6C77436F09004 -:0E1B5700E6C87404F090E6C9E4F090E6CA74A3 -:0D1B650003F00090E6CEE4F090E6CFF090A3 -:0C1B7200E6D0F090E6D17401F075BB06DF -:0E1B7E0053A0FED0D0D002D083D082D0E0326F -:0E1B8C00C0E0C082C083C002C0D075D000434C -:0E1B9A00A0045391BF75A20090E6C2E0FA537A -:0A1BA8000208BA0805431A0280493A -:0E1BB200C2AF90E6F574FFF000D2AF90E6F3FC -:0D1BC000E0FA4480F00090E6C67484F090D6 -:0E1BCD00E6C77409F090E6C87402F090E6C90D -:0E1BDB007402F090E6CA7402F00090E6CEE4C8 -:0E1BE900F090E6CFF090E6D0F090E6D17401D7 -:041BF700F075BB00CA -:0E1BFB0053A0FBD0D0D002D083D082D0E032F5 -:0E1C090090E60174E6F00090E6497482F090D7 -:0D1C1700E624E4F00090E6257414F000903F -:0E1C2400E618E0FA4410F00090E61AE0FA44E8 -:0E1C320008F00090E6307480F090E631740106 -:0E1C4000F00090E6D2E4F00090E6E27402F0CC -:0E1C4E000090E6D3E4F090E6E3F090E6F57443 -:0D1C5C00FFF0009038C3E49390E6F3F090A1 -:0E1C690038C4E49390E6C3F09038C5E493903D -:0D1C7700E6C1F09038C6E49390E6C2F0900C -:0A1C840038C8E49390E6C0F07A003F -:031C8E00BA800019 -:0E1C910050128A037CE4EA90381F93FD8B8288 -:061C9F008C83F00A80E9CD -:0D1CA50090E6C67483F090E6C77436F090A8 -:0E1CB200E6C87404F090E6C9E4F090E6CA7447 -:0E1CC00003F090E6CB7423F090E6CC7403F0B2 -:0E1CCE0090E6CD7402F090E60CE4F090E6C6CD -:0C1CDC00F090E6F3E04480F0751A00C2BE -:051CE800AF756DDA7517 -:061CED006E1A758234122C -:041CF3002F82756D5A -:031CF7008C756E7B -:0C1CFA001B758200122F8290E6507404CB -:0E1D0600F090E6607402F0D2AF90E6F3E0FADF -:0E1D14004480F00090E6C67483F090E6C77439 -:0E1D220036F090E6C87404F090E6C9E4F09044 -:0E1D3000E6CA7403F00090E6CEE4F090E6CF31 -:0E1D3E00F090E6D0F090E6D17401F075BB068F -:011D4C002274 -:0C1D4D00C2AF751A0090E6F574FFF000BC -:0E1D5900E5BB30E7FB9038CA75F080122AD443 -:091D670074D1C0E07438C0E01230 -:0E1D7000356415811581D2AF90E6F3E0FA4498 -:0E1D7E0080F00090E6C67483F090E6C77436DD -:0D1D8C00F090E6C87404F090E6C9E4F09011 -:0E1D9900E6CA7403F00090E6CEE4F090E6CFC8 -:0E1DA700F090E6D0F090E6D17401F075BB0626 -:011DB500220B -:0E1DB600C2AF90E650E4F00090E660E4F0006A -:0E1DC40090E6D1E4F090E6D37401F090E6E3EF -:0C1DD2007401F090E6F574FFF000751A43 -:0E1DDE000090E618E0FA54EFF00090E61AE0EC -:0E1DEC0054F7F0D2AF9038CA75F080122AD4A6 -:091DFA0074DFC0E07438C0E0128F -:071E030035641581158122F1 -:0738CA00494E464F3A200071 -:0E38D100677069662061626F727465640A0038 -:0E38DF00677069662064656163746976617460 -:0438ED0065640A0004 -:0E1E0A0090E6007410F0758E0075802075B2A1 -:0E1E18002B75900075B3FF75A0C075B4C79010 -:0E1E2600E6C27407F090E6C3E4F090E60B7499 -:0E1E340003F00090E610E4F00090E611E4F0F8 -:0E1E42000090E61274A0F00090E613E4F000A9 -:0E1E500090E61474E0F00090E615E4F00090C7 -:0E1E5E00E6047480F00090E6047402F0009038 -:0D1E6C00E6047406F00090E604E4F0009037 -:0E1E7900E6187401F00090E61A7401F0009073 -:0E1E8700E68AE4F00090E68BE4F00090E64975 -:0E1E95007482F00090E6497482F00090E649F5 -:0E1EA3007482F00090E6497482F00090E680B0 -:0D1EB100E0FA30E70E90E6247402F0009095 -:061EBE00E625E4F000221D -:0E1EC40090E624E4F00090E6257440F0002241 -:0E1ED2005380BF43B24090000112369D438002 -:051EE0004053B2BF22D7 -:091EE500E582FA700443A04022DA -:041EEE0053A0BF221C -:091EF200E582FA700443A080228D -:041EFB0053A07F224F -:041EFF0063A040227A -:041F030063A0802235 -:011F070022B7 -:0D1F0800903A7B7403F0903A7C7401F07500 -:031F15006D7B756C -:031F18006E3A75A9 -:081F1B006F02758241022DFFE7 -:0E1F2300AA82903A7D7401F0903A7EEAF07541 -:031F31006D7D754E -:031F34006E3A758D -:091F37006F02758241122DFF7545 -:031F40001CFF2261 -:071F4300903A7FE4F0756D98 -:031F4A007F756E32 -:081F4D003A756F017582411223 -:041F55002DFF756D7A -:031F59007F756E23 -:081F5C003A756F017582411214 -:0E1F64002D3F903A7FE0FA530201BA01047556 -:031F7200820122C7 -:041F7500758200224F -:03370B000237136F -:0636F600756101755564C9 -:0337260002370E59 -:05370E0012299680FE67 -:051F790090E68BE4F08E -:091F7E0090E6A0E0FA20E1F8224F -:031F8700022A85A6 -:031F8A00022AAB7D -:091F8D00121F797402B51E0790C1 -:061F96003A80E4F0A3F024 -:091F9C00903A80E0F50DA3E0F598 -:051FA5000E750F4075F0 -:0A1FAA0010E790E6BEE0F511758225 -:0C1FB400511201D9E5827006751D03F57D -:021FC00082227B -:0E1FC20090E6BEE0FA7B00903A80E0FCA3E0DF -:0E1FD000FD903A80EA2CF0EB3DA3F075820103 -:011FDE0022E0 -:0E1FDF0090E690E0FB7A0090E691E07D002A0B -:071FED00F556ED3BF557909E -:091FF4003A49E0FCBC0102800343 -:031FFD00022108B6 -:0E200000903A4AE0FCA3E0FDA3E0FEA3E0FF5F -:09200E00EC4D4E4F60030220C7A7 -:0E201700903A9CE4F0903A45E0FCA3E0FDA373 -:0A202500E0FEA3E0FFA856A9577AD9 -:0E202F00007B00C3E89CE99DEA9EEB9F502ACF -:0A203D00E55624F4FAE55734FFFBE2 -:0E2047007C007D00903A4AEAF0A3EBF0A3EC97 -:0A205500F0A3EDF0E55624EAF5567D -:08205F00E55734FFF557802E10 -:0E206700903A45E0FAA3E0FBA3E0FCA3E0FD05 -:0E207500903A4AEAF0A3EBF0A3ECF0A3EDF0F2 -:0E208300903A45E0FAA3E0FBA3E0FCA3E0FDE9 -:042091008A568B5789 -:0C209500755816903A45E0FBA3E0FCA350 -:0E20A100E0FDA3E0FEEB24F6FBEC34FFFCEDCB -:0E20AF0034FFFDEE34FFFE903A45EBF0A3EC5B -:0A20BD00F0A3EDF0A3EEF002219E67 -:0820C70075580CE55624F4F5F0 -:0620CF0056E55734FFF551 -:0C20D50057903A4AE0FBA3E0FCA3E0FDBA -:0A20E100A3E0FEAF56A857E4F9FA99 -:0D20EB00EF2BFBE83CFCE93DFDEA3EFE90DA -:0E20F8003A4AEBF0A3ECF0A3EDF0A3EEF002F9 -:02210600219E18 -:0C210800755800903A45E0FAA3E0FBA3F4 -:0A211400E0FCA3E0FDAE56AF5778E3 -:0E211E00007900C3EE9AEF9BE89CE99D502AE1 -:0E212C00903A4AE0FAA3E0FBA3E0FCA3E0FD3A -:0D213A00EE2AFEEF3BFFE83CF8E93DF9908E -:0E2147003A4AEEF0A3EFF0A3E8F0A3E9F0802F -:012155004841 -:0E215600903A4AE0FAA3E0FBA3E0FCA3E0FD10 -:0E216400903A45E0FEA3E0FFA3E0F8A3E0F907 -:0D217200EE2AFAEF3BFBE83CFCE93DFD9056 -:0E217F003A4AEAF0A3EBF0A3ECF0A3EDF090E7 -:0E218D003A45E0FAA3E0FBA3E0FCA3E0FD8AE4 -:03219B00568B5709 -:0E219E00903A9CE0FAC374808AF063F080955A -:0621AC00F05003022307BE -:0921B200EA7006903A847462F0B0 -:0C21BB00903A84E0FABA6278AA587BF0EF -:0621C7007C00756F8275BB -:0321CD00703A75F0 -:0421D00071008556BF -:0321D4006D8557BF -:0C21D7006E8A828B838CF01211F5AA82B4 -:0721E300BA014F750A9D755A -:0321EA000B3A7538 -:0621ED0008DD75093F75D5 -:0C21F3000C107582511201A2E5827003ED -:0321FF00F5822244 -:04220200756D9D75E4 -:032206006E3A75B8 -:072209006F00757010E4F591 -:0822100071903A8575F000128F -:0E2218002B9CE5828583F045F0600475820002 -:012226002295 -:0E222700903A847465F0903A9C7401F0800641 -:06223500903A9C74FFF0DA -:0C223B00903A84E0FABA6558AA587BF08B -:062247007C00756F82753A -:03224D00703A756F -:04225000710085563E -:032254006D85573E -:0C2257006E8A828B838CF01211F5AA8233 -:0C226300BA012F903A87E0903A98F09072 -:08226F003A86E0903A99F090E4 -:082277003A85E0903A9AF090DC -:0E227F003A9BE4F0121361E5827003F58222AF -:08228D00903A9C7401F08006F8 -:06229500903A9C74FFF07A -:0C229B00903A82E0FAA3E0FBEA2558F537 -:0622A70058E556C39AF54C -:0522AD0056E5579BF50A -:0C22B20057903A4AE0FCA3E0FDA3E0FED8 -:0E22BE00A3E0FFE4F8F9EA2CFCEB3DFDE83E5E -:0E22CC00FEE93FFF903A4AECF0A3EDF0A3EEDE -:0E22DA00F0A3EFF0903A45E0FCA3E0FDA3E096 -:0E22E800FEA3E0FFECC39AFAED9BFBEE98F824 -:0E22F600EF99F9903A45EAF0A3EBF0A3E8F077 -:03230400A3E9F05A -:0E230700903A9CE0FAC374808AF063F08095EF -:06231500F040030223BDAD -:08231B00AA587BF07C008556F6 -:032323006D85576E -:0C2326006E8A828B838CF01213E7E58234 -:052332007003F582229A -:0E233700903A45E0FAA3E0FBA3E0FCA3E0FD32 -:0A234500AE56AF57E4F8F9EAC39E64 -:0E234F00FAEB9FFBEC98FCED99FD903A45EA05 -:0E235D00F0A3EBF0A3ECF0A3EDF0903A98E0C3 -:0C236B00FAA3E0FBA3E0FCA3E0FDAE56EB -:0C237700AF5778007900903A98EAC39EB6 -:0E238300F0EB9FA3F0EC98A3F0ED99A3F0907F -:0E2391003A98E0FAA3E0FBA3E0FCA3E0FDC352 -:0E239F00E49AE49BE49C74808DF063F08095DA -:0D23AD00F0400D12141AE5827003F5822233 -:0323BA0075130197 -:0423BD007582012202 -:0E23C10090E6BCE0FABA020D90E6B8E0FA53DE -:0723CF000201BA01028006C1 -:0623D60074FE251E500AF2 -:0A23DC00122C1BE582704CF58222E2 -:0E23E60090E6BCE0700D90E6B8E0FA530201FC -:0523F400BA010280287F -:0E23F90090E6BCE0FABA020D90E6B8E0FA53A6 -:072407000202BA0202801379 -:0E240E0090E6BCE0FABA861590E6B8E0FA5304 -:05241C000202BA020AF1 -:0A24210012034FE5827007F58222D6 -:04242B007582002294 -:04242F00758201228F -:04243300758200228C -:04243700750AAD7500 -:03243B000B3A75E4 -:06243E0008F775093F7567 -:092444000C017582511201A290F5 -:09244D003AADE0FA90E00CF090C9 -:06245600E05AEAF0750AED -:03245C00AE750B4F -:05245F003A7508F87554 -:09246400093F750C087582511244 -:04246D0001A27A004E -:03247100BA0800A6 -:0A2474005022EA24AEF582E4343A67 -:09247E00F583E0FBBBFF027B309B -:0A248700EA2AFC247AF582E434E12D -:07249100F583EBF00A80D98E -:012498002221 -:0E249900903BC27411F0E4A3F0A3F0A3F09006 -:0424A7003BC1E4F061 -:0924AB00903A49E4F030040312F8 -:0224B400324FA5 -:0824B600E5AA30E0030227ACA7 -:0724BE00E51B60030227ACDF -:0724C5007401B5130280173A -:0E24CC00903A45E0FAA3E0FBA3E0FCA3E0FD9C -:0924DA00EA4B4C4D60030226564A -:0E24E30090F00175F0001236DAFA90F00275F2 -:0E24F100F0001236DAFB3395E0FCEBF4FBEC66 -:0E24FF00F4FCEAFD3395E0FEEDB50306EEB504 -:04250D000402800341 -:0325110002263768 -:0E251400903A44EAF090F000E0FABA0102803A -:0125220003B5 -:032523000225D1BD -:0E25260090F00475F0001236DAFBA31236DADC -:0C253400FCA31236DAFDA31236DAFE908A -:0E2540003A45EBF0A3ECF0A3EDF0A3EEF09023 -:0C254E003A497401F07401B513028003D7 -:03255A0002265600 -:0C255D00751302903A4AE4F0A3F0A3F0DA -:09256900A3F074EF5516F516906D -:0E2572003A4EE4F0A3F0A3F0A3F0903BBCE4DB -:0D258000F0A3F0903AB6740CF0E4A3F090D4 -:0D258D003BBE7400F0A374F0F0A3E4F090E6 -:05259A003BC1F07522B9 -:03259F00BE7523E3 -:0525A2003B75240075EB -:0325A70025BC75DB -:0325AA00263A7559 -:0625AD002700903AB6126F -:0925B300087AE582600302265655 -:0725BC0074204514F51475AD -:0825C3001301903BC1E4F0900C -:0625CB003A49F002265619 -:0E25D100BA0242903BBCE0FAA3E0FB4A60373E -:0C25DF0075130390F00475F0001236DA5A -:0D25EB00FAA31236DAFBA31236DAFCA312B3 -:0E25F80036DAFD903A45EAF0A3EBF0A3ECF0E2 -:0E260600A3EDF0903A4EE4F0A3F0A3F0A3F0A1 -:02261400804004 -:0E26160090E6A3E04401F09038F175F08012D8 -:072624002AD474F9C0E07430 -:0C262B0038C0E012356415811581801F55 -:0E26370090E6A3E04401F09038F175F08012B7 -:072645002AD474FDC0E0740B -:0A264C0038C0E012356415811581D5 -:072656007402B513028003BA -:03265D000227A6AB -:0C266000903BC1E0FA24F650030227A3CF -:07266C00EA2A2A902673738D -:072673000227A302269102D9 -:06267A00269A0226CA02A6 -:0626800026FA02272502E4 -:06268600273A0227A3021F -:05268C00274502277143 -:07269100121ED275130102B5 -:0226980027A673 -:04269A00750ABC758C -:03269E000B3A757F -:0626A10008ED75093F750C -:0926A7000C0A7582511201A29087 -:0E26B0003AC6740AF0903BBC740BF0A3E4F041 -:0726BE0074104516F51675B6 -:0526C50013010227A62D -:0426CA00750ABC755C -:0326CE000B3A754F -:0626D10008DD75093F75EC -:0926D7000C107582511201A29051 -:0E26E0003ACC740AF0903BBC7411F0A3E4F005 -:0726EE0074104516F5167586 -:0526F50013010227A6FD -:0E26FA0074805580FABA8008903ABC7431F0B2 -:02270800800649 -:06270A00903ABC7430F0AF -:0E271000903ABD740AF0903BBC7402F0A3E452 -:07271E00F07513010227A66C -:0A272500121FDFE58260030227A601 -:07272F0074104514F5147548 -:042736001301806C9F -:07273A00121C09751B01755B -:04274100130180619F -:042745007540C275A4 -:03274900413B759C -:03274C0042BC7517 -:03274F00433A7595 -:062752004414E4F545907B -:062758003A5E1216D79054 -:0C275E003BBC7414F0A3E4F074104516AA -:07276A00F51675130180351F -:042771007546C27572 -:03277500473B904F -:062778003A5E12177275B3 -:03277E0048C275D9 -:03278100493B9041 -:0C2784003AB6E0FAA3E0FB8A4A74F02B9E -:07279000F54B754C14E4F554 -:052797004D903A5E12B6 -:07279C00187D751301800395 -:0327A300751301AA -:0627A60090E6497482F088 -:0827AC00E5AA30E50302292F24 -:0727B4007403B5130280035A -:0327BB0002292FC1 -:0E27BE00903A4EE0FAA3E0FBA3E0FCA3E0FD9E -:0927CC00EA4B4C4D600302285455 -:0E27D50090F8007402F0903A44E0FA90F80197 -:0E27E30075F000EA12354B903A44E0F4FA909B -:0E27F100F80275F000EA12354B90F803E4F59B -:0E27FF00F012354B903BBCE0FAA3E0FB7C00EF -:0E280D007D0090F80475F000EA12354BA3EB45 -:0B281B0012354BA3EC12354BA3ED125D -:0E282600354B90F809E4F5F012354B90F80AA6 -:0D283400E4F5F012354B90F80BE4F5F012CE -:0E284100354B90F80875F000740112354B7598 -:05284F00590CE4F55AEC -:0C285400903A4EE0A3E0A3E0A3E0AA59F4 -:02286000AB5A71 -:0E286200C002C003903A4EE0FCA3E0FDA3E0EC -:0D287000FEA3E0FF903BBCE0FAA3E0FB8A72 -:04287D005B8B5C75A0 -:072881005D00755E00C3E578 -:062888005B9CE55C9DE590 -:0A288E005D9EE55E9FD003D002407E -:0A2898005A8A048B050ABA00010BEE -:0828A2008C5F74F82DF56090C5 -:0D28AA003A4EE0FEA3E0FFA3E0A3E0EE2421 -:0A28B700BCF582EF343AF583E085AA -:0728C1005F82856083F09047 -:0E28C8003A4EE0FCA3E0FDA3E0FEA3E0FF0C0F -:0C28D600BC00090DBD00050EBE00010F86 -:0E28E200903A4EECF0A3EDF0A3EEF0A3EFF071 -:0328F00002286259 -:0C28F30090E698EBF090E699EAF0E4F52E -:0428FF0059F55A909D -:0E2903003A4EE0FAA3E0FBA3E0FCA3E0FDC324 -:08291100EA955BEB955CEC9587 -:072919005DED955E401075B5 -:07292000130174EF5516F5D9 -:0829270016903BBCE4F0A3F0A4 -:09292F00E51C7005F582121F235E -:062938007555640224AB9A -:0C293E00C021C0E0C0F0C082C083C00215 -:0E294A00C003C004C005C006C007C000C00125 -:0A295800C0D075D000D5610975618B -:0729620032121EFF751C007C -:082969007401B51E09151FE5FC -:062971001F700312321773 -:0E297700C2CFD0D0D001D000D007D006D005FE -:0E298500D004D003D002D083D082D0F0D0E0B6 -:03299300D021321E -:07299600121E0A121F0812B5 -:06299D0002A31211ED90EF -:0629A3003A5E12150B75EF -:0C29A9001B001229E890E601E04404F055 -:0929B500C2AF122437122FD31215 -:0529BE00314E7A3E7B62 -:0B29C300298A828B8312366DD2AF127E -:0E29CE001F43E5826008758204121F238006F5 -:0629DC00758202121F23A8 -:0629E200122B780224997B -:0838F1004552524F523A2000EB -:0438F90049440A0034 -:0638FD00625461670A003D -:0A29E800C2ACC200903BC6E4F090C0 -:0829F2003BC7F0903BC8F090D8 -:0E29FA003BC9F090E6087401F07598501099F2 -:032A080002800049 -:052A0B0010980280009C -:042A1000756D1F754C -:062A14006E2A75822312F8 -:052A1A002ECED2AC221B -:0E2A1F00C0E0C082C083C002C003C0D075D02A -:082A2D0000C2AC1098028017F2 -:0C2A3500903BC8E0FA903BC804F0EA2493 -:0A2A4100CAF582E4343CF583E59900 -:012A4B00F09A -:052A4C00109902802535 -:0E2A5100903BC6E0FA903BC7E0FBEAB50304F9 -:042A5F00C20080131E -:0C2A6300903BC7EB04F0EB24CAF582E4C2 -:072A6F00343BF583E0F5990B -:0E2A7600D2ACD0D0D003D002D083D082D0E03A -:012A8400321F -:0C2A8500AA82C2AC300018903BC6E0FBF7 -:0C2A9100903BC604F0EB24CAF582E4344C -:072A9D003BF583EAF0800421 -:042AA400D2008A9939 -:032AA800D2AC228B -:0E2AAB00903BC8E0FA903BC9E0FBEAB503029D -:022AB900801487 -:0C2ABB00903BC9EB04F0EB24CAF582E468 -:082AC700343CF583E0FA8002C3 -:022ACF007A008B -:032AD1008A8222D4 -:062AD400AA82AB83ACF006 -:0E2ADA008A828B838CF01236DAFD60188D82B2 -:052AE8000ABA00010B19 -:0E2AED00C002C003C004122A85D004D003D05A -:032AFB000280DC7A -:012AFE0022B5 -:0E2AFF007A00903BC8E0FB903BC9E0FCEBB5D1 -:042B0D00040280023C -:022B11007A0147 -:032B13008A822291 -:082B160085827085837185F052 -:042B1E0072AD6DAE79 -:042B22006EAF6FA87B -:042B260070A971AA77 -:012B2A007238 -:0E2B2B008D828E838FF01236DAFBA3AD82AE60 -:0E2B390083888289838AF0EB12354BA3A88231 -:0A2B4700A983EB70DF8570828571B1 -:052B5100838572F022F3 -:082B560090E6A0E04401F0222A -:0E2B5E00AA8274805AC423541FFB740F5A902D -:0C2B6C00E6834BF090E683E04420F0226A -:0E2B780090E680E0440AF09000FA12369D903C -:0E2B8600E65D74FFF090E65F74FFF05391EF90 -:082B940090E680E054F7F02206 -:0A2B9C00AA82AB83ACF0E57045712E -:062BA60070049000002203 -:052BAC00AD6DAE6EAF3F -:042BB1006FA870A9F0 -:012BB50071AE -:052BB60018B8FF011931 -:0E2BBB00E84960368A828B838CF01236DAF598 -:0C2BC900726029C000C0018D828E838FD5 -:0A2BD500F01236DAF8B5720280063D -:062BDF00D001D0008010BF -:092BE500D001D0000ABA00010B76 -:072BEE000DBD00C40E80C103 -:0E2BF5008A828B838CF01236DAFA3395E0FB7D -:0E2C03008D828E838FF01236DAFD3395E0FC61 -:0A2C1100EAC39DF582EB9CF58322D7 -:06372000E478FFF6D8FD7D -:0736FC00751D00751E00752D -:023703001FFFA6 -:0E2C1B0090E6B8E0FA530280BA805F90E6B906 -:072C2900E0FABA0202800A82 -:052C3000BA0302800B55 -:052C3500BA05498033DF -:062C3A00E51D7582002279 -:0C2C400090E740E51DF090E741E4F090C3 -:0D2C4C00E742F090E74374FFF090E744E5A5 -:0C2C59001EF090E745E4F090E68AF09051 -:082C6500E68B7406F0022D3B22 -:0C2C6D0090E740E51EF090E68AE4F0904D -:082C7900E68B7401F0022D3B13 -:042C81007582002236 -:0B2C850090E6B8E0FA30E703022D37BC -:0C2C900090E6B9E0FA6013BA010280255A -:052C9C00BA0402806192 -:062CA100BA0603022D1625 -:032CA700022D30CB -:082CAA00E51E700C12321775D3 -:062CB2001E01751FFF0268 -:022CB8002D3BB2 -:072CBA00751D0F7582002259 -:072CC1007402B51E0280053C -:052CC8007405B51E1BA0 -:0E2CCD0090E6BEE06015121F8DE5827009755D -:082CDB001D03751E0AF582229B -:052CE300751E05805381 -:0C2CE8007405B51E0E90E6BEE0700812E8 -:072CF4003217751E08804035 -:072CFB00751D0F7582002218 -:092D0200740AB51E08751D007568 -:042D0B001E02802CF8 -:072D0F00751D0F7582002203 -:0A2D1600E51E600F7401B51E028077 -:012D200008AA -:082D2100751D00751E028012F1 -:072D2900751D0F75820022E9 -:072D3000751D0F75820022E2 -:042D3700758200227F -:042D3B00758201227A -:0A2D3F00AA82E56F7004758201227C -:0E2D490090E678E0FB20E6F890E6787480F0E3 -:0A2D5700EA2AFA90E67974014AF0C6 -:0E2D610090E678E0FA30E0F890E678E0FA309C -:052D6F00E203022DF457 -:0B2D740090E678E0FA20E103022DF465 -:0C2D7F007401B56F0890E678E0FA44207B -:012D8B00F057 -:092D8C0090E679E0F570AA6DAB48 -:032D95006EAC6FB2 -:042D98001CEC60309F -:0E2D9C0090E678E0FD30E0F890E678E0FD206B -:0D2DAA00E248BC010890E678E0FD4420F00E -:0E2DB70090E679E0FD8A828B83F0A3AA82ABBE -:072DC500838A6D8B6E80CC48 -:0E2DCC0090E678E0FA30E0F890E678E0FA2041 -:0C2DDA00E21890E678E04440F0AA6DABEF -:0C2DE6006E90E679E08A828B83F07582A3 -:022DF2000122BC -:0B2DF40090E678E04440F07582002279 -:022DFF00AA82A6 -:0E2E010090E678E0FB20E6F890E6787480F02A -:072E0F00EA2AFA90E679F0CF -:0E2E160090E678E0FA30E0F890E678E0FA20F6 -:0C2E2400E24790E678E0FA30E13FAA6D4A -:042E3000AB6EAC6F6A -:0E2E3400EC602B8A828B83E0FDA3AA82AB8325 -:062E420090E679EDF01CA2 -:0E2E480090E678E0FD30E0F890E678E0FD20BE -:0C2E5600E21590E678E0FD20E1D4800B4E -:0B2E620090E678E04440F07582012209 -:0B2E6D0090E678E04440F075820022FF -:082E780085827085837185F0ED -:042E800072AD70AE11 -:032E840071AF72B9 -:0E2E87008D828E838FF01236DA60070DBD004B -:042E9500F10E80EECC -:052E9900A86DA96EAA5E -:052E9E006F8E048F039C -:0E2EA300888289838AF01236DAFEA3A882A9FB -:0E2EB100838D828C838BF0EE12354BA3AD82A5 -:0A2EBF00AC83EE70DF857082857130 -:052EC900838572F02278 -:052ECE00AA82BA030016 -:072ED3004005EA249C5001B8 -:012EDA0022D5 -:092EDB00740F5AFBBB03028007CF -:072EE400740F5AFBBB0B4504 -:0A2EEB00A2AF9201C2AFEA2400F585 -:0C2EF50082E43400F5837402F07B00746A -:0C2F0100012AFCE43BFDEC2400F582ED0D -:0A2F0D003400F583E56EFCF0740259 -:0C2F17002AFAE43BFBEA2400F582EB34CC -:0A2F230000F583AA6D7B00EAF0A21E -:032F2D000192AF5F -:012F3000227E -:082F3100E582FA24835001221D -:062F3900EA5403600122CE -:0A2F3F00A2AF9202C2AFEA2400F52F -:0C2F490082E43401F5837402F07B007414 -:0C2F5500012AFCE43BFDEC2400F582EDB9 -:0A2F61003401F583E56EF074022AD6 -:0B2F6B00FAE43BFBEA2400F582EB34A3 -:082F760001F583AA6DEAF0A247 -:042F7E000292AF22EA -:082F8200E582FA24CB50012284 -:062F8A00EA54036001227D -:0A2F9000A2AF9203C2AFEA2480F55D -:0C2F9A0082E43400F5837402F07B0074C4 -:0C2FA600012AFCE43BFDEC2480F582EDE8 -:0A2FB2003400F583E56EF074022A86 -:0B2FBC00FAE43BFBEA2480F582EB34D2 -:082FC70000F583AA6DEAF0A2F7 -:042FCF000392AF2298 -:082FD300C2E8C2EA756D007549 -:062FDB006E017582431235 -:042FE1002ECE756D0E -:032FE50080756E86 -:0C2FE80000758253122ECE0090E650E4DB -:0E2FF400F00090E652E4F00090E654E4F000A5 -:0E30020090E656E4F00090E65174FFF0009066 -:0E301000E65374FFF00090E65574FFF0009058 -:0E301E00E65774FFF00090E658E4F090E65993 -:0E302C0074FFF090E65AE4F090E65B74FFF05B -:0E303A0090E65CE4F090E65D74FFF090E65ED8 -:0E304800E4F090E65F74FFF00090E660E4F0C4 -:0D3056000090E66174FFF090E662E4F090F7 -:0E306300E66374FFF090E665E4F090E66874B2 -:0A3071000BF05391AFD2E8D2EA222F -:063705007562007563000F -:0A307B0090E680E0FA30E719756472 -:033085000075656E -:03308800E075668A -:03308B0012756754 -:03308E00E0756882 -:033091001C756942 -:03309400E0756A7A -:033097006A756BEC -:02309A00E02232 -:04309C0075644E7594 -:0330A00065E07573 -:0330A300666075EF -:0330A60067E0756B -:0330A900686A75DD -:0330AC0069E07563 -:0330AF006A1C7523 -:0330B2006BE022AE -:0930B5005391EF75A100D2043221 -:0C30BE00C021C0E0C0F0C082C083C0028E -:0E30CA00C003C004C005C006C007C000C0019E -:0E30D800C0D075D0005391EF75A10012307B6F -:0C30E600751E00D0D0D001D000D007D063 -:0E30F20006D005D004D003D002D083D082D007 -:06310000F0D0E0D0213206 -:0C310600C021C0E0C0F0C082C083C00245 -:0E311200C003C004C005C006C007C000C00155 -:0E312000C0D075D0005391EF75A10012307B26 -:0C312E00751E00D0D0D001D000D007D01A -:0E313A0006D005D004D003D002D083D082D0BE -:06314800F0D0E0D02132BE -:05314E0012307B756DDD -:03315300B5756EE1 -:0831560030758200122F317563 -:03315E006DBE75CE -:063161006E3075821012B1 -:043167002F31756D22 -:03316B0006756E78 -:0C316E0031758214122F3190E65C743130 -:02317A00F02241 -:0D317C00E582547FFA24F75004758200228A -:07318900BA01047582012266 -:08319000530201E4BA0001043E -:03319800F582229B -:09319B00AA82BA010490E6A12207 -:0731A400BA810490E6A222AB -:0A31AB0053027FEA700490E6A022B0 -:0D31B500EAC31324A2F582E434E6F5832278 -:0431C20075649C751F -:0331C60065E0754C -:0331C90068AE7578 -:0331CC0069E02295 -:0C31CF00C021C0E0C0F0C082C083C0027C -:0E31DB00C003C004C005C006C007C000C0018C -:0E31E900C0D075D0005391EF75A1001231C215 -:0C31F700751E02D0D0D001D000D007D04F -:0E32030006D005D004D003D002D083D082D0F4 -:06321100F0D0E0D02132F4 -:06321700E51E7018756D44 -:03321D00CF756EFC -:0832200031758210122F317587 -:033228006DCF75F2 -:06322B006E3175821402F1 -:023231002F313B -:04323300756DBE7582 -:063237006E3075821012DA -:04323D002F31756D4B -:0332410006756EA1 -:0832440031758214122F31755F -:03324C001E00223F -:0C324F00C20490E6B8E0FA530260BA0036 -:03325B00028038B6 -:05325E00BA2002800D02 -:05326300BA4002801ECC -:05326800BA60028013B2 -:03326D00023543E4 -:0A3270001223C1E58260030235431A -:06327A00122B5602354341 -:06328000122B560235433B -:0A328600122433E582600302354391 -:06329000122B560235432B -:0D32960090E6B8E0FA530280BA800280038F -:0332A30002343DB5 -:0B32A60090E6B9E0FABA00030233B46E -:0532B100BA06028035A1 -:0532B600BA08028008C7 -:0532BB00BA0A028017B1 -:0332C0000234379E -:0C32C30090E740E562F090E68AE4F090AD -:0832CF00E68B7401F0023543A7 -:0C32D70090E740E563F090E68AE4F09098 -:0832E300E68B7401F002354393 -:0A32EB0090E6BBE0FABA0102801D74 -:0532F500BA0202803E58 -:0532FA00BA0302805F31 -:0532FF00BA0602802167 -:05330400BA070280423F -:06330900BA210302339714 -:03330F000233AED8 -:0A331200AA64AB6590E6B3EBF07B14 -:09331C000090E6B4EAF00235432A -:0A332500AA66AB6790E6B3EBF07BFD -:09332F000090E6B4EAF002354317 -:0A333800AA68AB6990E6B3EBF07BE6 -:093342000090E6B4EAF002354304 -:0A334B00AA6AAB6B90E6B3EBF07BCF -:093355000090E6B4EAF0023543F1 -:0E335E0090E6BAE0FA90E0C9E0FBC3EA9B40BB -:07336C0006122B5602354347 -:0C33730090E6BAE075F002A424CAF582CE -:0B337F0074E035F0F583E0FAA3E09065 -:0D338A00E6B3F07B0090E6B4EAF0023543B4 -:0A3397007AC07BE090E6B3EBF07A19 -:0A33A100C07BE07B0090E6B4EAF088 -:0333AB00023543A5 -:0633AE00122B560235430C -:0D33B40090E6B8E0FA53021FBA0002800A4A -:0533C100BA0102801DAD -:0533C600BA0268802E30 -:0E33CB0090E7407401F090E741E4F090E68A4C -:0A33D900F090E68B7402F002354319 -:0E33E30090E740E4F090E741F090E68AF09029 -:0833F100E68B7402F002354383 -:0E33F90090E6BCE0F58212317CE58260259002 -:0E340700E6BCE0F58212319BE0FA5302019020 -:0E341500E740EAF090E741E4F090E68AF0909C -:08342300E68B7402F002354350 -:06342B00122B560235438E -:06343100122B5602354388 -:06343700122B5602354382 -:0C343D0090E6B9E0FA24F4500302354098 -:07344900EA2A2A90345073B7 -:073450000235400234860240 -:0634570035080234E90211 -:06345D003540023540027B -:0634630035400235400275 -:063469003540023474023C -:05346F00354002347D30 -:0934740090E6BAE0F5620235436E -:09347D0090E6BAE0F56302354364 -:0D34860090E6B8E0FA53021FBA000280057C -:05349300BA024E800AA0 -:0A34980090E6BAE0122B560235430D -:0D34A20090E6BAE0703790E6BCE0F58212CB -:0D34AF00317CE582602A90E6BCE0F58212D7 -:0E34BC00319BAA82AB83E0FC5304FE8A828B14 -:0E34CA0083ECF090E6A3E054FEF090E6BCE048 -:0734D800F582122B5E8064F7 -:0534DF00122B56805F76 -:0534E400122B56805A76 -:0E34E90090E6B8E0FA53021FBA004F90E6BA20 -:0734F700E0FABA01028005B2 -:0534FE00BA020280404B -:05350300122B56803B75 -:0E35080090E6BAE0FA702C90E6BCE0F5821274 -:0D351600317CE582601A90E6BCE0F582127F -:0E352300319BAA82AB83E0FC4304018A828BB9 -:0535310083ECF0800DA9 -:05353600122B56800875 -:05353B00122B56800375 -:03354000122B56F5 -:0835430090E6A0E04480F022B4 -:0E354B0020F71030F6118883A88220F507F6CD -:05355900A8837583004A -:01355E00224A -:03355F00F280F700 -:02356200F02255 -:05356400C06C85816CC4 -:0B356900E56C24FDF8868318868218AC -:0E357400E493A324DB600C242560051236527C -:0235820080F0D7 -:0335840002366AA2 -:09358700D2D5E493A3C083C082F5 -:03359000B47314FD -:0935930086F01886831886821860 -:0B359C001236DA6054A312365280F59C -:0B35A700B4630818E618123652804387 -:0E35B200B46417E630E74618E6F42401F60884 -:0C35C000E6F43400F6742D12365280330D -:0A35CC00B4782D868318868218E477 -:0B35D600123643E583123642E58312F3 -:0A35E1003643E582123642E58212FD -:0A35EB00364330D505743012365215 -:0735F500D082D0830235747F -:0335FC00B475F6AD -:0635FF00E6FA18E6F918D7 -:0D3605007C107D2712362DFF7CE87D03121E -:0E361200362DC4F5837C647D0012362D428374 -:0D362000E975F00A84C445F0F582EF80A939 -:02362D007B0020 -:0E362F000BC3E99CF9EA9DFA50F61BE92CF951 -:05363D00EA3DFAEB225A -:01364200C4C3 -:07364300540F700320D51F96 -:08364A00C2D52490D43440D411 -:0E365200C083C082C0F0F582E8C0E0121F877E -:09366000D0E0F8D0F0D082D08354 -:01366900223E -:03366A00D06C22FF -:0A366D00AA82AB83C2AD8A6D8B6E9A -:0E36770075822B122ECE75CB6375CAC075C836 -:0436850004D2AD229C -:01368900221E -:02368A00AA8212 -:06368C00123689DAFB2270 -:0336920090FB505A -:08369500A3E582458370F922D0 -:04369D00AA82AB83CF -:0836A1001236921ABAFF011B58 -:0536A900EA4B70F42261 -:0536AE00AA82BA4100F0 -:0B36B3004009EA24A5400475820122B2 -:0436BE0075820022EF -:0436C200AA82AB83AA -:0836C6001236DA6003A380F85C -:0C36CE00C3E5829AF582E5839BF5832218 -:0337130075817E3F -:0A371600120180E582600302370E05 -:0E36DA0020F71430F6148883A88220F507E646 -:0636E800A8837583002297 -:0336EE00E280F780 -:0336F100E493223D -:0236F400E022D2 -:00000001FF Index: gecko3/trunk/gecko3com-fw/firmware/src/vectors.a51 =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/src/vectors.a51 (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/src/vectors.a51 (nonexistent) @@ -1,180 +0,0 @@ -;;; -*- asm -*- -;;; -;;; Copyright 2003 Free Software Foundation, Inc. -;;; -;;; This file is part of GNU Radio -;;; -;;; GNU Radio is free software; you can redistribute it and/or modify -;;; it under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 3, or (at your option) -;;; any later version. -;;; -;;; GNU Radio is distributed in the hope that it will be useful, -;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with GNU Radio; see the file COPYING. If not, write to -;;; the Free Software Foundation, Inc., 51 Franklin Street, -;;; Boston, MA 02110-1301, USA. -;;; - -;;; Interrupt vectors. - -;;; N.B. This object module must come first in the list of modules - - .module vectors - -;;; ---------------------------------------------------------------- -;;; standard FX2 interrupt vectors -;;; ---------------------------------------------------------------- - - .area CSEG (CODE) - .area GSINIT (CODE) - .area CSEG (CODE) -__standard_interrupt_vector:: -__reset_vector:: - ljmp s_GSINIT - - ;; 13 8-byte entries. We point them all at __isr_nop - ljmp __isr_nop ; 3 bytes - .ds 5 ; + 5 = 8 bytes for vector slot - ljmp __isr_nop - .ds 5 - ljmp __isr_nop - .ds 5 - ljmp __isr_nop - .ds 5 - ljmp __isr_nop - .ds 5 - ljmp __isr_nop - .ds 5 - ljmp __isr_nop - .ds 5 - ljmp __isr_nop - .ds 5 - ljmp __isr_nop - .ds 5 - ljmp __isr_nop - .ds 5 - ljmp __isr_nop - .ds 5 - ljmp __isr_nop - .ds 5 - ljmp __isr_nop - .ds 5 - -__isr_nop:: - reti - -;;; ---------------------------------------------------------------- -;;; the FIFO/GPIF autovector. 14 4-byte entries. -;;; must start on a 128 byte boundary. -;;; ---------------------------------------------------------------- - - . = __reset_vector + 0x0080 - -__fifo_gpif_autovector:: - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - - -;;; ---------------------------------------------------------------- -;;; the USB autovector. 32 4-byte entries. -;;; must start on a 256 byte boundary. -;;; ---------------------------------------------------------------- - - . = __reset_vector + 0x0100 - -__usb_autovector:: - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop - ljmp __isr_nop - nop Index: gecko3/trunk/gecko3com-fw/firmware/src/gecko3com =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: gecko3/trunk/gecko3com-fw/firmware/src/gecko3com =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/src/gecko3com (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/src/gecko3com (nonexistent)
gecko3/trunk/gecko3com-fw/firmware/src/gecko3com Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: gecko3/trunk/gecko3com-fw/firmware/src/spi.c =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/src/spi.c (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/src/spi.c (nonexistent) @@ -1,390 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2006 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ -/************************************************************/ -/** \file spi.c - ************************************************************* - * \brief SPI bus functions - * - * \details Library to communicate with SPI devices - * - * \author GNU Radio guys - */ - -#include "spi.h" -#include "debugprint.h" - -#if 0 -/* -static unsigned char -count_bits8 (unsigned char v) -{ - static unsigned char count4[16] = { - 0, // 0 - 1, // 1 - 1, // 2 - 2, // 3 - 1, // 4 - 2, // 5 - 2, // 6 - 3, // 7 - 1, // 8 - 2, // 9 - 2, // a - 3, // b - 2, // c - 3, // d - 3, // e - 4 // f - }; - return count4[v & 0xf] + count4[(v >> 4) & 0xf]; -} -*/ -#else - - /** \brief internal helper function to count the number of active (1) bits in a byte */ -static unsigned char -count_bits8 (unsigned char v) -{ - unsigned char count = 0; - if (v & (1 << 0)) count++; - if (v & (1 << 1)) count++; - if (v & (1 << 2)) count++; - if (v & (1 << 3)) count++; - if (v & (1 << 4)) count++; - if (v & (1 << 5)) count++; - if (v & (1 << 6)) count++; - if (v & (1 << 7)) count++; - return count; -} -#endif - - -static void -setup_enables (unsigned char enables) -{ - // Software eanbles are active high. - // Hardware enables are active low. - - if(count_bits8(enables) > 1) { - print_info("too many enables acitve\n"); - return; - } - else { - enables &= bmSPI_CS_MASK; - SPI_CS_PORT |= bmSPI_CS_MASK; //disable all chipselect signals - SPI_CS_PORT &= ~enables; - } -} - -#define disable_all() setup_enables (0) - -void -init_spi (void) -{ - disable_all (); /* disable all devs */ - bitSPI_MOSI = 0; /* idle state has CLK = 0 */ -} -static void -write_byte_msb (unsigned char v); - -static void -write_bytes_msb (const xdata unsigned char *buf, unsigned char len); - -static void -read_bytes_msb (xdata unsigned char *buf, unsigned char len); - - -// returns non-zero if successful, else 0 -unsigned char -spi_read (unsigned char header_hi, unsigned char header_lo, - unsigned char enables, unsigned char format, - xdata unsigned char *buf, unsigned char len) -{ - if (count_bits8 (enables) > 1) - return 0; // error, too many enables set - - setup_enables (enables); - /* - if (format & bmSPI_FMT_LSB){ // order: LSB -#if 1 - return 0; // error, not implemented -#else - switch (format & bmSPI_HEADER){ - case SPI_HEADER_0: - break; - case bmSPI_HEADER_1: - write_byte_lsb (header_lo); - break; - case bmSPI_HEADER_2: - write_byte_lsb (header_lo); - write_byte_lsb (header_hi); - break; - default: - return 0; // error - } - if (len != 0) - read_bytes_lsb (buf, len); -#endif - } - - else { // order: MSB - */ - switch (format & bmSPI_HEADER){ - case bmSPI_HEADER_0: - break; - case bmSPI_HEADER_1: - write_byte_msb (header_lo); - break; - case bmSPI_HEADER_2: - write_byte_msb (header_hi); - write_byte_msb (header_lo); - break; - default: - return 0; // error - } - if (len != 0) - read_bytes_msb (buf, len); - //} - - disable_all (); - return 1; // success -} - - -// returns non-zero if successful, else 0 -unsigned char -spi_write (unsigned char header_hi, unsigned char header_lo, - unsigned char enables, unsigned char format, - const xdata unsigned char *buf, unsigned char len) -{ - setup_enables (enables); - - /* if (format & bmSPI_FORMAT_LSB){ // order: LSB -#if 1 - return 0; // error, not implemented -#else - switch (format & bmSPI_HEADER){ - case bmSPI_HEADER_0: - break; - case bmSPI_HEADER_1: - write_byte_lsb (header_lo); - break; - case bmSPI_HEADER_2: - write_byte_lsb (header_lo); - write_byte_lsb (header_hi); - break; - default: - return 0; // error - } - if (len != 0) - write_bytes_lsb (buf, len); -#endif - } - - else { // order: MSB - */ - switch (format & bmSPI_HEADER){ - case bmSPI_HEADER_0: - break; - case bmSPI_HEADER_1: - write_byte_msb (header_lo); - break; - case bmSPI_HEADER_2: - write_byte_msb (header_hi); - write_byte_msb (header_lo); - break; - default: - return 0; // error - } - if (len != 0) - write_bytes_msb (buf, len); - //} - - disable_all (); - return 1; // success -} - -// ---------------------------------------------------------------- - -static void -write_byte_msb (unsigned char v) -{ - v = (v << 1) | (v >> 7); // rotate left (MSB into bottom bit) - bitSPI_MOSI = v & 0x1; - bitSPI_CLK = 1; - bitSPI_CLK = 0; - - v = (v << 1) | (v >> 7); // rotate left (MSB into bottom bit) - bitSPI_MOSI = v & 0x1; - bitSPI_CLK = 1; - bitSPI_CLK = 0; - - v = (v << 1) | (v >> 7); // rotate left (MSB into bottom bit) - bitSPI_MOSI = v & 0x1; - bitSPI_CLK = 1; - bitSPI_CLK = 0; - - v = (v << 1) | (v >> 7); // rotate left (MSB into bottom bit) - bitSPI_MOSI = v & 0x1; - bitSPI_CLK = 1; - bitSPI_CLK = 0; - - v = (v << 1) | (v >> 7); // rotate left (MSB into bottom bit) - bitSPI_MOSI = v & 0x1; - bitSPI_CLK = 1; - bitSPI_CLK = 0; - - v = (v << 1) | (v >> 7); // rotate left (MSB into bottom bit) - bitSPI_MOSI = v & 0x1; - bitSPI_CLK = 1; - bitSPI_CLK = 0; - - v = (v << 1) | (v >> 7); // rotate left (MSB into bottom bit) - bitSPI_MOSI = v & 0x1; - bitSPI_CLK = 1; - bitSPI_CLK = 0; - - v = (v << 1) | (v >> 7); // rotate left (MSB into bottom bit) - bitSPI_MOSI = v & 0x1; - bitSPI_CLK = 1; - bitSPI_CLK = 0; -} - -static void -write_bytes_msb (const xdata unsigned char *buf, unsigned char len) -{ - while (len-- != 0){ - write_byte_msb (*buf++); - } -} - -#if 0 -/* - * This is incorrectly compiled by SDCC 2.4.0 - */ -/*static unsigned char -read_byte_msb (void) -{ - unsigned char v = 0; - - bitSPI_CLK = 1; - v |= bitSPI_MISO; - bitSPI_CLK = 0; - - v = v << 1; - bitSPI_CLK = 1; - v |= bitSPI_MISO; - bitSPI_CLK = 0; - - v = v << 1; - bitSPI_CLK = 1; - v |= bitSPI_MISO; - bitSPI_CLK = 0; - - v = v << 1; - bitSPI_CLK = 1; - v |= bitSPI_MISO; - bitSPI_CLK = 0; - - v = v << 1; - bitSPI_CLK = 1; - v |= bitSPI_MISO; - bitSPI_CLK = 0; - - v = v << 1; - bitSPI_CLK = 1; - v |= bitSPI_MISO; - bitSPI_CLK = 0; - - v = v << 1; - bitSPI_CLK = 1; - v |= bitSPI_MISO; - bitSPI_CLK = 0; - - v = v << 1; - bitSPI_CLK = 1; - v |= bitSPI_MISO; - bitSPI_CLK = 0; - - return v; - } */ -#else -static unsigned char -read_byte_msb (void) _naked -{ - _asm - clr a - - setb _bitSPI_CLK - mov c, _bitSPI_MISO - rlc a - clr _bitSPI_CLK - - setb _bitSPI_CLK - mov c, _bitSPI_MISO - rlc a - clr _bitSPI_CLK - - setb _bitSPI_CLK - mov c, _bitSPI_MISO - rlc a - clr _bitSPI_CLK - - setb _bitSPI_CLK - mov c, _bitSPI_MISO - rlc a - clr _bitSPI_CLK - - setb _bitSPI_CLK - mov c, _bitSPI_MISO - rlc a - clr _bitSPI_CLK - - setb _bitSPI_CLK - mov c, _bitSPI_MISO - rlc a - clr _bitSPI_CLK - - setb _bitSPI_CLK - mov c, _bitSPI_MISO - rlc a - clr _bitSPI_CLK - - setb _bitSPI_CLK - mov c, _bitSPI_MISO - rlc a - clr _bitSPI_CLK - - mov dpl,a - ret - _endasm; -} -#endif - -static void -read_bytes_msb (xdata unsigned char *buf, unsigned char len) -{ - while (len-- != 0){ - *buf++ = read_byte_msb (); - } -} - Index: gecko3/trunk/gecko3com-fw/firmware/src/usb_tmc.c =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/src/usb_tmc.c (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/src/usb_tmc.c (nonexistent) @@ -1,340 +0,0 @@ -/* GECKO3COM - * - * Copyright (C) 2008 by - * ___ ____ _ _ - * ( _`\ ( __)( ) ( ) - * | (_) )| (_ | |_| | Berne University of Applied Sciences - * | _ <'| _) | _ | School of Engineering and - * | (_) )| | | | | | Information Technology - * (____/'(_) (_) (_) - * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/*********************************************************************/ -/** \file usb_tmc.c - ********************************************************************* - * \brief The USB Test and Measurement Class (TMC) functions. - * - * \author Christoph Zimmermann bfh.ch - * \date 2009-02-04 - * -*/ - -#include - -#include "fx2regs.h" -#include "isr.h" -#include "usb_requests.h" -#include "usb_descriptors.h" -#include "usb_tmc.h" -#include "debugprint.h" - -/* GECKO3COM specific includes */ -#include "gecko3com_common.h" -#include "gecko3com_interfaces.h" -#include "gecko3com_gpif.h" -#include "fpga_load.h" - - -volatile static TMC_Status usb_tmc_status; -volatile TMC_State usb_tmc_state; -volatile idata TMC_Transfer_Info usb_tmc_transfer; - -volatile idata IEEE488_status_registers ieee488_status; - -/** This constant contains the device capabilities according to the TMC specification, Ref.: Table 37 */ -volatile const USB_TMC_Capabilities USB_TMC_CAPABILITIES = { - TMC_STATUS_SUCCESS, - 0, - 0x00, /* BCD version number of TMC specification, 1.00 */ - 0x01, - HAS_INDICATOR_PULSE, - 0, - {0,0,0,0,0,0}, - /* place here USB488 subclass capabilities */ - 0x00, /* BCD version number of USB488 specification, 1.00 */ - 0x01, - 0, - 0, - {0,0,0,0,0,0,0,0} -}; - -void init_usb_tmc(){ - usb_tmc_transfer.bTag = 0; - usb_tmc_transfer.transfer_size = 0; - usb_tmc_transfer.new_transfer = 0; - usb_tmc_transfer.nbytes_rxd = 0; - usb_tmc_transfer.nbytes_txd = 0; - - usb_tmc_status = TMC_STATUS_SUCCESS; - usb_tmc_state = TMC_STATE_IDLE; - - ieee488_status.EventStatusRegister = bmPOWER_ON; - ieee488_status.EventStatusEnable = 0; - ieee488_status.StatusByteRegister = 0; - ieee488_status.ServiceRequestEnable = 0; -} - -uint8_t IEEE488_status_query(idata IEEE488_status_registers *status){ - - uint8_t local_status, local_enable; - - local_status = status->EventStatusRegister; - local_enable = status->EventStatusEnable; - - if(local_status & local_enable) - local_status |= 0x20; /* set the ESB bit */ - else - local_status &= !0xDF; - - status->EventStatusRegister = local_status; - - local_status = status->StatusByteRegister; - local_enable = status->ServiceRequestEnable; - - if((local_status &= 0xBF) & (local_enable & 0xBF)) { - local_status |= 0x40; /* set the MSS bit */ - status->StatusByteRegister = local_status; - } - - return local_status; -} - -uint8_t usb_handle_tmc_packet (void){ - - if ((bRequestType & bmRT_DIR_MASK) == bmRT_DIR_IN){ - /********************************* - * handle the TMC IN requests - ********************************/ - - switch (bRequest){ - - case INITIATE_ABORT_BULK_OUT: - /* --------------------------------------------------------------------*/ - /* abort GECKO3COM specific stuff */ - if( flLOCAL == GECKO3COM_REMOTE) { - usb_tmc_status = TMC_STATUS_SUCCESS; - usb_tmc_state = TMC_STATE_IDLE; - abort_gpif(); - } - - /* check if the active transfer has the requested bTag value */ - else if(usb_tmc_transfer.bTag == wValueL) { - usb_tmc_status = TMC_STATUS_SUCCESS; - usb_tmc_state = TMC_STATE_IDLE; - - /* reset OUT FIFOs */ - FIFORESET = bmNAKALL; SYNCDELAY; - FIFORESET = bmNAKALL | USB_TMC_EP_OUT; SYNCDELAY; - - /* because we use quad buffering we have to flush all for buffers */ - OUTPKTEND = bmSKIP | USB_TMC_EP_OUT; SYNCDELAY; - OUTPKTEND = bmSKIP | USB_TMC_EP_OUT; SYNCDELAY; - OUTPKTEND = bmSKIP | USB_TMC_EP_OUT; SYNCDELAY; - OUTPKTEND = bmSKIP | USB_TMC_EP_OUT; SYNCDELAY; - - FIFORESET = 0; SYNCDELAY; - } - - else { - usb_tmc_status = TMC_STATUS_TRANSFER_NOT_IN_PROGRESS; - } - - EP0BUF[0] = usb_tmc_status; - EP0BUF[1] = usb_tmc_transfer.bTag; - EP0BCH = 0; - EP0BCL = 2; - break; - - case CHECK_ABORT_BULK_OUT_STATUS: - /* send number of transmitted bytes */ - usb_tmc_status = TMC_STATUS_SUCCESS; - EP0BUF[0] = usb_tmc_status; - EP0BUF[1] = 0; - EP0BUF[2] = 0; - EP0BUF[3] = 0; - EP0BUF[4] = (usb_tmc_transfer.nbytes_rxd & 0x0000FF); - EP0BUF[5] = (usb_tmc_transfer.nbytes_rxd & 0x00FF00)>>8; - EP0BUF[6] = (usb_tmc_transfer.nbytes_rxd & 0xFF0000)>>16; - EP0BUF[7] = usb_tmc_transfer.nbytes_rxd >>24; - EP0BCH = 0; - EP0BCL = 8; - break; - - case INITIATE_ABORT_BULK_IN: - /* --------------------------------------------------------------------*/ - /* abort GECKO3COM specific stuff */ - if( flLOCAL == GECKO3COM_REMOTE) { - usb_tmc_status = TMC_STATUS_SUCCESS; - usb_tmc_state = TMC_STATE_IDLE; - - abort_gpif(); - - /* reset IN FIFOs */ - FIFORESET = bmNAKALL; SYNCDELAY; - FIFORESET = bmNAKALL | USB_TMC_EP_IN; SYNCDELAY; - - INPKTEND = bmSKIP | USB_TMC_EP_IN; SYNCDELAY; - - FIFORESET = 0; SYNCDELAY; - - } - - /* check if the active transfer has the requested bTag value */ - else if(usb_tmc_transfer.bTag == wValueL) { - usb_tmc_status = TMC_STATUS_SUCCESS; - usb_tmc_state = TMC_STATE_IDLE; - IEEE488_clear_mav(); - } - - else { - usb_tmc_status = TMC_STATUS_TRANSFER_NOT_IN_PROGRESS; - } - - EP0BUF[0] = usb_tmc_status; - EP0BUF[1] = wValueL; - EP0BCH = 0; - EP0BCL = 2; - break; - - case CHECK_ABORT_BULK_IN_STATUS: - /* send number of transmitted bytes */ - usb_tmc_status = TMC_STATUS_SUCCESS; - EP0BUF[0] = usb_tmc_status; - EP0BUF[1] = 0; - EP0BUF[2] = 0; - EP0BUF[3] = 0; - EP0BUF[4] = (usb_tmc_transfer.nbytes_txd & 0x0000FF); - EP0BUF[5] = (usb_tmc_transfer.nbytes_txd & 0x00FF00)>>8; - EP0BUF[6] = (usb_tmc_transfer.nbytes_txd & 0xFF0000)>>16; - EP0BUF[7] = usb_tmc_transfer.nbytes_txd >>24; - EP0BCH = 0; - EP0BCL = 8; - break; - - case INITIATE_CLEAR: - usb_tmc_status = TMC_STATUS_SUCCESS; - usb_tmc_state = TMC_STATE_IDLE; - IEEE488_clear_mav(); - - /* --------------------------------------------------------------------*/ - /* abort GECKO3COM specific stuff */ - if( flLOCAL == GECKO3COM_REMOTE) { - deactivate_gpif(); - flLOCAL = GECKO3COM_LOCAL; - - /* configure the fpga interface for configuration */ - init_fpga_interface(); - } - - /* --------------------------------------------------------------------*/ - - - /* reset FIFOs */ - FIFORESET = bmNAKALL; SYNCDELAY; - FIFORESET = bmNAKALL | USB_TMC_EP_OUT; SYNCDELAY; - FIFORESET = bmNAKALL | USB_TMC_EP_IN; SYNCDELAY; - - /* because we use quad buffering we have to flush all for buffers */ - OUTPKTEND = bmSKIP | USB_TMC_EP_OUT; SYNCDELAY; - OUTPKTEND = bmSKIP | USB_TMC_EP_OUT; SYNCDELAY; - OUTPKTEND = bmSKIP | USB_TMC_EP_OUT; SYNCDELAY; - OUTPKTEND = bmSKIP | USB_TMC_EP_OUT; SYNCDELAY; - - FIFORESET = 0; SYNCDELAY; - - EP0BUF[0] = usb_tmc_status; - EP0BCH = 0; - EP0BCL = 1; - - break; - - case CHECK_CLEAR_STATUS: - usb_tmc_status = TMC_STATUS_SUCCESS; - EP0BUF[0] = usb_tmc_status; - EP0BUF[1] = 0; /* no queued data in bulk-in buffer */ - - EP0BCH = 0; - EP0BCL = 2; - break; - - case GET_CAPABILITIES: - usb_tmc_status = TMC_STATUS_SUCCESS; - { - uint8_t i = 0; - for(i;i<0x18;i++){ - EP0BUF[i] = (&(uintptr_t)USB_TMC_CAPABILITIES)[i]; - } - EP0BCH = 0; - EP0BCL = 0x18; - } - break; - - case INDICATOR_PULSE: - /* GECKO3COM spcific command to set external LED */ - set_led_ext(ORANGE); - usb_tmc_status = TMC_STATUS_SUCCESS; - EP0BUF[0] = usb_tmc_status; - EP0BCH = 0; - EP0BCL = 1; - break; - - /* USB488 subclass commands */ - case READ_STATUS_BYTE: - usb_tmc_status = TMC_STATUS_SUCCESS; - EP0BUF[0] = usb_tmc_status; - EP0BUF[1] = wValueL; - EP0BUF[2] = IEEE488_status_query(&ieee488_status); - EP0BCH = 0; - EP0BCL = 3; - break; - - case REN_CONTROL: - /* optional command, not implemented */ - break; - - case GO_TO_LOCAL: - /* optional command, not implemented */ - return 0; - break; - - case LOCAL_LOCKOUT: - /* optional command, not implemented */ - return 0; - break; - - default: - return 0; - } - } - - else if ((bRequestType & bmRT_DIR_MASK) == bmRT_DIR_OUT){ - - /*********************************** - * handle the TMC OUT requests - **********************************/ - - switch (bRequest){ - - default: - usb_tmc_status = TMC_STATUS_FAILED; - return 0; - } - } - else - return 0; /* invalid bRequestType */ - - return 1; -} Index: gecko3/trunk/gecko3com-fw/firmware/src/Makefile =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/src/Makefile (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/src/Makefile (nonexistent) @@ -1,124 +0,0 @@ -# GECKO3COM -# -# Copyright (C) 2008 by -# ___ ____ _ _ -# ( _`\ ( __)( ) ( ) -# | (_) )| (_ | |_| | Berne University of Applied Sciences -# | _ <'| _) | _ | School of Engineering and -# | (_) )| | | | | | Information Technology -# (____/'(_) (_) (_) -# -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# - -PACKAGE = gecko3com.hex - -BOARD = GECKO3MAIN #currently the only supported board - -DEBUG = --debug -DDEBUG_LEVEL_INFO -#DEBUG = - -MEMOPTS = --code-loc 0x0000 --code-size 0x3A00 --xram-loc 0x3A00 --xram-size 0x0600 -Wl '-b USBDESCSEG = 0xE000' - -ASFLAGS = -plosgff - -CFLAGS = --opt-code-size --no-xinit-opt -mmcs51 --model-small $(MEMOPTS) $(DEBUG) -D$(BOARD) - -LDFLAGS = --model-small $(MEMOPTS) $(DEBUG) - -INCLUDE_DIR = ../include -LIB_DIR = ../lib -LIB = libfx2 -GPIF_DIR = ../gpif-design -GPIF_DATA = gpif_data -BUILD_DIR = build -CC = sdcc - -# the Hex2bix utility is included in the development software package -# provided by Cypress. you can download it for free. -# feel free to enhance the hex2bix.py python script from the GNUradio project -# to replace this wine & proprietary software hack. -HEX2BIX = wine Hex2bix.exe -I -F 0xC2 -C 0×41 -R -M 0xe200 -V 0×0547 -P 0×0002 - -SRCS_C = eeprom_io.c \ - usb_tmc.c \ - scpi_parser.c \ - fpga_load.c \ - spi_flash.c \ - $(GPIF_DATA).c \ - gecko3com_gpif.c \ - gecko3com_common.c \ - gecko3com_main.c - -SRCS_ASM = \ - vectors.a51 \ - _startup.a51 \ - usb_descriptors.a51 - -#SRCS_RE = \ -# scpi_parser.re - - - -OBJS = $(SRCS_ASM:.a51=.rel) $(SRCS_C:.c=.rel) #$(SRCS_RE:.re=.rel) - -all : $(LIB) $(GPIF_DIR) $(BUILD_DIR) $(PACKAGE) - -iic : $(LIB) $(GPIF_DIR) $(BUILD_DIR) $(PACKAGE) $(PACKAGE:.hex=.iic) - - -$(BUILD_DIR) : - mkdir $@ - -$(BUILD_DIR)/%.rel : %.c - $(CC) -c $(CFLAGS) -I$(INCLUDE_DIR) -o $@ $< - -$(BUILD_DIR)/%.rel : %.a51 - cp $< $(BUILD_DIR)/ - cd $(BUILD_DIR) - asx8051 $(ASFLAGS) $(BUILD_DIR)/$< - -$(LIB) : - cd $(LIB_DIR) && $(MAKE) - - -$(GPIF_DATA).c : - $(MAKE) -C $(GPIF_DIR) $(BOARD) / - cp $(GPIF_DIR)/gpif_data.* . - - -ls $(PACKAGE) : $(patsubst %,$(BUILD_DIR)/%,$(OBJS)) - $(CC) $(LDFLAGS) -o $@ -L$(LIB_DIR) -l $(LIB) $^ - -%.hex : %.ihx - cp $< $@ - -%.iic : %.hex - $(HEX2BIX) -o $@ $< - -%.c : %.re - re2c -s -o $@ $< - -clean : - rm -f $(PACKAGE) $(BUILD_DIR)/* *.iic *.mem *.cdb *.map *.lnk gpif_data.* - cd $(LIB_DIR) && $(MAKE) clean - cd $(GPIF_DIR) && $(MAKE) clean - - -.PHONY : clean all - - - - - Index: gecko3/trunk/gecko3com-fw/firmware/src/_startup.a51 =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/src/_startup.a51 (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/src/_startup.a51 (nonexistent) @@ -1,80 +0,0 @@ -;;; -*- asm -*- -;;; -;;; Copyright 2003,2004 Free Software Foundation, Inc. -;;; -;;; This file is part of GNU Radio -;;; -;;; GNU Radio is free software; you can redistribute it and/or modify -;;; it under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 3, or (at your option) -;;; any later version. -;;; -;;; GNU Radio is distributed in the hope that it will be useful, -;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with GNU Radio; see the file COPYING. If not, write to -;;; the Free Software Foundation, Inc., 51 Franklin Street, -;;; Boston, MA 02110-1301, USA. - - -;;; The default external memory initialization provided by sdcc is not -;;; appropriate to the FX2. This is derived from the sdcc code, but uses -;;; the FX2 specific _MPAGE sfr. - - - ;; .area XISEG (XDATA) ; the initialized external data area - ;; .area XINIT (CODE) ; the code space consts to init XISEG - .area XSEG (XDATA) ; zero initialized xdata - .area USBDESCSEG (XDATA) ; usb descriptors - - - .area CSEG (CODE) - - ;; sfr that sets upper address byte of MOVX using @r0 or @r1 - _MPAGE = 0x0092 - -__sdcc_external_startup:: - ;; This system is now compiled with the --no-xinit-opt - ;; which means that any initialized XDATA is handled - ;; inline by code in the GSINIT segs emitted for each file. - ;; - ;; We zero XSEG and all of the internal ram to ensure - ;; a known good state for uninitialized variables. - -; _mcs51_genRAMCLEAR() start - mov r0,#l_XSEG - mov a,r0 - orl a,#(l_XSEG >> 8) - jz 00002$ - mov r1,#((l_XSEG + 255) >> 8) - mov dptr,#s_XSEG - clr a - -00001$: movx @dptr,a - inc dptr - djnz r0,00001$ - djnz r1,00001$ - - ;; We're about to clear internal memory. This will overwrite - ;; the stack which contains our return address. - ;; Pop our return address into DPH, DPL -00002$: pop dph - pop dpl - - ;; R0 and A contain 0. This loop will execute 256 times. - ;; - ;; FWIW the first iteration writes direct address 0x00, - ;; which is the location of r0. We get lucky, we're - ;; writing the correct value (0) - -00003$: mov @r0,a - djnz r0,00003$ - - push dpl ; restore our return address - push dph - - mov dpl,#0 ; indicate that data init is still required - ret Index: gecko3/trunk/gecko3com-fw/firmware/src/spi_flash.c =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/src/spi_flash.c (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/src/spi_flash.c (nonexistent) @@ -1,538 +0,0 @@ -/* GECKO3COM - * - * Copyright (C) 2008 by - * ___ ___ _ _ - * ( _`\ ( __)( ) ( ) - * | (_) )| ( | |_| | Berne University of Applied Sciences - * | _ <'| _) | _ | School of Engineering and - * | (_) )| | | | | | Information Technology - * (____/'(_) (_) (_) - * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -/************************************************************/ -/** \file spi_flash.c - ************************************************************* - * \author Christoph Zimmermann - * \date Date of creation: 17.09.2007 - * \brief C code for the spi-flash Library - * - * \details Library to access the SPI Flash devices from ST - * Microelectronics (now Numonyx) or Spansion. - * Supported densities: - * 8, 16, 32 Mbit - * - * \date 17.09.2007 first version, based on the m25p16.h header file - * \date 24. june 2009 code size optimization for the GECKO3COM firmware - * - */ -#include "spi_flash.h" -#include "spi.h" -#include "debugprint.h" -#include "stdint.h" - -SPI_flash xdata flash_dr; - - - /** \brief Internal: Helper function to count the number of active (1) bits in a byte */ -static unsigned char -count_bits8 (unsigned char v) -{ - unsigned char count = 0; - if (v & (1 << 0)) count++; - if (v & (1 << 1)) count++; - if (v & (1 << 2)) count++; - if (v & (1 << 3)) count++; - if (v & (1 << 4)) count++; - if (v & (1 << 5)) count++; - if (v & (1 << 6)) count++; - if (v & (1 << 7)) count++; - return count; -} - - -static void -setup_enables (unsigned char enables) -{ - // Software enables are active high. - // Hardware enables are active low. - - if(count_bits8(enables) > 1) { - //print_info("en\n"); - return; - } - else { - bitSPI_CLK = 0; //make shure spi_clk is low before we activate a device - SPI_OE |= bmSPI_MASK; //activate spi bus - enables &= bmSPI_CS_MASK; - SPI_CS_PORT |= bmSPI_CS_MASK; //disable all chipselect signals - SPI_CS_PORT &= ~enables; - SPI_CS_OE |= enables; - } -} - - -/** disables all SPI devices and sets the SPI and SPI CS signals to tri-state */ -#define disable_all() {setup_enables (0); SPI_OE &= ~bmSPI_MASK;} - - -/** \brief Internal: Writes one byte to the SPI bus - * - * \param[in] data to write to the bus - */ -static void -write_byte_msb (unsigned char v); - - -/** \brief Internal: Writes a block of data to the SPI bus - * - * \param[in] pointer to a buffer to read the data from - * \param[in] length of the data to read - */ -static void -write_bytes_msb (const xdata unsigned char *buf, unsigned char len); - - -/** \brief Internal: Reads a block of data from the SPI bus - * - * \param[in] pointer to a buffer to write the data to - * \param[in] length of the data to read - */ -static void -read_bytes_msb (xdata unsigned char *buf, unsigned char len); - - -/** \brief Internal: Writes a block of data in reversed order to the SPI bus - * - * \param[in] pointer to a buffer to read the data from - * \param[in] length of the data to read - */ -static void -write_bytes_msb_reversed (const xdata unsigned char *buf, unsigned char len); - - -/** \brief Checks if the SPI flash is busy */ -int8_t spiflash_is_busy(xdata SPI_flash *flashPtr) { - xdata uint8_t buffer[2]; - - if(flashPtr->isBusy) { - //ask flash if still busy; - setup_enables(bmSPI_CS_FLASH); - - write_byte_msb(RDSR); - read_bytes_msb(buffer, 2); - - disable_all(); - - if((buffer[1] & 1) == 1) { - return 1; - } - else { - flashPtr->isBusy = 0; - } - } - - return 0; -} - - -/** \brief Initalizes the values in the SPI_flash struct after reading - * the device ID */ -int8_t init_spiflash(xdata SPI_flash *flashPtr) { - - uint8_t xdata flashID[3]; - uint8_t *idPtr = flashID; - int8_t xdata memsize; - uint32_t xdata maxAdress; - uint32_t xdata capacity; - uint16_t xdata pages; - uint8_t xdata sectors; - - - /* init SPI */ - disable_all (); /* disable all devs */ - bitSPI_MOSI = 0; /* idle state has CLK = 0 */ - - ptrCheck(flashPtr); - - setup_enables(bmSPI_CS_FLASH); - write_byte_msb(RDID); - read_bytes_msb (flashID, 3); - disable_all(); - - if(*idPtr == MANUFACTURER_STM || *idPtr == MANUFACTURER_SPA) { - idPtr++; - if(*idPtr == MEMTYPE_STM) { - memsize = 0; - } - else if(*idPtr == MEMTYPE_SPA) { - memsize = 1; - } - else { - return UNSUPPORTED_TYPE; - } - - idPtr++; - memsize += *idPtr; - - - switch(memsize) { - case MEMCAPACITY_32MBIT_STM : - maxAdress = MAXADRESS_32MBIT; - capacity = FLASH_SIZE_32MBIT; - pages = FLASH_PAGE_COUNT_32MBIT; - sectors = FLASH_SECTOR_COUNT_32MBIT; - break; - case MEMCAPACITY_16MBIT_STM : - maxAdress = MAXADRESS_16MBIT; - capacity = FLASH_SIZE_16MBIT; - pages = FLASH_PAGE_COUNT_16MBIT; - sectors = FLASH_SECTOR_COUNT_16MBIT; - break; - case MEMCAPACITY_8MBIT_STM : - maxAdress = MAXADRESS_8MBIT; - capacity = FLASH_SIZE_8MBIT; - pages = FLASH_PAGE_COUNT_8MBIT; - sectors = FLASH_SECTOR_COUNT_8MBIT; - break; - default : - return UNSUPPORTED_TYPE; - } - - flashPtr->maxAdress = maxAdress; - flashPtr->capacity = capacity; - flashPtr->pages = pages; - flashPtr->sectors = sectors; - - return GOOD; - } - else { - return UNSUPPORTED_TYPE; - } -} - - -/** \brief Reads data from the SPI flash */ -int8_t spiflash_read(xdata SPI_flash *flashPtr, xdata uint32_t *adress, xdata uint8_t *buffer, const uint16_t length) { - - //adrCheck(flashPtr, adress, length); - - while(spiflash_is_busy(flashPtr)); - - //print_info("r\n"); - - /* we do a bit dirty programming here: - * the adress of the device is only 24bit long, so we misuse the upper 8bits to send the - * read command to the spi flash. this avoids more complicated constructs. */ - *adress &= 0x00FFFFFF; - *adress |= 0x03000000; //set the upper 8bit to the READ command - - /*printf_tiny("ad: %x,",((uint8_t*)adress)[2]); - printf_tiny("%x,",((uint8_t*)adress)[1]); - printf_tiny("%x\n",((uint8_t*)adress)[0]); - */ - - setup_enables(bmSPI_CS_FLASH); - - write_bytes_msb_reversed((uint8_t*)adress, 4); - if (length != 0) { - read_bytes_msb (buffer, length); - } - - disable_all(); - - return 1; -} - -/** \brief deletes one sector (64 kbyte) of the SPI flash */ -int8_t spiflash_erase(xdata SPI_flash *flashPtr, xdata uint32_t *adress) { - while(spiflash_is_busy(flashPtr)); - - setup_enables(bmSPI_CS_FLASH); - write_byte_msb(WREN); - disable_all(); - - /* we do a bit dirty programming here: - * the adress of the device is only 24bit long, so we misuse the upper 8bits to send the - * read command to the spi flash. this avoids more complicated constructs. */ - *adress &= 0x00FFFFFF; - *adress |= 0xD8000000; //set the upper 8bit to the SE (sector erase) command - - //print_info("e\n"); - - setup_enables(bmSPI_CS_FLASH); - write_bytes_msb_reversed((uint8_t*)adress, 4); - disable_all(); - - flashPtr->isBusy = 1; - - return 1; -} - - -/** \brief deletes the whole SPI flash */ -int8_t spiflash_erase_bulk(xdata SPI_flash *flashPtr) { - while(spiflash_is_busy(flashPtr)); - setup_enables(bmSPI_CS_FLASH); - write_byte_msb(WREN); - disable_all(); - - setup_enables(bmSPI_CS_FLASH); - write_byte_msb(BE); - disable_all(); - - flashPtr->isBusy = 1; - - return 1; -} - - -/** \brief Writes data to the SPI flash */ -int8_t spiflash_write(xdata SPI_flash *flashPtr, xdata uint32_t *adress, \ - xdata uint8_t *buffer, uint16_t length) { - - xdata uint16_t writeableBytes; - - while(length > 0) { - - while(spiflash_is_busy(flashPtr)); - - setup_enables(bmSPI_CS_FLASH); - write_byte_msb(WREN); - disable_all(); - - writeableBytes = (uint16_t)(pageEnd(*adress)-*adress); - writeableBytes ++; - - if(length > writeableBytes) { - length -= writeableBytes; - } - else { - writeableBytes = length; - length = 0; - } - - //print_info("w\n"); - //printf_tiny("%d\n",writeableBytes); - - /* we do a bit dirty programming here: - * the adress of the device is only 24bit long, so we misuse the upper 8bits to send the - * read command to the spi flash. this avoids more complicated constructs. */ - *adress &= 0x00FFFFFF; - *adress |= 0x02000000; //set the upper 8bit to the PP (page programm) command - - /*printf_tiny("ad: %x,",((uint8_t*)adress)[3]); - printf_tiny("%x,",((uint8_t*)adress)[2]); - printf_tiny("%x,",((uint8_t*)adress)[1]); - printf_tiny("%x\n",((uint8_t*)adress)[0]); - */ - setup_enables(bmSPI_CS_FLASH); - write_bytes_msb_reversed((uint8_t*)adress, 4); //send the adress - - /* the write_bytes_msb function can loop maximum 255 times, but a page is 256 long... */ - write_byte_msb(buffer[0]); - buffer++; - write_bytes_msb(buffer, writeableBytes-1); //...thats why we split this to two writes - disable_all(); - - *adress += writeableBytes; - buffer += writeableBytes; - buffer--; //adjust it because we incremented it once during the write - - flashPtr->isBusy = 1; - } - - return 1; -} - -/* ---------------------------------------------------------------- - * Internal functions - */ -static void -write_byte_msb (unsigned char v) -{ - //printf_tiny("0x%x",v); - v = (v << 1) | (v >> 7); // rotate left (MSB into bottom bit) - bitSPI_MOSI = v & 0x1; - bitSPI_CLK = 1; - bitSPI_CLK = 0; - - v = (v << 1) | (v >> 7); // rotate left (MSB into bottom bit) - bitSPI_MOSI = v & 0x1; - bitSPI_CLK = 1; - bitSPI_CLK = 0; - - v = (v << 1) | (v >> 7); // rotate left (MSB into bottom bit) - bitSPI_MOSI = v & 0x1; - bitSPI_CLK = 1; - bitSPI_CLK = 0; - - v = (v << 1) | (v >> 7); // rotate left (MSB into bottom bit) - bitSPI_MOSI = v & 0x1; - bitSPI_CLK = 1; - bitSPI_CLK = 0; - - v = (v << 1) | (v >> 7); // rotate left (MSB into bottom bit) - bitSPI_MOSI = v & 0x1; - bitSPI_CLK = 1; - bitSPI_CLK = 0; - - v = (v << 1) | (v >> 7); // rotate left (MSB into bottom bit) - bitSPI_MOSI = v & 0x1; - bitSPI_CLK = 1; - bitSPI_CLK = 0; - - v = (v << 1) | (v >> 7); // rotate left (MSB into bottom bit) - bitSPI_MOSI = v & 0x1; - bitSPI_CLK = 1; - bitSPI_CLK = 0; - - v = (v << 1) | (v >> 7); // rotate left (MSB into bottom bit) - bitSPI_MOSI = v & 0x1; - bitSPI_CLK = 1; - bitSPI_CLK = 0; -} - -static void -write_bytes_msb (const xdata unsigned char *buf, unsigned char len) -{ - while (len-- != 0){ - //printf_tiny("0x%x, ",*buf); - write_byte_msb (*buf++); - } -} - -static void -write_bytes_msb_reversed (const xdata unsigned char *buf, unsigned char len) -{ - while (len-- != 0){ - //printf_tiny("0x%x, ",buf[len]); - write_byte_msb (buf[len]); - } -} - -/** \brief Internal: Reads one byte from the SPI bus - * - * \return data read from the bus - */ -#if 0 -/* - * This is incorrectly compiled by SDCC 2.4.0 - */ -/*static unsigned char -read_byte_msb (void) -{ - unsigned char v = 0; - - bitSPI_CLK = 1; - v |= bitSPI_MISO; - bitSPI_CLK = 0; - - v = v << 1; - bitSPI_CLK = 1; - v |= bitSPI_MISO; - bitSPI_CLK = 0; - - v = v << 1; - bitSPI_CLK = 1; - v |= bitSPI_MISO; - bitSPI_CLK = 0; - - v = v << 1; - bitSPI_CLK = 1; - v |= bitSPI_MISO; - bitSPI_CLK = 0; - - v = v << 1; - bitSPI_CLK = 1; - v |= bitSPI_MISO; - bitSPI_CLK = 0; - - v = v << 1; - bitSPI_CLK = 1; - v |= bitSPI_MISO; - bitSPI_CLK = 0; - - v = v << 1; - bitSPI_CLK = 1; - v |= bitSPI_MISO; - bitSPI_CLK = 0; - - v = v << 1; - bitSPI_CLK = 1; - v |= bitSPI_MISO; - bitSPI_CLK = 0; - - return v; - } */ -#else -static unsigned char -read_byte_msb (void) _naked -{ - _asm - clr a - - setb _bitSPI_CLK - mov c, _bitSPI_MISO - rlc a - clr _bitSPI_CLK - - setb _bitSPI_CLK - mov c, _bitSPI_MISO - rlc a - clr _bitSPI_CLK - - setb _bitSPI_CLK - mov c, _bitSPI_MISO - rlc a - clr _bitSPI_CLK - - setb _bitSPI_CLK - mov c, _bitSPI_MISO - rlc a - clr _bitSPI_CLK - - setb _bitSPI_CLK - mov c, _bitSPI_MISO - rlc a - clr _bitSPI_CLK - - setb _bitSPI_CLK - mov c, _bitSPI_MISO - rlc a - clr _bitSPI_CLK - - setb _bitSPI_CLK - mov c, _bitSPI_MISO - rlc a - clr _bitSPI_CLK - - setb _bitSPI_CLK - mov c, _bitSPI_MISO - rlc a - clr _bitSPI_CLK - - mov dpl,a - ret - _endasm; -} -#endif - -static void -read_bytes_msb (xdata unsigned char *buf, unsigned char len) -{ - while (len-- != 0){ - *buf++ = read_byte_msb (); - } -} Index: gecko3/trunk/gecko3com-fw/firmware/src/Hex2bix.exe =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: gecko3/trunk/gecko3com-fw/firmware/src/Hex2bix.exe =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/src/Hex2bix.exe (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/src/Hex2bix.exe (nonexistent)
gecko3/trunk/gecko3com-fw/firmware/src/Hex2bix.exe Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: gecko3/trunk/gecko3com-fw/firmware/src/check_mdelay.c =================================================================== --- gecko3/trunk/gecko3com-fw/firmware/src/check_mdelay.c (revision 9) +++ gecko3/trunk/gecko3com-fw/firmware/src/check_mdelay.c (nonexistent) @@ -1,37 +0,0 @@ -/* - * USRP - Universal Software Radio Peripheral - * - * Copyright (C) 2003 Free Software Foundation, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA - */ - -#include "usrp_common.h" -#include "delay.h" - -void -main (void) -{ - init_usrp (); - - // CPUCS = 0; // 12 MHz - // CPUCS = bmCLKSPD0; // 24 MHz - CPUCS = bmCLKSPD1; // 48 MHz - - while (1){ - USRP_LED_REG ^= bmLED0; - mdelay (10); - } -} Index: gecko3/trunk/gecko3com-fw/README =================================================================== --- gecko3/trunk/gecko3com-fw/README (revision 9) +++ gecko3/trunk/gecko3com-fw/README (nonexistent) @@ -1,29 +0,0 @@ -# -# README -- the short version -# - -The top level makefile handles the host code and FX2 firmware. - -Besides the normal gcc suite and all the auto tools, you'll need -the SDCC free C compiler to build the firmware. You MUST -USE VERSION 2.4.0 or VERSION 2.5.0 due to some problems with variable -initialization. http://sdcc.sourceforge.net - - -The high level interface to the USRP using our standard FPGA bitstram -is contained in usrp/host/lib/usrp_standard.h - -If you've got doxygen installed, there are html docs in -usrp/doc/html/index.html - - -# Compiling the verilog (not required unless you're modifying it) - -If you want to build the FPGA .rbf file from source (not required; we -provide pre-compiled .rbf files in usrp/fpga/rbf directory), you'll -need Altera's no cost Quartus II development tools. We're currently -building with Quartus II 5.1sp1 Web Edition. The project file is -usrp/fpga/toplevel/usrp_std/usrp_std.qpf. The toplevel verilog file -is usrp/fpga/toplevel/usrp_std/usrp_std.v. The bulk of the verilog -modules are contained in usrp/fpga/sdr_lib - Index: gecko3/trunk/gecko3com-fw/Makefile =================================================================== --- gecko3/trunk/gecko3com-fw/Makefile (revision 9) +++ gecko3/trunk/gecko3com-fw/Makefile (nonexistent) @@ -1,19 +0,0 @@ -FW_DIR = firmware/src -DOC_DIR = doc - - -all : fw doc - -fw : - cd $(FW_DIR) && $(MAKE) iic - -doc : - cd $(DOC_DIR) && $(MAKE) - -clean : - cd $(FW_DIR) && $(MAKE) clean - cd $(DOC_DIR) && $(MAKE) clean - -run : all - -.PHONY : clean all fw doc Index: gecko3/trunk/gecko3com-fw/examples/scpi_parser_full_spec.re =================================================================== --- gecko3/trunk/gecko3com-fw/examples/scpi_parser_full_spec.re (revision 9) +++ gecko3/trunk/gecko3com-fw/examples/scpi_parser_full_spec.re (nonexistent) @@ -1,246 +0,0 @@ -/* GECKO3COM - * - * Copyright (C) 2009 by - * ___ ____ _ _ - * ( _`\ ( __)( ) ( ) - * | (_) )| (_ | |_| | Berne University of Applied Sciences - * | _ <'| _) | _ | School of Engineering and - * | (_) )| | | | | | Information Technology - * (____/'(_) (_) (_) - * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/*********************************************************************/ -/** \cond EXAMPLE \file scpi_parser.re - ********************************************************************* - * \brief Parser for the SCPI commands. Excecutes the necessary - * Function. - * - * The SCPI Parser is developed as a set of regular - * expressions and blocks of C code to excecute. \n - * We use the opensource programm re2c (http://re2c.org/) to - * generate the parser. With solution we have an easy to - * maintain and extend parser definitions without the hassle - * of optimizing the parser sourcecode by hand. \n \n - * Don't forget to use the "-s" option with re2c to generate - * nested ifs for some switches because sdcc hates long - * switch case structures. - * - * \todo use newer re2c to generate state event diagramm to include here - * - * \author Christoph Zimmermann bfh.ch - * \date 2009-02-04 - * - * \endcond -*/ - -#include -#include - -#include "scpi_parser.h" -#include "debugprint.h" - - -#define YYCTYPE uint8_t -#define YYCURSOR s->cur -#define YYLIMIT s->lim -#define YYMARKER s->ptr -#define YYFILL(n) {YYCURSOR = fill(s, buffer, n);} -/*!max:re2c */ /* this will define YYMAXFILL */ - - -uint8_t* fill(Scanner *s, int16_t *buffer, uint8_t n){ - uint8_t i = 0; - - for(i;isource)); - s->source++; - } - - s->cur = buffer; - s->lim = &buffer[n]; - - return s->cur; -} - - -int8_t scpi_scan(Scanner *s){ - - int8_t buffer[YYMAXFILL]; - - /** \cond SCANNER - * this is a ugly hack to avoid that the regular expressions are included in - * the doxygen documentation - */ - - /*!re2c - - /* place here the regular expressions to detect the end of a message */ - - /* FIXME end detection missing */ - "\n" { /* end of message reached */ - return 99; - } - - /* this set of regular expressions are for the mandatory IEEE488 commands */ - - "*cls" { /* clear status command */ - - return 1; - } - - "*ese" { /* standard event status enable command */ - - return 1; - } - - "*ese?" { /* standard event status enable query */ - - return 1; - } - - "*esr?" { /* standard event status register query */ - - return 1; - } - - "*idn?" { /* identification query */ - - return 1; - } - - "*opc" { /* operation complete command */ - - return 1; - } - - "*opc?" { /* operation complete query */ - - return 1; - } - - "*rst" { /* reset command */ - - return 1; - } - - "*sre" { /* service request enable command */ - - return 1; - } - - "*sre?" { /* service request enable query */ - - return 1; - } - - "*stb?" { /* read status byte query */ - - return 1; - } - - "*tst?" { /* self-test query */ - - return 1; - } - - "*wai" { /* wait-to-continue command */ - - return 1; - } - - - - /* this set of regular expressions are for the mandatory SCPI 99 commands */ - - "syst:err?"|"syst:err:next?" { /* gets an error message if ther is one */ - - return 1; - } - - "syst:vers" { /* returns the firmware version number */ - - return 1; - } - - "stat:oper?"|"stat:oper:even?" { /* dfsg */ - - return 1; - } - - "stat:oper:cond?" { // fsdgsg - - return 1; - } - - "stat:oper:enab" { // sfgsdf - - return 1; - } - - "stat:oper:enab?" { // sfgfsdg - - return 1; - } - - "stat:ques?"|"stat:ques:even?" { // sfgfsdg - - return 1; - } - - "stat:ques:cond?" { // sfgsdfg - - return 1; - } - - "stat:ques:enab" { // sfgsdfg - - return 1; - } - - "stat:ques:enab?" { // sfgfg - - return 1; - } - - "stat:pres" { // sfgfg - - return 1; - } - - - - /* this set of regular expressions are for the device functions */ - - - "diag:mes?" { /* ask if there is a message to read available */ - print_info("scpi: diag:mes?\n"); - return 1; - } - - "diag:mes" { /* reads the message from the message buffer */ - print_info("scpi: diag:mes\n"); - return 1; - } - - "diag:gpif?" { /* reads the GPIF state */ - print_info("scpi: diag:gpif?\n"); - return 1; - } - -*/ - -/** \endcond */ -}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.