Thomas Morris / Mbed 2 deprecated Stacy

Dependencies:   mbed mbed-rtos TextLCD

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers SETUP.hpp Source File

SETUP.hpp

00001 #ifndef SETUP_HPP//Header Guards Prevents Multiple includes
00002 #define SETUP_HPP
00003 
00004 #include "stdio.h"
00005 #include "string.h"
00006 #include "mbed.h"
00007 #include "rtos.h"
00008 #include "TextLCD.h"
00009 #include "iostream"
00010 #include "rtos.h"
00011 #include "STEPPER_MOTOR.hpp"
00012 #include "Interface.hpp"
00013 
00014 #define Debounce_Time 300//200 works fine
00015 #define Up_Down_Debounce_Time 300
00016 INTERFACE INTERFACE;
00017     
00018 //Digital Outputs
00019 DigitalOut led1(LED1);
00020 DigitalOut led2(LED2);
00021 
00022 
00023 //Function forward declarations
00024 void up_thread_function();
00025 void down_thread_function();
00026 void start_thread_function();
00027 void function_thread_function();
00028 void select_thread_function();
00029 void Polling_thread_function();
00030 //Thread Setups
00031 Thread polling_thread;
00032 Thread lcd_thread;
00033 Thread led_thread;
00034 Thread up_thread;
00035 Thread down_thread;
00036 Thread start_stop_thread;
00037 Thread function_thread;
00038 Thread select_thread;
00039 Thread Interface_Serial_thread;
00040 //LCD pin connections
00041 TextLCD lcd(D0,D1,D4,D5,D6,D7); // rs, e, d4-d7
00042 
00043 //Serial Terminal setup for debugging
00044 Serial pc(USBTX, USBRX);         //Define serial namespace so the serial comms can be printed to
00045 
00046 int Down_Counter = 0;
00047 int Up_Counter = 0;
00048 
00049 #endif