Testing 1 blue pill

Dependencies:   mbed mbed-rtos TextLCD

Interface/Interface.hpp

Committer:
thomasmorris
Date:
2019-02-16
Revision:
22:fc2186b610b5
Parent:
21:6d9f6a986647
Child:
23:07a368f2cdb1

File content as of revision 22:fc2186b610b5:

#ifndef INTERFACE_HPP//Header Guards Prevents Multiple includes
#define INTERFACE_HPP

#include "mbed.h"
#include "STEPPER_MOTOR.hpp" //Include this to use the stepper motor
//Led Outputs //check the pin outs.
//Led Outputs //check the pin outs.
static DigitalOut Led_Select_Left(D2);
static DigitalOut Led_Select_Right(D3);
static DigitalOut Led_Power(A2);
static STEPPER_MOTOR STEPPER_MOTOR_1(D15,D14,D13,D12);


class INTERFACE                       //This creates a class called Led
{ 
public: 
    //Public member variables

    //Public Member Functions
    INTERFACE(int Default_Turns); //Constructor
    ~INTERFACE();//Destructor
    
    void Interface_Init();//Set all values to 0
    void Up();//Up Routine
    void Down();//Down Routine
    void Start_Stop();//Start / Stop Routine
    void Function();//Function Routine
    void Select();//Select Routine
    void Interface_main();//Main Routine

    //Setters to assign data to the private memeber variables
    void Set_No_Of_Rotations(int Rotations);
    void Set_Function(int Function);
    void Set_Twist_Go(bool Twist_Go);
    void Set_Anneal_Go(bool Anneal_Go);
    void Set_Test_Go(bool Test_Go);
    void Set_Select(bool Select);
    void Set_Turns_Done(int Turns_Done);
    void Set_Turns_To_Do(int Turns_To_Do);
    void Set_Loop(int Loop);
    void Set_Wait_Time(int Wait_Time);
    void Set_Duty_Cycle(int Duty_Cycle);
    void Set_Power_Time(float Power_Time);
    
    //Getters to receive private information
    int Get_No_Of_Rotations();
    int Get_Function();
    bool Get_Twist_Go();
    bool Get_Anneal_Go();
    bool Get_Test_Go();
    bool Get_Select();
    int Get_Turns_Done();
    int Get_Turns_To_Do();
    int Get_Loop();
    int Get_Wait_Time();
    int Get_Duty_Cycle();
    int Get_Power_Time();

private:    
    //Private member variables to prevent them being accessed externally 
   
    int _No_Of_Rotations;
    int _Function;
    bool _Twist_Go;
    bool _Anneal_Go;
    bool _Test_Go;
    bool _Select;
    int _Turns_Done;
    int _Turns_Todo;
    int _Loop;
    int _Wait_Time;//IN SECONDS
    int _Duty_Cycle;
    int _Power_Time;

};
#endif//INTERFACE_HPP