aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/Peripheral/AVR8
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2011-06-18 08:04:25 +0000
committerDean Camera <dean@fourwalledcubicle.com>2011-06-18 08:04:25 +0000
commitbad956bace05c603e9d6e63718f40ae173f5052f (patch)
tree4e279ccd2bc474cb566df0b8b20cca5510c45bed /LUFA/Drivers/Peripheral/AVR8
parent00acc95ff6a4ce8d1c3890700a4a476b6277c3cd (diff)
downloadlufa-bad956bace05c603e9d6e63718f40ae173f5052f.tar.gz
lufa-bad956bace05c603e9d6e63718f40ae173f5052f.tar.bz2
lufa-bad956bace05c603e9d6e63718f40ae173f5052f.zip
Fix TWI driver documentation example (thanks to Jerome Colombie).
Diffstat (limited to 'LUFA/Drivers/Peripheral/AVR8')
-rw-r--r--LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c2
-rw-r--r--LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.h8
2 files changed, 5 insertions, 5 deletions
diff --git a/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c b/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c
index ef35ac686..2f65921ca 100644
--- a/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c
+++ b/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c
@@ -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)
{
diff --git a/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.h b/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.h
index d0c78bc8d..8ff38a16f 100644
--- a/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.h
+++ b/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.h
@@ -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);