1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-08-07 00:04:36 +03:00

Adding ability to send repeated starts in Wire library.

This adds an additional (boolean) parameter to both endTransmission() and requestFrom(), which specifies whether or not to send a stop condition after the corresponding transmission.  This defaults to true, as in the previous behavior of the library.

http://code.google.com/p/arduino/issues/detail?id=663
This commit is contained in:
David A. Mellis
2012-02-18 20:05:11 -05:00
parent 561cd7054d
commit 2f29f898de
4 changed files with 111 additions and 16 deletions

View File

@@ -40,8 +40,8 @@
void twi_init(void);
void twi_setAddress(uint8_t);
uint8_t twi_readFrom(uint8_t, uint8_t*, uint8_t);
uint8_t twi_writeTo(uint8_t, uint8_t*, uint8_t, uint8_t);
uint8_t twi_readFrom(uint8_t, uint8_t*, uint8_t, uint8_t);
uint8_t twi_writeTo(uint8_t, uint8_t*, uint8_t, uint8_t, uint8_t);
uint8_t twi_transmit(const uint8_t*, uint8_t);
void twi_attachSlaveRxEvent( void (*)(uint8_t*, int) );
void twi_attachSlaveTxEvent( void (*)(void) );