1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-09 10:36:15 +02:00
Commit Graph

6 Commits

Author SHA1 Message Date
Werner Almesberger
d03beb2257 atusb/fw/: changed USB stack to use interrupts instead of polling
Note: this change surprisingly _increases_ the DFU wait in the boot
loader. Not yet sure why.

- boot.c (main): move the interrupt vectors to the boot loader
  section
- atusb.c (main): move the interrupt vectors to the application
  section
- boot.c (main): enable global interrupts while looping (disable
  them before jumping to the application)
- board_app.c (__timer_read, timer_read): removed wrapped since
  we're now always called with interrupts disabled
- usb/atu2.c (ep_init): enable endpoint interrupts
- usb/atu2.c (usb_init): enable device interrupts
- usb/atu2.c (usb_poll, USB_GEN_vect, USB_COM_vect): moved poll
  loop code into separate handlers for device and endpoint
  interrupts
- boot.c (main), atusb.c (main): removed call to usb_poll
2011-06-11 11:06:18 -03:00
Werner Almesberger
a69916da52 atusb/fw/: make timer code use interrupts instead of polling
- board_app.c (timer_poll): replaced with interrupt handler
- board_app.c (__timer_read): merged polling of timer_poll into the
  read loop (so it works as before, provided that interrupts are
  disabled)
- board_app.c (timer_read): run __timer_read with interrupts disabled
- board_app.c (timer_init): enable timer 1 overflow interrupt
- atusb.c (main): enabled global interrupts
- atusb.c (main): don't call poll_timer anymore
- board.h (timer_poll): removed
2011-06-11 08:13:31 -03:00
Werner Almesberger
2acdaca218 atusb/fw/: moved timer initialization to board_app.c as well
- board.c (board_init), board_app.h (timer_init), board_app.c
  (timer_init): moved timer initialization from board_init to
  new function timer_init
- atusb.c (main): call timer_init
2011-06-11 01:52:16 -03:00
Werner Almesberger
ec7c93789a atusb/fw/: added "lazy enabling" of UART-SPI after ATUSB_GPIO
- spi.h (spi_off), spi.c: disable the UART
- spi.c (spi_initialized, spi_begin, spi_init): initialize the UART
  if necessary
- board_app.c (gpio): call spi_off to disable the UART instead of
  open-coding the operation
- board_app.c (gpio): don't explicitly re-enable the UART but defer it
  to the next communication
2011-06-09 14:02:26 -03:00
Werner Almesberger
ed6d43bb35 atusb/fw/board_app.c: removed unnecessary includes 2011-06-09 12:51:13 -03:00
Werner Almesberger
e678401ac3 atusb/fw/: split board functions into app-only/shared part (boot overlflowed)
- board.c (timer_h, reset_cpu, read_irq, slp_tr, timer_poll,
  timer_read, gpio): moved to new file board_app.c
- Makefile (OBJS): added board_app.o
2011-06-09 12:48:44 -03:00