extmod/modmachine: Clean up decls of machine types to use common ones.
The machine_i2c_type, machine_spi_type and machine_timer_type symbols are already declared in extmod/modmachine.h and should not be declared anywhere else. Also move declarations of machine_pin_type and machine_rtc_type to the common header in extmod. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include <stdint.h>
|
||||
#include "py/obj.h"
|
||||
#include "py/mphal.h"
|
||||
#include "extmod/modmachine.h"
|
||||
#include "machine_pin.h"
|
||||
|
||||
#define AF(af_idx, af_fn, af_unit) \
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "py/mphal.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "extmod/machine_i2c.h"
|
||||
#include "modmachine.h"
|
||||
#include "extmod/modmachine.h"
|
||||
|
||||
#include "hardware/i2c.h"
|
||||
|
||||
|
||||
@@ -29,10 +29,11 @@
|
||||
|
||||
#include "py/runtime.h"
|
||||
#include "py/mphal.h"
|
||||
#include "extmod/modmachine.h"
|
||||
#include "extmod/virtpin.h"
|
||||
#include "shared/runtime/mpirq.h"
|
||||
#include "modmachine.h"
|
||||
#include "machine_pin.h"
|
||||
#include "extmod/virtpin.h"
|
||||
|
||||
#include "hardware/irq.h"
|
||||
#include "hardware/regs/intctrl.h"
|
||||
|
||||
@@ -59,7 +59,6 @@ typedef struct _machine_pin_obj_t {
|
||||
const machine_pin_af_obj_t *af;
|
||||
} machine_pin_obj_t;
|
||||
|
||||
extern const mp_obj_type_t machine_pin_type;
|
||||
extern const mp_obj_type_t machine_pin_af_type;
|
||||
|
||||
// Include all of the individual pin objects
|
||||
|
||||
@@ -35,10 +35,10 @@
|
||||
#include "py/runtime.h"
|
||||
#include "py/mphal.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "extmod/modmachine.h"
|
||||
#include "shared/timeutils/timeutils.h"
|
||||
#include "hardware/rtc.h"
|
||||
#include "pico/util/datetime.h"
|
||||
#include "modmachine.h"
|
||||
|
||||
typedef struct _machine_rtc_obj_t {
|
||||
mp_obj_base_t base;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "py/mphal.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "extmod/machine_spi.h"
|
||||
#include "modmachine.h"
|
||||
#include "extmod/modmachine.h"
|
||||
|
||||
#include "hardware/spi.h"
|
||||
#include "hardware/dma.h"
|
||||
|
||||
@@ -3,12 +3,6 @@
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
extern const mp_obj_type_t machine_i2c_type;
|
||||
extern const mp_obj_type_t machine_pin_type;
|
||||
extern const mp_obj_type_t machine_rtc_type;
|
||||
extern const mp_obj_type_t machine_spi_type;
|
||||
extern const mp_obj_type_t machine_timer_type;
|
||||
|
||||
void machine_pin_init(void);
|
||||
void machine_pin_deinit(void);
|
||||
void machine_i2s_init0(void);
|
||||
|
||||
Reference in New Issue
Block a user