This is a code factoring to have the Python bindings in one location, and all the ports use those same bindings. For all ports except the two listed below there is no functional change. The nrf port has UART.sendbreak() removed, but this method previously did nothing. The zephyr port has the following methods added: - UART.init(): supports setting timeout and timeout_char. - UART.deinit(): does nothing, just returns None. - UART.flush(): raises OSError(EINVAL) because it's not implemented. - UART.any() and UART.txdone(): raise NotImplementedError. Signed-off-by: Damien George <damien@micropython.org>
22 lines
545 B
C
22 lines
545 B
C
#ifndef MICROPY_INCLUDED_ZEPHYR_MODMACHINE_H
|
|
#define MICROPY_INCLUDED_ZEPHYR_MODMACHINE_H
|
|
|
|
#include "py/obj.h"
|
|
|
|
extern const mp_obj_type_t machine_pin_type;
|
|
extern const mp_obj_type_t machine_i2c_type;
|
|
extern const mp_obj_type_t machine_spi_type;
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_0(machine_info_obj);
|
|
|
|
typedef struct _machine_pin_obj_t {
|
|
mp_obj_base_t base;
|
|
const struct device *port;
|
|
uint32_t pin;
|
|
struct _machine_pin_irq_obj_t *irq;
|
|
} machine_pin_obj_t;
|
|
|
|
void machine_pin_deinit(void);
|
|
|
|
#endif // MICROPY_INCLUDED_ZEPHYR_MODMACHINE_H
|