summaryrefslogtreecommitdiff
path: root/extmod/modmachine.h
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2023-10-25 19:13:11 +1100
committerDamien George <damien@micropython.org>2023-11-07 16:44:35 +1100
commit03eae48847c61985afece342df971f149c8ffa42 (patch)
tree41f4ea5a4c634d7891d9f730ef641760c5cf7d46 /extmod/modmachine.h
parent4212799fd8bded69e5cf47faf2ebd675906ac151 (diff)
extmod/machine_adc_block: Factor esp32 ADCBlock bindings to common code.
This is a code factoring to have the Python bindings in one location, and all the ports use those same bindings. At this stage only esp32 implements this class, so the code for the bindings comes from that port. The documentation is also updated to reflect the esp32's behaviour of ADCBlock.connect(). Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'extmod/modmachine.h')
-rw-r--r--extmod/modmachine.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/extmod/modmachine.h b/extmod/modmachine.h
index 6cace4f85..0744ef788 100644
--- a/extmod/modmachine.h
+++ b/extmod/modmachine.h
@@ -128,6 +128,7 @@
// A port must provide these types, but they are otherwise opaque.
typedef struct _machine_adc_obj_t machine_adc_obj_t;
+typedef struct _machine_adc_block_obj_t machine_adc_block_obj_t;
typedef struct _machine_i2s_obj_t machine_i2s_obj_t;
typedef struct _machine_pwm_obj_t machine_pwm_obj_t;
typedef struct _machine_uart_obj_t machine_uart_obj_t;
@@ -200,6 +201,7 @@ extern const machine_mem_obj_t machine_mem32_obj;
// Their Python bindings are implemented in extmod, and their implementation
// is provided by a port.
extern const mp_obj_type_t machine_adc_type;
+extern const mp_obj_type_t machine_adc_block_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_mem_type;