am 4cbd62c2: add i2c_device_address member to nfc_pn544_device_t

* commit '4cbd62c2ca1600dcd2001d1c5a736abc043a0333':
  add i2c_device_address member to nfc_pn544_device_t
This commit is contained in:
Rakesh Goyal 2012-03-09 11:34:13 -08:00 committed by Android Git Automerger
commit 6d2bc4fc11
2 changed files with 6 additions and 0 deletions

View file

@ -76,6 +76,11 @@ typedef struct {
* Set to 0 to disable the workaround, 1 to enable it. * Set to 0 to disable the workaround, 1 to enable it.
*/ */
uint8_t enable_i2c_workaround; uint8_t enable_i2c_workaround;
/* I2C slave address. Multiple I2C addresses are
* possible for PN544 module. Configure address according to
* board design.
*/
uint8_t i2c_device_address;
} nfc_pn544_device_t; } nfc_pn544_device_t;
static inline int nfc_pn544_open(const struct hw_module_t* module, static inline int nfc_pn544_open(const struct hw_module_t* module,

View file

@ -44,6 +44,7 @@ static int nfc_open(const hw_module_t* module, const char* name,
dev->linktype = PN544_LINK_TYPE_INVALID; dev->linktype = PN544_LINK_TYPE_INVALID;
dev->device_node = NULL; dev->device_node = NULL;
dev->enable_i2c_workaround = 0; dev->enable_i2c_workaround = 0;
dev->i2c_device_address = 0;
*device = (hw_device_t*) dev; *device = (hw_device_t*) dev;
return 0; return 0;