Skip to content

Commit

Permalink
Also set DDR mask for upper 8 channels if using a 16-bit mux.
Browse files Browse the repository at this point in the history
  • Loading branch information
modmaker authored and Traumflug committed Aug 19, 2011
1 parent ffdfde8 commit 9cc2bb9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions analog.c
Expand Up @@ -59,6 +59,9 @@ void analog_init() {

// clear analog inputs in the data direction register(s)
AIO0_DDR &= ~analog_mask;
#ifdef AIO8_DDR
AIO8_DDR &= ~(analog_mask >> 8);
#endif

// disable the analog inputs for digital use.
DIDR0 = analog_mask & 0xFF;
Expand Down

0 comments on commit 9cc2bb9

Please sign in to comment.