mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-11 03:29:51 +00:00
Merge pull request #1467 from alignan/pull/fix-adc-zoul
Removed harsh restriction on mask values and disabled debug flags
This commit is contained in:
commit
89899c7955
@ -49,7 +49,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
#define DEBUG 1
|
#define DEBUG 0
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
#define PRINTF(...) printf(__VA_ARGS__)
|
#define PRINTF(...) printf(__VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
#define DEBUG 1
|
#define DEBUG 0
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
#define PRINTF(...) printf(__VA_ARGS__)
|
#define PRINTF(...) printf(__VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
@ -136,13 +136,6 @@ configure(int type, int value)
|
|||||||
return ZOUL_SENSORS_ERROR;
|
return ZOUL_SENSORS_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if((value != ZOUL_SENSORS_ADC1) && (value != ZOUL_SENSORS_ADC2) &&
|
|
||||||
(value != ZOUL_SENSORS_ADC3) && (value != ZOUL_SENSORS_ADC4) &&
|
|
||||||
(value != ZOUL_SENSORS_ADC5)) {
|
|
||||||
PRINTF("ADC: invalid adc pin mask\n");
|
|
||||||
return ZOUL_SENSORS_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
GPIO_SOFTWARE_CONTROL(GPIO_A_BASE, value);
|
GPIO_SOFTWARE_CONTROL(GPIO_A_BASE, value);
|
||||||
GPIO_SET_INPUT(GPIO_A_BASE, value);
|
GPIO_SET_INPUT(GPIO_A_BASE, value);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user