//
//  $Id: i2c.h 42 2008-10-04 18:40:36Z jcw $
//  $Revision: 42 $
//  $Author: jcw $
//  $Date: 2008-10-04 14:40:36 -0400 (Sat, 04 Oct 2008) $
//  $HeadURL: http://tinymicros.com/svn_public/arm/lpc2148_demo/trunk/i2c/i2c.h $
//

#ifndef __I2C0_IRQ_H
#define __I2C0_IRQ_H

#include "_config_cpu_.h"
#include "_config_cpu_i2c.h"

//extern i2cErr_e i2cErrno;

int i2c0_Init (u16 bitrate);
void i2c0_SetBitrate(const u16 bitrate);
int i2c0_GetErrno (void);
#if (USE_STRING_MESSAGE == pdON)
const char *i2c0_StrError (int err);
#endif
void i2c0_SetTimeOut (unsigned int timeoutInMilliseconds);
int i2c0_WriteBuffer (u8 address, u8 *buffer, u32 bufferLength);
int i2c0_ReadBuffer (u8 address, u8 *buffer, u32 bufferLength);
int i2c0_WriteReadBuffer (u8 address, u8 *buffer, u32 putLength, u32 getLength);
int i2c0_WriteBufferPoll (u8 address, u8 *buffer, u32 bufferLength);
int i2c0_WriteReadBufferPoll (u8 address, u8 *buffer, u32 putLength, u32 getLength);


#endif
