Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MicroCART
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
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
Distributed Autonomous Networked Control Lab
MicroCART
Commits
8fb3e349
Commit
8fb3e349
authored
7 years ago
by
dawehr
Browse files
Options
Downloads
Patches
Plain Diff
wip: add checks to new i2c
parent
2403e3c5
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
quad/xsdk_workspace/real_quad/src/hw_impl_zybo_i2c.c
+4
-0
4 additions, 0 deletions
quad/xsdk_workspace/real_quad/src/hw_impl_zybo_i2c.c
with
4 additions
and
0 deletions
quad/xsdk_workspace/real_quad/src/hw_impl_zybo_i2c.c
+
4
−
0
View file @
8fb3e349
...
...
@@ -43,7 +43,11 @@ int XIicPs_MasterRecvPolled_ours(XIicPs *InstancePtr, u8 *MsgPtr,
int
XIicPs_SetupMaster
(
XIicPs
*
InstancePtr
,
int
Role
);
int
zybo_i2c_reset
(
struct
I2CDriver
*
self
)
{
// ensure all required memory is allocated
struct
ZyboI2CState
*
state
=
self
->
state
;
if
(
state
==
NULL
)
return
-
1
;
if
(
state
->
inst
==
NULL
)
return
-
1
;
if
(
state
->
busId
>
1
)
return
-
1
;
int
i2cID
=
state
->
busId
;
XIicPs
*
inst
=
state
->
inst
;
...
...
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