|
StepperII
Dual Axis Stepper Controller
|
00001 00002 #pragma once 00003 #include <avr/io.h> 00004 00005 #define BIT_OFF( PORTx, BIT) PORTx &= ~_BV(BIT) ///< Set IO bit low 00006 #define BIT_ON( PORTx, BIT) PORTx |= _BV(BIT) ///< Set IO bit high 00007 #define BIT_READ( PINx, BIT) PINx & _BV(BIT) ///< Read the IO bit 00008 #define BIT_READ_AL(PINx, BIT) (PINx & _BV(BIT)) ^ _BV(BIT) // Cheap "not" 00009 00011 #define BIT_CLEAR( REGx, BIT) REGx &= ~_BV(BIT) ///< Set bit to 0 00012 #define BIT_SET( REGx, BIT) REGx |= _BV(BIT) ///< Set bit to 1 00013 #define BIT_TOGGLE( REGx, BIT) REGx ^= _BV(BIT) ///< Toggle bit 00014 // Toggle for _AVR_IOMX8_H_ ATMega48,88,168 00015 #define BIT_TOGGLE_MX(PINx,BIT) PINx |= _BV(BIT) ///< Write 1 to PIN
1.7.3