Руслан Бредун / Mbed 2 deprecated stm32-sensor-base2

Dependencies:   mbed Watchdog

Dependents:   STM32-MC_node

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers global.h Source File

global.h

00001 #ifndef GLOBAL_H_
00002 #define GLOBAL_H_
00003 
00004 #include "mbed.h"
00005 #include "JSN_SR04.h"
00006 #include "AS5045.h"
00007 #include "E18_D80NK.h"
00008 #include <RS485.h>
00009 #include "DS1820.h"
00010 #include "Watchdog.h"
00011 
00012 #define MAX_SENSOSRS   32 
00013  
00014 #define BLINKING_RATE     5000
00015 
00016 #define TEST_WATCHDOG   0
00017 #define TEST_REQUEST    0 
00018 #define MAIN_CODE       1
00019 
00020 // rs-485 pins
00021 #define UART1_TX    PB_6
00022 #define UART1_RX    PB_7
00023 #define DE_TXD_1    PB_5
00024 
00025 #define UART2_TX    PA_2
00026 #define UART2_RX    PA_3
00027 #define DE_TXD_2    PB_3
00028 
00029 // adc pins 
00030 #define ADC1_IN0    PA_0
00031 #define ADC1_IN1    PA_1
00032 
00033 #define ADC1_IN8    PB_0
00034 #define ADC1_IN9    PB_1
00035 
00036 // Encoder spi chip select pins
00037 #define SP1_NSS1    PA_4
00038 #define SP1_NSS2    PB_2
00039 
00040 // ultra sonics pins 
00041 
00042 #define TIM1_CH2        PA_9 // echo pin 
00043 #define TRIG_PA8_OUT    PA_8
00044 #define TRIG_PB15_OUT   PB_15
00045 #define TRIG_PB14_OUT   PB_14
00046 
00047 //ir obstacle pins
00048 #define IR1_PB12_OUT   PB_12
00049 #define IR2_PB13_OUT   PB_13
00050 
00051 DS1820* ds1820[MAX_SENSOSRS];
00052 
00053 #define DEBUG_LED   PC_13
00054 
00055 #endif /* GLOBAL_H_ */