Commit 3257d354 authored by Damien George's avatar Damien George

stm: Remove unnecessary #includes; small other changes.

parent 82fd302f
......@@ -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"
......
......@@ -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);
......@@ -6,7 +6,6 @@
#include "misc.h"
#include "mpconfig.h"
#include "mpconfigport.h"
#include "qstr.h"
#include "obj.h"
#include "usrsw.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment