variant.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #ifndef _SEEED_SENSECAP_SOLAR_H_
  2. #define _SEEED_SENSECAP_SOLAR_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 (12)
  16. #define LED_PWR (PINS_COUNT)
  17. #define LED_BUILTIN (PIN_LED)
  18. #define LED_RED (PINS_COUNT)
  19. #define LED_GREEN (12)
  20. #define LED_BLUE (11)
  21. #define LED_STATE_ON (1) // State when LED is litted
  22. // Buttons
  23. #define PIN_BUTTON1 (13)
  24. #define PIN_BUTTON2 (20)
  25. #define VBAT_ENABLE (19) // Output LOW to enable reading of the BAT voltage.
  26. // Analog pins
  27. #define BATTERY_PIN (16) // Read the BAT voltage.
  28. #define AREF_VOLTAGE (3.0F)
  29. #define ADC_MULTIPLIER (3.0F) // 1M, 512k divider bridge
  30. #define ADC_RESOLUTION (12)
  31. // Serial interfaces
  32. #define PIN_SERIAL1_RX (7)
  33. #define PIN_SERIAL1_TX (6)
  34. // SPI Interfaces
  35. #define SPI_INTERFACES_COUNT (1)
  36. #define PIN_SPI_MISO (9)
  37. #define PIN_SPI_MOSI (10)
  38. #define PIN_SPI_SCK (8)
  39. // Lora SPI is on SPI0
  40. #define P_LORA_SCLK PIN_SPI_SCK
  41. #define P_LORA_MISO PIN_SPI_MISO
  42. #define P_LORA_MOSI PIN_SPI_MOSI
  43. // Wire Interfaces
  44. #define WIRE_INTERFACES_COUNT (1)
  45. #define PIN_WIRE_SDA (14)
  46. #define PIN_WIRE_SCL (15)
  47. // GPS L76KB
  48. #define GPS_BAUDRATE 9600
  49. #define GPS_THREAD_INTERVAL 50
  50. #define PIN_GPS_TX PIN_SERIAL1_RX
  51. #define PIN_GPS_RX PIN_SERIAL1_TX
  52. #define PIN_GPS_STANDBY (0)
  53. #define GPS_EN (18)
  54. // QSPI Pins
  55. #define PIN_QSPI_SCK (21)
  56. #define PIN_QSPI_CS (22)
  57. #define PIN_QSPI_IO0 (23)
  58. #define PIN_QSPI_IO1 (24)
  59. #define PIN_QSPI_IO2 (25)
  60. #define PIN_QSPI_IO3 (26)
  61. #define EXTERNAL_FLASH_DEVICES P25Q16H
  62. #define EXTERNAL_FLASH_USE_QSPI
  63. #endif