Commit graph

7 commits

Author SHA1 Message Date
Martijn Coenen
93cc45750b Add HAL module ID for BCM2079x.
Bug: 16542494
Change-Id: Ia03f981d134e0f4f2de909f8ab158b28931a1dc0
2014-07-24 18:00:42 -07:00
Stewart Miles
b253bcc44a Described restrictions for common HAL object methods in nfc.h.
Follow up from change Ibe4300275286ef275b2097534c84f1029d761d87
which extends comments to the nfc_nci_module_t and nfc_nci_device_t
structures.

Change-Id: I060bda450912ff3fc041027faa8f03c24e310870
2014-05-12 15:05:24 -07:00
Stewart Miles
84d35492b1 Described restrictions for common HAL object methods.
Inheritance of HAL object is performed by composing a child structure of a
single parent structure located at offset 0 followed by new data members
and function pointers in the child structure.

For example,

struct child {
  struct parent common;
  int a_data_member;
  void (*a_method)(struct child *c, int v);
};

HAL code assumes this layout when accessing child structures given a pointer
to a parent structure such that users write code like the following...

void child_method(struct *parent, int v) {
  struct child * c = (struct child*)parent;
  // do stuff with c
}

Code above will break if a member is added before "common" in "struct child".

This change adds comments that describe the restriction on the location of
parent HAL objects within a derived HAL object.  HAL objects that already
have comments that describe the required location of parent objects are not
modified.

Change-Id: Ibe4300275286ef275b2097534c84f1029d761d87
2014-05-12 12:35:37 -07:00
Martijn Coenen
442752aecd NFC HAL: Use a separate callback for data.
Bug: 7258325
Change-Id: I02d8ea1bdcb8ea6a9430e3dc286f5c2647277f72
2012-09-30 11:08:49 -07:00
Martijn Coenen
1c970f1a49 Initial NFC HAL for NCI controllers.
Bug: 7123942
Change-Id: Ic64aa6477f2eb65b489b3be5d49ad21ccce63e2d
2012-09-14 13:56:58 -07:00
Rakesh Goyal
4cbd62c2ca add i2c_device_address member to nfc_pn544_device_t
Add I2C slave address. Multiple I2C addresses are possible
for PN544 module. Configure address according to board design.

Change-Id: I847e8f3db631f5039cf15143a9982f4b9b209f27
2012-03-09 08:51:15 -08:00
Martijn Coenen
44ae5b2476 New NFC HAL.
First implementation of a NFC HAL. This implementation doesn't
offer a generic NFC device HAL (yet), but offers typed interfaces
for different NFC controllers. Currently only the PN544 is supported.

Change-Id: I3ac04dcd767fb12a433edbe88ec7068eb1930a57
2011-11-04 09:05:22 -07:00