From c4519da48a02bebfde897e3227ae40b600fa1cb0 Mon Sep 17 00:00:00 2001 From: Jakub Kaderka Date: Tue, 16 Oct 2018 20:25:29 +0200 Subject: Added setting qei to value for stm32 --- os/hal/include/hal_qei.h | 1 + os/hal/ports/STM32/LLD/TIMv1/hal_qei_lld.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'os') diff --git a/os/hal/include/hal_qei.h b/os/hal/include/hal_qei.h index 15f24ce..de41b97 100644 --- a/os/hal/include/hal_qei.h +++ b/os/hal/include/hal_qei.h @@ -145,6 +145,7 @@ extern "C" { void qeiEnable(QEIDriver *qeip); void qeiDisable(QEIDriver *qeip); qeicnt_t qeiGetCount(QEIDriver *qeip); + void qeiSetCount(QEIDriver *qeip, qeicnt_t value); qeidelta_t qeiUpdate(QEIDriver *qeip); qeidelta_t qeiUpdateI(QEIDriver *qeip); qeidelta_t qeiAdjustI(QEIDriver *qeip, qeidelta_t delta); diff --git a/os/hal/ports/STM32/LLD/TIMv1/hal_qei_lld.h b/os/hal/ports/STM32/LLD/TIMv1/hal_qei_lld.h index 73468f5..a9bdaf4 100644 --- a/os/hal/ports/STM32/LLD/TIMv1/hal_qei_lld.h +++ b/os/hal/ports/STM32/LLD/TIMv1/hal_qei_lld.h @@ -415,7 +415,7 @@ struct QEIDriver { * * @notapi */ -#define qei_lld_set_count(qeip, value) +#define qei_lld_set_count(qeip, value) ((qeip)->tim->CNT = (value)) /*===========================================================================*/ /* External declarations. */ -- cgit v1.2.3