diff options
author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2008-12-04 18:26:19 +0000 |
---|---|---|
committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2008-12-04 18:26:19 +0000 |
commit | a119c44c7ec7a383dafbb391f052aaade0b6c981 (patch) | |
tree | 166f1ebc5dad5c132adeca9376ad323023f55a28 /firmware/target/mips/ingenic_jz47xx/onda_vx747/usb-target.h | |
parent | b2dd3c210e909baec303a94463dc5517acc2780a (diff) | |
download | rockbox-a119c44c7ec7a383dafbb391f052aaade0b6c981.tar.gz rockbox-a119c44c7ec7a383dafbb391f052aaade0b6c981.zip |
Ingenic targets:
* Clean up codec & PCM + functional changes
* LCD: Don't wait on DMAC in lcd_unlock()
* SADC: add battery mutex + other changes
* NAND: add mutex
* USB rework (still not working)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19327 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/mips/ingenic_jz47xx/onda_vx747/usb-target.h')
-rw-r--r-- | firmware/target/mips/ingenic_jz47xx/onda_vx747/usb-target.h | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/onda_vx747/usb-target.h b/firmware/target/mips/ingenic_jz47xx/onda_vx747/usb-target.h index c681bdaa12..09b563fd14 100644 --- a/firmware/target/mips/ingenic_jz47xx/onda_vx747/usb-target.h +++ b/firmware/target/mips/ingenic_jz47xx/onda_vx747/usb-target.h | |||
@@ -24,23 +24,19 @@ | |||
24 | 24 | ||
25 | #include "config.h" | 25 | #include "config.h" |
26 | 26 | ||
27 | #define __gpio_as_usb_detect() \ | ||
28 | do { \ | ||
29 | REG_GPIO_PXFUNS(3) = 0x10000000; \ | ||
30 | REG_GPIO_PXSELS(3) = 0x10000000; \ | ||
31 | REG_GPIO_PXPES(3) = 0x10000000; \ | ||
32 | } while (0) | ||
33 | |||
34 | #define GPIO_UDC_DETE (32 * 3 + 28) | 27 | #define GPIO_UDC_DETE (32 * 3 + 28) |
35 | #define IRQ_GPIO_UDC_DETE (IRQ_GPIO_0 + GPIO_UDC_DETE) | 28 | #define IRQ_GPIO_UDC_DETE (IRQ_GPIO_0 + GPIO_UDC_DETE) |
36 | 29 | ||
37 | static inline void usb_init_gpio(void) | 30 | #define USB_INIT_GPIO() \ |
38 | { | 31 | { \ |
39 | __gpio_as_usb_detect(); | 32 | REG_GPIO_PXFUNS(3) = 0x10000000; \ |
40 | system_enable_irq(IRQ_UDC); | 33 | REG_GPIO_PXSELS(3) = 0x10000000; \ |
41 | __gpio_as_input(GPIO_UDC_DETE); | 34 | REG_GPIO_PXPES(3) = 0x10000000; \ |
35 | __gpio_as_input(GPIO_UDC_DETE); \ | ||
42 | } | 36 | } |
43 | 37 | ||
38 | #define USB_DRV_CONNECTED() (__gpio_get_pin(GPIO_UDC_DETE) == 1) | ||
39 | |||
44 | int usb_detect(void); | 40 | int usb_detect(void); |
45 | void usb_init_device(void); | 41 | void usb_init_device(void); |
46 | bool usb_drv_connected(void); | 42 | bool usb_drv_connected(void); |