variant.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. #ifndef _SEEED_WIO_TRACKER_L1_H_
  2. #define _SEEED_WIO_TRACKER_L1_H_
  3. /** Master clock frequency */
  4. #define VARIANT_MCK (64000000ul)
  5. #define USE_LFXO // Board uses 32khz crystal for LF
  6. /*----------------------------------------------------------------------------
  7. * Headers
  8. *----------------------------------------------------------------------------*/
  9. #include "WVariant.h"
  10. #define PINS_COUNT (33)
  11. #define NUM_DIGITAL_PINS (33)
  12. #define NUM_ANALOG_INPUTS (8)
  13. #define NUM_ANALOG_OUTPUTS (0)
  14. // LEDs
  15. #define PIN_LED (11)
  16. #define LED_BLUE (-1) // Disable annoying flashing caused by Bluefruit
  17. #define LED_BUILTIN PIN_LED
  18. #define P_LORA_TX_LED PIN_LED
  19. #define LED_STATE_ON 1
  20. // Buttons
  21. #define PIN_BUTTON1 (13) // Menu / User Button
  22. #define PIN_BUTTON2 (25) // Joystick Up
  23. #define PIN_BUTTON3 (26) // Joystick Down
  24. #define PIN_BUTTON4 (27) // Joystick Left
  25. #define PIN_BUTTON5 (28) // Joystick Right
  26. #define PIN_BUTTON6 (29) // Joystick Press
  27. #define PIN_USER_BTN PIN_BUTTON1
  28. #define JOYSTICK_UP PIN_BUTTON2
  29. #define JOYSTICK_DOWN PIN_BUTTON3
  30. #define JOYSTICK_LEFT PIN_BUTTON4
  31. #define JOYSTICK_RIGHT PIN_BUTTON5
  32. #define JOYSTICK_PRESS PIN_BUTTON6
  33. // Buzzer
  34. // #define PIN_BUZZER (12) // Buzzer pin (defined per firmware type)
  35. #define VBAT_ENABLE (30)
  36. // Analog pins
  37. #define PIN_VBAT_READ (16)
  38. #define AREF_VOLTAGE (3.6F)
  39. #define ADC_MULTIPLIER (2.0F)
  40. #define ADC_RESOLUTION (12)
  41. // Serial interfaces
  42. #define PIN_SERIAL1_RX (7)
  43. #define PIN_SERIAL1_TX (6)
  44. // SPI Interfaces
  45. #define SPI_INTERFACES_COUNT (1)
  46. #define PIN_SPI_MISO (9)
  47. #define PIN_SPI_MOSI (10)
  48. #define PIN_SPI_SCK (8)
  49. // Lora Pins
  50. #define P_LORA_SCLK PIN_SPI_SCK
  51. #define P_LORA_MISO PIN_SPI_MISO
  52. #define P_LORA_MOSI PIN_SPI_MOSI
  53. #define P_LORA_DIO_1 (1)
  54. #define P_LORA_RESET (2)
  55. #define P_LORA_BUSY (3)
  56. #define P_LORA_NSS (4)
  57. #define SX126X_RXEN (5)
  58. #define SX126X_TXEN RADIOLIB_NC
  59. #define SX126X_DIO2_AS_RF_SWITCH true
  60. #define SX126X_DIO3_TCXO_VOLTAGE (1.8f)
  61. // Wire Interfaces
  62. #define WIRE_INTERFACES_COUNT (2)
  63. #define PIN_WIRE_SDA (14)
  64. #define PIN_WIRE_SCL (15)
  65. #define PIN_WIRE1_SDA (17)
  66. #define PIN_WIRE1_SCL (18)
  67. #define I2C_NO_RESCAN
  68. #define DISPLAY_ADDRESS 0x3D // SH1106 OLED I2C address
  69. // GPS L76KB
  70. #define GPS_BAUDRATE 9600
  71. #define PIN_GPS_TX PIN_SERIAL1_RX
  72. #define PIN_GPS_RX PIN_SERIAL1_TX
  73. #define PIN_GPS_STANDBY (0)
  74. #define PIN_GPS_EN (18)
  75. // QSPI Pins
  76. #define PIN_QSPI_SCK (21)
  77. #define PIN_QSPI_CS (22)
  78. #define PIN_QSPI_IO0 (23)
  79. #define PIN_QSPI_IO1 (24)
  80. #define PIN_QSPI_IO2 (25)
  81. #define PIN_QSPI_IO3 (26)
  82. #define EXTERNAL_FLASH_DEVICES P25Q16H
  83. #define EXTERNAL_FLASH_USE_QSPI
  84. #endif