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.
main.cpp
- Committer:
- skyscraper
- Date:
- 2018-09-12
- Revision:
- 0:c1a4bf56f1de
File content as of revision 0:c1a4bf56f1de:
#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 */ }