Private
Public Access
2
0

pinmap: Added aio support.

* Intel Galileo Rev D: Added analog information
* maa_check_aio, similar to maa_check_gpio, will setup multiplexers.
* aio: Removed now duplicated functionality.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
This commit is contained in:
Thomas Ingleby
2014-05-02 11:52:40 +01:00
parent 9878b2e419
commit fd1c1c80f4
6 changed files with 187 additions and 127 deletions

View File

@@ -23,6 +23,11 @@
*/
#pragma once
/** @file
*
* This file defines the aio (analog in) interface for libmaa
*
*/
#include <stdio.h>
#include <fcntl.h>
@@ -30,21 +35,8 @@
#include "maa.h"
#include "gpio.h"
#define TOTAL_ANALOG_INPUTS_ON_BOARD (6)
static const unsigned int A0 = 0;
static const unsigned int A1 = 1;
static const unsigned int A2 = 2;
static const unsigned int A3 = 3;
static const unsigned int A4 = 4;
static const unsigned int A5 = 5;
#define ADC_RAW_RESOLUTION_BITS (12)
#define ADC_SUPPORTED_RESOLUTION_BITS (10)
#define ADC_COMMON_GATE_A4_A5 (29)
static const unsigned int
adc_gate_pins[TOTAL_ANALOG_INPUTS_ON_BOARD] = {37, 36, 23, 22, 21, 20};
typedef struct {
unsigned int channel;