diff options
author | Damien George <damien.p.george@gmail.com> | 2014-01-23 22:16:15 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-01-23 22:16:15 +0000 |
commit | 3257d3543becc23b045c94e99f814e80d306d235 (patch) | |
tree | 13ee08250270ae8aaed0c2e896fb9e177a8fa16f | |
parent | 82fd302f1a58768684a8d9770faf6bd2dd7e340d (diff) | |
download | micropython-3257d3543becc23b045c94e99f814e80d306d235.tar.gz micropython-3257d3543becc23b045c94e99f814e80d306d235.zip |
stm: Remove unnecessary #includes; small other changes.
-rw-r--r-- | stm/Makefile | 2 | ||||
-rw-r--r-- | stm/led.c | 1 | ||||
-rw-r--r-- | stm/main.c | 1 | ||||
-rw-r--r-- | stm/rtc.c | 1 | ||||
-rw-r--r-- | stm/usb.c | 14 | ||||
-rw-r--r-- | stm/usb.h | 1 | ||||
-rw-r--r-- | stm/usrsw.c | 1 |
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 @@ -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 @@ -3,7 +3,6 @@ #include "misc.h" #include "mpconfig.h" -#include "mpconfigport.h" #include "qstr.h" #include "obj.h" #include "rtc.h" @@ -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 @@ -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" |