forked from PAWPAW-Mirror/lib_xua
iic no longer uses externed global timer
This commit is contained in:
@@ -41,7 +41,7 @@
|
|||||||
//extern port p_i2c_sda;
|
//extern port p_i2c_sda;
|
||||||
#define PORT_IIC_SDA p_sda
|
#define PORT_IIC_SDA p_sda
|
||||||
|
|
||||||
extern timer i2ctimer;
|
//extern timer i2ctimer;
|
||||||
|
|
||||||
#define SCLHIGH() \
|
#define SCLHIGH() \
|
||||||
{ \
|
{ \
|
||||||
@@ -304,7 +304,8 @@ int iic_writeC(unsigned int address, unsigned int reg, char data[], unsigned int
|
|||||||
/* If null channel end arg passed in use i2c ports */
|
/* If null channel end arg passed in use i2c ports */
|
||||||
if(isnull(c))
|
if(isnull(c))
|
||||||
{
|
{
|
||||||
return iic_write(address, reg, data, numBytes, i2ctimer, p_scl, p_sda);
|
timer t;
|
||||||
|
return iic_write(address, reg, data, numBytes, t, p_scl, p_sda);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -377,7 +378,8 @@ int iic_readC(unsigned int address, unsigned int reg, char data[], unsigned int
|
|||||||
/* If null channend argument passed in use i2c ports */
|
/* If null channend argument passed in use i2c ports */
|
||||||
if(isnull(c))
|
if(isnull(c))
|
||||||
{
|
{
|
||||||
return iic_read(address, reg, data, numBytes, i2ctimer, p_scl, p_sda);
|
timer t;
|
||||||
|
return iic_read(address, reg, data, numBytes, t, p_scl, p_sda);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user