1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-12-23 08:39:55 +02:00

atusb/fw/: new request ATUSB_SLP_TR to pulse SLP_TR

- include/atusb/ep0.h (enum atspi_requests): added ATUSB_SLP_TR
- ep0.c (my_setup): call slp_tr on ATUSB_SLP_TR
- board.h (slp_tr), board.c: pulse SLP_TR high
This commit is contained in:
Werner Almesberger 2011-06-05 22:34:49 -03:00
parent e7dfb38fce
commit e42203b723
4 changed files with 15 additions and 0 deletions

View File

@ -96,6 +96,13 @@ uint8_t read_irq(void)
}
void slp_tr(void)
{
SET(SLP_TR);
CLR(SLP_TR);
}
void led(int on)
{
if (on)

View File

@ -70,6 +70,7 @@ extern uint8_t board_sernum[42];
void reset_rf(void);
void reset_cpu(void);
uint8_t read_irq(void);
void slp_tr(void);
void led(int on);
void panic(void);

View File

@ -123,6 +123,11 @@ static int my_setup(const struct setup_request *setup)
usb_send(&eps[0], buf, 3, NULL, NULL);
return 1;
case ATUSB_TO_DEV(ATUSB_SLP_TR):
debug("ATUSB_SLP_TR\n");
slp_tr();
return 1;
case ATUSB_TO_DEV(ATUSB_REG_WRITE):
debug("ATUSB_REG_WRITE\n");
spi_begin();

View File

@ -26,6 +26,7 @@
* host-> ATUSB_TEST - - 0
* ->host ATUSB_TIMER - - #bytes (6)
* ->host ATUSB_GPIO dir+data mask+p# 3
* host-> ATUSB_SLP_TR - - 0
*
* host-> ATUSB_REG_WRITE value addr 0
* ->host ATUSB_REG_READ - addr 1
@ -74,6 +75,7 @@ enum atspi_requests {
ATUSB_TEST, /* atusb-sil only */
ATUSB_TIMER,
ATUSB_GPIO,
ATUSB_SLP_TR,
ATUSB_REG_WRITE = 0x20, /* transceiver group */
ATUSB_REG_READ,
ATUSB_BUF_WRITE,