summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-07-03 17:37:22 +1000
committerDamien George <damien.p.george@gmail.com>2017-07-03 17:37:22 +1000
commit80b31dc0972eca3f67dd2be7518b133e316e8f32 (patch)
tree93f5f8153bdb5b2293c851d85aba153b873433e8
parent5b509dbc7bd542ad9fdc7e94f8b8c096db8bef40 (diff)
stmhal: Clean up some header includes.
-rw-r--r--stmhal/boards/LIMIFROG/mpconfigboard.h2
-rw-r--r--stmhal/boards/NUCLEO_F429ZI/mpconfigboard.h2
-rw-r--r--stmhal/boards/STM32F429DISC/mpconfigboard.h2
-rw-r--r--stmhal/boards/STM32L476DISC/mpconfigboard.h2
-rw-r--r--stmhal/dac.c3
-rw-r--r--stmhal/dma.c3
-rw-r--r--stmhal/flash.c6
-rw-r--r--stmhal/modpyb.c2
-rw-r--r--stmhal/modstm.c8
-rw-r--r--stmhal/modutime.c3
-rw-r--r--stmhal/pendsv.c1
-rw-r--r--stmhal/rng.c2
-rw-r--r--stmhal/rtc.c3
-rw-r--r--stmhal/servo.c2
-rw-r--r--stmhal/stm32_it.c4
-rw-r--r--stmhal/system_stm32.c3
-rw-r--r--stmhal/timer.c2
-rw-r--r--stmhal/usbd_conf.c1
-rw-r--r--stmhal/usbd_conf.h1
-rw-r--r--stmhal/wdt.c2
20 files changed, 8 insertions, 46 deletions
diff --git a/stmhal/boards/LIMIFROG/mpconfigboard.h b/stmhal/boards/LIMIFROG/mpconfigboard.h
index d04634ac3..42b862fcf 100644
--- a/stmhal/boards/LIMIFROG/mpconfigboard.h
+++ b/stmhal/boards/LIMIFROG/mpconfigboard.h
@@ -1,5 +1,3 @@
-#include STM32_HAL_H
-
#define MICROPY_HW_BOARD_NAME "LIMIFROG"
#define MICROPY_HW_MCU_NAME "STM32L476"
diff --git a/stmhal/boards/NUCLEO_F429ZI/mpconfigboard.h b/stmhal/boards/NUCLEO_F429ZI/mpconfigboard.h
index fcbc382a9..42cc9d68c 100644
--- a/stmhal/boards/NUCLEO_F429ZI/mpconfigboard.h
+++ b/stmhal/boards/NUCLEO_F429ZI/mpconfigboard.h
@@ -1,5 +1,3 @@
-#include STM32_HAL_H
-
#define MICROPY_HW_BOARD_NAME "NUCLEO-F429ZI"
#define MICROPY_HW_MCU_NAME "STM32F429"
diff --git a/stmhal/boards/STM32F429DISC/mpconfigboard.h b/stmhal/boards/STM32F429DISC/mpconfigboard.h
index a8e379020..fc0702025 100644
--- a/stmhal/boards/STM32F429DISC/mpconfigboard.h
+++ b/stmhal/boards/STM32F429DISC/mpconfigboard.h
@@ -1,5 +1,3 @@
-#include STM32_HAL_H
-
#define MICROPY_HW_BOARD_NAME "F429I-DISCO"
#define MICROPY_HW_MCU_NAME "STM32F429"
diff --git a/stmhal/boards/STM32L476DISC/mpconfigboard.h b/stmhal/boards/STM32L476DISC/mpconfigboard.h
index 258a86b60..9dbadd530 100644
--- a/stmhal/boards/STM32L476DISC/mpconfigboard.h
+++ b/stmhal/boards/STM32L476DISC/mpconfigboard.h
@@ -1,5 +1,3 @@
-#include STM32_HAL_H
-
#define MICROPY_BOARD_EARLY_INIT STM32L476DISC_board_early_init
void STM32L476DISC_board_early_init(void);
diff --git a/stmhal/dac.c b/stmhal/dac.c
index 1c372f73c..243aa08c3 100644
--- a/stmhal/dac.c
+++ b/stmhal/dac.c
@@ -28,9 +28,6 @@
#include <stdint.h>
#include <string.h>
-#include STM32_HAL_H
-
-#include "py/nlr.h"
#include "py/runtime.h"
#include "timer.h"
#include "dac.h"
diff --git a/stmhal/dma.c b/stmhal/dma.c
index 04c874dc2..e43b67e73 100644
--- a/stmhal/dma.c
+++ b/stmhal/dma.c
@@ -27,10 +27,9 @@
#include <stdio.h>
#include <string.h>
#include <stdint.h>
-#include STM32_HAL_H
-#include "dma.h"
#include "py/obj.h"
+#include "dma.h"
#include "irq.h"
typedef enum {
diff --git a/stmhal/flash.c b/stmhal/flash.c
index 29de8b8da..e374be0e5 100644
--- a/stmhal/flash.c
+++ b/stmhal/flash.c
@@ -24,11 +24,9 @@
* THE SOFTWARE.
*/
-#include STM32_HAL_H
-
-#include "flash.h"
-#include "mpconfigport.h"
+#include "py/mpconfig.h"
#include "py/misc.h"
+#include "flash.h"
typedef struct {
uint32_t base_address;
diff --git a/stmhal/modpyb.c b/stmhal/modpyb.c
index b8da948ab..7322c6a5b 100644
--- a/stmhal/modpyb.c
+++ b/stmhal/modpyb.c
@@ -27,8 +27,6 @@
#include <stdint.h>
#include <stdio.h>
-#include STM32_HAL_H
-
#include "py/mpstate.h"
#include "py/nlr.h"
#include "py/obj.h"
diff --git a/stmhal/modstm.c b/stmhal/modstm.c
index 18882fa47..eabbf08e4 100644
--- a/stmhal/modstm.c
+++ b/stmhal/modstm.c
@@ -27,15 +27,11 @@
#include <stdio.h>
#include <stdint.h>
-#include STM32_HAL_H
-
-#include "py/nlr.h"
#include "py/obj.h"
-#include "extmod/machine_mem.h"
-#include "portmodules.h"
-
#include "py/objint.h"
+#include "extmod/machine_mem.h"
#include "genhdr/modstm_mpz.h"
+#include "portmodules.h"
STATIC const mp_rom_map_elem_t stm_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_stm) },
diff --git a/stmhal/modutime.c b/stmhal/modutime.c
index 97af35c49..58c43a55e 100644
--- a/stmhal/modutime.c
+++ b/stmhal/modutime.c
@@ -26,9 +26,8 @@
#include <stdio.h>
#include <string.h>
-#include STM32_HAL_H
-#include "py/nlr.h"
+#include "py/runtime.h"
#include "py/smallint.h"
#include "py/obj.h"
#include "lib/timeutils/timeutils.h"
diff --git a/stmhal/pendsv.c b/stmhal/pendsv.c
index 200d13a5a..7b3906f25 100644
--- a/stmhal/pendsv.c
+++ b/stmhal/pendsv.c
@@ -25,7 +25,6 @@
*/
#include <stdlib.h>
-#include STM32_HAL_H
#include "py/mpstate.h"
#include "py/runtime.h"
diff --git a/stmhal/rng.c b/stmhal/rng.c
index 2571bc3a0..a5a9874d1 100644
--- a/stmhal/rng.c
+++ b/stmhal/rng.c
@@ -26,8 +26,6 @@
#include <string.h>
-#include STM32_HAL_H
-
#include "py/obj.h"
#include "rng.h"
diff --git a/stmhal/rtc.c b/stmhal/rtc.c
index bc9c889c2..755684570 100644
--- a/stmhal/rtc.c
+++ b/stmhal/rtc.c
@@ -26,12 +26,9 @@
#include <stdio.h>
-#include STM32_HAL_H
-
#include "py/runtime.h"
#include "rtc.h"
#include "irq.h"
-#include "mphalport.h"
/// \moduleref pyb
/// \class RTC - real time clock
diff --git a/stmhal/servo.c b/stmhal/servo.c
index 1f1aa5a2d..6ea6938ad 100644
--- a/stmhal/servo.c
+++ b/stmhal/servo.c
@@ -26,8 +26,6 @@
#include <stdio.h>
-#include STM32_HAL_H
-
#include "py/nlr.h"
#include "py/runtime.h"
#include "timer.h"
diff --git a/stmhal/stm32_it.c b/stmhal/stm32_it.c
index 913f1c931..357b6d79d 100644
--- a/stmhal/stm32_it.c
+++ b/stmhal/stm32_it.c
@@ -67,12 +67,10 @@
#include <stdio.h>
-#include "stm32_it.h"
-#include STM32_HAL_H
-
#include "py/mpstate.h"
#include "py/obj.h"
#include "py/mphal.h"
+#include "stm32_it.h"
#include "pendsv.h"
#include "irq.h"
#include "pybthread.h"
diff --git a/stmhal/system_stm32.c b/stmhal/system_stm32.c
index 266b8a92a..a63bd3c57 100644
--- a/stmhal/system_stm32.c
+++ b/stmhal/system_stm32.c
@@ -87,8 +87,7 @@
* @{
*/
-#include "mpconfigboard.h"
-#include STM32_HAL_H
+#include "py/mphal.h"
void __fatal_error(const char *msg);
diff --git a/stmhal/timer.c b/stmhal/timer.c
index 64d445111..7db15f649 100644
--- a/stmhal/timer.c
+++ b/stmhal/timer.c
@@ -28,11 +28,9 @@
#include <stdio.h>
#include <string.h>
-#include STM32_HAL_H
#include "usbd_cdc_msc_hid.h"
#include "usbd_cdc_interface.h"
-#include "py/nlr.h"
#include "py/runtime.h"
#include "py/gc.h"
#include "timer.h"
diff --git a/stmhal/usbd_conf.c b/stmhal/usbd_conf.c
index 1da987d89..e2bd6c949 100644
--- a/stmhal/usbd_conf.c
+++ b/stmhal/usbd_conf.c
@@ -30,7 +30,6 @@
*/
/* Includes ------------------------------------------------------------------*/
-#include STM32_HAL_H
#include "usbd_core.h"
#include "py/obj.h"
#include "irq.h"
diff --git a/stmhal/usbd_conf.h b/stmhal/usbd_conf.h
index 5415eb10b..b69ba52c2 100644
--- a/stmhal/usbd_conf.h
+++ b/stmhal/usbd_conf.h
@@ -34,7 +34,6 @@
#define __USBD_CONF_H
/* Includes ------------------------------------------------------------------*/
-#include STM32_HAL_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/stmhal/wdt.c b/stmhal/wdt.c
index 272c575ef..2b4967a43 100644
--- a/stmhal/wdt.c
+++ b/stmhal/wdt.c
@@ -26,8 +26,6 @@
#include <stdio.h>
-#include STM32_HAL_H
-
#include "py/runtime.h"
#include "wdt.h"