config.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. //SWI2C configuration
  9. #define SWI2C
  10. //#define SWI2C_SDA 20 //SDA on P3
  11. //#define SWI2C_SCL 21 //SCL on P3
  12. #define SWI2C_A8
  13. #define SWI2C_DEL 20 //2us clock delay
  14. #define SWI2C_TMO 2048 //2048 cycles timeout
  15. //PAT9125 configuration
  16. #define PAT9125_SWI2C
  17. #define PAT9125_I2C_ADDR 0x75 //ID=LO
  18. //#define PAT9125_I2C_ADDR 0x79 //ID=HI
  19. //#define PAT9125_I2C_ADDR 0x73 //ID=NC
  20. #define PAT9125_XRES 0
  21. #define PAT9125_YRES 240
  22. //SM4 configuration
  23. #define SM4_DEFDELAY 500 //default step delay [us]
  24. //TMC2130 - Trinamic stepper driver
  25. //pinout - hardcoded
  26. //spi:
  27. #define TMC2130_SPI_RATE 0 // fosc/4 = 4MHz
  28. #define TMC2130_SPCR SPI_SPCR(TMC2130_SPI_RATE, 1, 1, 1, 0)
  29. #define TMC2130_SPSR SPI_SPSR(TMC2130_SPI_RATE)
  30. //W25X20CL configuration
  31. //pinout:
  32. #define W25X20CL_PIN_CS 32
  33. //spi:
  34. #define W25X20CL_SPI_RATE 0 // fosc/4 = 4MHz
  35. #define W25X20CL_SPCR SPI_SPCR(W25X20CL_SPI_RATE, 1, 1, 1, 0)
  36. #define W25X20CL_SPSR SPI_SPSR(W25X20CL_SPI_RATE)
  37. //LANG - Multi-language support
  38. #define LANG_MODE 0 // primary language only
  39. //#define LANG_MODE 1 // sec. language support
  40. #define LANG_SIZE_RESERVED 0x2f00 // reserved space for secondary language (12032 bytes)
  41. #endif //_CONFIG_H