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:
@@ -32,7 +32,7 @@
|
||||
#include "py/mphal.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "extmod/machine_i2c.h"
|
||||
#include "modmachine.h"
|
||||
#include "extmod/modmachine.h"
|
||||
#include "samd_soc.h"
|
||||
#include "pin_af.h"
|
||||
#include "clock_config.h"
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
|
||||
#include "py/runtime.h"
|
||||
#include "shared/timeutils/timeutils.h"
|
||||
#include "modmachine.h"
|
||||
#include "py/mphal.h"
|
||||
#include "extmod/modmachine.h"
|
||||
#include "sam.h"
|
||||
|
||||
#if MICROPY_PY_MACHINE_RTC
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
#include "py/mphal.h"
|
||||
#include "extmod/machine_spi.h"
|
||||
#include "modmachine.h"
|
||||
#include "extmod/modmachine.h"
|
||||
#include "samd_soc.h"
|
||||
#include "pin_af.h"
|
||||
#include "clock_config.h"
|
||||
|
||||
@@ -32,17 +32,6 @@
|
||||
#if MICROPY_PY_MACHINE_DAC
|
||||
extern const mp_obj_type_t machine_dac_type;
|
||||
#endif
|
||||
#if MICROPY_PY_MACHINE_I2C
|
||||
extern const mp_obj_type_t machine_i2c_type;
|
||||
#endif
|
||||
extern const mp_obj_type_t machine_pin_type;
|
||||
#if MICROPY_PY_MACHINE_SPI
|
||||
extern const mp_obj_type_t machine_spi_type;
|
||||
#endif
|
||||
extern const mp_obj_type_t machine_timer_type;
|
||||
#if MICROPY_PY_MACHINE_RTC
|
||||
extern const mp_obj_type_t machine_rtc_type;
|
||||
#endif
|
||||
|
||||
NORETURN mp_obj_t machine_bootloader(size_t n_args, const mp_obj_t *args);
|
||||
|
||||
|
||||
@@ -31,9 +31,9 @@
|
||||
#include <stdint.h>
|
||||
#include "string.h"
|
||||
|
||||
#include "modmachine.h"
|
||||
#include "py/runtime.h"
|
||||
#include "py/misc.h"
|
||||
#include "extmod/modmachine.h"
|
||||
#include "pin_af.h"
|
||||
#include "sam.h"
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
#include "py/runtime.h"
|
||||
#include "py/mphal.h"
|
||||
#include "extmod/machine_spi.h"
|
||||
#include "extmod/modmachine.h"
|
||||
#include "extmod/vfs.h"
|
||||
#include "modmachine.h"
|
||||
#include "pin_af.h"
|
||||
|
||||
#if MICROPY_HW_SPIFLASH
|
||||
|
||||
Reference in New Issue
Block a user