1

Dependencies:   mbed-dev-f303 FastPWM3

Revision:
48:1b51771c3647
Parent:
47:55bdc4d5096b
Child:
52:d4d5e3414865
--- a/PositionSensor/PositionSensor.cpp	Sat Dec 07 08:01:06 2019 +0000
+++ b/PositionSensor/PositionSensor.cpp	Fri Feb 07 11:31:37 2020 +0000
@@ -128,7 +128,7 @@
     }
     
 
-
+/*
 PositionSensorEncoder::PositionSensorEncoder(int CPR, float offset, int ppairs) {
     _ppairs = ppairs;
     _CPR = CPR;
@@ -141,12 +141,12 @@
     // Enable clock for GPIOA
     __GPIOA_CLK_ENABLE(); //equivalent from hal_rcc.h
  
-    GPIOA->MODER   |= GPIO_MODER_MODER6_1 | GPIO_MODER_MODER7_1 ;           //PA6 & PA7 as Alternate Function   /*!< GPIO port mode register,               Address offset: 0x00      */
-    GPIOA->OTYPER  |= GPIO_OTYPER_OT_6 | GPIO_OTYPER_OT_7 ;                 //PA6 & PA7 as Inputs               /*!< GPIO port output type register,        Address offset: 0x04      */
-    GPIOA->OSPEEDR |= GPIO_OSPEEDER_OSPEEDR6 | GPIO_OSPEEDER_OSPEEDR7 ;     //Low speed                         /*!< GPIO port output speed register,       Address offset: 0x08      */
-    GPIOA->PUPDR   |= GPIO_PUPDR_PUPDR6_1 | GPIO_PUPDR_PUPDR7_1 ;           //Pull Down                         /*!< GPIO port pull-up/pull-down register,  Address offset: 0x0C      */
-    GPIOA->AFR[0]  |= 0x22000000 ;                                          //AF02 for PA6 & PA7                /*!< GPIO alternate function registers,     Address offset: 0x20-0x24 */
-    GPIOA->AFR[1]  |= 0x00000000 ;                                          //nibbles here refer to gpio8..15   /*!< GPIO alternate function registers,     Address offset: 0x20-0x24 */
+    GPIOA->MODER   |= GPIO_MODER_MODER6_1 | GPIO_MODER_MODER7_1 ;           //PA6 & PA7 as Alternate Function   //!< GPIO port mode register,               Address offset: 0x00      //
+    GPIOA->OTYPER  |= GPIO_OTYPER_OT_6 | GPIO_OTYPER_OT_7 ;                 //PA6 & PA7 as Inputs               //!< GPIO port output type register,        Address offset: 0x04      //
+    GPIOA->OSPEEDR |= GPIO_OSPEEDER_OSPEEDR6 | GPIO_OSPEEDER_OSPEEDR7 ;     //Low speed                         //!< GPIO port output speed register,       Address offset: 0x08      //
+    GPIOA->PUPDR   |= GPIO_PUPDR_PUPDR6_1 | GPIO_PUPDR_PUPDR7_1 ;           //Pull Down                         //!< GPIO port pull-up/pull-down register,  Address offset: 0x0C      //
+    GPIOA->AFR[0]  |= 0x22000000 ;                                          //AF02 for PA6 & PA7                //!< GPIO alternate function registers,     Address offset: 0x20-0x24 //
+    GPIOA->AFR[1]  |= 0x00000000 ;                                          //nibbles here refer to gpio8..15   //!< GPIO alternate function registers,     Address offset: 0x20-0x24 //
    
     // configure TIM3 as Encoder input
     // Enable clock for TIM3
@@ -296,3 +296,4 @@
 void PositionSensorEncoder::WriteLUT(int new_lut[128]){
     memcpy(offset_lut, new_lut, sizeof(offset_lut));
     }
+*/
\ No newline at end of file