From 1c8c3dc244b27e5d12a55aa1db42dadb418364fd Mon Sep 17 00:00:00 2001 From: David Voswinkel Date: Mon, 27 Jul 2009 17:09:12 +0200 Subject: [PATCH] new header --- avr/usbload/Makefile | 28 +++++++++++++++-- avr/usbload/commandline/opendevice.c | 34 ++++++++++++++------ avr/usbload/commandline/opendevice.h | 43 +++++++++++++++----------- avr/usbload/commandline/snesuploader.c | 37 ++++++++++++++-------- avr/usbload/crc.c | 19 +++++++----- avr/usbload/crc.h | 19 +++++++----- avr/usbload/debug.c | 20 +++++++----- avr/usbload/debug.h | 17 +++++++--- avr/usbload/dump.c | 19 +++++++----- avr/usbload/dump.h | 19 +++++++----- avr/usbload/fifo.c | 17 +++++++--- avr/usbload/fifo.h | 20 +++++++----- avr/usbload/huffman-decode.c | 41 ++++++++++++++---------- avr/usbload/huffman-decode.h | 41 ++++++++++++++---------- avr/usbload/main.c | 18 +++++++---- avr/usbload/requests.h | 34 +++++++------------- avr/usbload/rle.c | 26 ++++++++++++++++ avr/usbload/rle.h | 31 +++++++++++++++++++ avr/usbload/sram.c | 19 +++++++----- avr/usbload/sram.h | 18 +++++++---- avr/usbload/timer.c | 17 +++++++--- avr/usbload/timer.h | 28 +++++++++++------ avr/usbload/uart.c | 19 +++++++----- avr/usbload/uart.h | 18 +++++++---- avr/usbload/usb_bulk.c | 19 +++++++----- avr/usbload/usb_bulk.h | 24 +++++++++----- avr/usbload/usbconfig.h | 18 +++++++---- avr/usbload/watchdog.c | 18 +++++++---- avr/usbload/watchdog.h | 18 ++++++++--- 29 files changed, 468 insertions(+), 231 deletions(-) diff --git a/avr/usbload/Makefile b/avr/usbload/Makefile index 2b1884b..46e7bf9 100644 --- a/avr/usbload/Makefile +++ b/avr/usbload/Makefile @@ -1,3 +1,27 @@ +# ===================================================================================== +# +# ________ .__ __ ________ ____ ________ +# \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ +# / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ +# / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ +# \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / +# \__> \/ \/ \/ \/ \/ +# ___. +# __ __ _____\_ |__ +# | | \/ ___/| __ \ +# | | /\___ \ | \_\ \ +# |____//____ >|___ / +# \/ \/ +# +# www.optixx.org +# +# +# Version: 1.0 +# Created: 07/21/2009 03:32:16 PM +# Author: david@optixx.org +# Based on: custom-class, a basic USB example +# Author: Christian Starkjohann +# ===================================================================================== TTY = /dev/tty.PL2303-00002126 DEVICE = atmega644 @@ -18,8 +42,8 @@ COMPILE = avr-gcc -Wall -Os -DF_CPU=$(F_CPU) $(CFLAGS) -mmcu=$(DEVICE) FUSE_L = 0xf7 FUSE_H = 0xda +all: hex -# symbolic targets: help: @echo "This Makefile has no default rule. Use one of the following:" @echo "make hex ....... to build main.hex" @@ -28,8 +52,6 @@ help: @echo "make flash ..... to flash the firmware (use this on metaboard)" @echo "make clean ..... to delete objects and hex file" -all: hex - hex: main.hex @echo "===============================" @echo "$(TARGET) compiled for: $(DEVICE)" diff --git a/avr/usbload/commandline/opendevice.c b/avr/usbload/commandline/opendevice.c index 7706310..56d6086 100644 --- a/avr/usbload/commandline/opendevice.c +++ b/avr/usbload/commandline/opendevice.c @@ -1,15 +1,31 @@ /* - * Name: opendevice.c Project: V-USB host-side library Author: Christian - * Starkjohann Creation Date: 2008-04-10 Tabsize: 4 Copyright: (c) 2008 by - * OBJECTIVE DEVELOPMENT Software GmbH License: GNU GPL v2 (see License.txt), - * GNU GPL v3 or proprietary (CommercialLicense.txt) This Revision: $Id: - * opendevice.c 740 2009-04-13 18:23:31Z cs $ + * ===================================================================================== + * + * ________ .__ __ ________ ____ ________ + * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ + * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ + * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ + * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / + * \__> \/ \/ \/ \/ \/ + * ___. + * __ __ _____\_ |__ + * | | \/ ___/| __ \ + * | | /\___ \ | \_\ \ + * |____//____ >|___ / + * \/ \/ + * + * www.optixx.org + * + * + * Version: 1.0 + * Created: 07/21/2009 03:32:16 PM + * Author: david@optixx.org + * Based on: custom-class, a basic USB example + * Author: Christian Starkjohann + * ===================================================================================== */ -/* - * General Description: The functions in this module can be used to find and - * open a device based on libusb or libusb-win32. - */ + #include diff --git a/avr/usbload/commandline/opendevice.h b/avr/usbload/commandline/opendevice.h index 0e04f73..dfea883 100644 --- a/avr/usbload/commandline/opendevice.h +++ b/avr/usbload/commandline/opendevice.h @@ -1,24 +1,31 @@ -/* Name: opendevice.h - * Project: V-USB host-side library - * Author: Christian Starkjohann - * Creation Date: 2008-04-10 - * Tabsize: 4 - * Copyright: (c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH - * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) - * This Revision: $Id: opendevice.h 740 2009-04-13 18:23:31Z cs $ +/* + * ===================================================================================== + * + * ________ .__ __ ________ ____ ________ + * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ + * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ + * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ + * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / + * \__> \/ \/ \/ \/ \/ + * ___. + * __ __ _____\_ |__ + * | | \/ ___/| __ \ + * | | /\___ \ | \_\ \ + * |____//____ >|___ / + * \/ \/ + * + * www.optixx.org + * + * + * Version: 1.0 + * Created: 07/21/2009 03:32:16 PM + * Author: david@optixx.org + * Based on: custom-class, a basic USB example + * Author: Christian Starkjohann + * ===================================================================================== */ -/* -General Description: -This module offers additional functionality for host side drivers based on -libusb or libusb-win32. It includes a function to find and open a device -based on numeric IDs and textual description. It also includes a function to -obtain textual descriptions from a device. -To use this functionality, simply copy opendevice.c and opendevice.h into your -project and add them to your Makefile. You may modify and redistribute these -files according to the GNU General Public License (GPL) version 2 or 3. -*/ #ifndef __OPENDEVICE_H_INCLUDED__ #define __OPENDEVICE_H_INCLUDED__ diff --git a/avr/usbload/commandline/snesuploader.c b/avr/usbload/commandline/snesuploader.c index 2b7acca..c43a137 100644 --- a/avr/usbload/commandline/snesuploader.c +++ b/avr/usbload/commandline/snesuploader.c @@ -1,17 +1,28 @@ /* - * Name: set-led.c Project: custom-class, a basic USB example Author: - * Christian Starkjohann Creation Date: 2008-04-10 Tabsize: 4 Copyright: (c) - * 2008 by OBJECTIVE DEVELOPMENT Software GmbH License: GNU GPL v2 (see - * License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) This - * Revision: $Id: set-led.c 692 2008-11-07 15:07:40Z cs $ - */ - -/* - * General Description: This is the host-side driver for the custom-class - * example device. It searches the USB for the LEDControl device and sends the - * requests understood by this device. This program must be linked with libusb - * on Unix and libusb-win32 on Windows. See http://libusb.sourceforge.net/ or - * http://libusb-win32.sourceforge.net/ respectively. + * ===================================================================================== + * + * ________ .__ __ ________ ____ ________ + * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ + * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ + * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ + * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / + * \__> \/ \/ \/ \/ \/ + * ___. + * __ __ _____\_ |__ + * | | \/ ___/| __ \ + * | | /\___ \ | \_\ \ + * |____//____ >|___ / + * \/ \/ + * + * www.optixx.org + * + * + * Version: 1.0 + * Created: 07/21/2009 03:32:16 PM + * Author: david@optixx.org + * Based on: custom-class, a basic USB example + * Author: Christian Starkjohann + * ===================================================================================== */ diff --git a/avr/usbload/crc.c b/avr/usbload/crc.c index c79e2df..a9de249 100644 --- a/avr/usbload/crc.c +++ b/avr/usbload/crc.c @@ -1,11 +1,18 @@ /* * ===================================================================================== * - * .d8888b 88888b. .d88b. .d8888b 888d888 8888b. 88888b.d88b. - * 88K 888 "88b d8P Y8b 88K 888P" "88b 888 "888 "88b - * "Y8888b. 888 888 88888888 "Y8888b. 888 .d888888 888 888 888 - * X88 888 888 Y8b. X88 888 888 888 888 888 888 - * 88888P' 888 888 "Y8888 88888P' 888 "Y888888 888 888 888 + * ________ .__ __ ________ ____ ________ + * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ + * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ + * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ + * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / + * \__> \/ \/ \/ \/ \/ + * ___. + * __ __ _____\_ |__ + * | | \/ ___/| __ \ + * | | /\___ \ | \_\ \ + * |____//____ >|___ / + * \/ \/ * * www.optixx.org * @@ -17,8 +24,6 @@ * ===================================================================================== */ - - #include #include diff --git a/avr/usbload/crc.h b/avr/usbload/crc.h index 1daa66d..3606841 100644 --- a/avr/usbload/crc.h +++ b/avr/usbload/crc.h @@ -1,11 +1,18 @@ /* * ===================================================================================== * - * .d8888b 88888b. .d88b. .d8888b 888d888 8888b. 88888b.d88b. - * 88K 888 "88b d8P Y8b 88K 888P" "88b 888 "888 "88b - * "Y8888b. 888 888 88888888 "Y8888b. 888 .d888888 888 888 888 - * X88 888 888 Y8b. X88 888 888 888 888 888 888 - * 88888P' 888 888 "Y8888 88888P' 888 "Y888888 888 888 888 + * ________ .__ __ ________ ____ ________ + * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ + * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ + * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ + * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / + * \__> \/ \/ \/ \/ \/ + * ___. + * __ __ _____\_ |__ + * | | \/ ___/| __ \ + * | | /\___ \ | \_\ \ + * |____//____ >|___ / + * \/ \/ * * www.optixx.org * @@ -18,8 +25,6 @@ */ - - #ifndef __CRC_H__ #define __CRC_H__ diff --git a/avr/usbload/debug.c b/avr/usbload/debug.c index eb143a9..2c2c37f 100644 --- a/avr/usbload/debug.c +++ b/avr/usbload/debug.c @@ -1,11 +1,18 @@ /* * ===================================================================================== * - * .d8888b 88888b. .d88b. .d8888b 888d888 8888b. 88888b.d88b. - * 88K 888 "88b d8P Y8b 88K 888P" "88b 888 "888 "88b - * "Y8888b. 888 888 88888888 "Y8888b. 888 .d888888 888 888 888 - * X88 888 888 Y8b. X88 888 888 888 888 888 888 - * 88888P' 888 888 "Y8888 88888P' 888 "Y888888 888 888 888 + * ________ .__ __ ________ ____ ________ + * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ + * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ + * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ + * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / + * \__> \/ \/ \/ \/ \/ + * ___. + * __ __ _____\_ |__ + * | | \/ ___/| __ \ + * | | /\___ \ | \_\ \ + * |____//____ >|___ / + * \/ \/ * * www.optixx.org * @@ -16,9 +23,6 @@ * * ===================================================================================== */ - - - #include #include diff --git a/avr/usbload/debug.h b/avr/usbload/debug.h index 8619d9b..da90757 100644 --- a/avr/usbload/debug.h +++ b/avr/usbload/debug.h @@ -1,11 +1,18 @@ /* * ===================================================================================== * - * .d8888b 88888b. .d88b. .d8888b 888d888 8888b. 88888b.d88b. - * 88K 888 "88b d8P Y8b 88K 888P" "88b 888 "888 "88b - * "Y8888b. 888 888 88888888 "Y8888b. 888 .d888888 888 888 888 - * X88 888 888 Y8b. X88 888 888 888 888 888 888 - * 88888P' 888 888 "Y8888 88888P' 888 "Y888888 888 888 888 + * ________ .__ __ ________ ____ ________ + * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ + * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ + * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ + * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / + * \__> \/ \/ \/ \/ \/ + * ___. + * __ __ _____\_ |__ + * | | \/ ___/| __ \ + * | | /\___ \ | \_\ \ + * |____//____ >|___ / + * \/ \/ * * www.optixx.org * diff --git a/avr/usbload/dump.c b/avr/usbload/dump.c index 343266f..c2fb2d6 100644 --- a/avr/usbload/dump.c +++ b/avr/usbload/dump.c @@ -1,11 +1,18 @@ /* * ===================================================================================== * - * .d8888b 88888b. .d88b. .d8888b 888d888 8888b. 88888b.d88b. - * 88K 888 "88b d8P Y8b 88K 888P" "88b 888 "888 "88b - * "Y8888b. 888 888 88888888 "Y8888b. 888 .d888888 888 888 888 - * X88 888 888 Y8b. X88 888 888 888 888 888 888 - * 88888P' 888 888 "Y8888 88888P' 888 "Y888888 888 888 888 + * ________ .__ __ ________ ____ ________ + * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ + * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ + * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ + * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / + * \__> \/ \/ \/ \/ \/ + * ___. + * __ __ _____\_ |__ + * | | \/ ___/| __ \ + * | | /\___ \ | \_\ \ + * |____//____ >|___ / + * \/ \/ * * www.optixx.org * @@ -17,8 +24,6 @@ * ===================================================================================== */ - - #include #include diff --git a/avr/usbload/dump.h b/avr/usbload/dump.h index 415f645..7b34e47 100644 --- a/avr/usbload/dump.h +++ b/avr/usbload/dump.h @@ -1,11 +1,18 @@ /* * ===================================================================================== * - * .d8888b 88888b. .d88b. .d8888b 888d888 8888b. 88888b.d88b. - * 88K 888 "88b d8P Y8b 88K 888P" "88b 888 "888 "88b - * "Y8888b. 888 888 88888888 "Y8888b. 888 .d888888 888 888 888 - * X88 888 888 Y8b. X88 888 888 888 888 888 888 - * 88888P' 888 888 "Y8888 88888P' 888 "Y888888 888 888 888 + * ________ .__ __ ________ ____ ________ + * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ + * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ + * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ + * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / + * \__> \/ \/ \/ \/ \/ + * ___. + * __ __ _____\_ |__ + * | | \/ ___/| __ \ + * | | /\___ \ | \_\ \ + * |____//____ >|___ / + * \/ \/ * * www.optixx.org * @@ -17,8 +24,6 @@ * ===================================================================================== */ - - #ifndef __DUMP_H__ #define __DUMP_H__ diff --git a/avr/usbload/fifo.c b/avr/usbload/fifo.c index 2f7abc5..2282b9f 100644 --- a/avr/usbload/fifo.c +++ b/avr/usbload/fifo.c @@ -1,11 +1,18 @@ /* * ===================================================================================== * - * .d8888b 88888b. .d88b. .d8888b 888d888 8888b. 88888b.d88b. - * 88K 888 "88b d8P Y8b 88K 888P" "88b 888 "888 "88b - * "Y8888b. 888 888 88888888 "Y8888b. 888 .d888888 888 888 888 - * X88 888 888 Y8b. X88 888 888 888 888 888 888 - * 88888P' 888 888 "Y8888 88888P' 888 "Y888888 888 888 888 + * ________ .__ __ ________ ____ ________ + * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ + * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ + * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ + * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / + * \__> \/ \/ \/ \/ \/ + * ___. + * __ __ _____\_ |__ + * | | \/ ___/| __ \ + * | | /\___ \ | \_\ \ + * |____//____ >|___ / + * \/ \/ * * www.optixx.org * diff --git a/avr/usbload/fifo.h b/avr/usbload/fifo.h index f910488..147a03d 100644 --- a/avr/usbload/fifo.h +++ b/avr/usbload/fifo.h @@ -1,11 +1,18 @@ /* * ===================================================================================== * - * .d8888b 88888b. .d88b. .d8888b 888d888 8888b. 88888b.d88b. - * 88K 888 "88b d8P Y8b 88K 888P" "88b 888 "888 "88b - * "Y8888b. 888 888 88888888 "Y8888b. 888 .d888888 888 888 888 - * X88 888 888 Y8b. X88 888 888 888 888 888 888 - * 88888P' 888 888 "Y8888 88888P' 888 "Y888888 888 888 888 + * ________ .__ __ ________ ____ ________ + * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ + * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ + * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ + * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / + * \__> \/ \/ \/ \/ \/ + * ___. + * __ __ _____\_ |__ + * | | \/ ___/| __ \ + * | | /\___ \ | \_\ \ + * |____//____ >|___ / + * \/ \/ * * www.optixx.org * @@ -16,9 +23,6 @@ * * ===================================================================================== */ - - - #ifndef __FIFO_H__ #define __FIFO_H__ diff --git a/avr/usbload/huffman-decode.c b/avr/usbload/huffman-decode.c index 7c6075d..e66194a 100644 --- a/avr/usbload/huffman-decode.c +++ b/avr/usbload/huffman-decode.c @@ -1,21 +1,28 @@ -/* avr-huffman-decode.c */ /* - This file is part of the AVR-Huffman. - Copyright (C) 2009 Daniel Otte (daniel.otte@rub.de) - - 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 . -*/ + * ===================================================================================== + * + * ________ .__ __ ________ ____ ________ + * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ + * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ + * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ + * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / + * \__> \/ \/ \/ \/ \/ + * ___. + * __ __ _____\_ |__ + * | | \/ ___/| __ \ + * | | /\___ \ | \_\ \ + * |____//____ >|___ / + * \/ \/ + * + * www.optixx.org + * + * + * Version: 1.0 + * Created: 07/21/2009 03:32:16 PM + * Author: david@optixx.org + * Based on: Daniel Otte (daniel.otte@rub.de) + * ===================================================================================== + */ #include "huffman-decode.h" #include diff --git a/avr/usbload/huffman-decode.h b/avr/usbload/huffman-decode.h index 04c56b0..97d6094 100644 --- a/avr/usbload/huffman-decode.h +++ b/avr/usbload/huffman-decode.h @@ -1,21 +1,28 @@ -/* avr-huffman-decode.h */ /* - This file is part of the AVR-Huffman. - Copyright (C) 2009 Daniel Otte (daniel.otte@rub.de) - - 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 . -*/ + * ===================================================================================== + * + * ________ .__ __ ________ ____ ________ + * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ + * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ + * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ + * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / + * \__> \/ \/ \/ \/ \/ + * ___. + * __ __ _____\_ |__ + * | | \/ ___/| __ \ + * | | /\___ \ | \_\ \ + * |____//____ >|___ / + * \/ \/ + * + * www.optixx.org + * + * + * Version: 1.0 + * Created: 07/21/2009 03:32:16 PM + * Author: david@optixx.org + * Based on: Daniel Otte (daniel.otte@rub.de) + * ===================================================================================== + */ #ifndef AVR_HUFFMAN_DECODE_H_ #define AVR_HUFFMAN_DECODE_H_ diff --git a/avr/usbload/main.c b/avr/usbload/main.c index ceaa44a..207c879 100644 --- a/avr/usbload/main.c +++ b/avr/usbload/main.c @@ -1,11 +1,18 @@ /* * ===================================================================================== * - * .d8888b 88888b. .d88b. .d8888b 888d888 8888b. 88888b.d88b. - * 88K 888 "88b d8P Y8b 88K 888P" "88b 888 "888 "88b - * "Y8888b. 888 888 88888888 "Y8888b. 888 .d888888 888 888 888 - * X88 888 888 Y8b. X88 888 888 888 888 888 888 - * 88888P' 888 888 "Y8888 88888P' 888 "Y888888 888 888 888 + * ________ .__ __ ________ ____ ________ + * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ + * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ + * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ + * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / + * \__> \/ \/ \/ \/ \/ + * ___. + * __ __ _____\_ |__ + * | | \/ ___/| __ \ + * | | /\___ \ | \_\ \ + * |____//____ >|___ / + * \/ \/ * * www.optixx.org * @@ -18,7 +25,6 @@ */ - #include #include /* for sei() */ #include /* for _delay_ms() */ diff --git a/avr/usbload/requests.h b/avr/usbload/requests.h index a16005e..69e7ef1 100644 --- a/avr/usbload/requests.h +++ b/avr/usbload/requests.h @@ -1,11 +1,18 @@ /* * ===================================================================================== * - * .d8888b 88888b. .d88b. .d8888b 888d888 8888b. 88888b.d88b. - * 88K 888 "88b d8P Y8b 88K 888P" "88b 888 "888 "88b - * "Y8888b. 888 888 88888888 "Y8888b. 888 .d888888 888 888 888 - * X88 888 888 Y8b. X88 888 888 888 888 888 888 - * 88888P' 888 888 "Y8888 88888P' 888 "Y888888 888 888 888 + * ________ .__ __ ________ ____ ________ + * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ + * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ + * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ + * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / + * \__> \/ \/ \/ \/ \/ + * ___. + * __ __ _____\_ |__ + * | | \/ ___/| __ \ + * | | /\___ \ | \_\ \ + * |____//____ >|___ / + * \/ \/ * * www.optixx.org * @@ -17,23 +24,6 @@ * ===================================================================================== */ - - -/* Name: requests.h - * Project: custom-class, a basic USB example - * Author: Christian Starkjohann - * Creation Date: 2008-04-09 - * Tabsize: 4 - * Copyright: (c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH - * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) - * This Revision: $Id: requests.h 692 2008-11-07 15:07:40Z cs $ - */ - -/* This header is shared between the firmware and the host software. It - * defines the USB request numbers (and optionally data types) used to - * communicate between the host and the device. - */ - #ifndef __REQUESTS_H__ #define __REQUESTS_H__ diff --git a/avr/usbload/rle.c b/avr/usbload/rle.c index 2d746eb..53ab400 100644 --- a/avr/usbload/rle.c +++ b/avr/usbload/rle.c @@ -1,3 +1,29 @@ +/* + * ===================================================================================== + * + * ________ .__ __ ________ ____ ________ + * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ + * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ + * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ + * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / + * \__> \/ \/ \/ \/ \/ + * ___. + * __ __ _____\_ |__ + * | | \/ ___/| __ \ + * | | /\___ \ | \_\ \ + * |____//____ >|___ / + * \/ \/ + * + * www.optixx.org + * + * + * Version: 1.0 + * Created: 07/21/2009 03:32:16 PM + * Author: david@optixx.org + * + * ===================================================================================== + */ + #include #include #include diff --git a/avr/usbload/rle.h b/avr/usbload/rle.h index 6453c2b..37da3d9 100644 --- a/avr/usbload/rle.h +++ b/avr/usbload/rle.h @@ -1,3 +1,34 @@ +/* + * ===================================================================================== + * + * ________ .__ __ ________ ____ ________ + * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ + * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ + * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ + * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / + * \__> \/ \/ \/ \/ \/ + * ___. + * __ __ _____\_ |__ + * | | \/ ___/| __ \ + * | | /\___ \ | \_\ \ + * |____//____ >|___ / + * \/ \/ + * + * www.optixx.org + * + * + * Version: 1.0 + * Created: 07/21/2009 03:32:16 PM + * Author: david@optixx.org + * + * ===================================================================================== + */ + + #ifndef __SRAM_H__ + #define __SRAM_H__ + #include uint8_t rle_decode(PGM_VOID_P in_addr,uint32_t in_len, uint32_t out_addr); + +#endif diff --git a/avr/usbload/sram.c b/avr/usbload/sram.c index 6d0678b..d122bff 100644 --- a/avr/usbload/sram.c +++ b/avr/usbload/sram.c @@ -1,11 +1,18 @@ /* * ===================================================================================== * - * .d8888b 88888b. .d88b. .d8888b 888d888 8888b. 88888b.d88b. - * 88K 888 "88b d8P Y8b 88K 888P" "88b 888 "888 "88b - * "Y8888b. 888 888 88888888 "Y8888b. 888 .d888888 888 888 888 - * X88 888 888 Y8b. X88 888 888 888 888 888 888 - * 88888P' 888 888 "Y8888 88888P' 888 "Y888888 888 888 888 + * ________ .__ __ ________ ____ ________ + * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ + * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ + * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ + * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / + * \__> \/ \/ \/ \/ \/ + * ___. + * __ __ _____\_ |__ + * | | \/ ___/| __ \ + * | | /\___ \ | \_\ \ + * |____//____ >|___ / + * \/ \/ * * www.optixx.org * @@ -17,8 +24,6 @@ * ===================================================================================== */ - - #include #include #include diff --git a/avr/usbload/sram.h b/avr/usbload/sram.h index 169c8bd..b891eb4 100644 --- a/avr/usbload/sram.h +++ b/avr/usbload/sram.h @@ -1,11 +1,18 @@ /* * ===================================================================================== * - * .d8888b 88888b. .d88b. .d8888b 888d888 8888b. 88888b.d88b. - * 88K 888 "88b d8P Y8b 88K 888P" "88b 888 "888 "88b - * "Y8888b. 888 888 88888888 "Y8888b. 888 .d888888 888 888 888 - * X88 888 888 Y8b. X88 888 888 888 888 888 888 - * 88888P' 888 888 "Y8888 88888P' 888 "Y888888 888 888 888 + * ________ .__ __ ________ ____ ________ + * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ + * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ + * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ + * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / + * \__> \/ \/ \/ \/ \/ + * ___. + * __ __ _____\_ |__ + * | | \/ ___/| __ \ + * | | /\___ \ | \_\ \ + * |____//____ >|___ / + * \/ \/ * * www.optixx.org * @@ -18,7 +25,6 @@ */ - #ifndef __SRAM_H__ #define __SRAM_H__ diff --git a/avr/usbload/timer.c b/avr/usbload/timer.c index 3022f5e..d1abb71 100644 --- a/avr/usbload/timer.c +++ b/avr/usbload/timer.c @@ -1,11 +1,18 @@ /* * ===================================================================================== * - * .d8888b 88888b. .d88b. .d8888b 888d888 8888b. 88888b.d88b. - * 88K 888 "88b d8P Y8b 88K 888P" "88b 888 "888 "88b - * "Y8888b. 888 888 88888888 "Y8888b. 888 .d888888 888 888 888 - * X88 888 888 Y8b. X88 888 888 888 888 888 888 - * 88888P' 888 888 "Y8888 88888P' 888 "Y888888 888 888 888 + * ________ .__ __ ________ ____ ________ + * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ + * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ + * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ + * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / + * \__> \/ \/ \/ \/ \/ + * ___. + * __ __ _____\_ |__ + * | | \/ ___/| __ \ + * | | /\___ \ | \_\ \ + * |____//____ >|___ / + * \/ \/ * * www.optixx.org * diff --git a/avr/usbload/timer.h b/avr/usbload/timer.h index 96639de..4132491 100644 --- a/avr/usbload/timer.h +++ b/avr/usbload/timer.h @@ -1,11 +1,18 @@ /* * ===================================================================================== * - * .d8888b 88888b. .d88b. .d8888b 888d888 8888b. 88888b.d88b. - * 88K 888 "88b d8P Y8b 88K 888P" "88b 888 "888 "88b - * "Y8888b. 888 888 88888888 "Y8888b. 888 .d888888 888 888 888 - * X88 888 888 Y8b. X88 888 888 888 888 888 888 - * 88888P' 888 888 "Y8888 88888P' 888 "Y888888 888 888 888 + * ________ .__ __ ________ ____ ________ + * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ + * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ + * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ + * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / + * \__> \/ \/ \/ \/ \/ + * ___. + * __ __ _____\_ |__ + * | | \/ ___/| __ \ + * | | /\___ \ | \_\ \ + * |____//____ >|___ / + * \/ \/ * * www.optixx.org * @@ -16,11 +23,12 @@ * * ===================================================================================== */ + + #ifndef __TIMER_H__ + #define __TIMER_H__ + - - - - -uint16_t timer_start( void ); +int16_t timer_start( void ); double timer_stop( void ); +#endif diff --git a/avr/usbload/uart.c b/avr/usbload/uart.c index 9041057..1927179 100644 --- a/avr/usbload/uart.c +++ b/avr/usbload/uart.c @@ -1,11 +1,18 @@ /* * ===================================================================================== * - * .d8888b 88888b. .d88b. .d8888b 888d888 8888b. 88888b.d88b. - * 88K 888 "88b d8P Y8b 88K 888P" "88b 888 "888 "88b - * "Y8888b. 888 888 88888888 "Y8888b. 888 .d888888 888 888 888 - * X88 888 888 Y8b. X88 888 888 888 888 888 888 - * 88888P' 888 888 "Y8888 88888P' 888 "Y888888 888 888 888 + * ________ .__ __ ________ ____ ________ + * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ + * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ + * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ + * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / + * \__> \/ \/ \/ \/ \/ + * ___. + * __ __ _____\_ |__ + * | | \/ ___/| __ \ + * | | /\___ \ | \_\ \ + * |____//____ >|___ / + * \/ \/ * * www.optixx.org * @@ -17,8 +24,6 @@ * ===================================================================================== */ - - #include #include #include diff --git a/avr/usbload/uart.h b/avr/usbload/uart.h index a9f802f..7247c47 100644 --- a/avr/usbload/uart.h +++ b/avr/usbload/uart.h @@ -1,11 +1,18 @@ /* * ===================================================================================== * - * .d8888b 88888b. .d88b. .d8888b 888d888 8888b. 88888b.d88b. - * 88K 888 "88b d8P Y8b 88K 888P" "88b 888 "888 "88b - * "Y8888b. 888 888 88888888 "Y8888b. 888 .d888888 888 888 888 - * X88 888 888 Y8b. X88 888 888 888 888 888 888 - * 88888P' 888 888 "Y8888 88888P' 888 "Y888888 888 888 888 + * ________ .__ __ ________ ____ ________ + * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ + * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ + * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ + * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / + * \__> \/ \/ \/ \/ \/ + * ___. + * __ __ _____\_ |__ + * | | \/ ___/| __ \ + * | | /\___ \ | \_\ \ + * |____//____ >|___ / + * \/ \/ * * www.optixx.org * @@ -18,7 +25,6 @@ */ - #ifndef __UART_H__ #define __UART_H__ diff --git a/avr/usbload/usb_bulk.c b/avr/usbload/usb_bulk.c index 6018225..43151d9 100644 --- a/avr/usbload/usb_bulk.c +++ b/avr/usbload/usb_bulk.c @@ -1,11 +1,18 @@ /* * ===================================================================================== * - * .d8888b 88888b. .d88b. .d8888b 888d888 8888b. 88888b.d88b. - * 88K 888 "88b d8P Y8b 88K 888P" "88b 888 "888 "88b - * "Y8888b. 888 888 88888888 "Y8888b. 888 .d888888 888 888 888 - * X88 888 888 Y8b. X88 888 888 888 888 888 888 - * 88888P' 888 888 "Y8888 88888P' 888 "Y888888 888 888 888 + * ________ .__ __ ________ ____ ________ + * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ + * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ + * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ + * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / + * \__> \/ \/ \/ \/ \/ + * ___. + * __ __ _____\_ |__ + * | | \/ ___/| __ \ + * | | /\___ \ | \_\ \ + * |____//____ >|___ / + * \/ \/ * * www.optixx.org * @@ -18,8 +25,6 @@ */ - - #include #include /* required by usbdrv.h */ #include /* for sei() */ diff --git a/avr/usbload/usb_bulk.h b/avr/usbload/usb_bulk.h index 3b68fad..c4670e9 100644 --- a/avr/usbload/usb_bulk.h +++ b/avr/usbload/usb_bulk.h @@ -1,11 +1,18 @@ /* * ===================================================================================== * - * .d8888b 88888b. .d88b. .d8888b 888d888 8888b. 88888b.d88b. - * 88K 888 "88b d8P Y8b 88K 888P" "88b 888 "888 "88b - * "Y8888b. 888 888 88888888 "Y8888b. 888 .d888888 888 888 888 - * X88 888 888 Y8b. X88 888 888 888 888 888 888 - * 88888P' 888 888 "Y8888 88888P' 888 "Y888888 888 888 888 + * ________ .__ __ ________ ____ ________ + * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ + * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ + * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ + * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / + * \__> \/ \/ \/ \/ \/ + * ___. + * __ __ _____\_ |__ + * | | \/ ___/| __ \ + * | | /\___ \ | \_\ \ + * |____//____ >|___ / + * \/ \/ * * www.optixx.org * @@ -16,10 +23,13 @@ * * ===================================================================================== */ - - + + +#ifndef __USB_BULK_H__ +#define __USB_BULK_H__ uint8_t usbFunctionWrite(uint8_t * data, uint8_t len); uint8_t usbFunctionRead(uint8_t * data, uint8_t len); +#endif diff --git a/avr/usbload/usbconfig.h b/avr/usbload/usbconfig.h index c4ed50b..302539e 100644 --- a/avr/usbload/usbconfig.h +++ b/avr/usbload/usbconfig.h @@ -1,11 +1,18 @@ /* * ===================================================================================== * - * .d8888b 88888b. .d88b. .d8888b 888d888 8888b. 88888b.d88b. - * 88K 888 "88b d8P Y8b 88K 888P" "88b 888 "888 "88b - * "Y8888b. 888 888 88888888 "Y8888b. 888 .d888888 888 888 888 - * X88 888 888 Y8b. X88 888 888 888 888 888 888 - * 88888P' 888 888 "Y8888 88888P' 888 "Y888888 888 888 888 + * ________ .__ __ ________ ____ ________ + * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ + * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ + * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ + * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / + * \__> \/ \/ \/ \/ \/ + * ___. + * __ __ _____\_ |__ + * | | \/ ___/| __ \ + * | | /\___ \ | \_\ \ + * |____//____ >|___ / + * \/ \/ * * www.optixx.org * @@ -18,7 +25,6 @@ */ - /* Name: usbconfig.h * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers * Author: Christian Starkjohann diff --git a/avr/usbload/watchdog.c b/avr/usbload/watchdog.c index 43bd5d3..23e2813 100644 --- a/avr/usbload/watchdog.c +++ b/avr/usbload/watchdog.c @@ -1,11 +1,18 @@ /* * ===================================================================================== * - * .d8888b 88888b. .d88b. .d8888b 888d888 8888b. 88888b.d88b. - * 88K 888 "88b d8P Y8b 88K 888P" "88b 888 "888 "88b - * "Y8888b. 888 888 88888888 "Y8888b. 888 .d888888 888 888 888 - * X88 888 888 Y8b. X88 888 888 888 888 888 888 - * 88888P' 888 888 "Y8888 88888P' 888 "Y888888 888 888 888 + * ________ .__ __ ________ ____ ________ + * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ + * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ + * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ + * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / + * \__> \/ \/ \/ \/ \/ + * ___. + * __ __ _____\_ |__ + * | | \/ ___/| __ \ + * | | /\___ \ | \_\ \ + * |____//____ >|___ / + * \/ \/ * * www.optixx.org * @@ -18,7 +25,6 @@ */ - #include "watchdog.h" void wdt_init(void) diff --git a/avr/usbload/watchdog.h b/avr/usbload/watchdog.h index 0f29698..6a8dda2 100644 --- a/avr/usbload/watchdog.h +++ b/avr/usbload/watchdog.h @@ -1,11 +1,18 @@ /* * ===================================================================================== * - * .d8888b 88888b. .d88b. .d8888b 888d888 8888b. 88888b.d88b. - * 88K 888 "88b d8P Y8b 88K 888P" "88b 888 "888 "88b - * "Y8888b. 888 888 88888888 "Y8888b. 888 .d888888 888 888 888 - * X88 888 888 Y8b. X88 888 888 888 888 888 888 - * 88888P' 888 888 "Y8888 88888P' 888 "Y888888 888 888 888 + * ________ .__ __ ________ ____ ________ + * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/ + * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \ + * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \ + * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ / + * \__> \/ \/ \/ \/ \/ + * ___. + * __ __ _____\_ |__ + * | | \/ ___/| __ \ + * | | /\___ \ | \_\ \ + * |____//____ >|___ / + * \/ \/ * * www.optixx.org * @@ -19,6 +26,7 @@ + #include #ifndef __WATCHDOG_H__