55 lines
1.2 KiB
C
55 lines
1.2 KiB
C
/*
|
|
* config.h
|
|
*
|
|
* Created on: 28 mai 2026
|
|
* Author: innotex
|
|
*/
|
|
|
|
#ifndef CONFIG_H_
|
|
#define CONFIG_H_
|
|
#include "stm32f446xx.h"
|
|
|
|
#define INIT_MODDER_MOTOR_PBA 0x00100000
|
|
#define INIT_MODDER_MOTOR_PBA_MSK 0x00300000
|
|
|
|
#define INIT_MODDER_MOTOR_PBB 0x00100500
|
|
#define INIT_MODDER_MOTOR_PBB_MSK 0x00300F00
|
|
|
|
#define INIT_OSPEEDR_MOTOR_PBA INIT_MODDER_MOTOR_PBA
|
|
#define INIT_OSPEEDR_MOTOR_PBA_MSK INIT_MODDER_MOTOR_PBA_MSK
|
|
|
|
#define INIT_OSPEEDR_MOTOR_PBB INIT_MODDER_MOTOR_PBB
|
|
#define INIT_OSPEEDR_MOTOR_PBB_MSK INIT_MODDER_MOTOR_PBB_MSK
|
|
|
|
#define INIT_PUPDR_MOTOR_PBA_MSK INIT_MODDER_MOTOR_PBA_MSK
|
|
#define INIT_PUPDR_MOTOR_PBB_MSK INIT_MODDER_MOTOR_PBB_MSK
|
|
|
|
extern volatile uint32_t it_count;
|
|
extern uint32_t index_time;
|
|
extern uint32_t nbr_un;
|
|
extern uint32_t nbr_un_final;
|
|
extern volatile uint8_t finReception;
|
|
|
|
void motor_init(void);
|
|
void init_Timer_RoueDroit(char sens, uint8_t vitesse);
|
|
void init_Timer_RoueGauche(char sens, uint8_t vitesse);
|
|
|
|
void InitGPIOUS(void);
|
|
void InitTimerUS(void);
|
|
void TIM2_IRQHandler(void);
|
|
void UltraSoundMgt(void);
|
|
void set_RoueGauche_Sens(int sens, uint8_t vitesse);
|
|
uint32_t ComputeDistance(uint32_t nbrUnFinal);
|
|
|
|
|
|
|
|
|
|
typedef enum {
|
|
STOP = 0,
|
|
AVANCE = 1,
|
|
RECUL = 2
|
|
} Direction;
|
|
|
|
|
|
#endif /* CONFIG_H_ */
|