Skip to content
Permalink
e88b206f40
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
40 lines (29 sloc) 952 Bytes
/*
This is the headerfile for our class.
It contains details of the class and all its methods.
This includes definitions, and the function signatures.
It is used by the compiler to link code from class files, into our main program.
*/
// Avoid the compiler including code every time it is imported
#ifndef FLASHER_H
#define FLASHER_H
// We Will need mbed for definitions of DigitalOut etc.
#include <mbed.h>
// Here we define the class structure, and variables
class Flasher{
// Variables
private:
DigitalOut theLed;
int state;
/*
We then define the method sigantures here.
NOTE: We just define the signatures, the code code in the corrisponding .c file
*/
public:
// Constructor. NOTE: We dont include the definition list here
Flasher(PinName thePin, int startState);
// Public Methods
void flash(); //Our standard Flash
void set_state(int the_state); //Setter method for the state
};
#endif