steppermotor driver solar on foils

Dependencies:   mbed

Fork of CAN_module_stepper by Dannis Brugman

Committer:
Dannis_mbed
Date:
Tue Aug 11 08:52:57 2015 +0000
Revision:
1:239c8d704941
Presentation version

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Dannis_mbed 1:239c8d704941 1 #ifndef STEPPER_H_INCLUDED
Dannis_mbed 1:239c8d704941 2 #define STEPPER_H_INCLUDED
Dannis_mbed 1:239c8d704941 3
Dannis_mbed 1:239c8d704941 4 #include "mbed.h"
Dannis_mbed 1:239c8d704941 5
Dannis_mbed 1:239c8d704941 6 class Stepper
Dannis_mbed 1:239c8d704941 7 {
Dannis_mbed 1:239c8d704941 8 private:
Dannis_mbed 1:239c8d704941 9 // variable
Dannis_mbed 1:239c8d704941 10 uint32_t counter;
Dannis_mbed 1:239c8d704941 11 uint32_t offTimeCounter;
Dannis_mbed 1:239c8d704941 12 uint32_t uiInitRampDown;
Dannis_mbed 1:239c8d704941 13
Dannis_mbed 1:239c8d704941 14 bool offTime;
Dannis_mbed 1:239c8d704941 15 bool bRampUp;
Dannis_mbed 1:239c8d704941 16 bool bRampDown;
Dannis_mbed 1:239c8d704941 17
Dannis_mbed 1:239c8d704941 18 public:
Dannis_mbed 1:239c8d704941 19 // Constructor
Dannis_mbed 1:239c8d704941 20 Stepper();
Dannis_mbed 1:239c8d704941 21 // Destructor
Dannis_mbed 1:239c8d704941 22 ~Stepper();
Dannis_mbed 1:239c8d704941 23
Dannis_mbed 1:239c8d704941 24 // Gets
Dannis_mbed 1:239c8d704941 25 uint32_t iGetStepCount(void);
Dannis_mbed 1:239c8d704941 26 uint32_t iGetOffTimeCount(void);
Dannis_mbed 1:239c8d704941 27 bool bGetoffTime(void);
Dannis_mbed 1:239c8d704941 28 bool bGetRampUp(void);
Dannis_mbed 1:239c8d704941 29 bool bGetRampDown(void);
Dannis_mbed 1:239c8d704941 30
Dannis_mbed 1:239c8d704941 31 // Sets
Dannis_mbed 1:239c8d704941 32 void vSetStepCount(uint32_t);
Dannis_mbed 1:239c8d704941 33 void vSetOffTimeCount(uint32_t);
Dannis_mbed 1:239c8d704941 34
Dannis_mbed 1:239c8d704941 35 // Other functions
Dannis_mbed 1:239c8d704941 36 void vDecreaseStepCount(void);
Dannis_mbed 1:239c8d704941 37 void vIncreaseStepCount(void);
Dannis_mbed 1:239c8d704941 38 void vDecreaseOffTimeCount(void); //ramp up
Dannis_mbed 1:239c8d704941 39 void vIncreaseOffTimeCount(void); //ramp down
Dannis_mbed 1:239c8d704941 40 void vResetOffTimeCount(void);
Dannis_mbed 1:239c8d704941 41 };
Dannis_mbed 1:239c8d704941 42 #endif