Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions AVR_Source/USB IR Remote Receiver 1.8/Makefile.linux
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
DEVICE := atmega168
F_CPU := 12000000UL

AVRDUDE_PROGRAMMER := avrispv2
AVRDUDE_PORT := usb

AVRDUDE := avrdude -c$(AVRDUDE_PROGRAMMER) -P$(AVRDUDE_PORT) -p $(DEVICE)

CC := avr-gcc
OBJDUMP := avr-objdump
OBJCOPY := avr-objcopy
SIZE := avr-size

CPPFLAGS := -I. -Iusbdrv/ -IIrmp/ -DF_CPU=$(F_CPU)
CFLAGS := -Wall -Os -fpack-struct -fshort-enums -std=gnu99 -funsigned-char -funsigned-bitfields -mmcu=$(DEVICE)
LDFLAGS := -Wl,-Map,USB_IR_Remote_Receiver.map -mmcu=$(DEVICE)

OBJECTS = usbdrv/usbdrv.o usbdrv/usbdrvasm.o Irmp/irmp.o main.o

PROJECT = USB_IR_Remote_Receiver

.c.o:
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<

.S.o:
$(CC) $(CPPFLAGS) $(CFLAGS) -x assembler-with-cpp -c -o $@ $<

all: $(PROJECT).hex

$(PROJECT).elf: $(OBJECTS)
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(PROJECT).elf $^

$(PROJECT).lss: $(PROJECT).elf
$(OBJDUMP) -h -S $(PROJECT).elf > $(PROJECT).lss

$(PROJECT).hex: $(PROJECT).elf $(PROJECT).lss
$(OBJCOPY) -R .eeprom -O ihex $(PROJECT).elf $(PROJECT).hex

$(PROJECT).eep: $(PROJECT).elf
$(OBJCOPY) -j .eeprom --no-change-warnings --change-section-lma .eeprom=0 -O ihex $(PROJECT).elf $(PROJECT).eep

size: $(PROJECT).elf
$(SIZE) --format=berkeley -t $(PROJECT).elf

flash: $(PROJECT).hex
$(AVRDUDE) -Uflash:w:$(PROJECT).hex:a

clean:
$(RM) $(PROJECT).elf $(PROJECT).eep $(PROJECT).lss $(PROJECT).hex *.o $(OBJECTS)
8 changes: 4 additions & 4 deletions AVR_Source/USB IR Remote Receiver 1.8/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const char IrmpVersion[] = "12.03.2013";
/* ----------------------------- USB interface ----------------------------- */
/* ------------------------------------------------------------------------- */

PROGMEM char usbHidReportDescriptor[USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH] = {
PROGMEM const char usbHidReportDescriptor[USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH] = {
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x0b, 0x01, 0x00, 0x00, 0xff, // USAGE (Vendor Defined Page 1:Vendor Usage 1)
0xa1, 0x01, // COLLECTION (Application)
Expand Down Expand Up @@ -132,7 +132,7 @@ static uchar replyBuf[16];
/* ------------------------------------------------------------------------- */
/* main functions for irmp
*/
void
static void
timer_init (void)
{
/* IR polling timer */
Expand All @@ -153,7 +153,7 @@ timer_init (void)
* init all io pins of the AVR, first all to input with pullups. then config USB and output pin
*---------------------------------------------------------------------------------------------------------------------------------------------------
*/
void
static void
init_io(void)
{
/* first set all pins to input */
Expand Down Expand Up @@ -313,7 +313,7 @@ usbRequest_t *rq = (void *)data;
return 0;
}
/* ------------------------------------------------------------------------- */
void SendINTData(void)
static void SendINTData(void)
{

if (!(irmp_data.flags & IRMP_FLAG_REPETITION)) // first check if the IR command is repeated
Expand Down
13 changes: 10 additions & 3 deletions AVR_Source/USB IR Remote Receiver 1.8/usbconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* Tabsize: 4
* Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH
* License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
* This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $
*/

#ifndef __usbconfig_h_included__
Expand Down Expand Up @@ -280,8 +279,7 @@ section at the end of this file).
* CDC class is 2, use subclass 2 and protocol 1 for ACM
*/


/*#define USB_PUBLIC static */
/* #define USB_PUBLIC static */
/* Use the define above if you #include usbdrv.c instead of linking against it.
* This technique saves a couple of bytes in flash memory.
*/
Expand Down Expand Up @@ -349,6 +347,15 @@ section at the end of this file).
#define USB_CFG_DESCR_PROPS_HID_REPORT 0
#define USB_CFG_DESCR_PROPS_UNKNOWN 0


// #define usbMsgPtr_t unsigned short
/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to
* a scalar type here because gcc generates slightly shorter code for scalar
* arithmetics than for pointer arithmetics. Remove this define for backward
* type compatibility or define it to an 8 bit type if you use data in RAM only
* and all RAM is below 256 bytes (tiny memory model in IAR CC).
*/

/* ----------------------- Optional MCU Description ------------------------ */

/* The following configurations have working defaults in usbdrv.h. You
Expand Down
21 changes: 21 additions & 0 deletions AVR_Source/USB IR Remote Receiver 1.8/usbdrv/Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -306,3 +306,24 @@ Scroll down to the bottom to see the most recent changes.
endpoint now.

* Release 2010-07-15

- Fixed bug in usbDriverSetup() which prevented descriptor sizes above 255
bytes.
- Avoid a compiler warning for unused parameter in usbHandleResetHook() when
compiler option -Wextra is enabled.
- Fixed wrong hex value for some IDs in USB-IDs-for-free.txt.
- Keep a define for USBATTR_BUSPOWER, although the flag does not exist
in USB 1.1 any more. Set it to 0. This is for backward compatibility.

* Release 2012-01-09

- Define a separate (defined) type for usbMsgPtr so that projects using a
tiny memory model can define it to an 8 bit type in usbconfig.h. This
change also saves a couple of bytes when using a scalar 16 bit type.
- Inserted "const" keyword for all PROGMEM declarations because new GCC
requires it.
- Fixed problem with dependence of usbportability.h on usbconfig.h. This
problem occurred with IAR CC only.
- Prepared repository for github.com.

* Release 2012-12-06
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
V-USB Driver Software License Agreement
Version 2009-08-03
Version 2012-07-09

THIS LICENSE AGREEMENT GRANTS YOU CERTAIN RIGHTS IN A SOFTWARE. YOU CAN
ENTER INTO THIS AGREEMENT AND ACQUIRE THE RIGHTS OUTLINED BELOW BY PAYING
Expand Down Expand Up @@ -37,10 +37,10 @@ Product ID(s), sent to you in e-mail. These Product IDs are reserved
exclusively for you. OBJECTIVE DEVELOPMENT has obtained USB Product ID
ranges under the Vendor ID 5824 from Wouter van Ooijen (Van Ooijen
Technische Informatica, www.voti.nl) and under the Vendor ID 8352 from
Jason Kotzin (Clay Logic, www.claylogic.com). Both owners of the Vendor IDs
have obtained these IDs from the USB Implementers Forum, Inc.
(www.usb.org). OBJECTIVE DEVELOPMENT disclaims all liability which might
arise from the assignment of USB IDs.
Jason Kotzin (now flirc.tv, Inc.). Both owners of the Vendor IDs have
obtained these IDs from the USB Implementers Forum, Inc. (www.usb.org).
OBJECTIVE DEVELOPMENT disclaims all liability which might arise from the
assignment of USB IDs.

2.5 USB Certification. Although not part of this agreement, we want to make
it clear that you cannot become USB certified when you use V-USB or a USB
Expand Down
6 changes: 3 additions & 3 deletions AVR_Source/USB IR Remote Receiver 1.8/usbdrv/USB-ID-FAQ.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version 2009-08-22
Version 2012-07-09

==========================
WHY DO WE NEED THESE IDs?
Expand Down Expand Up @@ -107,8 +107,8 @@ WHO IS THE OWNER OF THE VENDOR-ID?
Objective Development has obtained ranges of USB Product-IDs under two
Vendor-IDs: Under Vendor-ID 5824 from Wouter van Ooijen (Van Ooijen
Technische Informatica, www.voti.nl) and under Vendor-ID 8352 from Jason
Kotzin (Clay Logic, www.claylogic.com). Both VID owners have received their
Vendor-ID directly from usb.org.
Kotzin (now flirc.tv, Inc.). Both VID owners have received their Vendor-ID
directly from usb.org.


=========================================================================
Expand Down
16 changes: 11 additions & 5 deletions AVR_Source/USB IR Remote Receiver 1.8/usbdrv/USB-IDs-for-free.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ If you use one of the IDs listed below, your device and host-side software
must conform to these rules:

(1) The USB device MUST provide a textual representation of the serial
number. The serial number string MUST be available at least in USB language
0x0409 (English/US).
number, unless ONLY the operating system's default class driver is used.
The serial number string MUST be available at least in USB language 0x0409
(English/US).

(2) The serial number MUST start with either an Internet domain name (e.g.
"mycompany.com") registered and owned by you, or an e-mail address under your
Expand All @@ -108,6 +109,11 @@ driver for Vendor Class devices is needed, this driver must be libusb or
libusb-win32 (see http://libusb.org/ and
http://libusb-win32.sourceforge.net/).

(7) If ONLY the operating system's default class driver is used, e.g. for
mice, keyboards, joysticks, CDC or MIDI devices and no discrimination by an
application is needed, the serial number may be omitted.


Table if IDs for discrimination by serial number string:

PID dec (hex) | VID dec (hex) | Description of use
Expand All @@ -121,11 +127,11 @@ PID dec (hex) | VID dec (hex) | Description of use
---------------+---------------+-------------------------------------------
10203 (0x27db) | 5824 (0x16c0) | For USB Keyboards
---------------+---------------+-------------------------------------------
10204 (0x27db) | 5824 (0x16c0) | For USB Joysticks
10204 (0x27dc) | 5824 (0x16c0) | For USB Joysticks
---------------+---------------+-------------------------------------------
10205 (0x27dc) | 5824 (0x16c0) | For CDC-ACM class devices (modems)
10205 (0x27dd) | 5824 (0x16c0) | For CDC-ACM class devices (modems)
---------------+---------------+-------------------------------------------
10206 (0x27dd) | 5824 (0x16c0) | For MIDI class devices
10206 (0x27de) | 5824 (0x16c0) | For MIDI class devices
---------------+---------------+-------------------------------------------


Expand Down
1 change: 0 additions & 1 deletion AVR_Source/USB IR Remote Receiver 1.8/usbdrv/asmcommon.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* Tabsize: 4
* Copyright: (c) 2007 by OBJECTIVE DEVELOPMENT Software GmbH
* License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
* Revision: $Id$
*/

/* Do not link this file! Link usbdrvasm.S instead, which includes the
Expand Down
1 change: 0 additions & 1 deletion AVR_Source/USB IR Remote Receiver 1.8/usbdrv/oddebug.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* Tabsize: 4
* Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH
* License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
* This Revision: $Id: oddebug.c 692 2008-11-07 15:07:40Z cs $
*/

#include "oddebug.h"
Expand Down
1 change: 0 additions & 1 deletion AVR_Source/USB IR Remote Receiver 1.8/usbdrv/oddebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* Tabsize: 4
* Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH
* License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
* This Revision: $Id: oddebug.h 692 2008-11-07 15:07:40Z cs $
*/

#ifndef __oddebug_h_included__
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* Tabsize: 4
* Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH
* License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
* This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $
*/

#ifndef __usbconfig_h_included__
Expand Down Expand Up @@ -356,6 +355,15 @@ section at the end of this file).
#define USB_CFG_DESCR_PROPS_HID_REPORT 0
#define USB_CFG_DESCR_PROPS_UNKNOWN 0


#define usbMsgPtr_t unsigned short
/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to
* a scalar type here because gcc generates slightly shorter code for scalar
* arithmetics than for pointer arithmetics. Remove this define for backward
* type compatibility or define it to an 8 bit type if you use data in RAM only
* and all RAM is below 256 bytes (tiny memory model in IAR CC).
*/

/* ----------------------- Optional MCU Description ------------------------ */

/* The following configurations have working defaults in usbdrv.h. You
Expand Down
Loading