提交 5b223b39 编写于 作者: M Mauro Carvalho Chehab 提交者: Mauro Carvalho Chehab

[media] drx-j: get rid of the typedefs on bsp_i2c.h

Most of the hard work here were done by this small script:

for i in *; do sed s,pI2CDeviceAddr_t,"struct i2c_device_addr *",g <$i >a && mv a $i; done
for i in *; do sed s,I2CDeviceAddr_t,"struct i2c_device_addr",g <$i >a && mv a $i; done

Only bsp_i2c.h were added by hand.
Acked-by: NDevin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
上级 c7db16ae
......@@ -46,54 +46,19 @@
#ifndef __BSPI2C_H__
#define __BSPI2C_H__
/*------------------------------------------------------------------------------
INCLUDES
------------------------------------------------------------------------------*/
#include "bsp_types.h"
/*------------------------------------------------------------------------------
TYPEDEFS
------------------------------------------------------------------------------*/
/**
* \struct _I2CDeviceAddr_t
* \brief I2C device parameters.
*
* This structure contains the I2C address, the device ID and a userData pointer.
* The userData pointer can be used for application specific purposes.
*
*/
struct I2CDeviceAddr_t {
u16 i2cAddr;
/**< The I2C address of the device. */
u16 i2cDevId;
/**< The device identifier. */
void *userData;
/**< User data pointer */
};
/**
* \typedef I2CDeviceAddr_t
* \brief I2C device parameters.
*
* This structure contains the I2C address and the device ID.
*
*/
typedef struct I2CDeviceAddr_t I2CDeviceAddr_t;
/**
* \typedef pI2CDeviceAddr_t
* \brief Pointer to I2C device parameters.
*/
typedef I2CDeviceAddr_t *pI2CDeviceAddr_t;
#include "bsp_types.h"
/*------------------------------------------------------------------------------
DEFINES
------------------------------------------------------------------------------*/
/*
* This structure contains the I2C address, the device ID and a userData pointer.
* The userData pointer can be used for application specific purposes.
*/
struct i2c_device_addr {
u16 i2cAddr; /* The I2C address of the device. */
u16 i2cDevId; /* The device identifier. */
void *userData; /* User data pointer */
};
/*------------------------------------------------------------------------------
MACROS
------------------------------------------------------------------------------*/
/**
* \def IS_I2C_10BIT( addr )
......@@ -106,14 +71,6 @@ MACROS
#define IS_I2C_10BIT(addr) \
(((addr) & 0xF8) == 0xF0)
/*------------------------------------------------------------------------------
ENUM
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
STRUCTS
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Exported FUNCTIONS
------------------------------------------------------------------------------*/
......@@ -137,10 +94,10 @@ Exported FUNCTIONS
DRXStatus_t DRXBSP_I2C_Term(void);
/**
* \fn DRXStatus_t DRXBSP_I2C_WriteRead( pI2CDeviceAddr_t wDevAddr,
* \fn DRXStatus_t DRXBSP_I2C_WriteRead( struct i2c_device_addr *wDevAddr,
* u16_t wCount,
* pu8_t wData,
* pI2CDeviceAddr_t rDevAddr,
* struct i2c_device_addr *rDevAddr,
* u16_t rCount,
* pu8_t rData)
* \brief Read and/or write count bytes from I2C bus, store them in data[].
......@@ -166,10 +123,10 @@ Exported FUNCTIONS
* The device ID can be useful if several devices share an I2C address.
* It can be used to control a "switch" on the I2C bus to the correct device.
*/
DRXStatus_t DRXBSP_I2C_WriteRead(pI2CDeviceAddr_t wDevAddr,
DRXStatus_t DRXBSP_I2C_WriteRead(struct i2c_device_addr *wDevAddr,
u16_t wCount,
pu8_t wData,
pI2CDeviceAddr_t rDevAddr,
struct i2c_device_addr *rDevAddr,
u16_t rCount, pu8_t rData);
/**
......
......@@ -138,10 +138,10 @@ TYPEDEFS
lockStat);
typedef DRXStatus_t(*TUNERi2cWriteReadFunc_t) (pTUNERInstance_t tuner,
pI2CDeviceAddr_t
struct i2c_device_addr *
wDevAddr, u16_t wCount,
pu8_t wData,
pI2CDeviceAddr_t
struct i2c_device_addr *
rDevAddr, u16_t rCount,
pu8_t rData);
......@@ -157,7 +157,7 @@ TYPEDEFS
typedef struct TUNERInstance_s {
I2CDeviceAddr_t myI2CDevAddr;
struct i2c_device_addr myI2CDevAddr;
pTUNERCommonAttr_t myCommonAttr;
void *myExtAttr;
pTUNERFunc_t myFunct;
......@@ -193,10 +193,10 @@ Exported FUNCTIONS
pTUNERLockStatus_t lockStat);
DRXStatus_t DRXBSP_TUNER_DefaultI2CWriteRead(pTUNERInstance_t tuner,
pI2CDeviceAddr_t wDevAddr,
struct i2c_device_addr *wDevAddr,
u16_t wCount,
pu8_t wData,
pI2CDeviceAddr_t rDevAddr,
struct i2c_device_addr *rDevAddr,
u16_t rCount, pu8_t rData);
/*------------------------------------------------------------------------------
......
......@@ -327,7 +327,7 @@ struct dvb_frontend *drx39xxj_attach(struct i2c_adapter *i2c)
{
struct drx39xxj_state *state = NULL;
I2CDeviceAddr_t *demodAddr = NULL;
struct i2c_device_addr *demodAddr = NULL;
DRXCommonAttr_t *demodCommAttr = NULL;
DRXJData_t *demodExtAttr = NULL;
DRXDemodInstance_t *demod = NULL;
......@@ -344,7 +344,7 @@ struct dvb_frontend *drx39xxj_attach(struct i2c_adapter *i2c)
if (demod == NULL)
goto error;
demodAddr = kmalloc(sizeof(I2CDeviceAddr_t), GFP_KERNEL);
demodAddr = kmalloc(sizeof(struct i2c_device_addr), GFP_KERNEL);
if (demodAddr == NULL)
goto error;
......@@ -364,7 +364,7 @@ struct dvb_frontend *drx39xxj_attach(struct i2c_adapter *i2c)
demod->myI2CDevAddr = demodAddr;
memcpy(demod->myI2CDevAddr, &DRXJDefaultAddr_g,
sizeof(I2CDeviceAddr_t));
sizeof(struct i2c_device_addr));
demod->myI2CDevAddr->userData = state;
demod->myCommonAttr = demodCommAttr;
memcpy(demod->myCommonAttr, &DRXJDefaultCommAttr_g,
......
......@@ -60,10 +60,10 @@ void *DRXBSP_HST_Memcpy(void *to, void *from, u32_t n)
return (memcpy(to, from, (size_t) n));
}
DRXStatus_t DRXBSP_I2C_WriteRead(pI2CDeviceAddr_t wDevAddr,
DRXStatus_t DRXBSP_I2C_WriteRead(struct i2c_device_addr *wDevAddr,
u16_t wCount,
pu8_t wData,
pI2CDeviceAddr_t rDevAddr,
struct i2c_device_addr *rDevAddr,
u16_t rCount, pu8_t rData)
{
struct drx39xxj_state *state;
......
......@@ -55,61 +55,61 @@
/*============================================================================*/
/* Function prototypes */
static DRXStatus_t DRXDAP_FASI_WriteBlock(pI2CDeviceAddr_t devAddr, /* address of I2C device */
static DRXStatus_t DRXDAP_FASI_WriteBlock(struct i2c_device_addr *devAddr, /* address of I2C device */
DRXaddr_t addr, /* address of register/memory */
u16_t datasize, /* size of data */
pu8_t data, /* data to send */
DRXflags_t flags); /* special device flags */
static DRXStatus_t DRXDAP_FASI_ReadBlock(pI2CDeviceAddr_t devAddr, /* address of I2C device */
static DRXStatus_t DRXDAP_FASI_ReadBlock(struct i2c_device_addr *devAddr, /* address of I2C device */
DRXaddr_t addr, /* address of register/memory */
u16_t datasize, /* size of data */
pu8_t data, /* data to send */
DRXflags_t flags); /* special device flags */
static DRXStatus_t DRXDAP_FASI_WriteReg8(pI2CDeviceAddr_t devAddr, /* address of I2C device */
static DRXStatus_t DRXDAP_FASI_WriteReg8(struct i2c_device_addr *devAddr, /* address of I2C device */
DRXaddr_t addr, /* address of register */
u8_t data, /* data to write */
DRXflags_t flags); /* special device flags */
static DRXStatus_t DRXDAP_FASI_ReadReg8(pI2CDeviceAddr_t devAddr, /* address of I2C device */
static DRXStatus_t DRXDAP_FASI_ReadReg8(struct i2c_device_addr *devAddr, /* address of I2C device */
DRXaddr_t addr, /* address of register */
pu8_t data, /* buffer to receive data */
DRXflags_t flags); /* special device flags */
static DRXStatus_t DRXDAP_FASI_ReadModifyWriteReg8(pI2CDeviceAddr_t devAddr, /* address of I2C device */
static DRXStatus_t DRXDAP_FASI_ReadModifyWriteReg8(struct i2c_device_addr *devAddr, /* address of I2C device */
DRXaddr_t waddr, /* address of register */
DRXaddr_t raddr, /* address to read back from */
u8_t datain, /* data to send */
pu8_t dataout); /* data to receive back */
static DRXStatus_t DRXDAP_FASI_WriteReg16(pI2CDeviceAddr_t devAddr, /* address of I2C device */
static DRXStatus_t DRXDAP_FASI_WriteReg16(struct i2c_device_addr *devAddr, /* address of I2C device */
DRXaddr_t addr, /* address of register */
u16_t data, /* data to write */
DRXflags_t flags); /* special device flags */
static DRXStatus_t DRXDAP_FASI_ReadReg16(pI2CDeviceAddr_t devAddr, /* address of I2C device */
static DRXStatus_t DRXDAP_FASI_ReadReg16(struct i2c_device_addr *devAddr, /* address of I2C device */
DRXaddr_t addr, /* address of register */
pu16_t data, /* buffer to receive data */
DRXflags_t flags); /* special device flags */
static DRXStatus_t DRXDAP_FASI_ReadModifyWriteReg16(pI2CDeviceAddr_t devAddr, /* address of I2C device */
static DRXStatus_t DRXDAP_FASI_ReadModifyWriteReg16(struct i2c_device_addr *devAddr, /* address of I2C device */
DRXaddr_t waddr, /* address of register */
DRXaddr_t raddr, /* address to read back from */
u16_t datain, /* data to send */
pu16_t dataout); /* data to receive back */
static DRXStatus_t DRXDAP_FASI_WriteReg32(pI2CDeviceAddr_t devAddr, /* address of I2C device */
static DRXStatus_t DRXDAP_FASI_WriteReg32(struct i2c_device_addr *devAddr, /* address of I2C device */
DRXaddr_t addr, /* address of register */
u32_t data, /* data to write */
DRXflags_t flags); /* special device flags */
static DRXStatus_t DRXDAP_FASI_ReadReg32(pI2CDeviceAddr_t devAddr, /* address of I2C device */
static DRXStatus_t DRXDAP_FASI_ReadReg32(struct i2c_device_addr *devAddr, /* address of I2C device */
DRXaddr_t addr, /* address of register */
pu32_t data, /* buffer to receive data */
DRXflags_t flags); /* special device flags */
static DRXStatus_t DRXDAP_FASI_ReadModifyWriteReg32(pI2CDeviceAddr_t devAddr, /* address of I2C device */
static DRXStatus_t DRXDAP_FASI_ReadModifyWriteReg32(struct i2c_device_addr *devAddr, /* address of I2C device */
DRXaddr_t waddr, /* address of register */
DRXaddr_t raddr, /* address to read back from */
u32_t datain, /* data to send */
......@@ -149,7 +149,7 @@ DRXAccessFunc_t drxDapFASIFunct_g = {
/* Functions not supported by protocol*/
static DRXStatus_t DRXDAP_FASI_WriteReg8(pI2CDeviceAddr_t devAddr, /* address of I2C device */
static DRXStatus_t DRXDAP_FASI_WriteReg8(struct i2c_device_addr *devAddr, /* address of I2C device */
DRXaddr_t addr, /* address of register */
u8_t data, /* data to write */
DRXflags_t flags)
......@@ -157,7 +157,7 @@ static DRXStatus_t DRXDAP_FASI_WriteReg8(pI2CDeviceAddr_t devAddr, /* address of
return DRX_STS_ERROR;
}
static DRXStatus_t DRXDAP_FASI_ReadReg8(pI2CDeviceAddr_t devAddr, /* address of I2C device */
static DRXStatus_t DRXDAP_FASI_ReadReg8(struct i2c_device_addr *devAddr, /* address of I2C device */
DRXaddr_t addr, /* address of register */
pu8_t data, /* buffer to receive data */
DRXflags_t flags)
......@@ -165,7 +165,7 @@ static DRXStatus_t DRXDAP_FASI_ReadReg8(pI2CDeviceAddr_t devAddr, /* address of
return DRX_STS_ERROR;
}
static DRXStatus_t DRXDAP_FASI_ReadModifyWriteReg8(pI2CDeviceAddr_t devAddr, /* address of I2C device */
static DRXStatus_t DRXDAP_FASI_ReadModifyWriteReg8(struct i2c_device_addr *devAddr, /* address of I2C device */
DRXaddr_t waddr, /* address of register */
DRXaddr_t raddr, /* address to read back from */
u8_t datain, /* data to send */
......@@ -174,7 +174,7 @@ static DRXStatus_t DRXDAP_FASI_ReadModifyWriteReg8(pI2CDeviceAddr_t devAddr, /*
return DRX_STS_ERROR;
}
static DRXStatus_t DRXDAP_FASI_ReadModifyWriteReg32(pI2CDeviceAddr_t devAddr, /* address of I2C device */
static DRXStatus_t DRXDAP_FASI_ReadModifyWriteReg32(struct i2c_device_addr *devAddr, /* address of I2C device */
DRXaddr_t waddr, /* address of register */
DRXaddr_t raddr, /* address to read back from */
u32_t datain, /* data to send */
......@@ -188,7 +188,7 @@ static DRXStatus_t DRXDAP_FASI_ReadModifyWriteReg32(pI2CDeviceAddr_t devAddr, /*
/******************************
*
* DRXStatus_t DRXDAP_FASI_ReadBlock (
* pI2CDeviceAddr_t devAddr, -- address of I2C device
* struct i2c_device_addr *devAddr, -- address of I2C device
* DRXaddr_t addr, -- address of chip register/memory
* u16_t datasize, -- number of bytes to read
* pu8_t data, -- data to receive
......@@ -210,7 +210,7 @@ static DRXStatus_t DRXDAP_FASI_ReadModifyWriteReg32(pI2CDeviceAddr_t devAddr, /*
*
******************************/
static DRXStatus_t DRXDAP_FASI_ReadBlock(pI2CDeviceAddr_t devAddr,
static DRXStatus_t DRXDAP_FASI_ReadBlock(struct i2c_device_addr *devAddr,
DRXaddr_t addr,
u16_t datasize,
pu8_t data, DRXflags_t flags)
......@@ -303,7 +303,7 @@ static DRXStatus_t DRXDAP_FASI_ReadBlock(pI2CDeviceAddr_t devAddr,
/******************************
*
* DRXStatus_t DRXDAP_FASI_ReadModifyWriteReg16 (
* pI2CDeviceAddr_t devAddr, -- address of I2C device
* struct i2c_device_addr *devAddr, -- address of I2C device
* DRXaddr_t waddr, -- address of chip register/memory
* DRXaddr_t raddr, -- chip address to read back from
* u16_t wdata, -- data to send
......@@ -325,7 +325,7 @@ static DRXStatus_t DRXDAP_FASI_ReadBlock(pI2CDeviceAddr_t devAddr,
*
******************************/
static DRXStatus_t DRXDAP_FASI_ReadModifyWriteReg16(pI2CDeviceAddr_t devAddr,
static DRXStatus_t DRXDAP_FASI_ReadModifyWriteReg16(struct i2c_device_addr *devAddr,
DRXaddr_t waddr,
DRXaddr_t raddr,
u16_t wdata, pu16_t rdata)
......@@ -349,7 +349,7 @@ static DRXStatus_t DRXDAP_FASI_ReadModifyWriteReg16(pI2CDeviceAddr_t devAddr,
/******************************
*
* DRXStatus_t DRXDAP_FASI_ReadReg16 (
* pI2CDeviceAddr_t devAddr, -- address of I2C device
* struct i2c_device_addr *devAddr, -- address of I2C device
* DRXaddr_t addr, -- address of chip register/memory
* pu16_t data, -- data to receive
* DRXflags_t flags) -- special device flags
......@@ -364,7 +364,7 @@ static DRXStatus_t DRXDAP_FASI_ReadModifyWriteReg16(pI2CDeviceAddr_t devAddr,
*
******************************/
static DRXStatus_t DRXDAP_FASI_ReadReg16(pI2CDeviceAddr_t devAddr,
static DRXStatus_t DRXDAP_FASI_ReadReg16(struct i2c_device_addr *devAddr,
DRXaddr_t addr,
pu16_t data, DRXflags_t flags)
{
......@@ -382,7 +382,7 @@ static DRXStatus_t DRXDAP_FASI_ReadReg16(pI2CDeviceAddr_t devAddr,
/******************************
*
* DRXStatus_t DRXDAP_FASI_ReadReg32 (
* pI2CDeviceAddr_t devAddr, -- address of I2C device
* struct i2c_device_addr *devAddr, -- address of I2C device
* DRXaddr_t addr, -- address of chip register/memory
* pu32_t data, -- data to receive
* DRXflags_t flags) -- special device flags
......@@ -397,7 +397,7 @@ static DRXStatus_t DRXDAP_FASI_ReadReg16(pI2CDeviceAddr_t devAddr,
*
******************************/
static DRXStatus_t DRXDAP_FASI_ReadReg32(pI2CDeviceAddr_t devAddr,
static DRXStatus_t DRXDAP_FASI_ReadReg32(struct i2c_device_addr *devAddr,
DRXaddr_t addr,
pu32_t data, DRXflags_t flags)
{
......@@ -417,7 +417,7 @@ static DRXStatus_t DRXDAP_FASI_ReadReg32(pI2CDeviceAddr_t devAddr,
/******************************
*
* DRXStatus_t DRXDAP_FASI_WriteBlock (
* pI2CDeviceAddr_t devAddr, -- address of I2C device
* struct i2c_device_addr *devAddr, -- address of I2C device
* DRXaddr_t addr, -- address of chip register/memory
* u16_t datasize, -- number of bytes to read
* pu8_t data, -- data to receive
......@@ -436,7 +436,7 @@ static DRXStatus_t DRXDAP_FASI_ReadReg32(pI2CDeviceAddr_t devAddr,
*
******************************/
static DRXStatus_t DRXDAP_FASI_WriteBlock(pI2CDeviceAddr_t devAddr,
static DRXStatus_t DRXDAP_FASI_WriteBlock(struct i2c_device_addr *devAddr,
DRXaddr_t addr,
u16_t datasize,
pu8_t data, DRXflags_t flags)
......@@ -526,7 +526,7 @@ static DRXStatus_t DRXDAP_FASI_WriteBlock(pI2CDeviceAddr_t devAddr,
st = DRXBSP_I2C_WriteRead(devAddr,
(u16_t) (bufx),
buf,
(pI2CDeviceAddr_t) (NULL),
(struct i2c_device_addr *) (NULL),
0, (pu8_t) (NULL));
if ((st != DRX_STS_OK) && (firstErr == DRX_STS_OK)) {
......@@ -543,7 +543,7 @@ static DRXStatus_t DRXDAP_FASI_WriteBlock(pI2CDeviceAddr_t devAddr,
st = DRXBSP_I2C_WriteRead(devAddr,
(u16_t) (bufx + todo),
buf,
(pI2CDeviceAddr_t) (NULL),
(struct i2c_device_addr *) (NULL),
0, (pu8_t) (NULL));
if ((st != DRX_STS_OK) && (firstErr == DRX_STS_OK)) {
......@@ -561,7 +561,7 @@ static DRXStatus_t DRXDAP_FASI_WriteBlock(pI2CDeviceAddr_t devAddr,
/******************************
*
* DRXStatus_t DRXDAP_FASI_WriteReg16 (
* pI2CDeviceAddr_t devAddr, -- address of I2C device
* struct i2c_device_addr *devAddr, -- address of I2C device
* DRXaddr_t addr, -- address of chip register/memory
* u16_t data, -- data to send
* DRXflags_t flags) -- special device flags
......@@ -575,7 +575,7 @@ static DRXStatus_t DRXDAP_FASI_WriteBlock(pI2CDeviceAddr_t devAddr,
*
******************************/
static DRXStatus_t DRXDAP_FASI_WriteReg16(pI2CDeviceAddr_t devAddr,
static DRXStatus_t DRXDAP_FASI_WriteReg16(struct i2c_device_addr *devAddr,
DRXaddr_t addr,
u16_t data, DRXflags_t flags)
{
......@@ -590,7 +590,7 @@ static DRXStatus_t DRXDAP_FASI_WriteReg16(pI2CDeviceAddr_t devAddr,
/******************************
*
* DRXStatus_t DRXDAP_FASI_WriteReg32 (
* pI2CDeviceAddr_t devAddr, -- address of I2C device
* struct i2c_device_addr *devAddr, -- address of I2C device
* DRXaddr_t addr, -- address of chip register/memory
* u32_t data, -- data to send
* DRXflags_t flags) -- special device flags
......@@ -604,7 +604,7 @@ static DRXStatus_t DRXDAP_FASI_WriteReg16(pI2CDeviceAddr_t devAddr,
*
******************************/
static DRXStatus_t DRXDAP_FASI_WriteReg32(pI2CDeviceAddr_t devAddr,
static DRXStatus_t DRXDAP_FASI_WriteReg32(struct i2c_device_addr *devAddr,
DRXaddr_t addr,
u32_t data, DRXflags_t flags)
{
......
......@@ -991,7 +991,7 @@ CtrlUCode(pDRXDemodInstance_t demod,
u16_t mcNrOfBlks = 0;
u16_t mcMagicWord = 0;
pu8_t mcData = (pu8_t) (NULL);
pI2CDeviceAddr_t devAddr = (pI2CDeviceAddr_t) (NULL);
struct i2c_device_addr *devAddr = (struct i2c_device_addr *) (NULL);
devAddr = demod->myI2CDevAddr;
......
......@@ -1329,11 +1329,11 @@ STRUCTS
*/
typedef struct {
u16_t portNr; /**< I2C port number */
pI2CDeviceAddr_t wDevAddr;
struct i2c_device_addr *wDevAddr;
/**< Write device address */
u16_t wCount; /**< Size of write data in bytes */
pu8_t wData; /**< Pointer to write data */
pI2CDeviceAddr_t rDevAddr;
struct i2c_device_addr *rDevAddr;
/**< Read device address */
u16_t rCount; /**< Size of data to read in bytes */
pu8_t rData; /**< Pointer to read buffer */
......@@ -1726,71 +1726,71 @@ STRUCTS
typedef u32_t DRXflags_t, *pDRXflags_t;
/* Write block of data to device */
typedef DRXStatus_t(*DRXWriteBlockFunc_t) (pI2CDeviceAddr_t devAddr, /* address of I2C device */
typedef DRXStatus_t(*DRXWriteBlockFunc_t) (struct i2c_device_addr *devAddr, /* address of I2C device */
DRXaddr_t addr, /* address of register/memory */
u16_t datasize, /* size of data in bytes */
pu8_t data, /* data to send */
DRXflags_t flags);
/* Read block of data from device */
typedef DRXStatus_t(*DRXReadBlockFunc_t) (pI2CDeviceAddr_t devAddr, /* address of I2C device */
typedef DRXStatus_t(*DRXReadBlockFunc_t) (struct i2c_device_addr *devAddr, /* address of I2C device */
DRXaddr_t addr, /* address of register/memory */
u16_t datasize, /* size of data in bytes */
pu8_t data, /* receive buffer */
DRXflags_t flags);
/* Write 8-bits value to device */
typedef DRXStatus_t(*DRXWriteReg8Func_t) (pI2CDeviceAddr_t devAddr, /* address of I2C device */
typedef DRXStatus_t(*DRXWriteReg8Func_t) (struct i2c_device_addr *devAddr, /* address of I2C device */
DRXaddr_t addr, /* address of register/memory */
u8_t data, /* data to send */
DRXflags_t flags);
/* Read 8-bits value to device */
typedef DRXStatus_t(*DRXReadReg8Func_t) (pI2CDeviceAddr_t devAddr, /* address of I2C device */
typedef DRXStatus_t(*DRXReadReg8Func_t) (struct i2c_device_addr *devAddr, /* address of I2C device */
DRXaddr_t addr, /* address of register/memory */
pu8_t data, /* receive buffer */
DRXflags_t flags);
/* Read modify write 8-bits value to device */
typedef DRXStatus_t(*DRXReadModifyWriteReg8Func_t) (pI2CDeviceAddr_t devAddr, /* address of I2C device */
typedef DRXStatus_t(*DRXReadModifyWriteReg8Func_t) (struct i2c_device_addr *devAddr, /* address of I2C device */
DRXaddr_t waddr, /* write address of register */
DRXaddr_t raddr, /* read address of register */
u8_t wdata, /* data to write */
pu8_t rdata); /* data to read */
/* Write 16-bits value to device */
typedef DRXStatus_t(*DRXWriteReg16Func_t) (pI2CDeviceAddr_t devAddr, /* address of I2C device */
typedef DRXStatus_t(*DRXWriteReg16Func_t) (struct i2c_device_addr *devAddr, /* address of I2C device */
DRXaddr_t addr, /* address of register/memory */
u16_t data, /* data to send */
DRXflags_t flags);
/* Read 16-bits value to device */
typedef DRXStatus_t(*DRXReadReg16Func_t) (pI2CDeviceAddr_t devAddr, /* address of I2C device */
typedef DRXStatus_t(*DRXReadReg16Func_t) (struct i2c_device_addr *devAddr, /* address of I2C device */
DRXaddr_t addr, /* address of register/memory */
pu16_t data, /* receive buffer */
DRXflags_t flags);
/* Read modify write 16-bits value to device */
typedef DRXStatus_t(*DRXReadModifyWriteReg16Func_t) (pI2CDeviceAddr_t devAddr, /* address of I2C device */
typedef DRXStatus_t(*DRXReadModifyWriteReg16Func_t) (struct i2c_device_addr *devAddr, /* address of I2C device */
DRXaddr_t waddr, /* write address of register */
DRXaddr_t raddr, /* read address of register */
u16_t wdata, /* data to write */
pu16_t rdata); /* data to read */
/* Write 32-bits value to device */
typedef DRXStatus_t(*DRXWriteReg32Func_t) (pI2CDeviceAddr_t devAddr, /* address of I2C device */
typedef DRXStatus_t(*DRXWriteReg32Func_t) (struct i2c_device_addr *devAddr, /* address of I2C device */
DRXaddr_t addr, /* address of register/memory */
u32_t data, /* data to send */
DRXflags_t flags);
/* Read 32-bits value to device */
typedef DRXStatus_t(*DRXReadReg32Func_t) (pI2CDeviceAddr_t devAddr, /* address of I2C device */
typedef DRXStatus_t(*DRXReadReg32Func_t) (struct i2c_device_addr *devAddr, /* address of I2C device */
DRXaddr_t addr, /* address of register/memory */
pu32_t data, /* receive buffer */
DRXflags_t flags);
/* Read modify write 32-bits value to device */
typedef DRXStatus_t(*DRXReadModifyWriteReg32Func_t) (pI2CDeviceAddr_t devAddr, /* address of I2C device */
typedef DRXStatus_t(*DRXReadModifyWriteReg32Func_t) (struct i2c_device_addr *devAddr, /* address of I2C device */
DRXaddr_t waddr, /* write address of register */
DRXaddr_t raddr, /* read address of register */
u32_t wdata, /* data to write */
......@@ -1948,7 +1948,7 @@ STRUCTS
/**< data access protocol functions */
pTUNERInstance_t myTuner;
/**< tuner instance,if NULL then baseband */
pI2CDeviceAddr_t myI2CDevAddr;
struct i2c_device_addr *myI2CDevAddr;
/**< i2c address and device identifier */
pDRXCommonAttr_t myCommonAttr;
/**< common DRX attributes */
......
......@@ -734,7 +734,7 @@ Exported GLOBAL VARIABLES
extern DRXAccessFunc_t drxDapDRXJFunct_g;
extern DRXDemodFunc_t DRXJFunctions_g;
extern DRXJData_t DRXJData_g;
extern I2CDeviceAddr_t DRXJDefaultAddr_g;
extern struct i2c_device_addr DRXJDefaultAddr_g;
extern DRXCommonAttr_t DRXJDefaultCommAttr_g;
extern DRXDemodInstance_t DRXJDefaultDemod_g;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册