forked from len0rd/rockbox
Recorder modifications
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1071 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
2bfa0473c3
commit
9d937e9c23
1 changed files with 5 additions and 2 deletions
|
|
@ -112,9 +112,10 @@ int i2c_getack(void)
|
||||||
low until it is ready. We need to poll the clock line until it goes
|
low until it is ready. We need to poll the clock line until it goes
|
||||||
high before we read the ack. */
|
high before we read the ack. */
|
||||||
|
|
||||||
|
#ifndef ARCHOS_RECORDER
|
||||||
SDA_LO; /* First, discharge the data line */
|
SDA_LO; /* First, discharge the data line */
|
||||||
|
#endif
|
||||||
SDA_INPUT; /* And set to input */
|
SDA_INPUT; /* And set to input */
|
||||||
SCL_LO; /* Set the clock low */
|
|
||||||
SCL_INPUT; /* Set the clock to input */
|
SCL_INPUT; /* Set the clock to input */
|
||||||
while(!SCL) /* and wait for the MAS to release it */
|
while(!SCL) /* and wait for the MAS to release it */
|
||||||
yield();
|
yield();
|
||||||
|
|
@ -154,9 +155,11 @@ unsigned char i2c_inb(int ack)
|
||||||
|
|
||||||
/* clock in each bit, MSB first */
|
/* clock in each bit, MSB first */
|
||||||
for ( i=0x80; i; i>>=1 ) {
|
for ( i=0x80; i; i>>=1 ) {
|
||||||
|
#ifndef ARCHOS_RECORDER
|
||||||
/* Tricky business. Here we discharge the data line by driving it low
|
/* Tricky business. Here we discharge the data line by driving it low
|
||||||
and then set it to input to see if it stays low or goes high */
|
and then set it to input to see if it stays low or goes high */
|
||||||
SDA_LO; /* First, discharge the data line */
|
SDA_LO; /* First, discharge the data line */
|
||||||
|
#endif
|
||||||
SDA_INPUT; /* And set to input */
|
SDA_INPUT; /* And set to input */
|
||||||
SCL_HI;
|
SCL_HI;
|
||||||
if ( SDA )
|
if ( SDA )
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue