feng wang / Mbed OS ACTest_ForHank

Dependencies:   mbed-STM32F103C8T6 SHT21_ncleee

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.h Source File

main.h

00001 #ifndef MAIN_H
00002 #define MAIN_H
00003 
00004 #include "mbed.h"
00005 //#include "FastIO.h"
00006 #include "st7789v.h"
00007 #include "stm32f103c8t6.h"
00008 #include "SHT21_ncleee.h"
00009 #include "eeprom.h"
00010 
00011 static BusOut lcdBus(PB_13,PB_12,PB_2,PB_1,PB_0,PA_7,PA_6,PA_5); //Laiwu board configuration BusOut(LSB------MSB)
00012 
00013 #if 0
00014 /**/
00015 static DigitalOut TFTRD(PB_1);
00016 static DigitalOut TFTWR(PB_10);
00017 static DigitalOut TFTDC(PB_7);
00018 static DigitalOut TFTRST(PB_11);
00019 static DigitalOut TFTCS(PB_6);
00020 #endif
00021 
00022 #if 0
00023 static FastOut<PB_14> TFTRD;
00024 static FastOut<PB_15> TFTWR;
00025 static FastOut<PA_8> TFTDC;
00026 static FastOut<PA_11> TFTCS;
00027 #endif
00028 
00029 #if 1
00030 static DigitalOut TFTRD(PB_14);
00031 static DigitalOut TFTWR(PB_15);
00032 static DigitalOut TFTDC(PA_8);
00033 static DigitalOut TFTCS(PA_11);
00034 #endif
00035 
00036 static I2C i2c(PB_7,PB_6);
00037 
00038 static SHT21 sht(&i2c);
00039 
00040 //static DigitalIn Stopper1(PA_13);
00041 //static DigitalIn Stopper2(PA_15);
00042 
00043 static DigitalOut MOTOA1(PB_4);
00044 static DigitalOut MOTOB1(PB_5);
00045 
00046 static DigitalOut MOTOA2(PB_8);
00047 static DigitalOut MOTOB2(PB_9);
00048 
00049 //static DigitalIn Hall1(PA_14);
00050 static DigitalIn Hall2(PB_3);
00051 
00052 static Serial bt_uart(PA_9, PA_10);
00053 static Serial wifi_uart(PA_2, PA_3);
00054 static Serial debug_uart(PB_10, PB_11);
00055 
00056 static InterruptIn FrontKey(PA_4);
00057 static InterruptIn DebugKey(PA_12);
00058 
00059 //static DigitalOut WIFI_PWREN(PC_13);
00060 
00061 static AnalogIn SensorCurrent(PA_0);
00062 static AnalogIn BatteryVoltage(PA_1);
00063 
00064 #endif