aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32
diff options
context:
space:
mode:
authorUladzimir Pylinski <barthess@yandex.ru>2016-11-10 20:38:24 +0300
committerGitHub <noreply@github.com>2016-11-10 20:38:24 +0300
commita9bd529ab54f0e74f73cf08cbb96752274e28d2c (patch)
tree4059c8d865832e8ce5a10bc391c3a8e1204fae9e /os/hal/ports/STM32
parent8f00b3af4d9ce8d711f07551d77d0d923c615b19 (diff)
parentff515eec71d277d8beac2a0a608990508ce83ff1 (diff)
downloadChibiOS-Contrib-a9bd529ab54f0e74f73cf08cbb96752274e28d2c.tar.gz
ChibiOS-Contrib-a9bd529ab54f0e74f73cf08cbb96752274e28d2c.tar.bz2
ChibiOS-Contrib-a9bd529ab54f0e74f73cf08cbb96752274e28d2c.zip
Merge pull request #99 from pl4nkton/stm32_fixes
Stm32 fixes
Diffstat (limited to 'os/hal/ports/STM32')
-rw-r--r--os/hal/ports/STM32/LLD/FSMCv1/hal_fsmc.h3
-rw-r--r--os/hal/ports/STM32/LLD/TIMv1/hal_qei_lld.c16
2 files changed, 11 insertions, 8 deletions
diff --git a/os/hal/ports/STM32/LLD/FSMCv1/hal_fsmc.h b/os/hal/ports/STM32/LLD/FSMCv1/hal_fsmc.h
index f0d4c65..f4837f5 100644
--- a/os/hal/ports/STM32/LLD/FSMCv1/hal_fsmc.h
+++ b/os/hal/ports/STM32/LLD/FSMCv1/hal_fsmc.h
@@ -230,6 +230,9 @@ typedef struct {
defined(STM32F7))
#define FSMC_BCR_CCLKEN ((uint32_t)1 << 20)
#endif
+#if (defined(STM32F7))
+#define FSMC_BCR_WFDIS ((uint32_t)1 << 21)
+#endif
/*===========================================================================*/
/* Driver pre-compile time settings. */
diff --git a/os/hal/ports/STM32/LLD/TIMv1/hal_qei_lld.c b/os/hal/ports/STM32/LLD/TIMv1/hal_qei_lld.c
index ffc4992..6138481 100644
--- a/os/hal/ports/STM32/LLD/TIMv1/hal_qei_lld.c
+++ b/os/hal/ports/STM32/LLD/TIMv1/hal_qei_lld.c
@@ -194,24 +194,24 @@ void qei_lld_start(QEIDriver *qeip) {
#endif
}
/* Timer configuration.*/
- qeip->tim->CR1 = 0; /* Initially stopped. */
+ qeip->tim->CR1 = 0; /* Initially stopped. */
qeip->tim->CR2 = 0;
qeip->tim->PSC = 0;
qeip->tim->DIER = 0;
- qeip->tim->ARR = 0xFFFF;
+ qeip->tim->ARR = 0xFFFF;
/* Set Capture Compare 1 and Capture Compare 2 as input. */
qeip->tim->CCMR1 |= TIM_CCMR1_CC1S_0 | TIM_CCMR1_CC2S_0;
if (qeip->config->mode == QEI_MODE_QUADRATURE) {
if (qeip->config->resolution == QEI_BOTH_EDGES)
- qeip->tim->SMCR = TIM_SMCR_SMS_1 | TIM_SMCR_SMS_0;
+ qeip->tim->SMCR = TIM_SMCR_SMS_1 | TIM_SMCR_SMS_0;
else
- qeip->tim->SMCR = TIM_SMCR_SMS_0;
+ qeip->tim->SMCR = TIM_SMCR_SMS_0;
} else {
/* Direction/Clock mode.
* Direction input on TI1, Clock input on TI2. */
- qeip->tim->SMCR = TIM_SMCR_SMS_0;
+ qeip->tim->SMCR = TIM_SMCR_SMS_0;
}
if (qeip->config->dirinv == QEI_DIRINV_TRUE)
@@ -230,7 +230,7 @@ void qei_lld_start(QEIDriver *qeip) {
void qei_lld_stop(QEIDriver *qeip) {
if (qeip->state == QEI_READY) {
- qeip->tim->CR1 = 0; /* Timer disabled. */
+ qeip->tim->CR1 = 0; /* Timer disabled. */
/* Clock deactivation.*/
#if STM32_QEI_USE_TIM1
@@ -275,7 +275,7 @@ void qei_lld_stop(QEIDriver *qeip) {
*/
void qei_lld_enable(QEIDriver *qeip) {
- qeip->tim->CR1 = TIM_CR1_CEN; /* Timer enabled. */
+ qeip->tim->CR1 = TIM_CR1_CEN; /* Timer enabled. */
}
/**
@@ -287,7 +287,7 @@ void qei_lld_enable(QEIDriver *qeip) {
*/
void qei_lld_disable(QEIDriver *qeip) {
- qeip->tim->CR1 = 0; /* Timer disabled. */
+ qeip->tim->CR1 = 0; /* Timer disabled. */
}
#endif /* HAL_USE_QEI */