?lang_form? ?lang_select? ?lang_submit? ?lang_endform?
{HEADER END}
{BLAME START}

library

?curdirlinks? -

Blame information for rev 6

Line No. Rev Author Line
1 6 kaklik /*! \file i2csw.h \brief Software I2C interface using port pins. */
2 //*****************************************************************************
3 //
4 // File Name : 'i2csw.h'
5 // Title : Software I2C interface using port pins
6 // Author : Pascal Stang
7 // Created : 11/22/2000
8 // Revised : 5/2/2002
9 // Version : 1.1
10 // Target MCU : Atmel AVR series
11 // Editor Tabs : 4
12 //
13 /// \ingroup driver_sw
14 /// \defgroup i2csw Software I2C Serial Interface Function Library (i2csw.c)
15 /// \code #include "i2csw.h" \endcode
16 /// \par Overview
17 /// This library provides a very simple bit-banged I2C serial interface.
18 /// The library supports MASTER mode send and receive of single or multiple
19 /// bytes.  Thanks to the standardization of the I2C protocol and register
20 /// access, the send and receive commands are everything you need to talk to
21 /// thousands of different I2C devices including: EEPROMS, Flash memory,
22 /// MP3 players, A/D and D/A converters, electronic potentiometers, etc.
23 ///
24 /// Although some AVR processors have built-in hardware to help create an I2C
25 /// interface, this library does not require or use that hardware.
26 ///
27 /// For general information about I2C, see the i2c library.
28 //
29 // This code is distributed under the GNU Public License
30 // which can be found at http://www.gnu.org/licenses/gpl.txt
31 //
32 //*****************************************************************************
33  
34 #ifndef I2CSW_H
35 #define I2CSW_H
36  
37 #include "global.h"
38  
39 // include project-dependent settings
40 #include "i2cswconf.h"
41  
42 // defines and constants
43 #define READ 0x01 // I2C READ bit
44  
45 // functions
46  
47 // initialize I2C interface pins
48 void i2cInit(void);
49  
50 // send I2C data to <device> register <sub>
51 void i2cSend(BYTE device, BYTE sub, BYTE length, BYTE *data);
52  
53 // receive I2C data from <device> register <sub>
54 void i2cReceive(BYTE device, BYTE sub, BYTE length, BYTE *data);
55  
56 #endif
{BLAME END}
{FOOTER START}

Powered by WebSVN v2.8.3