Wiki

The most recent version of this page is a draft.DiffThis version is outdated by a newer approved version.DiffThis version (01 Sep 2020 16:27) is a draft.
Approvals: 0/1

This is an old revision of the document!


ADPD410X No-OS Driver

Supported Devices

Overview

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:

  • Wearable health and fitness monitors: heart rate monitors (HRMs), heart rate variability (HRV), stress, blood pressure estimation, SpO2, hydration, body composition
  • Industrial monitoring: CO, CO2, smoke, and aerosol detection
  • Home patient monitoring

Driver Description

The driver contains two parts:

  • The driver for the ADPD4100/ADPD4101 part, which may be used, without modifications, with any microcontroller.
  • The Communication Drivers, where the specific communication functions for the desired type of processor and communication protocol have to be implemented. This driver implements the communication with the device and hides the actual details of the communication protocol to the ADI driver.

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:

  • i2c_init() – initializes the I2C communication peripheral.
  • i2c_remove() – frees memory allocated by the I2C communication driver.
  • i2c_write() – writes data to the device.
  • i2c_read() – reads data from the device.

For the SPI method, the driver calls three functions:

  • spi_init() - initializes the SPI communication peripheral.
  • spi_remove() – frees memory allocated by the SPI communication driver.
  • spi_write_and_read() – conduct information transfer with the device.

For the GPIO control methods, the driver calls three functions:

  • gpio_get() - initialize GPIO peripheral and allocate memory for one GPIO control.
  • gpio_remove() - frees memory allocated by the GPIO control driver.
  • gpio_direction_output() - set GPIO as input.
  • gpio_set_value() - set logic state of the GPIO.

Functions Declarations

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.
resources/tools-software/uc-drivers/adpd410x.1598970451.txt.gz · Last modified: 01 Sep 2020 16:27 by Andrei Drimbarean