Skip to content

Instantly share code, notes, and snippets.

View kuldeepdhaka's full-sized avatar
🏠
Moved to http://gitlab.com/kuldeepdhaka/

Kuldeep Singh Dhaka kuldeepdhaka

🏠
Moved to http://gitlab.com/kuldeepdhaka/
View GitHub Profile
diff --git a/lib/usb/usb_f107.c b/lib/usb/usb_f107.c
index fb8ddf5..af98ddc 100644
--- a/lib/usb/usb_f107.c
+++ b/lib/usb/usb_f107.c
@@ -55,8 +55,14 @@ static usbd_device *stm32f107_usbd_init(void)
OTG_FS_GINTSTS = OTG_GINTSTS_MMIS;
OTG_FS_GUSBCFG |= OTG_GUSBCFG_PHYSEL;
- /* Enable VBUS sensing in device mode and power down the PHY. */
- OTG_FS_GCCFG |= OTG_GCCFG_VBUSBSEN | OTG_GCCFG_PWRDWN;
diff --git a/lib/usbd/backend/usbd_dwc_otg.c b/lib/usbd/backend/usbd_dwc_otg.c
index abd4a8f..3a8ec9c 100644
--- a/lib/usbd/backend/usbd_dwc_otg.c
+++ b/lib/usbd/backend/usbd_dwc_otg.c
@@ -44,8 +44,14 @@ void dwc_otg_init(usbd_device *usbd_dev)
REBASE(DWC_OTG_GINTSTS) = DWC_OTG_GINTSTS_MMIS;
REBASE(DWC_OTG_GUSBCFG) |= DWC_OTG_GUSBCFG_PHYSEL;
- /* Enable VBUS sensing in device mode and power down the PHY. */
- REBASE(DWC_OTG_GCCFG) |= DWC_OTG_GCCFG_VBUSBSEN | DWC_OTG_GCCFG_PWRDWN;
diff --git a/kernel/drivers/devusb_cdc_ecm.c b/kernel/drivers/devusb_cdc_ecm.c
index 3f274ff..d193175 100644
--- a/kernel/drivers/devusb_cdc_ecm.c
+++ b/kernel/drivers/devusb_cdc_ecm.c
@@ -34,22 +34,6 @@ struct pico_dev_usbeth {
};
static struct pico_dev_usbeth *pico_usbeth = NULL;
-static const struct usb_device_descriptor cdc_ecm_dev = {
- .bLength = USB_DT_DEVICE_SIZE,
@kuldeepdhaka
kuldeepdhaka / how-to-use
Last active January 6, 2016 09:19
uC-def-dsl
python uc-def.py test-input test-output
@kuldeepdhaka
kuldeepdhaka / Bare_Mounting_Hole_M3.kicad_mod
Last active September 30, 2015 06:27
Mounting hole like Raspberry Pi. No mask and copper on screw head. (Note: this is for M3, Rpi has use M2.5) [vary "(size 3.5 3.5) (drill 3.5)" and "(solder_mask_margin 1.75) (clearance 1.75)" for your need]
(module Bare_Mounting_Hole_M3 (layer F.Cu) (tedit 0)
(fp_text reference REF** (at -0.0254 0.7874) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value Bare_Mounting_Hole_M3 (at 0 -0.75) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(pad 1 np_thru_hole circle (at 0 0) (size 3.5 3.5) (drill 3.5)
(layers *.Cu *.Mask) (solder_mask_margin 1.75) (clearance 1.75))
)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(QRearrangeableLayout)
FIND_PACKAGE(Qt4 REQUIRED)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})
SET(qrearrangeablelayout_SOURCES QRearrangeableLayout.cpp)
SET(qrearrangeablelayout_HEADERS QRearrangeableLayout.h)
QT4_WRAP_CPP(qrearrangeablelayout_HEADERS_MOC ${qrearrangeablelayout_HEADERS})