10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a48b92 commit 53a270fCopy full SHA for 53a270f
esp32/hal/esp32_mphal.h
@@ -35,4 +35,16 @@ void mp_hal_reset_safe_and_boot(bool reset);
35
#define mp_hal_quiet_timing_exit(irq_state) MICROPY_END_ATOMIC_SECTION(irq_state)
36
#define mp_hal_delay_us_fast(us) ets_delay_us(us)
37
38
+// C-level pin HAL
39
+#include "py/obj.h"
40
+#include "mach 699D pin.h"
41
+#define mp_hal_pin_obj_t mp_obj_t
42
+#define mp_hal_get_pin_obj(pin) (pin)
43
+#define mp_hal_pin_write(p, v) do { \
44
+ pin_obj_t *npin = pin_find(p); \
45
+ npin->value = v; \
46
+ pin_set_value(npin); \
47
+ } while (0)
48
+#define mp_hal_pin_read(p) pin_get_value(pin_find(p))
49
+
50
#endif // _INCLUDED_MPHAL_H_
0 commit comments