Permalink
Browse files

Update README

formatting
  • Loading branch information...
1 parent 9227b83 commit c19dcd43519f1a18ed30b78a69daa0f4d4071c74 @BlackBears committed Mar 24, 2013
Showing with 12 additions and 9 deletions.
  1. +12 −9 README
View
21 README
@@ -53,19 +53,22 @@ is a pointer to a function that is called when a stop condition occurs
after a valid transaction has been completed. Your callback should be
defined like this (see header file as well):
-static void twi_callback(uint8_t buffer_size,
- volatile uint8_t input_buffer_length, volatile const uint8_t *input_buffer,
- volatile uint8_t *output_buffer_length, volatile uint8_t *output_buffer)
-
-buffer_size = the size of the internal input and output buffers,
+ static void twi_callback(uint8_t buffer_size,
+ volatile uint8_t input_buffer_length,
+ volatile const uint8_t *input_buffer,
+ volatile uint8_t *output_buffer_length,
+ volatile uint8_t *output_buffer)
+ /*
+ buffer_size = the size of the internal input and output buffers,
currently this is 16 bytes, but it may enlarged by recompiling
the library. Do not write more bytes than the buffer_size or
mayhem will be the result!
-input_buffer_length = the amount of bytes received from the master
-input_buffer = the bytes received from the master
-output_buffer_length = the amount of bytes you want to send back to
+ input_buffer_length = the amount of bytes received from the master
+ input_buffer = the bytes received from the master
+ output_buffer_length = the amount of bytes you want to send back to
the master
-output_buffer = the bytes you want to send back to the master
+ output_buffer = the bytes you want to send back to the master
+ */
The input buffer is cleared after every valid transaction so you'll
never see the same bytes from the master twice. The output buffer

0 comments on commit c19dcd4

Please sign in to comment.