Page 280 - MDP2022-2
P. 280

/*  USER  CODE  END  PTD  */


                  /*                                   Private                                   define
                  ------------------------------------------------------------*/
                  /*  USER  CODE  BEGIN  PD  */
                  #define  TRIG_PIN  GPIO_PIN_5
                  #define  TRIG_PORT  GPIOA
                  /*  USER  CODE  END  PD  */


                  /*                                   Private                                   macro
                  -------------------------------------------------------------*/
                  /*  USER  CODE  BEGIN  PM  */


                  /*  USER  CODE  END  PM  */


                  /*                                  Private                                 variables
                  ---------------------------------------------------------*/
                  TIM_HandleTypeDef  htim3;
                  UART_HandleTypeDef  huart2;


                  /*  USER  CODE  BEGIN  PV  */
                  uint32_t  IC_Val1  =  0;
                  uint32_t  IC_Val2  =  0;
                  uint32_t  Difference  =  0;
                  uint8_t  Is_First_Captured  =  0;    //  is  the  first  value  captured  ?
                  uint8_t  Distance    =  0;


                  unsigned  char  read;
                  unsigned  int  flag  =  0;
                  /*  USER  CODE  END  PV  */


                  /*                   Private                   function                    prototypes
                  -----------------------------------------------*/
                  void  SystemClock_Config(void);
                  static  void  MX_GPIO_Init(void);
                  static  void  MX_USART2_UART_Init(void);
                  static  void  MX_TIM3_Init(void);
                  /*  USER  CODE  BEGIN  PFP  */


                  /*  USER  CODE  END  PFP  */
   275   276   277   278   279   280   281   282   283   284   285