aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorMichael Walker <walkerstop@gmail.com>2018-05-01 00:37:57 -0700
committerMichael Walker <walkerstop@gmail.com>2018-05-01 00:37:57 -0700
commitc7e025866649804a298f16ae26bb5d9dabc31476 (patch)
tree290123b8ca43042080d89c24b98dac9729ea53af /os
parentb0a75810674d430ca104edda24800ff11073fdcb (diff)
parent4e9f077fb10255dced1da4d5d2ad9f8ae41442a2 (diff)
downloadChibiOS-Contrib-c7e025866649804a298f16ae26bb5d9dabc31476.tar.gz
ChibiOS-Contrib-c7e025866649804a298f16ae26bb5d9dabc31476.tar.bz2
ChibiOS-Contrib-c7e025866649804a298f16ae26bb5d9dabc31476.zip
Merge branch 'master' into mike
Diffstat (limited to 'os')
-rw-r--r--os/common/startup/ARMCMx/compilers/GCC/mk/startup_k20x.mk1
-rw-r--r--os/common/startup/ARMCMx/compilers/GCC/mk/startup_kl2x.mk1
-rw-r--r--os/common/startup/ARMCMx/compilers/GCC/mk/startup_nrf51.mk3
-rw-r--r--os/common/startup/ARMCMx/compilers/GCC/mk/startup_tm4c123x.mk3
-rw-r--r--os/common/startup/ARMCMx/compilers/GCC/mk/startup_tm4c129x.mk3
-rw-r--r--os/hal/ports/KINETIS/LLD/hal_pal_lld.h5
-rw-r--r--os/hal/ports/KINETIS/LLD/hal_usb_lld.h23
7 files changed, 36 insertions, 3 deletions
diff --git a/os/common/startup/ARMCMx/compilers/GCC/mk/startup_k20x.mk b/os/common/startup/ARMCMx/compilers/GCC/mk/startup_k20x.mk
index 0c2ec7d..f474d19 100644
--- a/os/common/startup/ARMCMx/compilers/GCC/mk/startup_k20x.mk
+++ b/os/common/startup/ARMCMx/compilers/GCC/mk/startup_k20x.mk
@@ -7,6 +7,7 @@ STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v7m.S
STARTUPINC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC \
$(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/devices/K20x \
$(CHIBIOS)/os/common/ext/CMSIS/include \
+ $(CHIBIOS)/os/common/ext/ARM/CMSIS/Core/Include \
$(CHIBIOS_CONTRIB)/os/common/ext/CMSIS/KINETIS
STARTUPLD = $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/compilers/GCC/ld
diff --git a/os/common/startup/ARMCMx/compilers/GCC/mk/startup_kl2x.mk b/os/common/startup/ARMCMx/compilers/GCC/mk/startup_kl2x.mk
index ca67f10..0c9d329 100644
--- a/os/common/startup/ARMCMx/compilers/GCC/mk/startup_kl2x.mk
+++ b/os/common/startup/ARMCMx/compilers/GCC/mk/startup_kl2x.mk
@@ -7,6 +7,7 @@ STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v6m.S
STARTUPINC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC \
$(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/devices/KL2x \
$(CHIBIOS)/os/common/ext/CMSIS/include \
+ $(CHIBIOS)/os/common/ext/ARM/CMSIS/Core/Include \
$(CHIBIOS_CONTRIB)/os/common/ext/CMSIS/KINETIS
STARTUPLD = $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/compilers/GCC/ld
diff --git a/os/common/startup/ARMCMx/compilers/GCC/mk/startup_nrf51.mk b/os/common/startup/ARMCMx/compilers/GCC/mk/startup_nrf51.mk
index f005ce0..8ec318f 100644
--- a/os/common/startup/ARMCMx/compilers/GCC/mk/startup_nrf51.mk
+++ b/os/common/startup/ARMCMx/compilers/GCC/mk/startup_nrf51.mk
@@ -5,6 +5,7 @@ STARTUPSRC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt1.c \
STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v6m.S
STARTUPINC = $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/devices/NRF51822 \
- $(CHIBIOS)/os/common/ext/CMSIS/include
+ $(CHIBIOS)/os/common/ext/CMSIS/include \
+ $(CHIBIOS)/os/common/ext/ARM/CMSIS/Core/Include
STARTUPLD = $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/compilers/GCC/ld
diff --git a/os/common/startup/ARMCMx/compilers/GCC/mk/startup_tm4c123x.mk b/os/common/startup/ARMCMx/compilers/GCC/mk/startup_tm4c123x.mk
index e9c97e5..8457328 100644
--- a/os/common/startup/ARMCMx/compilers/GCC/mk/startup_tm4c123x.mk
+++ b/os/common/startup/ARMCMx/compilers/GCC/mk/startup_tm4c123x.mk
@@ -6,6 +6,7 @@ STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v7m.S
STARTUPINC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC \
$(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/devices/TM4C123x \
- $(CHIBIOS)/os/common/ext/CMSIS/include
+ $(CHIBIOS)/os/common/ext/CMSIS/include \
+ $(CHIBIOS)/os/common/ext/ARM/CMSIS/Core/Include
STARTUPLD = $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/compilers/GCC/ld
diff --git a/os/common/startup/ARMCMx/compilers/GCC/mk/startup_tm4c129x.mk b/os/common/startup/ARMCMx/compilers/GCC/mk/startup_tm4c129x.mk
index e151434..e488537 100644
--- a/os/common/startup/ARMCMx/compilers/GCC/mk/startup_tm4c129x.mk
+++ b/os/common/startup/ARMCMx/compilers/GCC/mk/startup_tm4c129x.mk
@@ -6,6 +6,7 @@ STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v7m.S
STARTUPINC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC \
$(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/devices/TM4C129x \
- $(CHIBIOS)/os/common/ext/CMSIS/include
+ $(CHIBIOS)/os/common/ext/CMSIS/include \
+ $(CHIBIOS)/os/common/ext/ARM/CMSIS/Core/Include
STARTUPLD = $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/compilers/GCC/ld
diff --git a/os/hal/ports/KINETIS/LLD/hal_pal_lld.h b/os/hal/ports/KINETIS/LLD/hal_pal_lld.h
index 833d95e..6129f69 100644
--- a/os/hal/ports/KINETIS/LLD/hal_pal_lld.h
+++ b/os/hal/ports/KINETIS/LLD/hal_pal_lld.h
@@ -83,6 +83,11 @@ typedef uint32_t ioline_t;
typedef GPIO_TypeDef *ioportid_t;
/**
+ * @brief Type of an pad identifier.
+ */
+typedef uint32_t iopadid_t;
+
+/**
* @brief Port Configuration.
* @details This structure stores the configuration parameters of all pads
* belonging to a port.
diff --git a/os/hal/ports/KINETIS/LLD/hal_usb_lld.h b/os/hal/ports/KINETIS/LLD/hal_usb_lld.h
index 593ef16..615d10d 100644
--- a/os/hal/ports/KINETIS/LLD/hal_usb_lld.h
+++ b/os/hal/ports/KINETIS/LLD/hal_usb_lld.h
@@ -326,6 +326,10 @@ struct USBDriver {
* @brief Current USB device configuration.
*/
uint8_t configuration;
+ /**
+ * @brief State of the driver when a suspend happened.
+ */
+ usbstate_t saved_state;
#if defined(USB_DRIVER_EXT_FIELDS)
USB_DRIVER_EXT_FIELDS
#endif
@@ -341,6 +345,25 @@ struct USBDriver {
/*===========================================================================*/
/**
+ * @brief Host wake-up procedure duration.
+ */
+#if !defined(USB_HOST_WAKEUP_DURATION) || defined(__DOXYGEN__)
+#define USB_HOST_WAKEUP_DURATION 2
+#endif
+
+/**
+ * @brief Start of host wake-up procedure.
+ *
+ * @notapi
+ */
+#define usb_lld_wakeup_host(usbp) \
+ do{ \
+ USB0->CTL |= USBx_CTL_RESUME; \
+ osalThreadSleepMilliseconds(USB_HOST_WAKEUP_DURATION); \
+ USB0->CTL &= ~USBx_CTL_RESUME; \
+ } while (false)
+
+/**
* @brief Returns the current frame number.
*
* @param[in] usbp pointer to the @p USBDriver object