some fixes from dfu branch

This commit is contained in:
Olaf Rempel 2008-02-04 01:51:29 +01:00
parent f7b1f465cc
commit 508ab7c94b
3 changed files with 38 additions and 38 deletions

View File

@ -50,7 +50,7 @@ all: $(BUILD)/$(TARGET).elf
$(BUILD)/$(TARGET).elf: $(patsubst %,$(BUILD)/%,$(AS_SRC:.s=.o) $(SRC:.c=.o))
@echo " Linking file: $@"
@$(shell mkdir -p $(BUILD)/$(*D))
@$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
@$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) > /dev/null
@$(OBJCOPY) -O binary $@ $@.bin
@$(OBJCOPY) -O ihex $@ $@.hex
@$(OBJDUMP) -h -S -C $@ > $@.lss

View File

@ -9,6 +9,7 @@
* with minor modifications:
* - type conversion (e.g. __u8 -> uint8_t)
* - usb_endpoint_descriptor: removed last 2 bytes
* - usb_string_descriptor: wData has no size
*/
/*-------------------------------------------------------------------------*/
@ -258,7 +259,7 @@ struct usb_string_descriptor {
uint8_t bLength;
uint8_t bDescriptorType;
uint16_t wData[1]; /* UTF-16LE encoded */
uint16_t wData[]; /* UTF-16LE encoded */
} __attribute__ ((packed));
/* note that "string" zero is special, it holds language codes that

View File

@ -311,7 +311,7 @@ static void udp_handle_ctrlrequest(struct usb_ctrlrequest *req)
// TODO: follow current_interface
switch (req->bRequest) {
case USB_REQ_SET_INTERFACE: /* 0x0b */
current_interface = req->wIndex;
current_interface = req->wValue;
udp_send_data(&ep_transfer[0], NULL, 0, udp_txcb_setinterface);
break;
@ -335,7 +335,6 @@ static void udp_handle_ctrlrequest(struct usb_ctrlrequest *req)
case USB_CDC_REQ_SET_LINE_CODING: /* 0x20 */
// TODO: read 7 data bytes
udp_send_data(&ep_transfer[0], NULL, 0, NULL);
break;
case USB_CDC_REQ_SET_CONTROL_LINE_STATE: /* 0x22 */