Home | History | Annotate | Download | only in utility

Lines Matching refs:twi

2   twi.c - TWI/I2C library for Wiring & Arduino
25 #include <compat/twi.h>
35 #include "twi.h"
58 * Desc readys twi pins and sets twi bitrate
68 // activate internal pull-ups for twi
73 // activate internal pull-ups for twi
79 // initialize twi prescaler and bit rate
84 /* twi bit rate formula from atmega128 manual pg 204
87 It is 72 for a 16mhz Wiring board with 100kHz TWI */
89 // enable twi module, acks, and twi interrupt
101 // set twi slave address (skip over TWGCE bit)
107 * Desc attempts to become twi bus master and read a
123 // wait until twi is ready, become master receiver
155 // copy twi buffer to data
165 * Desc attempts to become twi bus master and write a
175 * 4 .. other twi error (lost bus arbitration, bus error, ..)
186 // wait until twi is ready, become master transmitter
198 // copy data to twi buffer
222 return 4; // other twi error
313 // update twi state
328 // update twi state