#include "lpc210x.h"
#include "config.h"
#include "defs.h"
#include "i2cpacket.h"

//
// This module manages the I2C protocol at the packet level of abstraction including retries, etc. It also
// manages a buffer pool. 
//


int i2cpacketInit(void) 
{
  return 0;
}

//
// get a packet from the pool -- this is used by higher level routines to get raw packets to send data
// down the stack or by lower level routines to send data up the stack
//
int i2cpacketGet(pi2cPacket_t * ppPacket, int maxBytes)
{
}

//
// get a packet from the pool -- this is used by lower level routines to deposit received packets 
// into the receive queue as they flow up the stack
//
int i2cpacketPut(i2cPacket_t * pPacket)
{
}

//
// send a packet -- this is used by higher level routines to submit a packet for outbound processing
// by the lower layers. This routine should include some sort of retry strategy/mechanism.
//
int i2cpacketSend(i2cPacket_t * pPacket)
{
}

//
// receive a packet -- this is used by higher layers to retrieve received packets. An optional receive
// address can be specified to only receive packets originated from a particular address. If 0 is specified
// as the receive address, then the next received packet, if available, is retrieved.
//
int i2cpacketReceive(pi2cPacket_t * ppPacket, unsigned char receiveAddr)
{
}
