diff options
author | Damien George <damien.p.george@gmail.com> | 2014-03-22 18:34:16 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-03-22 18:34:16 +0000 |
commit | 0119fc7532c573bd596fb6173b4d36ef5260027a (patch) | |
tree | 34b58be58b793d55b8c08ddd36608bef9b4823f7 /stmhal/stm32f4xx_hal_msp.c | |
parent | 626f6b813375a2a67d110cf8f240fe829d5887e4 (diff) | |
download | micropython-0119fc7532c573bd596fb6173b4d36ef5260027a.tar.gz micropython-0119fc7532c573bd596fb6173b4d36ef5260027a.zip |
stmhal: Servo driver can move at a given speed.
Diffstat (limited to 'stmhal/stm32f4xx_hal_msp.c')
-rw-r--r-- | stmhal/stm32f4xx_hal_msp.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/stmhal/stm32f4xx_hal_msp.c b/stmhal/stm32f4xx_hal_msp.c index 816b1427e9..c64f377959 100644 --- a/stmhal/stm32f4xx_hal_msp.c +++ b/stmhal/stm32f4xx_hal_msp.c @@ -50,6 +50,12 @@ #include "usbd_cdc_msc.h"
#include "usbd_cdc_interface.h"
+#include "misc.h"
+#include "mpconfig.h"
+#include "qstr.h"
+#include "obj.h"
+#include "servo.h"
+
/** @addtogroup STM32F4xx_HAL_Driver
* @{
*/
@@ -155,6 +161,14 @@ void HAL_RTC_MspDeInit(RTC_HandleTypeDef *hrtc) __HAL_RCC_RTC_DISABLE();
}
+void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) {
+ if (htim == &USBD_CDC_TIM3_Handle) {
+ USBD_CDC_HAL_TIM_PeriodElapsedCallback();
+ } else if (htim == &servo_TIM2_Handle) {
+ servo_timer_irq_callback();
+ }
+}
+
/**
* @}
*/
|