variant.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #ifndef _KEEPTEEN_LT1_H_
  2. #define _KEEPTEEN_LT1_H_
  3. /** Master clock frequency */
  4. #define VARIANT_MCK (64000000ul)
  5. #define USE_LFRC
  6. /*----------------------------------------------------------------------------
  7. * Headers
  8. *----------------------------------------------------------------------------*/
  9. #include "WVariant.h"
  10. #define PINS_COUNT (48)
  11. #define NUM_DIGITAL_PINS (48)
  12. #define NUM_ANALOG_INPUTS (1)
  13. #define NUM_ANALOG_OUTPUTS (0)
  14. // LEDs
  15. #define PIN_LED (15) // Blue LED
  16. #define PIN_LED2 (13) // Maybe red power LED?
  17. #define LED_BLUE (-1) // Disable annoying flashing caused by Bluefruit
  18. #define LED_BUILTIN PIN_LED
  19. #define P_LORA_TX_LED PIN_LED
  20. #define LED_STATE_ON 1
  21. // Buttons
  22. #define PIN_BUTTON1 (32) // Menu / User Button
  23. #define PIN_USER_BTN PIN_BUTTON1
  24. // Analog pins
  25. #define PIN_VBAT_READ (31)
  26. #define AREF_VOLTAGE (3.6F)
  27. #define ADC_MULTIPLIER (1.535F)
  28. #define ADC_RESOLUTION (12)
  29. // Serial interfaces
  30. #define PIN_SERIAL1_RX (22)
  31. #define PIN_SERIAL1_TX (20)
  32. // SPI Interfaces
  33. #define SPI_INTERFACES_COUNT (1)
  34. #define PIN_SPI_MISO (2)
  35. #define PIN_SPI_MOSI (38)
  36. #define PIN_SPI_SCK (43)
  37. // Lora Pins
  38. #define P_LORA_BUSY (29)
  39. #define P_LORA_MISO PIN_SPI_MISO
  40. #define P_LORA_MOSI PIN_SPI_MOSI
  41. #define P_LORA_NSS (45)
  42. #define P_LORA_SCLK PIN_SPI_SCK
  43. #define P_LORA_DIO_1 (10)
  44. #define P_LORA_RESET (9)
  45. #define SX126X_RXEN RADIOLIB_NC
  46. #define SX126X_TXEN RADIOLIB_NC
  47. #define SX126X_DIO2_AS_RF_SWITCH true
  48. #define SX126X_DIO3_TCXO_VOLTAGE (1.8f)
  49. // Wire Interfaces
  50. #define WIRE_INTERFACES_COUNT (1)
  51. #define PIN_WIRE_SDA (34)
  52. #define PIN_WIRE_SCL (36)
  53. #define I2C_NO_RESCAN
  54. // GPS L76KB
  55. #define GPS_BAUDRATE 9600
  56. #define PIN_GPS_TX PIN_SERIAL1_RX
  57. #define PIN_GPS_RX PIN_SERIAL1_TX
  58. #define PIN_GPS_EN (24)
  59. #endif // _KEEPTEEN_LT1_H_