1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2025-04-21 12:27:27 +03:00

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
This commit is contained in:
Werner Almesberger
2011-06-09 14:02:26 -03:00
parent 814cf6fd78
commit ec7c93789a
3 changed files with 16 additions and 3 deletions

View File

@@ -19,6 +19,7 @@
void spi_begin(void);
uint8_t spi_io(uint8_t v);
void spi_end(void);
void spi_off(void);
void spi_init(void);
#define spi_send(v) (void) spi_io(v)