summaryrefslogtreecommitdiff
path: root/extmod/modmachine.h
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2023-10-26 12:06:19 +1100
committerDamien George <damien@micropython.org>2023-10-26 16:49:27 +1100
commitd336c1b79b38ac4024c2342e67640400e1f81532 (patch)
treeeebce99c47b71c65b2e2ae3d86a1d4ac701d7333 /extmod/modmachine.h
parent90023b4dcf7bfeb6eccd5d0d13efc4832cf187e7 (diff)
extmod/modmachine: Consolidate simple machine headers into modmachine.h.
The contents of machine_bitstream.h, machine_pinbase.h, machine_pulse.h and machine_signal.h have been moved into extmod/modmachine.h. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'extmod/modmachine.h')
-rw-r--r--extmod/modmachine.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/extmod/modmachine.h b/extmod/modmachine.h
index 2a7ce336e..4ef2bb3ad 100644
--- a/extmod/modmachine.h
+++ b/extmod/modmachine.h
@@ -27,6 +27,7 @@
#ifndef MICROPY_INCLUDED_EXTMOD_MODMACHINE_H
#define MICROPY_INCLUDED_EXTMOD_MODMACHINE_H
+#include "py/mphal.h"
#include "py/obj.h"
// Whether to enable the ADC.init() method.
@@ -97,11 +98,19 @@ extern const mp_obj_type_t machine_adc_type;
extern const mp_obj_type_t machine_i2c_type;
extern const mp_obj_type_t machine_i2s_type;
extern const mp_obj_type_t machine_pin_type;
+extern const mp_obj_type_t machine_pinbase_type;
extern const mp_obj_type_t machine_pwm_type;
extern const mp_obj_type_t machine_rtc_type;
+extern const mp_obj_type_t machine_signal_type;
extern const mp_obj_type_t machine_spi_type;
extern const mp_obj_type_t machine_timer_type;
extern const mp_obj_type_t machine_uart_type;
extern const mp_obj_type_t machine_wdt_type;
+void machine_bitstream_high_low(mp_hal_pin_obj_t pin, uint32_t *timing_ns, const uint8_t *buf, size_t len);
+mp_uint_t machine_time_pulse_us(mp_hal_pin_obj_t pin, int pulse_level, mp_uint_t timeout_us);
+
+MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(machine_bitstream_obj);
+MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(machine_time_pulse_us_obj);
+
#endif // MICROPY_INCLUDED_EXTMOD_MODMACHINE_H