Testing 1 blue pill

Dependencies:   mbed mbed-rtos TextLCD

Committer:
thomasmorris
Date:
Mon Mar 11 14:19:26 2019 +0000
Revision:
28:3193157ebb0c
Parent:
27:22d6fd88828e
Child:
29:f3b1387c81f1
Version 16 Working

Who changed what in which revision?

UserRevisionLine numberNew contents of line
thomasmorris 12:d9c133b360b0 1 #ifndef SETUP_HPP//Header Guards Prevents Multiple includes
thomasmorris 12:d9c133b360b0 2 #define SETUP_HPP
thomasmorris 25:9751619fa030 3
thomasmorris 13:c681f340909b 4 #include "stdio.h"
thomasmorris 13:c681f340909b 5 #include "string.h"
thomasmorris 13:c681f340909b 6 #include "mbed.h"
thomasmorris 13:c681f340909b 7 #include "rtos.h"
thomasmorris 13:c681f340909b 8 #include "TextLCD.h"
thomasmorris 13:c681f340909b 9 #include "iostream"
thomasmorris 12:d9c133b360b0 10 #include "rtos.h"
thomasmorris 16:9f98ec0ededb 11 #include "STEPPER_MOTOR.hpp"
thomasmorris 16:9f98ec0ededb 12 #include "Interface.hpp"
thomasmorris 23:07a368f2cdb1 13
thomasmorris 28:3193157ebb0c 14 #define Debounce_Time 150//200 works fine
thomasmorris 25:9751619fa030 15 INTERFACE INTERFACE;
thomasmorris 16:9f98ec0ededb 16
thomasmorris 13:c681f340909b 17 //Digital Outputs
thomasmorris 13:c681f340909b 18 DigitalOut led1(LED1);
thomasmorris 13:c681f340909b 19 DigitalOut led2(LED2);
thomasmorris 21:6d9f6a986647 20
thomasmorris 25:9751619fa030 21
thomasmorris 25:9751619fa030 22 //Function forward declarations
thomasmorris 14:63998be3d43c 23 void up_thread_function();
thomasmorris 14:63998be3d43c 24 void down_thread_function();
thomasmorris 14:63998be3d43c 25 void start_thread_function();
thomasmorris 14:63998be3d43c 26 void function_thread_function();
thomasmorris 14:63998be3d43c 27 void select_thread_function();
thomasmorris 26:83550fc299aa 28 void Polling_thread_function();
thomasmorris 13:c681f340909b 29 //Thread Setups
thomasmorris 26:83550fc299aa 30 Thread polling_thread;
thomasmorris 13:c681f340909b 31 Thread lcd_thread;
thomasmorris 13:c681f340909b 32 Thread led_thread;
thomasmorris 14:63998be3d43c 33 Thread up_thread;
thomasmorris 14:63998be3d43c 34 Thread down_thread;
thomasmorris 14:63998be3d43c 35 Thread start_stop_thread;
thomasmorris 14:63998be3d43c 36 Thread function_thread;
thomasmorris 14:63998be3d43c 37 Thread select_thread;
thomasmorris 17:68b3fdabe4c5 38 //LCD pin connections
thomasmorris 17:68b3fdabe4c5 39 TextLCD lcd(D0,D1,D4,D5,D6,D7); // rs, e, d4-d7
thomasmorris 14:63998be3d43c 40
thomasmorris 17:68b3fdabe4c5 41 //Serial Terminal setup for debugging
thomasmorris 13:c681f340909b 42 Serial pc(USBTX, USBRX); //Define serial namespace so the serial comms can be printed to
thomasmorris 23:07a368f2cdb1 43
JDickson 27:22d6fd88828e 44 #endif