config.h 1.0 KB

12345678910111213141516171819202122232425262728293031
  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. #define W25X20CL_PIN_CS 32
  18. //LANG - Multi-language support
  19. //#define LANG_MODE 0 // primary language only
  20. #define LANG_MODE 1 // sec. language support
  21. #define LANG_SIZE_RESERVED 0x2700 // reserved space for secondary language (~10kb)
  22. //#define LANG_SIZE_RESERVED 0x1ef8 // reserved space for secondary language (~10kb)
  23. #endif //_CONFIG_H