20671a463f91522b352d3a04536df69db489b22f
[bertos.git] / drv / twi.h
1 /*!
2  * \file
3  * <!--
4  * Copyright 2003, 2004, 2005 Develer S.r.l. (http://www.develer.com/)
5  * This file is part of DevLib - See README.devlib for information.
6  * -->
7  *
8  * \version $Id$
9  *
10  * \author Stefano Fedrigo <aleph@develer.com>
11  * \author Bernardo Innocenti <bernie@develer.com>
12  *
13  * \brief Driver for the AVR ATMega TWI (interface)
14  */
15
16 /*#*
17  *#* $Log$
18  *#* Revision 1.4  2006/03/20 17:49:49  bernie
19  *#* Make the TWI driver more generic to work with devices other than EEPROMS.
20  *#*
21  *#* Revision 1.3  2005/04/11 19:10:28  bernie
22  *#* Include top-level headers from cfg/ subdir.
23  *#*
24  *#* Revision 1.2  2005/02/18 11:19:52  bernie
25  *#* Update copyright info.
26  *#*
27  *#*/
28 #ifndef DRV_TWI_H
29 #define DRV_TWI_H
30
31 #include <cfg/compiler.h>
32
33 bool twi_start_w(uint8_t id);
34 bool twi_start_r(uint8_t id);
35 void twi_stop(void);
36 bool twi_put(const uint8_t data);
37 bool twi_send(const void *_buf, size_t count);
38 bool twi_recv(void *_buf, size_t count);
39 void twi_init(void);
40
41 #endif /* DRV_EEPROM_H */