stm: Remove unnecessary #includes; small other changes.

This commit is contained in:
Damien George 2014-01-23 22:16:15 +00:00
parent 82fd302f1a
commit 3257d3543b
7 changed files with 17 additions and 4 deletions

View File

@ -13,7 +13,7 @@ ECHO = @echo
CMSIS=cmsis
STMSRC=lib
#STMOTGSRC=lib-otg
#STMOTGSRC=usbhost
FATFSSRC=fatfs
CC3KSRC=cc3k
DFU=../tools/dfu.py

View File

@ -4,7 +4,6 @@
#include "misc.h"
#include "mpconfig.h"
#include "mpconfigport.h"
#include "qstr.h"
#include "obj.h"
#include "led.h"

View File

@ -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

View File

@ -3,7 +3,6 @@
#include "misc.h"
#include "mpconfig.h"
#include "mpconfigport.h"
#include "qstr.h"
#include "obj.h"
#include "rtc.h"

View File

@ -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

View File

@ -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);

View File

@ -6,7 +6,6 @@
#include "misc.h"
#include "mpconfig.h"
#include "mpconfigport.h"
#include "qstr.h"
#include "obj.h"
#include "usrsw.h"