Initialise ADC in main, not in sensor drivers
This commit is contained in:
parent
3717522680
commit
12ac8e1fb5
@ -43,6 +43,7 @@
|
||||
*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#include "contiki.h"
|
||||
#include "dev/adc.h"
|
||||
#include "dev/leds.h"
|
||||
#include "dev/sys-ctrl.h"
|
||||
#include "dev/scb.h"
|
||||
@ -208,6 +209,8 @@ main(void)
|
||||
process_start(&tcpip_process, NULL);
|
||||
#endif /* NETSTACK_CONF_WITH_IPV6 */
|
||||
|
||||
adc_init();
|
||||
|
||||
process_start(&sensors_process, NULL);
|
||||
|
||||
energest_init();
|
||||
|
@ -79,7 +79,6 @@ configure(int type, int value)
|
||||
GPIO_SET_INPUT(GPIO_A_BASE, ADC_ALS_OUT_PIN_MASK);
|
||||
ioc_set_over(GPIO_A_NUM, ADC_ALS_OUT_PIN, IOC_OVERRIDE_ANA);
|
||||
|
||||
adc_init();
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user