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,4 +1,4 @@
|
||||
#include "py/obj.h"
|
||||
#include "extmod/modmachine.h"
|
||||
#include "machine_pin.h"
|
||||
#include "modmachine.h"
|
||||
#include "genhdr/pins.h"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "py/stream.h"
|
||||
#include "py/mphal.h"
|
||||
#include "extmod/machine_spi.h"
|
||||
#include "modmachine.h"
|
||||
#include "extmod/modmachine.h"
|
||||
|
||||
#include "driver/spi_master.h"
|
||||
#include "soc/gpio_sig_map.h"
|
||||
|
||||
@@ -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 "driver/i2c.h"
|
||||
#include "hal/i2c_ll.h"
|
||||
|
||||
@@ -35,9 +35,10 @@
|
||||
|
||||
#include "py/runtime.h"
|
||||
#include "py/mphal.h"
|
||||
#include "extmod/modmachine.h"
|
||||
#include "extmod/virtpin.h"
|
||||
#include "mphalport.h"
|
||||
#include "modmachine.h"
|
||||
#include "extmod/virtpin.h"
|
||||
#include "machine_pin.h"
|
||||
#include "machine_rtc.h"
|
||||
#include "modesp32.h"
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
#include "py/obj.h"
|
||||
#include "py/runtime.h"
|
||||
#include "py/mphal.h"
|
||||
#include "extmod/modmachine.h"
|
||||
#include "shared/timeutils/timeutils.h"
|
||||
#include "modmachine.h"
|
||||
#include "machine_rtc.h"
|
||||
|
||||
typedef struct _machine_rtc_obj_t {
|
||||
|
||||
@@ -9,14 +9,9 @@ typedef enum {
|
||||
MACHINE_WAKE_DEEPSLEEP=0x04
|
||||
} wake_type_t;
|
||||
|
||||
extern const mp_obj_type_t machine_timer_type;
|
||||
extern const mp_obj_type_t machine_pin_type;
|
||||
extern const mp_obj_type_t machine_touchpad_type;
|
||||
extern const mp_obj_type_t machine_adcblock_type;
|
||||
extern const mp_obj_type_t machine_dac_type;
|
||||
extern const mp_obj_type_t machine_i2c_type;
|
||||
extern const mp_obj_type_t machine_spi_type;
|
||||
extern const mp_obj_type_t machine_rtc_type;
|
||||
extern const mp_obj_type_t machine_sdcard_type;
|
||||
|
||||
void machine_init(void);
|
||||
|
||||
Reference in New Issue
Block a user