Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
u-boot-2015.04
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vesta
u-boot-2015.04
Commits
ed9953d6
Commit
ed9953d6
authored
16 years ago
by
Wolfgang Denk
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
git://git.denx.de/u-boot-i2c
parents
da72af8d
d144f94d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
drivers/i2c/soft_i2c.c
+1
-5
1 addition, 5 deletions
drivers/i2c/soft_i2c.c
with
1 addition
and
5 deletions
drivers/i2c/soft_i2c.c
+
1
−
5
View file @
ed9953d6
...
@@ -51,14 +51,12 @@
...
@@ -51,14 +51,12 @@
DECLARE_GLOBAL_DATA_PTR
;
DECLARE_GLOBAL_DATA_PTR
;
#endif
#endif
/*-----------------------------------------------------------------------
/*-----------------------------------------------------------------------
* Definitions
* Definitions
*/
*/
#define RETRIES 0
#define RETRIES 0
#define I2C_ACK 0
/* PD_SDA level to ack a byte */
#define I2C_ACK 0
/* PD_SDA level to ack a byte */
#define I2C_NOACK 1
/* PD_SDA level to noack a byte */
#define I2C_NOACK 1
/* PD_SDA level to noack a byte */
...
@@ -154,7 +152,6 @@ static void send_stop(void)
...
@@ -154,7 +152,6 @@ static void send_stop(void)
I2C_TRISTATE
;
I2C_TRISTATE
;
}
}
/*-----------------------------------------------------------------------
/*-----------------------------------------------------------------------
* ack should be I2C_ACK or I2C_NOACK
* ack should be I2C_ACK or I2C_NOACK
*/
*/
...
@@ -174,7 +171,6 @@ static void send_ack(int ack)
...
@@ -174,7 +171,6 @@ static void send_ack(int ack)
I2C_DELAY
;
I2C_DELAY
;
}
}
/*-----------------------------------------------------------------------
/*-----------------------------------------------------------------------
* Send 8 bits and look for an acknowledgement.
* Send 8 bits and look for an acknowledgement.
*/
*/
...
@@ -246,6 +242,7 @@ int i2c_set_bus_num(unsigned int bus)
...
@@ -246,6 +242,7 @@ int i2c_set_bus_num(unsigned int bus)
#endif
#endif
return
0
;
return
0
;
}
}
#endif
/* TODO: add 100/400k switching */
/* TODO: add 100/400k switching */
unsigned
int
i2c_get_bus_speed
(
void
)
unsigned
int
i2c_get_bus_speed
(
void
)
...
@@ -260,7 +257,6 @@ int i2c_set_bus_speed(unsigned int speed)
...
@@ -260,7 +257,6 @@ int i2c_set_bus_speed(unsigned int speed)
return
0
;
return
0
;
}
}
#endif
/*-----------------------------------------------------------------------
/*-----------------------------------------------------------------------
* if ack == I2C_ACK, ACK the byte so can continue reading, else
* if ack == I2C_ACK, ACK the byte so can continue reading, else
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment