Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
usb_i2c_adapter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
labrobotica
drivers
usb_i2c_adapter
Commits
744e2ca3
Commit
744e2ca3
authored
12 years ago
by
Sergi Hernandez
Browse files
Options
Downloads
Patches
Plain Diff
Changed the project name to avoid problems in the ubuntu package creation.
Solved a minor bug.
parent
cf185b61
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
trunk/CMakeLists.txt
+1
-1
1 addition, 1 deletion
trunk/CMakeLists.txt
trunk/src/examples/CMakeLists.txt
+0
-4
0 additions, 4 deletions
trunk/src/examples/CMakeLists.txt
trunk/src/usb_i2c.cpp
+2
-2
2 additions, 2 deletions
trunk/src/usb_i2c.cpp
with
3 additions
and
7 deletions
trunk/CMakeLists.txt
+
1
−
1
View file @
744e2ca3
...
...
@@ -8,7 +8,7 @@ if(COMMAND cmake_policy)
endif
(
COMMAND cmake_policy
)
# The project name and the type of project
PROJECT
(
library_name
)
PROJECT
(
usb-i2c-adapter
)
SET
(
EXECUTABLE_OUTPUT_PATH
${
CMAKE_CURRENT_SOURCE_DIR
}
/bin
)
SET
(
LIBRARY_OUTPUT_PATH
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib
)
...
...
This diff is collapsed.
Click to expand it.
trunk/src/examples/CMakeLists.txt
+
0
−
4
View file @
744e2ca3
...
...
@@ -4,8 +4,4 @@ ADD_EXECUTABLE(test_usb_i2c test_usb_i2c.cpp)
# edit the following line to add the necessary libraries
TARGET_LINK_LIBRARIES
(
test_usb_i2c usb_i2c_adapter
${
iriutils_LIBRARY
}
${
comm_LIBRARY
}
)
# edit the following line to add the source code for the example and the name of the executable
ADD_EXECUTABLE
(
test_camera test_camera.cpp
)
# edit the following line to add the necessary libraries
TARGET_LINK_LIBRARIES
(
test_camera usb_i2c_adapter
${
iriutils_LIBRARY
}
${
comm_LIBRARY
}
)
This diff is collapsed.
Click to expand it.
trunk/src/usb_i2c.cpp
+
2
−
2
View file @
744e2ca3
...
...
@@ -300,7 +300,7 @@ int CUSBI2C::write(unsigned char dev_id, unsigned char *data, int len)
unsigned
char
status
;
int
written
=
0
,
read
=
0
;
if
(
len
>
1
)
if
(
len
<
1
)
{
/* handle exceptions */
throw
CUSBI2CException
(
_HERE_
,
"At least one byte must be send in a write operation"
);
...
...
@@ -339,7 +339,7 @@ int CUSBI2C::write(unsigned char dev_id, unsigned char *data, int len)
}
}
}
return
writt
en
;
return
l
en
;
}
int
CUSBI2C
::
read
(
unsigned
char
dev_id
,
unsigned
char
*
data
,
int
len
)
...
...
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