repo.or.cz
/
u-boot-openmoko
/
mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fixed tools/env utilities
[u-boot-openmoko/mini2440.git]
/
board
/
mini2440
/
udc.c
blob
8657796155fd848a2ddf075ef9d5254d6b651454
1
2
#include <common.h>
3
#include <usbdcore.h>
4
#include <s3c2440.h>
5
6
void
udc_ctrl
(
enum
usbd_event event
,
int
param
)
7
{
8
S3C24X0_GPIO
*
const
gpio
=
S3C24X0_GetBase_GPIO
();
9
10
switch
(
event
) {
11
case
UDC_CTRL_PULLUP_ENABLE
:
12
if
(
param
)
13
gpio
->
GPCDAT
|= (
1
<<
5
);
// GPC5
14
else
15
gpio
->
GPCDAT
&= ~(
1
<<
5
);
16
break
;
17
case
UDC_CTRL_500mA_ENABLE
:
18
/* IGNORE */
19
break
;
20
default
:
21
break
;
22
}
23
}