Руслан Бредун
/
stm32-sensor-base2
test
Diff: global.h
- Revision:
- 0:d383e2dee0f7
- Child:
- 3:96fcb3b041eb
diff -r 000000000000 -r d383e2dee0f7 global.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/global.h Mon Jul 06 17:18:59 2020 +0530 @@ -0,0 +1,47 @@ +#ifndef GLOBAL_H_ +#define GLOBAL_H_ + +#include "mbed.h" +#include <ros.h> +#include <ros/time.h> +#include "JSN_SR04.h" +#include "AS5045.h" +#include "E18_D80NK.h" + +#define TEST_ULTRASONIC 1 +#define TEST_ENCODERS 0 +#define TEST_IR 0 + +// rs-485 pins +#define UART1_TX PB_6 +#define UART1_RX PB_7 +#define DE_TXD_1 PB_5 + +#define UART2_TX PA_2 +#define UART2_RX PA_3 +#define DE_TXD_2 PB_3 + +// adc pins +#define ADC1_IN0 PA_0 +#define ADC1_IN1 PA_1 + +#define ADC1_IN8 PB_0 +#define ADC1_IN9 PB_1 + +// Encoder spi chip select pins +#define SP1_NSS1 PA_4 +#define SP1_NSS2 PB_2 + +// ultra sonics pins + +#define TIM1_CH2 PA_9 // echo pin +#define TRIG_PA8_OUT PA_8 +#define TRIG_PA15_OUT PA_15 +#define TRIG_PA14_OUT PA_14 + + + + + + +#endif /* GLOBAL_H_ */ \ No newline at end of file