This is an old revision of the document!
The ADPD4100/ADPD4101 operate as a complete multimodal sensor front end, stimulating up to eight light emitting diodes (LEDs) and measuring the return signal on up to eight separate current inputs. Twelve time slots are available, enabling 12 separate measurements per sampling period. The data output and functional configuration utilize an I2C interface on the ADPD4101 or a serial port interface (SPI) on the ADPD4100. The control circuitry includes flexible LED signaling and synchronous detection. The devices use a 1.8 V analog core and 1.8 V/3.3 V compatible digital input/output (I/O).
Applications:
The driver contains two parts:
The Communication Driver has a standard interface, so the ADPD4100/ADPD4101 driver can be used exactly as it is provided.
The Communication Drivers must include two things: I2C transmission methods for ADPD4101 and SPI transmission methods for ADPD4100 and GPIO control methods. For the I2C method, the driver calls four functions:
For the SPI method, the driver calls three functions:
For the GPIO control methods, the driver calls three functions:
Function | Description |
---|---|
int32_t adpd410x_setup(struct adpd410x_dev **device, struct adpd410x_init_param *init_param); | Setup the device and the driver. |
int32_t adpd410x_remove(struct adpd410x_dev *dev); | Free memory allocated by adpd410x_setup(). |
int32_t adpd410x_reg_read(struct adpd410x_dev *dev, uint16_t address, uint16_t *data); | Read device register. |
int32_t adpd410x_reg_write(struct adpd410x_dev *dev, uint16_t address, uint16_t data); | Write device register. |
int32_t adpd410x_reg_write_mask(struct adpd410x_dev *dev, uint16_t address, uint16_t data, uint16_t mask); | Do a read and write of a register to update only part of a register. |
int32_t adpd410x_reset(struct adpd410x_dev *dev); | Do a software reset. |
int32_t adpd410x_set_opmode(struct adpd410x_dev *dev, enum adpd410x_opmode mode); | Set operation mode. |
int32_t adpd410x_set_last_timeslot(struct adpd410x_dev *dev, enum adpd410x_timeslots timeslot_no); | Set number of active time slots. |
int32_t adpd410x_set_sampling_freq(struct adpd410x_dev *dev, uint32_t sampling_freq); | Set device sampling frequency. |
int32_t adpd410x_timeslot_setup(struct adpd410x_dev *dev, enum adpd410x_timeslots timeslot_no, struct adpd410x_timeslot_init *init); | Setup an active time slot. |
int32_t adpd410x_get_fifo_bytecount(struct adpd410x_dev *dev, uint16_t *bytes); | Get number of bytes in the device FIFO. |
int32_t adpd410x_get_data(struct adpd410x_dev *dev, uint32_t *data); | Get a full data packet from the device containing data from all active time slots. |