mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-25 15:45:56 +02:00
Merge branch 'master' of projects.qi-hardware.com:ben-wpan
This commit is contained in:
commit
9e9f65992c
@ -28,7 +28,12 @@ OBJCOPY = $(AVR_PREFIX)objcopy
|
|||||||
#OBJDUMP = $(AVR_PREFIX)objdump
|
#OBJDUMP = $(AVR_PREFIX)objdump
|
||||||
SIZE = $(AVR_PREFIX)size
|
SIZE = $(AVR_PREFIX)size
|
||||||
|
|
||||||
USB_ID = 20b7:1540
|
# BCD notion is 0xJJMM with JJ being major and MM being minor. Thus 0x0020 is
|
||||||
|
# version 0.2 */
|
||||||
|
USB_BCD_VERSION = 0020
|
||||||
|
USB_VENDOR_ID = 20b7
|
||||||
|
USB_PRODUCT_ID = 1540
|
||||||
|
USB_ID = $(USB_VENDOR_ID):$(USB_PRODUCT_ID)
|
||||||
|
|
||||||
OBJS = atusb.o board.o board_app.o sernum.o spi.o descr.o ep0.o \
|
OBJS = atusb.o board.o board_app.o sernum.o spi.o descr.o ep0.o \
|
||||||
dfu_common.o usb.o app-atu2.o mac.o
|
dfu_common.o usb.o app-atu2.o mac.o
|
||||||
@ -80,6 +85,11 @@ boot.elf: $(BOOT_OBJS)
|
|||||||
$(BUILD) $(OBJCOPY) -j .text -j .data -O binary $< $@
|
$(BUILD) $(OBJCOPY) -j .text -j .data -O binary $< $@
|
||||||
@echo "build #`cat .version`, `ls -l $@`"
|
@echo "build #`cat .version`, `ls -l $@`"
|
||||||
|
|
||||||
|
%.dfu: %.bin
|
||||||
|
cp $(NAME).bin $(NAME).dfu
|
||||||
|
dfu-suffix -a $(NAME).dfu -d 0x$(USB_BCD_VERSION) \
|
||||||
|
-p 0x$(USB_PRODUCT_ID) -v 0x$(USB_VENDOR_ID)
|
||||||
|
|
||||||
%.hex: %.elf
|
%.hex: %.elf
|
||||||
$(BUILD) $(OBJCOPY) -j .text -j .data -O ihex $< $@
|
$(BUILD) $(OBJCOPY) -j .text -j .data -O ihex $< $@
|
||||||
@echo "Size: `$(SIZE) -A boot.hex | sed '/Total */s///p;d'` B"
|
@echo "Size: `$(SIZE) -A boot.hex | sed '/Total */s///p;d'` B"
|
||||||
@ -87,7 +97,7 @@ boot.elf: $(BOOT_OBJS)
|
|||||||
# ----- Cleanup ---------------------------------------------------------------
|
# ----- Cleanup ---------------------------------------------------------------
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(NAME).bin $(NAME).elf
|
rm -f $(NAME).bin $(NAME).elf $(NAME).dfu
|
||||||
rm -f $(OBJS) $(OBJS:.o=.d)
|
rm -f $(OBJS) $(OBJS:.o=.d)
|
||||||
rm -f boot.hex boot.elf
|
rm -f boot.hex boot.elf
|
||||||
rm -f $(BOOT_OBJS) $(BOOT_OBJS:.o=.d)
|
rm -f $(BOOT_OBJS) $(BOOT_OBJS:.o=.d)
|
||||||
@ -177,8 +187,8 @@ prog-read:
|
|||||||
ssh $(HOST) avrdude -F -p $(CHIP) -c nanonote_atusb \
|
ssh $(HOST) avrdude -F -p $(CHIP) -c nanonote_atusb \
|
||||||
-U flash:r:mcu.bin:r
|
-U flash:r:mcu.bin:r
|
||||||
|
|
||||||
dfu: $(NAME).bin
|
dfu: $(NAME).dfu
|
||||||
dfu-util -d $(USB_ID) -D $(NAME).bin
|
dfu-util -d $(USB_ID) -D $(NAME).dfu
|
||||||
|
|
||||||
update: $(NAME).bin
|
update: $(NAME).bin
|
||||||
-atrf-reset -a
|
-atrf-reset -a
|
||||||
|
@ -22,10 +22,11 @@
|
|||||||
*
|
*
|
||||||
* 0.0 initial release
|
* 0.0 initial release
|
||||||
* 0.1 addition of ATUSB_TEST
|
* 0.1 addition of ATUSB_TEST
|
||||||
|
* 0.2 First public release
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define EP0ATUSB_MAJOR 0 /* EP0 protocol, major revision */
|
#define EP0ATUSB_MAJOR 0 /* EP0 protocol, major revision */
|
||||||
#define EP0ATUSB_MINOR 1 /* EP0 protocol, minor revision */
|
#define EP0ATUSB_MINOR 2 /* EP0 protocol, minor revision */
|
||||||
|
|
||||||
#define HW_TYPE_100813 0 /* 2010-08-13 */
|
#define HW_TYPE_100813 0 /* 2010-08-13 */
|
||||||
#define HW_TYPE_101216 1 /* 2010-12-16 */
|
#define HW_TYPE_101216 1 /* 2010-12-16 */
|
||||||
|
@ -182,7 +182,7 @@ bool mac_rx(int on)
|
|||||||
if (on) {
|
if (on) {
|
||||||
mac_irq = handle_irq;
|
mac_irq = handle_irq;
|
||||||
reg_read(REG_IRQ_STATUS);
|
reg_read(REG_IRQ_STATUS);
|
||||||
change_state(TRX_CMD_RX_ON);
|
change_state(TRX_CMD_RX_AACK_ON);
|
||||||
} else {
|
} else {
|
||||||
mac_irq = NULL;
|
mac_irq = NULL;
|
||||||
change_state(TRX_CMD_FORCE_TRX_OFF);
|
change_state(TRX_CMD_FORCE_TRX_OFF);
|
||||||
@ -232,9 +232,9 @@ static void do_tx(void *user)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Wait until we reach BUSY_TX, so that we command the transition to
|
* Wait until we reach BUSY_TX, so that we command the transition to
|
||||||
* RX_ON which will be executed upon TX completion.
|
* RX_AACK_ON which will be executed upon TX completion.
|
||||||
*/
|
*/
|
||||||
change_state(TRX_CMD_RX_ON);
|
change_state(TRX_CMD_RX_AACK_ON);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -247,12 +247,6 @@ void usb_reset(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void usb_enable_bus_reset(void)
|
|
||||||
{
|
|
||||||
UDCON |= 1 << RSTCPU; /* reset CPU on bus reset */
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void usb_init(void)
|
void usb_init(void)
|
||||||
{
|
{
|
||||||
USBCON |= 1 << FRZCLK; /* freeze the clock */
|
USBCON |= 1 << FRZCLK; /* freeze the clock */
|
||||||
@ -269,6 +263,7 @@ void usb_init(void)
|
|||||||
|
|
||||||
UDCON &= ~(1 << DETACH); /* attach the pull-up */
|
UDCON &= ~(1 << DETACH); /* attach the pull-up */
|
||||||
UDIEN = 1 << EORSTE; /* enable device interrupts */
|
UDIEN = 1 << EORSTE; /* enable device interrupts */
|
||||||
|
// UDCON |= 1 << RSTCPU; /* reset CPU on bus reset */
|
||||||
|
|
||||||
ep_init();
|
ep_init();
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,6 @@ bool handle_setup(const struct setup_request *setup)
|
|||||||
case TO_DEVICE(SET_CONFIGURATION):
|
case TO_DEVICE(SET_CONFIGURATION):
|
||||||
if (setup->wValue != config_descriptor[5])
|
if (setup->wValue != config_descriptor[5])
|
||||||
return 0;
|
return 0;
|
||||||
usb_enable_bus_reset();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -182,7 +182,6 @@ bool handle_setup(const struct setup_request *setup);
|
|||||||
void set_addr(uint8_t addr);
|
void set_addr(uint8_t addr);
|
||||||
void usb_ep_change(struct ep_descr *ep);
|
void usb_ep_change(struct ep_descr *ep);
|
||||||
void usb_reset(void);
|
void usb_reset(void);
|
||||||
void usb_enable_bus_reset(void);
|
|
||||||
void usb_init(void);
|
void usb_init(void);
|
||||||
|
|
||||||
#endif /* !USB_H */
|
#endif /* !USB_H */
|
||||||
|
@ -8,7 +8,7 @@ GEN=atben-pcba-small.jpg atusb-pcba-small.jpg \
|
|||||||
all: $(GEN)
|
all: $(GEN)
|
||||||
|
|
||||||
upload: index.html zoom.html $(GEN) $(DL)
|
upload: index.html zoom.html $(GEN) $(DL)
|
||||||
rsync -e ssh index.html zoom.html $(DL) $(GEN) \
|
rsync -e ssh -av index.html zoom.html releases/ $(DL) $(GEN) \
|
||||||
www-data@downloads.qi-hardware.com:werner/wpan/web/
|
www-data@downloads.qi-hardware.com:werner/wpan/web/
|
||||||
|
|
||||||
800px-Atben_atusb_prod_03.jpg:
|
800px-Atben_atusb_prod_03.jpg:
|
||||||
|
@ -142,18 +142,17 @@ Here is an overview of the status of the various project elements:
|
|||||||
<A href="http://downloads.qi-hardware.com/people/werner/wpan/fab/atben-smt-110330.tar.gz">SMT</A>
|
<A href="http://downloads.qi-hardware.com/people/werner/wpan/fab/atben-smt-110330.tar.gz">SMT</A>
|
||||||
<TR><TH align="left">Firmware<TD bgcolor="#ffff00" align="center">
|
<TR><TH align="left">Firmware<TD bgcolor="#ffff00" align="center">
|
||||||
Finishing
|
Finishing
|
||||||
<TD><A href="http://projects.qi-hardware.com/index.php/p/ben-wpan/source/tree/master/atusb/fw">source</A>
|
<TD><A href="http://projects.qi-hardware.com/index.php/p/ben-wpan/source/tree/master/atusb/fw">source</A>,
|
||||||
|
<A href="atusb-0.2.dfu">0.2 release</A>
|
||||||
<TR><TH align="left">Device driver<TD bgcolor="#ffff00" align="center">
|
<TR><TH align="left">Device driver<TD bgcolor="#ffff00" align="center">
|
||||||
In progress
|
Finishing
|
||||||
<TD><A href="http://sourceforge.net/apps/trac/linux-zigbee/">linux-zigbee project</A>,
|
<TD><A href="https://git.kernel.org/cgit/linux/kernel/git/bluetooth/bluetooth-next.git/">mainlining through linux-wpan (bluetooh-next tree)</A>
|
||||||
<A href="https://github.com/wpwrak/ben-wpan-linux">ben-wpan kernel branch</A>
|
|
||||||
<!--<A href="http://projects.qi-hardware.com/index.php/p/qi-kernel/source/tree/ben-wpan/drivers/ieee802154">ben-wpan kernel branch</A>-->
|
|
||||||
<TR><TH align="left">MAC layer<TD bgcolor="#ffff00" align="center">
|
<TR><TH align="left">MAC layer<TD bgcolor="#ffff00" align="center">
|
||||||
In progress
|
In progress
|
||||||
<TD><A href="http://sourceforge.net/apps/trac/linux-zigbee/">linux-zigbee project
|
<TD><A href="http://wpan.cakelab.org/">linux-wpan project
|
||||||
<TR><TH align="left">IPv4 hack<TD bgcolor="#80ff80" align="center">Done
|
<TR><TH align="left">IPv4 hack<TD bgcolor="#80ff80" align="center">Done
|
||||||
<TD><A href="http://projects.qi-hardware.com/index.php/p/ben-wpan/source/tree/master/tools/dirtpan">dirtpan</A>
|
<TD><A href="http://projects.qi-hardware.com/index.php/p/ben-wpan/source/tree/master/tools/dirtpan">dirtpan</A>
|
||||||
<TR><TH align="left">6LoWPAN stack<TD bgcolor="#ff8080" align="center">To do
|
<TR><TH align="left">6LoWPAN stack<TD bgcolor="#ffff00" align="center">In progress
|
||||||
</TABLE>
|
</TABLE>
|
||||||
<P>
|
<P>
|
||||||
|
|
||||||
@ -181,8 +180,9 @@ Shop links at Pulster:
|
|||||||
|
|
||||||
<P>
|
<P>
|
||||||
<HR>
|
<HR>
|
||||||
Last update: 2013-05-07
|
Last update: 2015-05-21
|
||||||
<A href="mailto:werner@almesberger.net"><I>Werner Almesberger</I></A>
|
<A href="mailto:werner@almesberger.net"><I>Werner Almesberger</I></A>,
|
||||||
|
<A href="mailto:stefan@datenfreihafen.org"><I>Stefan Schmidt</I></A>
|
||||||
<HR>
|
<HR>
|
||||||
</BODY>
|
</BODY>
|
||||||
</HTML>
|
</HTML>
|
||||||
|
BIN
web/releases/atusb-0.2.dfu
Executable file
BIN
web/releases/atusb-0.2.dfu
Executable file
Binary file not shown.
Loading…
Reference in New Issue
Block a user