Lines Matching refs:dev

34 extern bool I2cOpenLayer(void* dev, HAL_CALLBACK callb, HALHANDLE* pHandle);
57 extern bool hal_wrapper_open(st21nfc_dev_t* dev, nfc_stack_callback_t* p_cback,
71 st21nfc_dev_t* dev = (st21nfc_dev_t*)p_dev; in hal_open() local
75 dev->p_cback = p_cback; in hal_open()
76 dev->p_data_cback = p_data_cback; in hal_open()
80 result = hal_wrapper_open(dev, p_cback, p_data_cback, &dev->hHAL); in hal_open()
82 if (!result || !dev->hHAL) in hal_open()
84 dev->p_cback(HAL_NFC_OPEN_CPLT_EVT, HAL_NFC_STATUS_FAILED); in hal_open()
97 st21nfc_dev_t* dev = (st21nfc_dev_t*)p_dev; in hal_write() local
112 if (!HalSendDownstream(dev->hHAL, p_data, data_len)) in hal_write()
128 st21nfc_dev_t* dev = (st21nfc_dev_t*)p_dev; in hal_core_initialized() local
130 dev->p_cback(HAL_NFC_POST_INIT_CPLT_EVT, HAL_NFC_STATUS_OK); in hal_core_initialized()
173 st21nfc_dev_t* dev = (st21nfc_dev_t*)p_dev; in hal_power_cycle() local
188 dev->p_cback(HAL_NFC_OPEN_CPLT_EVT, HAL_NFC_STATUS_OK); in hal_power_cycle()
199 static int nfc_close(hw_device_t* dev) { in nfc_close() argument
201 free(dev); in nfc_close()
210 st21nfc_dev_t* dev = calloc(1, sizeof(st21nfc_dev_t)); in nfc_open() local
212 dev->nci_device.common.tag = HARDWARE_DEVICE_TAG; in nfc_open()
213 dev->nci_device.common.version = 0x00010000; // [31:16] major, [15:0] minor in nfc_open()
214 dev->nci_device.common.module = (struct hw_module_t*)module; in nfc_open()
215 dev->nci_device.common.close = nfc_close; in nfc_open()
218 dev->nci_device.open = hal_open; in nfc_open()
219 dev->nci_device.write = hal_write; in nfc_open()
220 dev->nci_device.core_initialized = hal_core_initialized; in nfc_open()
221 dev->nci_device.pre_discover = hal_pre_discover; in nfc_open()
222 dev->nci_device.close = hal_close; in nfc_open()
223 dev->nci_device.control_granted = hal_control_granted; in nfc_open()
224 dev->nci_device.power_cycle = hal_power_cycle; in nfc_open()
226 *device = (hw_device_t*)dev; in nfc_open()