aboutsummaryrefslogtreecommitdiff
path: root/shared-bindings/nativeio/__init__.c
diff options
context:
space:
mode:
authorScott Shawcroft <scott.shawcroft@gmail.com>2017-03-13 21:55:11 +0100
committerScott Shawcroft <scott.shawcroft@gmail.com>2017-03-24 10:30:15 +0000
commit7cb54864aa7c651fc65350708afcddfab2a15fcc (patch)
tree7d935580403b7dfaa49a35fe2ab6f1c93e3f173d /shared-bindings/nativeio/__init__.c
parentd200a621647aa9fc05aae29ad7bc38363025438b (diff)
Add PulseIn support which can be used to measure a series of pulse widths.0.9.2
This is useful for infrared input and DHT sensors.
Diffstat (limited to 'shared-bindings/nativeio/__init__.c')
-rw-r--r--shared-bindings/nativeio/__init__.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/shared-bindings/nativeio/__init__.c b/shared-bindings/nativeio/__init__.c
index af3b5e84b..7395ce311 100644
--- a/shared-bindings/nativeio/__init__.c
+++ b/shared-bindings/nativeio/__init__.c
@@ -3,7 +3,7 @@
*
* The MIT License (MIT)
*
- * Copyright (c) 2016 Scott Shawcroft
+ * Copyright (c) 2016 Scott Shawcroft for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -39,6 +39,7 @@
#include "shared-bindings/nativeio/AnalogOut.h"
#include "shared-bindings/nativeio/DigitalInOut.h"
#include "shared-bindings/nativeio/I2C.h"
+#include "shared-bindings/nativeio/PulseIn.h"
#include "shared-bindings/nativeio/PulseOut.h"
#include "shared-bindings/nativeio/PWMOut.h"
#include "shared-bindings/nativeio/SPI.h"
@@ -75,6 +76,7 @@
//| AnalogOut
//| DigitalInOut
//| I2C
+//| PulseIn
//| PulseOut
//| PWMOut
//| SPI
@@ -118,6 +120,7 @@ STATIC const mp_rom_map_elem_t nativeio_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_AnalogOut), MP_ROM_PTR(&nativeio_analogout_type) },
{ MP_ROM_QSTR(MP_QSTR_DigitalInOut), MP_ROM_PTR(&nativeio_digitalinout_type) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&nativeio_i2c_type) },
+ { MP_ROM_QSTR(MP_QSTR_PulseIn), MP_ROM_PTR(&nativeio_pulsein_type) },
{ MP_ROM_QSTR(MP_QSTR_PulseOut), MP_ROM_PTR(&nativeio_pulseout_type) },
{ MP_ROM_QSTR(MP_QSTR_PWMOut), MP_ROM_PTR(&nativeio_pwmout_type) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&nativeio_spi_type) },