config.h 677 B

123456789101112131415161718192021
  1. #ifndef _CONFIG_H
  2. #define _CONFIG_H
  3. //ADC configuration
  4. #define ADC_CHAN_MSK 0b0000001001011111 //used AD channels bit mask (0,1,2,3,4,6,9)
  5. #define ADC_CHAN_CNT 7 //number of used channels)
  6. #define ADC_OVRSAMPL 16 //oversampling multiplier
  7. #define ADC_CALLBACK adc_ready //callback function ()
  8. //SM4 configuration
  9. #define SM4_DEFDELAY 500 //default step delay [us]
  10. //TMC2130 - Trinamic stepper driver
  11. //pinout - hardcoded
  12. //spi:
  13. #define TMC2130_SPI_RATE 0 // fosc/4 = 4MHz
  14. #define TMC2130_SPCR SPI_SPCR(TMC2130_SPI_RATE, 1, 1, 1, 0)
  15. #define TMC2130_SPSR SPI_SPSR(TMC2130_SPI_RATE)
  16. #endif //_CONFIG_H