diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/export/config-ondiofm.h | 3 | ||||
-rw-r--r-- | firmware/export/config-ondiosp.h | 3 | ||||
-rw-r--r-- | firmware/usb.c | 12 |
3 files changed, 18 insertions, 0 deletions
diff --git a/firmware/export/config-ondiofm.h b/firmware/export/config-ondiofm.h index 62e7c86c4b..646deddb69 100644 --- a/firmware/export/config-ondiofm.h +++ b/firmware/export/config-ondiofm.h | |||
@@ -46,6 +46,9 @@ | |||
46 | /* How to detect USB */ | 46 | /* How to detect USB */ |
47 | #define USB_FMRECORDERSTYLE 1 /* like FM, on AN1 */ | 47 | #define USB_FMRECORDERSTYLE 1 /* like FM, on AN1 */ |
48 | 48 | ||
49 | /* How to enable USB */ | ||
50 | #define USB_ENABLE_ONDIOSTYLE 1 /* with PA5 */ | ||
51 | |||
49 | /* The start address index for ROM builds */ | 52 | /* The start address index for ROM builds */ |
50 | #define ROM_START 0x12010 /* don't know yet */ | 53 | #define ROM_START 0x12010 /* don't know yet */ |
51 | 54 | ||
diff --git a/firmware/export/config-ondiosp.h b/firmware/export/config-ondiosp.h index f8d04bf20c..7e364f738c 100644 --- a/firmware/export/config-ondiosp.h +++ b/firmware/export/config-ondiosp.h | |||
@@ -46,6 +46,9 @@ | |||
46 | /* How to detect USB */ | 46 | /* How to detect USB */ |
47 | #define USB_FMRECORDERSTYLE 1 /* like FM, on AN1 */ | 47 | #define USB_FMRECORDERSTYLE 1 /* like FM, on AN1 */ |
48 | 48 | ||
49 | /* How to enable USB */ | ||
50 | #define USB_ENABLE_ONDIOSTYLE 1 /* with PA5 */ | ||
51 | |||
49 | /* The start address index for ROM builds */ | 52 | /* The start address index for ROM builds */ |
50 | #define ROM_START 0x12010 /* don't know yet */ | 53 | #define ROM_START 0x12010 /* don't know yet */ |
51 | 54 | ||
diff --git a/firmware/usb.c b/firmware/usb.c index 3be6d7529c..1b9e747dc9 100644 --- a/firmware/usb.c +++ b/firmware/usb.c | |||
@@ -77,6 +77,17 @@ static void usb_enable(bool on) | |||
77 | on = !on; | 77 | on = !on; |
78 | #endif | 78 | #endif |
79 | 79 | ||
80 | #ifdef USB_ENABLE_ONDIOSTYLE | ||
81 | if(on) | ||
82 | { | ||
83 | or_b(0x20, &PADRL); /* enable USB */ | ||
84 | } | ||
85 | else | ||
86 | { | ||
87 | and_b(~0x20, &PADRL); | ||
88 | } | ||
89 | or_b(0x20, &PAIORL); | ||
90 | #else /* standard HD Jukebox */ | ||
80 | if(on) | 91 | if(on) |
81 | { | 92 | { |
82 | and_b(~0x04, &PADRH); /* enable USB */ | 93 | and_b(~0x04, &PADRH); /* enable USB */ |
@@ -86,6 +97,7 @@ static void usb_enable(bool on) | |||
86 | or_b(0x04, &PADRH); | 97 | or_b(0x04, &PADRH); |
87 | } | 98 | } |
88 | or_b(0x04, &PAIORH); | 99 | or_b(0x04, &PAIORH); |
100 | #endif | ||
89 | } | 101 | } |
90 | 102 | ||
91 | static void usb_slave_mode(bool on) | 103 | static void usb_slave_mode(bool on) |