commit 732a4657e2ba4a3bd5b4244e06cfbae9bb2a3e56
Author: Thomas Schöpping <tschoepp@cit-ec.uni-bielefeld.de>
Date:   Mon Feb 25 13:42:39 2019 +0100

    ChibiOS updated to version stable_19.1.x.
    NOTE: ChibiOS 19.1.x seems to contain some issues as of now.

diff --git a/kernel/patches/QEI-driver.patch b/kernel/patches/QEI-driver.patch
index 91fcfe6..8ca8292 100644
--- a/kernel/patches/QEI-driver.patch
+++ b/kernel/patches/QEI-driver.patch
@@ -1,30 +1,28 @@
 diff --git a/os/hal/hal.mk b/os/hal/hal.mk
-index f177a3f..64d96d9 100644
 --- a/os/hal/hal.mk
 +++ b/os/hal/hal.mk
-@@ -41,6 +41,9 @@ endif
- ifneq ($(findstring HAL_USE_ICU TRUE,$(HALCONF)),)
- HALSRC += $(CHIBIOS)/os/hal/src/hal_icu.c
+@@ -54,6 +54,9 @@ endif
+ ifneq ($(findstring HAL_USE_PWM TRUE,$(HALCONF)),)
+ HALSRC += $(CHIBIOS)/os/hal/src/hal_pwm.c
  endif
 +ifneq ($(findstring HAL_USE_QEI TRUE,$(HALCONF)),)
 +HALSRC += $(CHIBIOS)/os/hal/src/hal_qei.c
 +endif
- ifneq ($(findstring HAL_USE_MAC TRUE,$(HALCONF)),)
- HALSRC += $(CHIBIOS)/os/hal/src/hal_mac.c
+ ifneq ($(findstring HAL_USE_RTC TRUE,$(HALCONF)),)
+ HALSRC += $(CHIBIOS)/os/hal/src/hal_rtc.c
  endif
-@@ -94,6 +97,7 @@ HALSRC = $(CHIBIOS)/os/hal/src/hal.c \
-          $(CHIBIOS)/os/hal/src/hal_i2c.c \
-          $(CHIBIOS)/os/hal/src/hal_i2s.c \
-          $(CHIBIOS)/os/hal/src/hal_icu.c \
-+         $(CHIBIOS)/os/hal/src/hal_qei.c \
-          $(CHIBIOS)/os/hal/src/hal_mac.c \
+@@ -104,6 +107,7 @@ HALSRC = $(CHIBIOS)/os/hal/src/hal.c \
           $(CHIBIOS)/os/hal/src/hal_mmc_spi.c \
           $(CHIBIOS)/os/hal/src/hal_pal.c \
+          $(CHIBIOS)/os/hal/src/hal_pwm.c \
++         $(CHIBIOS)/os/hal/src/hal_qei.c \
+          $(CHIBIOS)/os/hal/src/hal_rtc.c \
+          $(CHIBIOS)/os/hal/src/hal_sdc.c \
+          $(CHIBIOS)/os/hal/src/hal_serial.c \
 diff --git a/os/hal/include/hal.h b/os/hal/include/hal.h
-index 79f7c42..8cf221f 100644
 --- a/os/hal/include/hal.h
 +++ b/os/hal/include/hal.h
-@@ -78,6 +78,10 @@
+@@ -74,6 +74,10 @@
  #define HAL_USE_PWM                         FALSE
  #endif
  
@@ -32,26 +30,25 @@ index 79f7c42..8cf221f 100644
 +#define HAL_USE_QEI                         FALSE
 +#endif
 +
- #if !defined(HAL_USE_QSPI)
- #define HAL_USE_QSPI                        FALSE
+ #if !defined(HAL_USE_RTC)
+ #define HAL_USE_RTC                         FALSE
  #endif
-@@ -138,6 +142,7 @@
+@@ -142,6 +146,7 @@
  #include "hal_icu.h"
  #include "hal_mac.h"
  #include "hal_pwm.h"
 +#include "hal_qei.h"
- #include "hal_qspi.h"
  #include "hal_rtc.h"
  #include "hal_serial.h"
+ #include "hal_sdc.h"
 diff --git a/os/hal/include/hal_qei.h b/os/hal/include/hal_qei.h
 new file mode 100644
-index 0000000..8769729
 --- /dev/null
 +++ b/os/hal/include/hal_qei.h
 @@ -0,0 +1,148 @@
 +/*
 +AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
-+Copyright (C) 2016..2018  Thomas Schöpping et al.
++Copyright (C) 2016..2019  Thomas Schöpping et al.
 +
 +This program is free software: you can redistribute it and/or modify
 +it under the terms of the GNU General Public License as published by
@@ -192,13 +189,12 @@ index 0000000..8769729
 +}
 +#endif
 +
-+#endif /* HAL_USE_QEI */
++#endif /* HAL_USE_QEI == TRUE */
 +
 +#endif /* HAL_QEI_H */
 +
 +/** @} */
 diff --git a/os/hal/ports/STM32/LLD/TIMv1/driver.mk b/os/hal/ports/STM32/LLD/TIMv1/driver.mk
-index 032d75a..13e3571 100644
 --- a/os/hal/ports/STM32/LLD/TIMv1/driver.mk
 +++ b/os/hal/ports/STM32/LLD/TIMv1/driver.mk
 @@ -10,10 +10,14 @@ endif
@@ -218,13 +214,12 @@ index 032d75a..13e3571 100644
  PLATFORMINC += $(CHIBIOS)/os/hal/ports/STM32/LLD/TIMv1
 diff --git a/os/hal/ports/STM32/LLD/TIMv1/hal_qei_lld.c b/os/hal/ports/STM32/LLD/TIMv1/hal_qei_lld.c
 new file mode 100644
-index 0000000..cd1ab9b
 --- /dev/null
 +++ b/os/hal/ports/STM32/LLD/TIMv1/hal_qei_lld.c
 @@ -0,0 +1,304 @@
 +/*
 +AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
-+Copyright (C) 2016..2018  Thomas Schöpping et al.
++Copyright (C) 2016..2019  Thomas Schöpping et al.
 +
 +This program is free software: you can redistribute it and/or modify
 +it under the terms of the GNU General Public License as published by
@@ -528,13 +523,12 @@ index 0000000..cd1ab9b
 +/** @} */
 diff --git a/os/hal/ports/STM32/LLD/TIMv1/hal_qei_lld.h b/os/hal/ports/STM32/LLD/TIMv1/hal_qei_lld.h
 new file mode 100644
-index 0000000..ec1cd42
 --- /dev/null
 +++ b/os/hal/ports/STM32/LLD/TIMv1/hal_qei_lld.h
 @@ -0,0 +1,302 @@
 +/*
 +AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
-+Copyright (C) 2016..2018  Thomas Schöpping et al.
++Copyright (C) 2016..2019  Thomas Schöpping et al.
 +
 +This program is free software: you can redistribute it and/or modify
 +it under the terms of the GNU General Public License as published by
@@ -836,13 +830,12 @@ index 0000000..ec1cd42
 +/** @} */
 diff --git a/os/hal/src/hal_qei.c b/os/hal/src/hal_qei.c
 new file mode 100644
-index 0000000..00334bb
 --- /dev/null
 +++ b/os/hal/src/hal_qei.c
 @@ -0,0 +1,152 @@
 +/*
 +AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
-+Copyright (C) 2016..2018  Thomas Schöpping et al.
++Copyright (C) 2016..2019  Thomas Schöpping et al.
 +
 +This program is free software: you can redistribute it and/or modify
 +it under the terms of the GNU General Public License as published by
@@ -989,6 +982,6 @@ index 0000000..00334bb
 +  osalSysUnlock();
 +}
 +
-+#endif /* HAL_USE_QEI */
++#endif /* HAL_USE_QEI == TRUE */
 +
 +/** @} */
