test

Dependencies:   mbed Watchdog

Dependents:   STM32-MC_node

Committer:
ruslanbredun
Date:
Mon Dec 14 14:13:35 2020 +0000
Revision:
16:82251ada9b04
Parent:
14:b3530522908e
tester

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ommpy 0:d383e2dee0f7 1 #ifndef GLOBAL_H_
ommpy 0:d383e2dee0f7 2 #define GLOBAL_H_
ommpy 0:d383e2dee0f7 3
ommpy 0:d383e2dee0f7 4 #include "mbed.h"
ommpy 0:d383e2dee0f7 5 #include "JSN_SR04.h"
ommpy 0:d383e2dee0f7 6 #include "AS5045.h"
ommpy 0:d383e2dee0f7 7 #include "E18_D80NK.h"
ommpy 6:a760ce6defbe 8 #include <RS485.h>
ommpy 10:0b7f23df690a 9 #include "DS1820.h"
ruslanbredun 14:b3530522908e 10 #include "Watchdog.h"
ommpy 10:0b7f23df690a 11
ommpy 10:0b7f23df690a 12 #define MAX_SENSOSRS 32
ommpy 10:0b7f23df690a 13
ruslanbredun 16:82251ada9b04 14 #define BLINKING_RATE 5000
nestedslk 4:f6e22dd39313 15
ruslanbredun 14:b3530522908e 16 #define TEST_WATCHDOG 0
ruslanbredun 14:b3530522908e 17 #define TEST_REQUEST 0
ruslanbredun 14:b3530522908e 18 #define MAIN_CODE 1
ommpy 0:d383e2dee0f7 19
ommpy 0:d383e2dee0f7 20 // rs-485 pins
ommpy 0:d383e2dee0f7 21 #define UART1_TX PB_6
ommpy 0:d383e2dee0f7 22 #define UART1_RX PB_7
ommpy 0:d383e2dee0f7 23 #define DE_TXD_1 PB_5
ommpy 0:d383e2dee0f7 24
ommpy 0:d383e2dee0f7 25 #define UART2_TX PA_2
ommpy 0:d383e2dee0f7 26 #define UART2_RX PA_3
ommpy 0:d383e2dee0f7 27 #define DE_TXD_2 PB_3
ommpy 0:d383e2dee0f7 28
ommpy 0:d383e2dee0f7 29 // adc pins
ommpy 0:d383e2dee0f7 30 #define ADC1_IN0 PA_0
ommpy 0:d383e2dee0f7 31 #define ADC1_IN1 PA_1
ommpy 0:d383e2dee0f7 32
ommpy 0:d383e2dee0f7 33 #define ADC1_IN8 PB_0
ommpy 0:d383e2dee0f7 34 #define ADC1_IN9 PB_1
ommpy 0:d383e2dee0f7 35
ommpy 0:d383e2dee0f7 36 // Encoder spi chip select pins
ommpy 0:d383e2dee0f7 37 #define SP1_NSS1 PA_4
ommpy 0:d383e2dee0f7 38 #define SP1_NSS2 PB_2
ommpy 0:d383e2dee0f7 39
ommpy 0:d383e2dee0f7 40 // ultra sonics pins
ommpy 0:d383e2dee0f7 41
ommpy 0:d383e2dee0f7 42 #define TIM1_CH2 PA_9 // echo pin
ommpy 0:d383e2dee0f7 43 #define TRIG_PA8_OUT PA_8
nestedslk 3:96fcb3b041eb 44 #define TRIG_PB15_OUT PB_15
nestedslk 3:96fcb3b041eb 45 #define TRIG_PB14_OUT PB_14
ommpy 0:d383e2dee0f7 46
nestedslk 4:f6e22dd39313 47 //ir obstacle pins
nestedslk 4:f6e22dd39313 48 #define IR1_PB12_OUT PB_12
nestedslk 4:f6e22dd39313 49 #define IR2_PB13_OUT PB_13
ommpy 0:d383e2dee0f7 50
ruslanbredun 12:406f75196a12 51 DS1820* ds1820[MAX_SENSOSRS];
ommpy 0:d383e2dee0f7 52
nestedslk 4:f6e22dd39313 53 #define DEBUG_LED PC_13
ommpy 0:d383e2dee0f7 54
ommpy 0:d383e2dee0f7 55 #endif /* GLOBAL_H_ */