Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lufa
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
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
Erik Strand
lufa
Commits
bad956ba
Commit
bad956ba
authored
13 years ago
by
Dean Camera
Browse files
Options
Downloads
Patches
Plain Diff
Fix TWI driver documentation example (thanks to Jerome Colombie).
parent
00acc95f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c
+1
-1
1 addition, 1 deletion
LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c
LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.h
+4
-4
4 additions, 4 deletions
LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.h
with
5 additions
and
5 deletions
LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c
+
1
−
1
View file @
bad956ba
...
...
@@ -100,7 +100,7 @@ uint8_t TWI_StartTransmission(const uint8_t SlaveAddress,
uint8_t
TWI_ReadPacket
(
const
uint8_t
SlaveAddress
,
const
uint8_t
TimeoutMS
,
const
uint8_t
*
InternalAddress
,
uint8_t
InternalAddressLen
,
const
uint8_t
InternalAddressLen
,
uint8_t
*
Buffer
,
uint8_t
Length
)
{
...
...
This diff is collapsed.
Click to expand it.
LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.h
+
4
−
4
View file @
bad956ba
...
...
@@ -56,7 +56,7 @@
* TWI_Init(TWI_BIT_PRESCALE_1, 10);
*
* // Start a write session to device at device address 0xA0, internal address 0xDC with a 10ms timeout
* if (TWI_StartTransmission(0xA0 | TWI_ADDRESS_WRITE, 10))
* if (TWI_StartTransmission(0xA0 | TWI_ADDRESS_WRITE, 10)
== TWI_ERROR_NoError
)
* {
* TWI_SendByte(0xDC);
*
...
...
@@ -69,12 +69,12 @@
* }
*
* // Start a read session to device at address 0xA0, internal address 0xDC with a 10ms timeout
* if (TWI_StartTransmission(0xA0 | TWI_ADDRESS_WRITE, 10))
* if (TWI_StartTransmission(0xA0 | TWI_ADDRESS_WRITE, 10)
== TWI_ERROR_NoError
)
* {
* TWI_SendByte(0xDC);
* TWI_StopTransmission();
*
* if (TWI_StartTransmission(0xA0 | TWI_ADDRESS_READ, 10))
* if (TWI_StartTransmission(0xA0 | TWI_ADDRESS_READ, 10)
== TWI_ERROR_NoError
)
* {
* uint8_t Byte1, Byte2, Byte3;
*
...
...
@@ -276,7 +276,7 @@
uint8_t
TWI_ReadPacket
(
const
uint8_t
SlaveAddress
,
const
uint8_t
TimeoutMS
,
const
uint8_t
*
InternalAddress
,
uint8_t
InternalAddressLen
,
const
uint8_t
InternalAddressLen
,
uint8_t
*
Buffer
,
uint8_t
Length
);
...
...
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