#ifndef BIOPOSITIONING_H
#define BIOPOSITIONING_H



#define MOTOR_BLUE  BIT4
#define MOTOR_GREEN BIT5
#define MOTOR_RED   BIT6
#define MOTOR_BLACK BIT2
#define LIMIT_PIN   BIT3 
#define MOTOR_OUT(x)  x ? P4OUT : P2OUT
#define MOTOR_DIR(x)  x ? P4DIR : P2DIR

#define TO_HEX(i) (i <= 9 ? '0' + i : 'A' - 10 + i)



void initAccelTimer(void );
void handleAccelerometer(void);
void stepperinit(void);
void clockwise_steppersequence(void);
void anticw_steppersequence(void);
void initStepperTimer(void );
void InitLimit(void);
void zposSync(void);
void zposSyncDebug(void);


#endif // BIOPOSITIONING_H