StepperII
Dual Axis Stepper Controller

CProfile.h

00001 
00002 #pragma once
00003 
00004 #include <stdint.h>                     // Need data type compat with eeprom.h
00009 class CProfile
00010 {
00011 private:
00012         uint8_t *shadow;
00013 protected:
00014 public:
00015         static const char degrees  = 0;                 
00016         static const char steps    = 1;                 
00017         static const int  accelMin = 1;                 
00018         static const int  accelMax = 20;                
00019 
00020         static const int  maxSpeedMin = 1;              
00021         static const int  maxSpeedMax = 250;    
00022 
00023         char nonBlocking;               
00024         char units;                             
00025         char accel;                             
00026         unsigned int maxSpeed;  
00027         char decel;                             
00028         int  msSettle;                  
00029         char sprIndex;                  
00030 
00031         int  stepsPayload360;   
00032         char brakeType;                 
00033         char reverse;                   
00034         char noLimits;                  
00035         int  lowTravelLimit;    
00036         int  highTravelLimit;   
00037 private:
00038         char crc;                               
00039 
00040         int  doCrc(void);
00041         char restore(void);             
00042 public:
00043         // Public methods
00044         //   s is address of EEPROM shadow data, consoleStatus determines master
00045         void init(uint8_t *s, const char axis, char consoleStatus = 0); 
00046         void save(void);                
00047 };
00048 
00051 class CRunProfile
00052 {
00053 public:
00054         static const char stop  = 0;            
00055         static const char accel = 1;            
00056         static const char decel = 2;            
00057         static const char run   = 3;            
00058         static const char stopping = 4;         
00059 
00060         char direction;                                         
00061         unsigned int  stepPeriod;                       
00062         volatile char runState;                         
00063         int  position;                                          
00064         char brakeTimer;                                        
00065         char continuousFlag;                            
00066         char autoHomeRunning;                           
00067         
00068         void init(void);                                        // Not sure if we need this
00069 };
 All Classes Files Functions Variables Defines