Contiki-NG
Loading...
Searching...
No Matches

Files

file  adc-zoul.c
 Generic driver for the Zoul ADC interface.
 
file  adc-zoul.h
 Header file for the Zoul ADC interface.
 

Functions

static int configure (int type, int value)
 

Generic ADC sensors

#define ZOUL_SENSORS_ADC_MIN   2
 PA1 pin mask.
 

Detailed Description

Driver for the Zoul ADC interface

This driver supports analogue sensors connected to ADC1, ADC2, ADC3, ADC4, ADC5 and ADC6 inputs. ADC6 is shared with the user button, so disable user button if ADC6 is needed. This is controlled by the type argument of the value() function. Possible choices are:

To initialize the ADC sensors use the configure() function, using as first argument SENSORS_HW_INIT, and choose which ADC channels to enable passing as second argument any single or combined (sum) values as below:

Using an invalid combination will return ZOUL_SENSORS_ERROR.

The decimation rate can be set by passing ZOUL_SENSORS_CONFIGURE_TYPE_DECIMATION_RATE as the type argument to the configure() function and then specifying the rate through the value argument. Valid values are:

Function Documentation

◆ configure()