summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Pollard <daniel@learnweaver.com>2020-05-06 09:05:14 +1000
committerDaniel Pollard <daniel@learnweaver.com>2020-05-06 09:05:14 +1000
commit8961dd9fe74a3ba6e55bfb1b8132a93de920a1dc (patch)
tree60b7d5c122785b654b3a2ae750c2e5c0619096d5
parent7f1be814c89e4ecbaf6c396561ce2d01d9e7a049 (diff)
changed build variables as per advice
-rw-r--r--py/circuitpy_mpconfig.mk4
-rw-r--r--shared-bindings/countio/Counter.c5
2 files changed, 4 insertions, 5 deletions
diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk
index 7ef87a7ea..be1e0ad9a 100644
--- a/py/circuitpy_mpconfig.mk
+++ b/py/circuitpy_mpconfig.mk
@@ -110,7 +110,7 @@ endif
CFLAGS += -DCIRCUITPY_DIGITALIO=$(CIRCUITPY_DIGITALIO)
ifndef CIRCUITPY_COUNTIO
-CIRCUITPY_COUNTIO = 1
+CIRCUITPY_COUNTIO ?= 1
endif
CFLAGS += -DCIRCUITPY_COUNTIO=$(CIRCUITPY_COUNTIO)
@@ -214,7 +214,7 @@ endif
CFLAGS += -DCIRCUITPY_ROTARYIO=$(CIRCUITPY_ROTARYIO)
ifndef CIRCUITPY_COUNTIO
-CIRCUITPY_COUNTIO = 1
+CIRCUITPY_COUNTIO = $(CIRCUITPY_FULL_BUILD)
endif
CFLAGS += -DCIRCUITPY_COUNTIO=$(CIRCUITPY_COUNTIO)
diff --git a/shared-bindings/countio/Counter.c b/shared-bindings/countio/Counter.c
index c10294199..efa3387a6 100644
--- a/shared-bindings/countio/Counter.c
+++ b/shared-bindings/countio/Counter.c
@@ -31,10 +31,9 @@
//| from board import *
//|
//| pin_counter = countio.Counter(board.D1)
-//|
+//| #reset the count after 100 counts
//| while True:
-//| count = pin_counter.count
-//| if count == None 10:
+//| if pin_counter.count == 100:
//| pin_counter.reset()
//| print(pin_counter.count)
//|