Testing 1 blue pill
Dependencies: mbed mbed-rtos TextLCD
Interface/Interface.hpp@16:9f98ec0ededb, 2019-02-11 (annotated)
- Committer:
- thomasmorris
- Date:
- Mon Feb 11 22:03:47 2019 +0000
- Revision:
- 16:9f98ec0ededb
- Child:
- 17:68b3fdabe4c5
Class Structure interface
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
thomasmorris | 16:9f98ec0ededb | 1 | #ifndef INTERFACE_HPP//Header Guards Prevents Multiple includes |
thomasmorris | 16:9f98ec0ededb | 2 | #define INTERFACE_HPP |
thomasmorris | 16:9f98ec0ededb | 3 | |
thomasmorris | 16:9f98ec0ededb | 4 | #include "mbed.h" |
thomasmorris | 16:9f98ec0ededb | 5 | #include "STEPPER_MOTOR.hpp" |
thomasmorris | 16:9f98ec0ededb | 6 | |
thomasmorris | 16:9f98ec0ededb | 7 | static STEPPER_MOTOR STEPPER_MOTOR_1(D15,D14,D13,D12); |
thomasmorris | 16:9f98ec0ededb | 8 | |
thomasmorris | 16:9f98ec0ededb | 9 | class INTERFACE //This creates a class called Led |
thomasmorris | 16:9f98ec0ededb | 10 | { |
thomasmorris | 16:9f98ec0ededb | 11 | public: |
thomasmorris | 16:9f98ec0ededb | 12 | //Public member variables |
thomasmorris | 16:9f98ec0ededb | 13 | |
thomasmorris | 16:9f98ec0ededb | 14 | //Public Member Functions |
thomasmorris | 16:9f98ec0ededb | 15 | INTERFACE(); //Constructor |
thomasmorris | 16:9f98ec0ededb | 16 | ~INTERFACE(); //Destructor |
thomasmorris | 16:9f98ec0ededb | 17 | |
thomasmorris | 16:9f98ec0ededb | 18 | void Interface_Init(); |
thomasmorris | 16:9f98ec0ededb | 19 | void Up(); |
thomasmorris | 16:9f98ec0ededb | 20 | void Down(); |
thomasmorris | 16:9f98ec0ededb | 21 | void Start_Stop(); |
thomasmorris | 16:9f98ec0ededb | 22 | void Function(); |
thomasmorris | 16:9f98ec0ededb | 23 | void Select(); |
thomasmorris | 16:9f98ec0ededb | 24 | void Interface_main(); |
thomasmorris | 16:9f98ec0ededb | 25 | |
thomasmorris | 16:9f98ec0ededb | 26 | //Setters |
thomasmorris | 16:9f98ec0ededb | 27 | |
thomasmorris | 16:9f98ec0ededb | 28 | void Set_No_Of_Rotations(int Rotations); |
thomasmorris | 16:9f98ec0ededb | 29 | void Set_Function(int Function); |
thomasmorris | 16:9f98ec0ededb | 30 | void Set_Twist_Go(bool Twist_Go); |
thomasmorris | 16:9f98ec0ededb | 31 | void Set_Anneal_Go(bool Anneal_Go); |
thomasmorris | 16:9f98ec0ededb | 32 | void Set_Test_Go(bool Test_Go); |
thomasmorris | 16:9f98ec0ededb | 33 | void Set_Select(bool Select); |
thomasmorris | 16:9f98ec0ededb | 34 | void Set_Turns_Done(int Turns_Done); |
thomasmorris | 16:9f98ec0ededb | 35 | void Set_Turns_To_Do(int Turns_To_Do); |
thomasmorris | 16:9f98ec0ededb | 36 | void Set_Loop(int Loop); |
thomasmorris | 16:9f98ec0ededb | 37 | void Set_Wait_Time(int Wait_Time); |
thomasmorris | 16:9f98ec0ededb | 38 | void Set_Duty_Cycle(int Duty_Cycle); |
thomasmorris | 16:9f98ec0ededb | 39 | void Set_Power_Time(float Power_Time); |
thomasmorris | 16:9f98ec0ededb | 40 | |
thomasmorris | 16:9f98ec0ededb | 41 | //Getters |
thomasmorris | 16:9f98ec0ededb | 42 | int Get_No_Of_Rotations(); |
thomasmorris | 16:9f98ec0ededb | 43 | int Get_Function(); |
thomasmorris | 16:9f98ec0ededb | 44 | bool Get_Twist_Go(); |
thomasmorris | 16:9f98ec0ededb | 45 | bool Get_Anneal_Go(); |
thomasmorris | 16:9f98ec0ededb | 46 | bool Get_Test_Go(); |
thomasmorris | 16:9f98ec0ededb | 47 | bool Get_Select(); |
thomasmorris | 16:9f98ec0ededb | 48 | int Get_Turns_Done(); |
thomasmorris | 16:9f98ec0ededb | 49 | int Get_Turns_To_Do(); |
thomasmorris | 16:9f98ec0ededb | 50 | int Get_Loop(); |
thomasmorris | 16:9f98ec0ededb | 51 | int Get_Wait_Time(); |
thomasmorris | 16:9f98ec0ededb | 52 | int Get_Duty_Cycle(); |
thomasmorris | 16:9f98ec0ededb | 53 | int Get_Power_Time(); |
thomasmorris | 16:9f98ec0ededb | 54 | |
thomasmorris | 16:9f98ec0ededb | 55 | private: |
thomasmorris | 16:9f98ec0ededb | 56 | //Private member variables to prevent them being accessed externally |
thomasmorris | 16:9f98ec0ededb | 57 | |
thomasmorris | 16:9f98ec0ededb | 58 | int _No_Of_Rotations; |
thomasmorris | 16:9f98ec0ededb | 59 | int _Function; |
thomasmorris | 16:9f98ec0ededb | 60 | bool _Twist_Go; |
thomasmorris | 16:9f98ec0ededb | 61 | bool _Anneal_Go; |
thomasmorris | 16:9f98ec0ededb | 62 | bool _Test_Go; |
thomasmorris | 16:9f98ec0ededb | 63 | bool _Select; |
thomasmorris | 16:9f98ec0ededb | 64 | int _Turns_Done; |
thomasmorris | 16:9f98ec0ededb | 65 | int _Turns_Todo; |
thomasmorris | 16:9f98ec0ededb | 66 | int _Loop; |
thomasmorris | 16:9f98ec0ededb | 67 | int _Wait_Time;//IN SECONDS |
thomasmorris | 16:9f98ec0ededb | 68 | int _Duty_Cycle; |
thomasmorris | 16:9f98ec0ededb | 69 | int _Power_Time; |
thomasmorris | 16:9f98ec0ededb | 70 | |
thomasmorris | 16:9f98ec0ededb | 71 | }; |
thomasmorris | 16:9f98ec0ededb | 72 | #endif//INTERFACE_HPP |