24 lines
464 B
C
24 lines
464 B
C
#ifndef SENSORS_COMMON_H
|
|
#define SENSORS_COMMON_H
|
|
|
|
#include <stdint.h>
|
|
|
|
typedef enum {
|
|
IMS_SUCCESS,
|
|
IMS_FAIL,
|
|
} ims_ret_t;
|
|
|
|
typedef struct {
|
|
uint8_t *tx_data;
|
|
uint8_t *rx_data;
|
|
uint16_t tx_size;
|
|
uint16_t rx_size;
|
|
} ims_i2c_xfer_desc_t;
|
|
|
|
/* I2C xfer functions */
|
|
typedef ims_ret_t (*ims_i2c_xfer_t)(void *pdev, uint16_t addr, ims_i2c_xfer_desc_t *xfer);
|
|
|
|
/* Delay */
|
|
typedef ims_ret_t (*ims_delay_t)(void *pdev, uint32_t delay_msec);
|
|
|
|
#endif |