Basic test to see if it is possible to access the low level hardware in the online compiler. It seems that it is possible. Would need much more work to get it running.

Dependencies:   mbed

Revision:
0:c1a4bf56f1de
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Sep 12 18:22:01 2018 +0000
@@ -0,0 +1,21 @@
+
+#include "stm32f4xx_hal.h"
+
+/*
+Use TIM2 as encoder Encoder pins on PA0 and PA1
+*/
+
+int main() {
+    
+    
+    RCC->APB1ENR |= (1U << 0U) ; // Enable TIM2 module
+    RCC->AHB1ENR |= (1U << 0U); //  enable GPIOA module
+   
+    /* TODO:
+       set up the above pins as Alternate function AF1 TIMER2
+       Setup TIM2 as quadrature encoder
+       
+          or quadrature encoder setup on F401 but with a different syntax
+          See https://github.com/kwikius/quantracker/blob/master/ground/tracker/v1/azimuth_encoder.cpp
+    */
+}