mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-10 21:55:10 -05:00
Added usb_detect() for Clip, Fuze, E200v2 and C200v2.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19614 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
679d2c11d1
commit
f2d2b8c3c7
1 changed files with 9 additions and 0 deletions
|
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
#include "usb.h"
|
#include "usb.h"
|
||||||
#include "power.h"
|
#include "power.h"
|
||||||
|
#include "as3525.h"
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
void usb_enable(bool on)
|
void usb_enable(bool on)
|
||||||
|
|
@ -35,6 +36,14 @@ void usb_init_device(void)
|
||||||
|
|
||||||
int usb_detect(void)
|
int usb_detect(void)
|
||||||
{
|
{
|
||||||
|
#if defined(SANSA_CLIP)
|
||||||
|
return !GPIOA_PIN(6);
|
||||||
|
#elif defined(SANSA_FUZE) || defined(SANSA_E200V2)
|
||||||
|
return !GPIOA_PIN(3);
|
||||||
|
#elif defined(SANSA_C200V2)
|
||||||
|
return !GPIOA_PIN(1);
|
||||||
|
#else
|
||||||
/* TODO: Implement USB detection */
|
/* TODO: Implement USB detection */
|
||||||
return USB_EXTRACTED;
|
return USB_EXTRACTED;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue