mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-23 01:29:33 +00:00
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 "contiki.h"
|
||||||
|
#include "dev/adc.h"
|
||||||
#include "dev/leds.h"
|
#include "dev/leds.h"
|
||||||
#include "dev/sys-ctrl.h"
|
#include "dev/sys-ctrl.h"
|
||||||
#include "dev/scb.h"
|
#include "dev/scb.h"
|
||||||
@ -208,6 +209,8 @@ main(void)
|
|||||||
process_start(&tcpip_process, NULL);
|
process_start(&tcpip_process, NULL);
|
||||||
#endif /* NETSTACK_CONF_WITH_IPV6 */
|
#endif /* NETSTACK_CONF_WITH_IPV6 */
|
||||||
|
|
||||||
|
adc_init();
|
||||||
|
|
||||||
process_start(&sensors_process, NULL);
|
process_start(&sensors_process, NULL);
|
||||||
|
|
||||||
energest_init();
|
energest_init();
|
||||||
|
@ -79,7 +79,6 @@ configure(int type, int value)
|
|||||||
GPIO_SET_INPUT(GPIO_A_BASE, ADC_ALS_OUT_PIN_MASK);
|
GPIO_SET_INPUT(GPIO_A_BASE, ADC_ALS_OUT_PIN_MASK);
|
||||||
ioc_set_over(GPIO_A_NUM, ADC_ALS_OUT_PIN, IOC_OVERRIDE_ANA);
|
ioc_set_over(GPIO_A_NUM, ADC_ALS_OUT_PIN, IOC_OVERRIDE_ANA);
|
||||||
|
|
||||||
adc_init();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user