From f501682759dcd355ca6a619c2a353d9106c7f168 Mon Sep 17 00:00:00 2001 From: funnydog Date: Tue, 15 Nov 2016 19:34:58 +0100 Subject: Fix KINETIS USB_SERIAL testhal compilation. Fix KINETIS USB_SERIAL testhal compilation by renaming the function sduDisconnectI() to sduSuspendHookI(). --- testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/usbcfg.c | 2 +- testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/usbcfg.c | 2 +- testhal/KINETIS/FRDM-KL26Z/USB_SERIAL/usbcfg.c | 2 +- testhal/KINETIS/MCHCK/USB_SERIAL/usbcfg.c | 2 +- testhal/KINETIS/TEENSY3_x/USB_SERIAL/usbcfg.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'testhal/KINETIS') diff --git a/testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/usbcfg.c b/testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/usbcfg.c index 24a732f..96bfdba 100644 --- a/testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/usbcfg.c +++ b/testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/usbcfg.c @@ -284,7 +284,7 @@ static void usb_event(USBDriver *usbp, usbevent_t event) { chSysLockFromISR(); /* Disconnection event on suspend.*/ - sduDisconnectI(&SDU1); + sduSuspendHookI(&SDU1); chSysUnlockFromISR(); return; diff --git a/testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/usbcfg.c b/testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/usbcfg.c index 3093640..fa5b4f4 100644 --- a/testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/usbcfg.c +++ b/testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/usbcfg.c @@ -284,7 +284,7 @@ static void usb_event(USBDriver *usbp, usbevent_t event) { chSysLockFromISR(); /* Disconnection event on suspend.*/ - sduDisconnectI(&SDU1); + sduSuspendHookI(&SDU1); chSysUnlockFromISR(); return; diff --git a/testhal/KINETIS/FRDM-KL26Z/USB_SERIAL/usbcfg.c b/testhal/KINETIS/FRDM-KL26Z/USB_SERIAL/usbcfg.c index 3093640..fa5b4f4 100644 --- a/testhal/KINETIS/FRDM-KL26Z/USB_SERIAL/usbcfg.c +++ b/testhal/KINETIS/FRDM-KL26Z/USB_SERIAL/usbcfg.c @@ -284,7 +284,7 @@ static void usb_event(USBDriver *usbp, usbevent_t event) { chSysLockFromISR(); /* Disconnection event on suspend.*/ - sduDisconnectI(&SDU1); + sduSuspendHookI(&SDU1); chSysUnlockFromISR(); return; diff --git a/testhal/KINETIS/MCHCK/USB_SERIAL/usbcfg.c b/testhal/KINETIS/MCHCK/USB_SERIAL/usbcfg.c index 3093640..fa5b4f4 100644 --- a/testhal/KINETIS/MCHCK/USB_SERIAL/usbcfg.c +++ b/testhal/KINETIS/MCHCK/USB_SERIAL/usbcfg.c @@ -284,7 +284,7 @@ static void usb_event(USBDriver *usbp, usbevent_t event) { chSysLockFromISR(); /* Disconnection event on suspend.*/ - sduDisconnectI(&SDU1); + sduSuspendHookI(&SDU1); chSysUnlockFromISR(); return; diff --git a/testhal/KINETIS/TEENSY3_x/USB_SERIAL/usbcfg.c b/testhal/KINETIS/TEENSY3_x/USB_SERIAL/usbcfg.c index 3093640..fa5b4f4 100644 --- a/testhal/KINETIS/TEENSY3_x/USB_SERIAL/usbcfg.c +++ b/testhal/KINETIS/TEENSY3_x/USB_SERIAL/usbcfg.c @@ -284,7 +284,7 @@ static void usb_event(USBDriver *usbp, usbevent_t event) { chSysLockFromISR(); /* Disconnection event on suspend.*/ - sduDisconnectI(&SDU1); + sduSuspendHookI(&SDU1); chSysUnlockFromISR(); return; -- cgit v1.2.3 From b403f064d4a33c0da1e7c6b258700e1451373db0 Mon Sep 17 00:00:00 2001 From: funnydog Date: Tue, 13 Dec 2016 07:54:25 +0100 Subject: testhal: add missing sduWakeupHookI() call to KINETIS usb_serial demos Add the missing call to sduWakeupHookI() to the USB_EVENT_WAKEUP event, with proper locking around them. --- testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/usbcfg.c | 6 ++++++ testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/usbcfg.c | 6 ++++++ testhal/KINETIS/FRDM-KL26Z/USB_SERIAL/usbcfg.c | 6 ++++++ testhal/KINETIS/MCHCK/USB_SERIAL/usbcfg.c | 6 ++++++ testhal/KINETIS/TEENSY3_x/USB_SERIAL/usbcfg.c | 6 ++++++ 5 files changed, 30 insertions(+) (limited to 'testhal/KINETIS') diff --git a/testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/usbcfg.c b/testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/usbcfg.c index 96bfdba..750f5ca 100644 --- a/testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/usbcfg.c +++ b/testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/usbcfg.c @@ -289,6 +289,12 @@ static void usb_event(USBDriver *usbp, usbevent_t event) { chSysUnlockFromISR(); return; case USB_EVENT_WAKEUP: + chSysLockFromISR(); + + /* Disconnection event on suspend */ + sduWakeupHookI(&SDU1); + + chSysUnlockFromISR(); return; case USB_EVENT_STALLED: return; diff --git a/testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/usbcfg.c b/testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/usbcfg.c index fa5b4f4..557d139 100644 --- a/testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/usbcfg.c +++ b/testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/usbcfg.c @@ -289,6 +289,12 @@ static void usb_event(USBDriver *usbp, usbevent_t event) { chSysUnlockFromISR(); return; case USB_EVENT_WAKEUP: + chSysLockFromISR(); + + /* Disconnection event on suspend */ + sduWakeupHookI(&SDU1); + + chSysUnlockFromISR(); return; case USB_EVENT_STALLED: return; diff --git a/testhal/KINETIS/FRDM-KL26Z/USB_SERIAL/usbcfg.c b/testhal/KINETIS/FRDM-KL26Z/USB_SERIAL/usbcfg.c index fa5b4f4..557d139 100644 --- a/testhal/KINETIS/FRDM-KL26Z/USB_SERIAL/usbcfg.c +++ b/testhal/KINETIS/FRDM-KL26Z/USB_SERIAL/usbcfg.c @@ -289,6 +289,12 @@ static void usb_event(USBDriver *usbp, usbevent_t event) { chSysUnlockFromISR(); return; case USB_EVENT_WAKEUP: + chSysLockFromISR(); + + /* Disconnection event on suspend */ + sduWakeupHookI(&SDU1); + + chSysUnlockFromISR(); return; case USB_EVENT_STALLED: return; diff --git a/testhal/KINETIS/MCHCK/USB_SERIAL/usbcfg.c b/testhal/KINETIS/MCHCK/USB_SERIAL/usbcfg.c index fa5b4f4..557d139 100644 --- a/testhal/KINETIS/MCHCK/USB_SERIAL/usbcfg.c +++ b/testhal/KINETIS/MCHCK/USB_SERIAL/usbcfg.c @@ -289,6 +289,12 @@ static void usb_event(USBDriver *usbp, usbevent_t event) { chSysUnlockFromISR(); return; case USB_EVENT_WAKEUP: + chSysLockFromISR(); + + /* Disconnection event on suspend */ + sduWakeupHookI(&SDU1); + + chSysUnlockFromISR(); return; case USB_EVENT_STALLED: return; diff --git a/testhal/KINETIS/TEENSY3_x/USB_SERIAL/usbcfg.c b/testhal/KINETIS/TEENSY3_x/USB_SERIAL/usbcfg.c index fa5b4f4..557d139 100644 --- a/testhal/KINETIS/TEENSY3_x/USB_SERIAL/usbcfg.c +++ b/testhal/KINETIS/TEENSY3_x/USB_SERIAL/usbcfg.c @@ -289,6 +289,12 @@ static void usb_event(USBDriver *usbp, usbevent_t event) { chSysUnlockFromISR(); return; case USB_EVENT_WAKEUP: + chSysLockFromISR(); + + /* Disconnection event on suspend */ + sduWakeupHookI(&SDU1); + + chSysUnlockFromISR(); return; case USB_EVENT_STALLED: return; -- cgit v1.2.3 From dc478a551138b03c73997d091180cf15eb4afb57 Mon Sep 17 00:00:00 2001 From: funnydog Date: Tue, 13 Dec 2016 08:03:55 +0100 Subject: testhal: handle USB_EVENT_(RESET|UNCONFIGURED) in KINETIS demos Handle the USB_EVENT_RESET and USB_EVENT_UNCONFIGURED as they were USB_EVENT_SUSPEND like in STM32 demos. --- testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/usbcfg.c | 6 ++++-- testhal/KINETIS/FRDM-KL25Z/USB_HID/usbcfg.c | 2 ++ testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/usbcfg.c | 6 ++++-- testhal/KINETIS/FRDM-KL26Z/USB_SERIAL/usbcfg.c | 6 ++++-- testhal/KINETIS/MCHCK/USB_SERIAL/usbcfg.c | 6 ++++-- testhal/KINETIS/TEENSY3_x/USB_SERIAL/usbcfg.c | 6 ++++-- 6 files changed, 22 insertions(+), 10 deletions(-) (limited to 'testhal/KINETIS') diff --git a/testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/usbcfg.c b/testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/usbcfg.c index 750f5ca..5c47795 100644 --- a/testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/usbcfg.c +++ b/testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/usbcfg.c @@ -262,8 +262,6 @@ static void usb_event(USBDriver *usbp, usbevent_t event) { extern SerialUSBDriver SDU1; switch (event) { - case USB_EVENT_RESET: - return; case USB_EVENT_ADDRESS: return; case USB_EVENT_CONFIGURED: @@ -280,6 +278,10 @@ static void usb_event(USBDriver *usbp, usbevent_t event) { chSysUnlockFromISR(); return; + case USB_EVENT_RESET: + /* Falls into. */ + case USB_EVENT_UNCONFIGURED: + /* Falls into. */ case USB_EVENT_SUSPEND: chSysLockFromISR(); diff --git a/testhal/KINETIS/FRDM-KL25Z/USB_HID/usbcfg.c b/testhal/KINETIS/FRDM-KL25Z/USB_HID/usbcfg.c index 30944b5..1f04a4c 100644 --- a/testhal/KINETIS/FRDM-KL25Z/USB_HID/usbcfg.c +++ b/testhal/KINETIS/FRDM-KL25Z/USB_HID/usbcfg.c @@ -315,6 +315,8 @@ static void usb_event(USBDriver *usbp, usbevent_t event) { osalSysUnlockFromISR(); return; + case USB_EVENT_UNCONFIGURED: + return; case USB_EVENT_SUSPEND: return; case USB_EVENT_WAKEUP: diff --git a/testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/usbcfg.c b/testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/usbcfg.c index 557d139..0ec1c62 100644 --- a/testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/usbcfg.c +++ b/testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/usbcfg.c @@ -262,8 +262,6 @@ static void usb_event(USBDriver *usbp, usbevent_t event) { extern SerialUSBDriver SDU1; switch (event) { - case USB_EVENT_RESET: - return; case USB_EVENT_ADDRESS: return; case USB_EVENT_CONFIGURED: @@ -280,6 +278,10 @@ static void usb_event(USBDriver *usbp, usbevent_t event) { chSysUnlockFromISR(); return; + case USB_EVENT_RESET: + /* Falls into. */ + case USB_EVENT_UNCONFIGURED: + /* Falls into. */ case USB_EVENT_SUSPEND: chSysLockFromISR(); diff --git a/testhal/KINETIS/FRDM-KL26Z/USB_SERIAL/usbcfg.c b/testhal/KINETIS/FRDM-KL26Z/USB_SERIAL/usbcfg.c index 557d139..0ec1c62 100644 --- a/testhal/KINETIS/FRDM-KL26Z/USB_SERIAL/usbcfg.c +++ b/testhal/KINETIS/FRDM-KL26Z/USB_SERIAL/usbcfg.c @@ -262,8 +262,6 @@ static void usb_event(USBDriver *usbp, usbevent_t event) { extern SerialUSBDriver SDU1; switch (event) { - case USB_EVENT_RESET: - return; case USB_EVENT_ADDRESS: return; case USB_EVENT_CONFIGURED: @@ -280,6 +278,10 @@ static void usb_event(USBDriver *usbp, usbevent_t event) { chSysUnlockFromISR(); return; + case USB_EVENT_RESET: + /* Falls into. */ + case USB_EVENT_UNCONFIGURED: + /* Falls into. */ case USB_EVENT_SUSPEND: chSysLockFromISR(); diff --git a/testhal/KINETIS/MCHCK/USB_SERIAL/usbcfg.c b/testhal/KINETIS/MCHCK/USB_SERIAL/usbcfg.c index 557d139..0ec1c62 100644 --- a/testhal/KINETIS/MCHCK/USB_SERIAL/usbcfg.c +++ b/testhal/KINETIS/MCHCK/USB_SERIAL/usbcfg.c @@ -262,8 +262,6 @@ static void usb_event(USBDriver *usbp, usbevent_t event) { extern SerialUSBDriver SDU1; switch (event) { - case USB_EVENT_RESET: - return; case USB_EVENT_ADDRESS: return; case USB_EVENT_CONFIGURED: @@ -280,6 +278,10 @@ static void usb_event(USBDriver *usbp, usbevent_t event) { chSysUnlockFromISR(); return; + case USB_EVENT_RESET: + /* Falls into. */ + case USB_EVENT_UNCONFIGURED: + /* Falls into. */ case USB_EVENT_SUSPEND: chSysLockFromISR(); diff --git a/testhal/KINETIS/TEENSY3_x/USB_SERIAL/usbcfg.c b/testhal/KINETIS/TEENSY3_x/USB_SERIAL/usbcfg.c index 557d139..0ec1c62 100644 --- a/testhal/KINETIS/TEENSY3_x/USB_SERIAL/usbcfg.c +++ b/testhal/KINETIS/TEENSY3_x/USB_SERIAL/usbcfg.c @@ -262,8 +262,6 @@ static void usb_event(USBDriver *usbp, usbevent_t event) { extern SerialUSBDriver SDU1; switch (event) { - case USB_EVENT_RESET: - return; case USB_EVENT_ADDRESS: return; case USB_EVENT_CONFIGURED: @@ -280,6 +278,10 @@ static void usb_event(USBDriver *usbp, usbevent_t event) { chSysUnlockFromISR(); return; + case USB_EVENT_RESET: + /* Falls into. */ + case USB_EVENT_UNCONFIGURED: + /* Falls into. */ case USB_EVENT_SUSPEND: chSysLockFromISR(); -- cgit v1.2.3 From f392dfa223310ab3bc17dce73a949d3a80b12b04 Mon Sep 17 00:00:00 2001 From: Fabio Utzig Date: Sat, 7 Oct 2017 16:41:08 -0300 Subject: Add version tags Signed-off-by: Fabio Utzig --- testhal/KINETIS/FRDM-K20D50M/I2C/chconf.h | 1 + testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/chconf.h | 1 + testhal/KINETIS/FRDM-KL25Z/ADC/chconf.h | 1 + testhal/KINETIS/FRDM-KL25Z/GPT/chconf.h | 1 + testhal/KINETIS/FRDM-KL25Z/PWM/chconf.h | 1 + testhal/KINETIS/FRDM-KL25Z/USB_HID/chconf.h | 1 + testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/chconf.h | 1 + testhal/KINETIS/FRDM-KL26Z/I2C/chconf.h | 1 + testhal/KINETIS/FRDM-KL26Z/PWM/chconf.h | 1 + testhal/KINETIS/FRDM-KL26Z/USB_SERIAL/chconf.h | 1 + testhal/KINETIS/KL27Z/BLINK/chconf.h | 1 + testhal/KINETIS/MCHCK/BOOTLOADER/chconf.h | 1 + testhal/KINETIS/MCHCK/PWM/chconf.h | 1 + testhal/KINETIS/MCHCK/USB_SERIAL/chconf.h | 1 + testhal/KINETIS/TEENSY3_x/ADC/chconf.h | 1 + testhal/KINETIS/TEENSY3_x/EEPROM_EMU/chconf.h | 1 + testhal/KINETIS/TEENSY3_x/EXT/chconf.h | 1 + testhal/KINETIS/TEENSY3_x/GPT/chconf.h | 1 + testhal/KINETIS/TEENSY3_x/PWM/chconf.h | 1 + testhal/KINETIS/TEENSY3_x/SERIAL/chconf.h | 1 + testhal/KINETIS/TEENSY3_x/USB_SERIAL/chconf.h | 1 + testhal/KINETIS/TEENSY_LC/BOOTLOADER/chconf.h | 1 + testhal/KINETIS/TEENSY_LC/EEPROM_EMU/chconf.h | 1 + testhal/KINETIS/TEENSY_LC/PWM/chconf.h | 1 + 24 files changed, 24 insertions(+) (limited to 'testhal/KINETIS') diff --git a/testhal/KINETIS/FRDM-K20D50M/I2C/chconf.h b/testhal/KINETIS/FRDM-K20D50M/I2C/chconf.h index eecc0a6..5f05547 100644 --- a/testhal/KINETIS/FRDM-K20D50M/I2C/chconf.h +++ b/testhal/KINETIS/FRDM-K20D50M/I2C/chconf.h @@ -29,6 +29,7 @@ #define _CHCONF_H_ #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_5_0_ /*===========================================================================*/ /** diff --git a/testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/chconf.h b/testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/chconf.h index bd97716..222c5ea 100644 --- a/testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/chconf.h +++ b/testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/chconf.h @@ -29,6 +29,7 @@ #define _CHCONF_H_ #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_5_0_ /*===========================================================================*/ /** diff --git a/testhal/KINETIS/FRDM-KL25Z/ADC/chconf.h b/testhal/KINETIS/FRDM-KL25Z/ADC/chconf.h index eecc0a6..5f05547 100644 --- a/testhal/KINETIS/FRDM-KL25Z/ADC/chconf.h +++ b/testhal/KINETIS/FRDM-KL25Z/ADC/chconf.h @@ -29,6 +29,7 @@ #define _CHCONF_H_ #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_5_0_ /*===========================================================================*/ /** diff --git a/testhal/KINETIS/FRDM-KL25Z/GPT/chconf.h b/testhal/KINETIS/FRDM-KL25Z/GPT/chconf.h index b7ffc80..5d231c8 100644 --- a/testhal/KINETIS/FRDM-KL25Z/GPT/chconf.h +++ b/testhal/KINETIS/FRDM-KL25Z/GPT/chconf.h @@ -27,6 +27,7 @@ #define _CHCONF_H_ #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_5_0_ /*===========================================================================*/ /** diff --git a/testhal/KINETIS/FRDM-KL25Z/PWM/chconf.h b/testhal/KINETIS/FRDM-KL25Z/PWM/chconf.h index 25dd7b8..2a25a25 100644 --- a/testhal/KINETIS/FRDM-KL25Z/PWM/chconf.h +++ b/testhal/KINETIS/FRDM-KL25Z/PWM/chconf.h @@ -27,6 +27,7 @@ #define _CHCONF_H_ #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_5_0_ /*===========================================================================*/ /** diff --git a/testhal/KINETIS/FRDM-KL25Z/USB_HID/chconf.h b/testhal/KINETIS/FRDM-KL25Z/USB_HID/chconf.h index 6774a44..424cf02 100644 --- a/testhal/KINETIS/FRDM-KL25Z/USB_HID/chconf.h +++ b/testhal/KINETIS/FRDM-KL25Z/USB_HID/chconf.h @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_5_0_ /*===========================================================================*/ /** diff --git a/testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/chconf.h b/testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/chconf.h index 7b54de5..e89ec1f 100644 --- a/testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/chconf.h +++ b/testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/chconf.h @@ -27,6 +27,7 @@ #define _CHCONF_H_ #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_5_0_ /*===========================================================================*/ /** diff --git a/testhal/KINETIS/FRDM-KL26Z/I2C/chconf.h b/testhal/KINETIS/FRDM-KL26Z/I2C/chconf.h index eecc0a6..5f05547 100644 --- a/testhal/KINETIS/FRDM-KL26Z/I2C/chconf.h +++ b/testhal/KINETIS/FRDM-KL26Z/I2C/chconf.h @@ -29,6 +29,7 @@ #define _CHCONF_H_ #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_5_0_ /*===========================================================================*/ /** diff --git a/testhal/KINETIS/FRDM-KL26Z/PWM/chconf.h b/testhal/KINETIS/FRDM-KL26Z/PWM/chconf.h index 8c37f87..9f9b3e9 100644 --- a/testhal/KINETIS/FRDM-KL26Z/PWM/chconf.h +++ b/testhal/KINETIS/FRDM-KL26Z/PWM/chconf.h @@ -27,6 +27,7 @@ #define _CHCONF_H_ #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_5_0_ /*===========================================================================*/ /** diff --git a/testhal/KINETIS/FRDM-KL26Z/USB_SERIAL/chconf.h b/testhal/KINETIS/FRDM-KL26Z/USB_SERIAL/chconf.h index c7ed185..9c9a479 100644 --- a/testhal/KINETIS/FRDM-KL26Z/USB_SERIAL/chconf.h +++ b/testhal/KINETIS/FRDM-KL26Z/USB_SERIAL/chconf.h @@ -27,6 +27,7 @@ #define _CHCONF_H_ #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_5_0_ /*===========================================================================*/ /** diff --git a/testhal/KINETIS/KL27Z/BLINK/chconf.h b/testhal/KINETIS/KL27Z/BLINK/chconf.h index 41259a0..49d21ae 100644 --- a/testhal/KINETIS/KL27Z/BLINK/chconf.h +++ b/testhal/KINETIS/KL27Z/BLINK/chconf.h @@ -29,6 +29,7 @@ #define _CHCONF_H_ #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_5_0_ /*===========================================================================*/ /** diff --git a/testhal/KINETIS/MCHCK/BOOTLOADER/chconf.h b/testhal/KINETIS/MCHCK/BOOTLOADER/chconf.h index b2448a9..a185459 100644 --- a/testhal/KINETIS/MCHCK/BOOTLOADER/chconf.h +++ b/testhal/KINETIS/MCHCK/BOOTLOADER/chconf.h @@ -27,6 +27,7 @@ #define _CHCONF_H_ #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_5_0_ /*===========================================================================*/ /** diff --git a/testhal/KINETIS/MCHCK/PWM/chconf.h b/testhal/KINETIS/MCHCK/PWM/chconf.h index 034c6cc..2f2938a 100644 --- a/testhal/KINETIS/MCHCK/PWM/chconf.h +++ b/testhal/KINETIS/MCHCK/PWM/chconf.h @@ -27,6 +27,7 @@ #define _CHCONF_H_ #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_5_0_ /*===========================================================================*/ /** diff --git a/testhal/KINETIS/MCHCK/USB_SERIAL/chconf.h b/testhal/KINETIS/MCHCK/USB_SERIAL/chconf.h index 7371b49..22272b1 100644 --- a/testhal/KINETIS/MCHCK/USB_SERIAL/chconf.h +++ b/testhal/KINETIS/MCHCK/USB_SERIAL/chconf.h @@ -27,6 +27,7 @@ #define _CHCONF_H_ #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_5_0_ /*===========================================================================*/ /** diff --git a/testhal/KINETIS/TEENSY3_x/ADC/chconf.h b/testhal/KINETIS/TEENSY3_x/ADC/chconf.h index caae0c2..029e4ec 100644 --- a/testhal/KINETIS/TEENSY3_x/ADC/chconf.h +++ b/testhal/KINETIS/TEENSY3_x/ADC/chconf.h @@ -27,6 +27,7 @@ #define _CHCONF_H_ #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_5_0_ /*===========================================================================*/ /** diff --git a/testhal/KINETIS/TEENSY3_x/EEPROM_EMU/chconf.h b/testhal/KINETIS/TEENSY3_x/EEPROM_EMU/chconf.h index ea87df8..3bb57de 100644 --- a/testhal/KINETIS/TEENSY3_x/EEPROM_EMU/chconf.h +++ b/testhal/KINETIS/TEENSY3_x/EEPROM_EMU/chconf.h @@ -29,6 +29,7 @@ #define _CHCONF_H_ #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_5_0_ /*===========================================================================*/ /** diff --git a/testhal/KINETIS/TEENSY3_x/EXT/chconf.h b/testhal/KINETIS/TEENSY3_x/EXT/chconf.h index 0389bed..0be6605 100644 --- a/testhal/KINETIS/TEENSY3_x/EXT/chconf.h +++ b/testhal/KINETIS/TEENSY3_x/EXT/chconf.h @@ -27,6 +27,7 @@ #define _CHCONF_H_ #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_5_0_ /*===========================================================================*/ /** diff --git a/testhal/KINETIS/TEENSY3_x/GPT/chconf.h b/testhal/KINETIS/TEENSY3_x/GPT/chconf.h index b2ed194..93ba7b8 100644 --- a/testhal/KINETIS/TEENSY3_x/GPT/chconf.h +++ b/testhal/KINETIS/TEENSY3_x/GPT/chconf.h @@ -27,6 +27,7 @@ #define _CHCONF_H_ #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_5_0_ /*===========================================================================*/ /** diff --git a/testhal/KINETIS/TEENSY3_x/PWM/chconf.h b/testhal/KINETIS/TEENSY3_x/PWM/chconf.h index dda26e1..a661f7e 100644 --- a/testhal/KINETIS/TEENSY3_x/PWM/chconf.h +++ b/testhal/KINETIS/TEENSY3_x/PWM/chconf.h @@ -29,6 +29,7 @@ #define _CHCONF_H_ #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_5_0_ /*===========================================================================*/ /** diff --git a/testhal/KINETIS/TEENSY3_x/SERIAL/chconf.h b/testhal/KINETIS/TEENSY3_x/SERIAL/chconf.h index 95b505a..27ed81c 100644 --- a/testhal/KINETIS/TEENSY3_x/SERIAL/chconf.h +++ b/testhal/KINETIS/TEENSY3_x/SERIAL/chconf.h @@ -27,6 +27,7 @@ #define _CHCONF_H_ #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_5_0_ /*===========================================================================*/ /** diff --git a/testhal/KINETIS/TEENSY3_x/USB_SERIAL/chconf.h b/testhal/KINETIS/TEENSY3_x/USB_SERIAL/chconf.h index 7d9ace3..6dbecb5 100644 --- a/testhal/KINETIS/TEENSY3_x/USB_SERIAL/chconf.h +++ b/testhal/KINETIS/TEENSY3_x/USB_SERIAL/chconf.h @@ -27,6 +27,7 @@ #define _CHCONF_H_ #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_5_0_ /*===========================================================================*/ /** diff --git a/testhal/KINETIS/TEENSY_LC/BOOTLOADER/chconf.h b/testhal/KINETIS/TEENSY_LC/BOOTLOADER/chconf.h index d6a7bf8..f0c238c 100644 --- a/testhal/KINETIS/TEENSY_LC/BOOTLOADER/chconf.h +++ b/testhal/KINETIS/TEENSY_LC/BOOTLOADER/chconf.h @@ -27,6 +27,7 @@ #define _CHCONF_H_ #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_5_0_ /*===========================================================================*/ /** diff --git a/testhal/KINETIS/TEENSY_LC/EEPROM_EMU/chconf.h b/testhal/KINETIS/TEENSY_LC/EEPROM_EMU/chconf.h index 919e2b0..97c98b7 100644 --- a/testhal/KINETIS/TEENSY_LC/EEPROM_EMU/chconf.h +++ b/testhal/KINETIS/TEENSY_LC/EEPROM_EMU/chconf.h @@ -27,6 +27,7 @@ #define _CHCONF_H_ #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_5_0_ /*===========================================================================*/ /** diff --git a/testhal/KINETIS/TEENSY_LC/PWM/chconf.h b/testhal/KINETIS/TEENSY_LC/PWM/chconf.h index b18de54..d910706 100644 --- a/testhal/KINETIS/TEENSY_LC/PWM/chconf.h +++ b/testhal/KINETIS/TEENSY_LC/PWM/chconf.h @@ -27,6 +27,7 @@ #define _CHCONF_H_ #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_5_0_ /*===========================================================================*/ /** -- cgit v1.2.3 From 424c7a2717fb6b2a847cec5c0060e3236f25e97f Mon Sep 17 00:00:00 2001 From: Fabien Poussin Date: Wed, 14 Mar 2018 20:15:13 +0100 Subject: Fixed most testhal examples for STM32, updated configs using script. Fixed deprecated MS2ST calls. --- testhal/KINETIS/TEENSY3_x/ADC/main.c | 6 +++--- testhal/KINETIS/TEENSY3_x/EXT/main.c | 2 +- testhal/KINETIS/TEENSY3_x/SERIAL/main.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'testhal/KINETIS') diff --git a/testhal/KINETIS/TEENSY3_x/ADC/main.c b/testhal/KINETIS/TEENSY3_x/ADC/main.c index 7a2dc3a..09c3921 100644 --- a/testhal/KINETIS/TEENSY3_x/ADC/main.c +++ b/testhal/KINETIS/TEENSY3_x/ADC/main.c @@ -68,11 +68,11 @@ static void adc_end_cb(ADCDriver *adcp, adcsample_t *buffer, size_t n) { chSysLockFromISR(); chVTResetI(&vt); if (temp < 19000) { - chVTSetI(&vt, MS2ST(10), ledoff, NULL); + chVTSetI(&vt, TIME_MS2I(10), ledoff, NULL); } else if (temp > 28000) { - chVTSetI(&vt, MS2ST(20), ledoff, NULL); + chVTSetI(&vt, TIME_MS2I(20), ledoff, NULL); } else { - chVTSetI(&vt, MS2ST(40), ledoff, NULL); + chVTSetI(&vt, TIME_MS2I(40), ledoff, NULL); } chSysUnlockFromISR(); } diff --git a/testhal/KINETIS/TEENSY3_x/EXT/main.c b/testhal/KINETIS/TEENSY3_x/EXT/main.c index 3903897..f46d49c 100644 --- a/testhal/KINETIS/TEENSY3_x/EXT/main.c +++ b/testhal/KINETIS/TEENSY3_x/EXT/main.c @@ -31,7 +31,7 @@ static void extcb1(EXTDriver *extp, expchannel_t channel) { chSysLockFromISR(); chVTResetI(&vt); /* LED set to OFF after 500mS.*/ - chVTSetI(&vt, MS2ST(500), ledoff, NULL); + chVTSetI(&vt, TIME_MS2I(500), ledoff, NULL); chSysUnlockFromISR(); } diff --git a/testhal/KINETIS/TEENSY3_x/SERIAL/main.c b/testhal/KINETIS/TEENSY3_x/SERIAL/main.c index 722a398..66b21e0 100644 --- a/testhal/KINETIS/TEENSY3_x/SERIAL/main.c +++ b/testhal/KINETIS/TEENSY3_x/SERIAL/main.c @@ -26,7 +26,7 @@ static THD_FUNCTION(thSerEcho, arg) while (!chThdShouldTerminateX()) { - chEvtWaitOneTimeout(EVENT_MASK(1), MS2ST(10)); + chEvtWaitOneTimeout(EVENT_MASK(1), TIME_MS2I(10)); flags = chEvtGetAndClearFlags(&elSerData); if (flags & CHN_INPUT_AVAILABLE) { -- cgit v1.2.3