]> oss.titaniummirror.com Git - rgblamp.git/commitdiff
Use internal uc pull-ups for IO pins.
authorR. Steve McKown <rsmckown@gmail.com>
Tue, 6 Dec 2011 16:30:47 +0000 (09:30 -0700)
committerR. Steve McKown <rsmckown@gmail.com>
Tue, 6 Dec 2011 16:30:47 +0000 (09:30 -0700)
This allows removal of the three external pull-up resistors in the circuit.

buttons.h

index 3138ecc168bfac4f9f556057a24ec056d39f64c8..39b96e12050dd48f2e8b48940c1adeef17165c80 100644 (file)
--- a/buttons.h
+++ b/buttons.h
@@ -19,6 +19,7 @@
  * rocker switch positions.
  */
 #define buttons_init() do { \
+    nWPUEN = 0; /* enable weak pull-ups on PortB */ \
     IOCBN4 = 1; \
     IOCBN5 = 1; \
     TRISB |= IN_MASK; \