summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-01-23 22:16:15 +0000
committerDamien George <damien.p.george@gmail.com>2014-01-23 22:16:15 +0000
commit3257d3543becc23b045c94e99f814e80d306d235 (patch)
tree13ee08250270ae8aaed0c2e896fb9e177a8fa16f
parent82fd302f1a58768684a8d9770faf6bd2dd7e340d (diff)
downloadmicropython-3257d3543becc23b045c94e99f814e80d306d235.tar.gz
micropython-3257d3543becc23b045c94e99f814e80d306d235.zip
stm: Remove unnecessary #includes; small other changes.
-rw-r--r--stm/Makefile2
-rw-r--r--stm/led.c1
-rw-r--r--stm/main.c1
-rw-r--r--stm/rtc.c1
-rw-r--r--stm/usb.c14
-rw-r--r--stm/usb.h1
-rw-r--r--stm/usrsw.c1
7 files changed, 17 insertions, 4 deletions
diff --git a/stm/Makefile b/stm/Makefile
index f7e5eb6129..ab69109583 100644
--- a/stm/Makefile
+++ b/stm/Makefile
@@ -13,7 +13,7 @@ ECHO = @echo
CMSIS=cmsis
STMSRC=lib
-#STMOTGSRC=lib-otg
+#STMOTGSRC=usbhost
FATFSSRC=fatfs
CC3KSRC=cc3k
DFU=../tools/dfu.py
diff --git a/stm/led.c b/stm/led.c
index e1d19b749c..96fac58e2e 100644
--- a/stm/led.c
+++ b/stm/led.c
@@ -4,7 +4,6 @@
#include "misc.h"
#include "mpconfig.h"
-#include "mpconfigport.h"
#include "qstr.h"
#include "obj.h"
#include "led.h"
diff --git a/stm/main.c b/stm/main.c
index 20d4278264..92c3772d5f 100644
--- a/stm/main.c
+++ b/stm/main.c
@@ -876,6 +876,7 @@ soft_reset:
//pyb_usbh_init();
//rt_store_name(qstr_from_str("u_p"), rt_make_function_n(0, pyb_usbh_process));
//rt_store_name(qstr_from_str("u_c"), rt_make_function_n(0, pyb_usbh_connect));
+ //rt_store_name(qstr_from_str("u_i"), rt_make_function_n(0, pyb_usbh_info));
if (first_soft_reset) {
#if MICROPY_HW_HAS_MMA7660
diff --git a/stm/rtc.c b/stm/rtc.c
index 9adfd3a7ad..2dbb2c0aa1 100644
--- a/stm/rtc.c
+++ b/stm/rtc.c
@@ -3,7 +3,6 @@
#include "misc.h"
#include "mpconfig.h"
-#include "mpconfigport.h"
#include "qstr.h"
#include "obj.h"
#include "rtc.h"
diff --git a/stm/usb.c b/stm/usb.c
index 89cc1df33f..769e6a53aa 100644
--- a/stm/usb.c
+++ b/stm/usb.c
@@ -153,4 +153,18 @@ mp_obj_t pyb_usbh_connect(void) {
return mp_const_none;
}
+mp_obj_t pyb_usbh_info(void) {
+ printf("GOTGCTL:%08x\n", (unsigned int)USB_OTG_dev.regs.GREGS->GOTGCTL);
+ printf("GOTGINT:%08x\n", (unsigned int)USB_OTG_dev.regs.GREGS->GOTGINT);
+ printf("GAHBCFG:%08x\n", (unsigned int)USB_OTG_dev.regs.GREGS->GAHBCFG);
+ printf("GUSBCFG:%08x\n", (unsigned int)USB_OTG_dev.regs.GREGS->GUSBCFG);
+ printf("GRSTCTL:%08x\n", (unsigned int)USB_OTG_dev.regs.GREGS->GRSTCTL);
+ printf("GINTSTS:%08x\n", (unsigned int)USB_OTG_dev.regs.GREGS->GINTSTS);
+ printf("GINTMSK:%08x\n", (unsigned int)USB_OTG_dev.regs.GREGS->GINTMSK);
+ //printf("GRXSTSR:%08x\n", (unsigned int)USB_OTG_dev.regs.GREGS->GRXSTSR);
+ //printf("GRXSTSP:%08x\n", (unsigned int)USB_OTG_dev.regs.GREGS->GRXSTSP);
+ //printf("GRXFSIZ:%08x\n", (unsigned int)USB_OTG_dev.regs.GREGS->GRXFSIZ);
+ return mp_const_none;
+}
+
#endif // USE_HOST_MODE
diff --git a/stm/usb.h b/stm/usb.h
index 1e634c2def..68954af636 100644
--- a/stm/usb.h
+++ b/stm/usb.h
@@ -10,3 +10,4 @@ void usb_hid_send_report(uint8_t *buf); // 4 bytes for mouse: ?, x, y, ?
void pyb_usbh_init(void);
mp_obj_t pyb_usbh_process(void);
mp_obj_t pyb_usbh_connect(void);
+mp_obj_t pyb_usbh_info(void);
diff --git a/stm/usrsw.c b/stm/usrsw.c
index 2aa21eef82..162cecfcf0 100644
--- a/stm/usrsw.c
+++ b/stm/usrsw.c
@@ -6,7 +6,6 @@
#include "misc.h"
#include "mpconfig.h"
-#include "mpconfigport.h"
#include "qstr.h"
#include "obj.h"
#include "usrsw.h"