Also set DDR mask for upper 8 channels if using a 16-bit mux.
This commit is contained in:
parent
ffdfde8d8d
commit
9cc2bb9125
3
analog.c
3
analog.c
|
|
@ -59,6 +59,9 @@ void analog_init() {
|
||||||
|
|
||||||
// clear analog inputs in the data direction register(s)
|
// clear analog inputs in the data direction register(s)
|
||||||
AIO0_DDR &= ~analog_mask;
|
AIO0_DDR &= ~analog_mask;
|
||||||
|
#ifdef AIO8_DDR
|
||||||
|
AIO8_DDR &= ~(analog_mask >> 8);
|
||||||
|
#endif
|
||||||
|
|
||||||
// disable the analog inputs for digital use.
|
// disable the analog inputs for digital use.
|
||||||
DIDR0 = analog_mask & 0xFF;
|
DIDR0 = analog_mask & 0xFF;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue