summaryrefslogtreecommitdiff
path: root/components/drivers
diff options
context:
space:
mode:
authoraozima <[email protected]>2020-08-14 16:29:11 +0800
committeraozima <[email protected]>2020-08-14 16:29:11 +0800
commit79fd12842beeee5a653ba6f4bc2f08b21be7697a (patch)
tree841402b8580e1820179cc79f47f74bd649d49403 /components/drivers
parent6bf76a375c53c1de3f1a4b1d0f7fc6506833f6dd (diff)
parent5b94c1482e8e63f68ad2437cacf2e60e6737626a (diff)
Merge branch 'master' into gitee_master
Diffstat (limited to 'components/drivers')
-rwxr-xr-xcomponents/drivers/Kconfig10
-rw-r--r--components/drivers/include/drivers/usb_common.h16
-rw-r--r--components/drivers/rtc/rtc.c4
-rw-r--r--components/drivers/usb/usbdevice/class/winusb.c2
4 files changed, 16 insertions, 16 deletions
diff --git a/components/drivers/Kconfig b/components/drivers/Kconfig
index 4ebde15125..457b8751fe 100755
--- a/components/drivers/Kconfig
+++ b/components/drivers/Kconfig
@@ -95,12 +95,12 @@ if RT_USING_I2C
config RT_USING_I2C_BITOPS
bool "Use GPIO to simulate I2C"
default y
-endif
-if RT_USING_I2C_BITOPS
- config RT_I2C_BITOPS_DEBUG
- bool "Use simulate I2C debug message"
- default n
+ if RT_USING_I2C_BITOPS
+ config RT_I2C_BITOPS_DEBUG
+ bool "Use simulate I2C debug message"
+ default n
+ endif
endif
config RT_USING_PIN
diff --git a/components/drivers/include/drivers/usb_common.h b/components/drivers/include/drivers/usb_common.h
index c26d83391e..4d85a85e35 100644
--- a/components/drivers/include/drivers/usb_common.h
+++ b/components/drivers/include/drivers/usb_common.h
@@ -435,15 +435,15 @@ typedef struct usb_os_proerty * usb_os_proerty_t;
// 5 A big-endian 32-bit integer (REG_DWORD_BIG_ENDIAN)
// 6 A NULL-terminated Unicode string that contains a symbolic link (REG_LINK)
// 7 Multiple NULL-terminated Unicode strings (REG_MULTI_SZ)
-#define USB_OS_PROERTY_TYPE_REG_SZ 0x01UL
-#define USB_OS_PROERTY_TYPE_REG_EXPAND_SZ 0x02UL
-#define USB_OS_PROERTY_TYPE_REG_BINARY 0x03UL
-#define USB_OS_PROERTY_TYPE_REG_DWORD_LITTLE_ENDIAN 0x04UL
-#define USB_OS_PROERTY_TYPE_REG_DWORD_BIG_ENDIAN 0x05UL
-#define USB_OS_PROERTY_TYPE_REG_LINK 0x06UL
-#define USB_OS_PROERTY_TYPE_REG_MULTI_SZ 0x07UL
+#define USB_OS_PROPERTY_TYPE_REG_SZ 0x01UL
+#define USB_OS_PROPERTY_TYPE_REG_EXPAND_SZ 0x02UL
+#define USB_OS_PROPERTY_TYPE_REG_BINARY 0x03UL
+#define USB_OS_PROPERTY_TYPE_REG_DWORD_LITTLE_ENDIAN 0x04UL
+#define USB_OS_PROPERTY_TYPE_REG_DWORD_BIG_ENDIAN 0x05UL
+#define USB_OS_PROPERTY_TYPE_REG_LINK 0x06UL
+#define USB_OS_PROPERTY_TYPE_REG_MULTI_SZ 0x07UL
-#define USB_OS_PROERTY_DESC(PropertyDataType,PropertyName,PropertyData) \
+#define USB_OS_PROPERTY_DESC(PropertyDataType,PropertyName,PropertyData) \
{\
.dwSize = sizeof(struct usb_os_proerty)-sizeof(const char *)*2\
+sizeof(PropertyName)*2+sizeof(PropertyData)*2,\
diff --git a/components/drivers/rtc/rtc.c b/components/drivers/rtc/rtc.c
index e17c0fe7dd..682515ce98 100644
--- a/components/drivers/rtc/rtc.c
+++ b/components/drivers/rtc/rtc.c
@@ -179,7 +179,7 @@ void list_date(void)
time_t now;
now = time(RT_NULL);
- rt_kprintf("%s\n", ctime(&now));
+ rt_kprintf("%.*s\n", 25, ctime(&now));
}
FINSH_FUNCTION_EXPORT(list_date, show date and time.)
@@ -194,7 +194,7 @@ static void date(uint8_t argc, char **argv)
time_t now;
/* output current time */
now = time(RT_NULL);
- rt_kprintf("%s", ctime(&now));
+ rt_kprintf("%.*s", 25, ctime(&now));
}
else if (argc >= 7)
{
diff --git a/components/drivers/usb/usbdevice/class/winusb.c b/components/drivers/usb/usbdevice/class/winusb.c
index bf4b353d73..729e39f663 100644
--- a/components/drivers/usb/usbdevice/class/winusb.c
+++ b/components/drivers/usb/usbdevice/class/winusb.c
@@ -121,7 +121,7 @@ const static char* _ustring[] =
ALIGN(4)
struct usb_os_proerty winusb_proerty[] =
{
- USB_OS_PROERTY_DESC(USB_OS_PROERTY_TYPE_REG_SZ,"DeviceInterfaceGUID",RT_WINUSB_GUID),
+ USB_OS_PROPERTY_DESC(USB_OS_PROPERTY_TYPE_REG_SZ,"DeviceInterfaceGUID",RT_WINUSB_GUID),
};
ALIGN(4)