config.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  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. //W25X20CL configuration
  17. //pinout:
  18. #define W25X20CL_PIN_CS 32
  19. //spi:
  20. #define W25X20CL_SPI_RATE 0 // fosc/4 = 4MHz
  21. #define W25X20CL_SPCR SPI_SPCR(W25X20CL_SPI_RATE, 1, 1, 1, 0)
  22. #define W25X20CL_SPSR SPI_SPSR(W25X20CL_SPI_RATE)
  23. //LANG - Multi-language support
  24. //#define LANG_MODE 0 // primary language only
  25. #define LANG_MODE 1 // sec. language support
  26. #define LANG_SIZE_RESERVED 0x2400 // reserved space for secondary language (~12kb)
  27. //#define LANG_SIZE_RESERVED 0x1ef8 // reserved space for secondary language (~10kb)
  28. #endif //_CONFIG_H