JocPro

waveshare_rp2350b_plus_w.h

May 20th, 2026
25
0
Never
3
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.04 KB | Source Code | 0 0
  1. /*
  2. * Copyright (c) 2024 Raspberry Pi (Trading) Ltd.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6.  
  7. // -----------------------------------------------------
  8. // NOTE: THIS HEADER IS ALSO INCLUDED BY ASSEMBLER SO
  9. // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES
  10. // -----------------------------------------------------
  11.  
  12. // This header may be included by other board headers as "boards/waveshare_rp2350_plus_w.h"
  13.  
  14. #ifndef _BOARDS_WAVESHARE_RP2350B_PLUS_W
  15. #define _BOARDS_WAVESHARE_RP2350B_PLUS_W
  16.  
  17. pico_board_cmake_set(PICO_PLATFORM, rp2350)
  18.  
  19. // For board detection
  20. #define WAVESHARE_RP2350B_PLUS_W
  21.  
  22. // --- RP2350 VARIANT ---
  23. #define PICO_RP2350A 0
  24.  
  25. // --- UART ---
  26. #ifndef PICO_DEFAULT_UART
  27. #define PICO_DEFAULT_UART 0
  28. #endif
  29. #ifndef PICO_DEFAULT_UART_TX_PIN
  30. #define PICO_DEFAULT_UART_TX_PIN 0
  31. #endif
  32. #ifndef PICO_DEFAULT_UART_RX_PIN
  33. #define PICO_DEFAULT_UART_RX_PIN 1
  34. #endif
  35.  
  36. // --- I2C ---
  37. #ifndef PICO_DEFAULT_I2C
  38. #define PICO_DEFAULT_I2C 0
  39. #endif
  40. #ifndef PICO_DEFAULT_I2C_SDA_PIN
  41. #define PICO_DEFAULT_I2C_SDA_PIN 4
  42. #endif
  43. #ifndef PICO_DEFAULT_I2C_SCL_PIN
  44. #define PICO_DEFAULT_I2C_SCL_PIN 5
  45. #endif
  46.  
  47. // --- SPI ---
  48. #ifndef PICO_DEFAULT_SPI
  49. #define PICO_DEFAULT_SPI 0
  50. #endif
  51. #ifndef PICO_DEFAULT_SPI_SCK_PIN
  52. #define PICO_DEFAULT_SPI_SCK_PIN 18
  53. #endif
  54. #ifndef PICO_DEFAULT_SPI_TX_PIN
  55. #define PICO_DEFAULT_SPI_TX_PIN 19
  56. #endif
  57. #ifndef PICO_DEFAULT_SPI_RX_PIN
  58. #define PICO_DEFAULT_SPI_RX_PIN 16
  59. #endif
  60. #ifndef PICO_DEFAULT_SPI_CSN_PIN
  61. #define PICO_DEFAULT_SPI_CSN_PIN 17
  62. #endif
  63.  
  64. // --- FLASH ---
  65.  
  66. #define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1
  67.  
  68. #ifndef PICO_FLASH_SPI_CLKDIV
  69. #define PICO_FLASH_SPI_CLKDIV 2
  70. #endif
  71.  
  72. // pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024)
  73. #ifndef PICO_FLASH_SIZE_BYTES
  74. #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024)
  75. #endif
  76. // Drive high to force power supply into PWM mode (lower ripple on 3V3 at light loads)
  77. // note the SMSP mode pin is on WL_GPIO1
  78.  
  79. #ifndef CYW43_WL_GPIO_COUNT
  80. #define CYW43_WL_GPIO_COUNT 3
  81. #endif
  82.  
  83. #ifndef CYW43_WL_GPIO_LED_PIN
  84. #define CYW43_WL_GPIO_LED_PIN 0
  85. #endif
  86.  
  87. // If CYW43_WL_GPIO_VBUS_PIN is defined then a CYW43 GPIO has to be used to read VBUS.
  88. // This can be passed to cyw43_arch_gpio_get to determine if the device is battery powered.
  89. // PICO_VBUS_PIN and CYW43_WL_GPIO_VBUS_PIN should not both be defined.
  90. #ifndef CYW43_WL_GPIO_VBUS_PIN
  91. #define CYW43_WL_GPIO_VBUS_PIN 2
  92. #endif
  93.  
  94. // If CYW43_USES_VSYS_PIN is defined then CYW43 uses the VSYS GPIO (defined by PICO_VSYS_PIN) for other purposes.
  95. // If this is the case, to use the VSYS GPIO it's necessary to ensure CYW43 is not using it.
  96. // This can be achieved by wrapping the use of the VSYS GPIO in cyw43_thread_enter / cyw43_thread_exit.
  97. #ifndef CYW43_USES_VSYS_PIN
  98. #define CYW43_USES_VSYS_PIN 1
  99. #endif
  100.  
  101. // The GPIO Pin used to monitor VSYS. Typically you would use this with ADC.
  102. // There is an example in adc/read_vsys in pico-examples.
  103. #ifndef PICO_VSYS_PIN
  104. #define PICO_VSYS_PIN 43
  105. #endif
  106.  
  107. // pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1
  108. #ifndef PICO_RP2350_A2_SUPPORTED
  109. #define PICO_RP2350_A2_SUPPORTED 1
  110. #endif
  111.  
  112. // cyw43 SPI pins can't be changed at runtime
  113. #ifndef CYW43_PIN_WL_DYNAMIC
  114. #define CYW43_PIN_WL_DYNAMIC 0
  115. #endif
  116.  
  117. // gpio pin to power up the cyw43 chip
  118. #ifndef CYW43_DEFAULT_PIN_WL_REG_ON
  119. #define CYW43_DEFAULT_PIN_WL_REG_ON 36ULL
  120. #endif
  121.  
  122. // gpio pin for spi data out to the cyw43 chip
  123. #ifndef CYW43_DEFAULT_PIN_WL_DATA_OUT
  124. #define CYW43_DEFAULT_PIN_WL_DATA_OUT 37ULL
  125. #endif
  126.  
  127. // gpio pin for spi data in from the cyw43 chip
  128. #ifndef CYW43_DEFAULT_PIN_WL_DATA_IN
  129. #define CYW43_DEFAULT_PIN_WL_DATA_IN 37ULL
  130. #endif
  131.  
  132. // gpio (irq) pin for the irq line from the cyw43 chip
  133. #ifndef CYW43_DEFAULT_PIN_WL_HOST_WAKE
  134. #define CYW43_DEFAULT_PIN_WL_HOST_WAKE 37ULL
  135. #endif
  136.  
  137. // gpio pin for the spi clock line to the cyw43 chip
  138. #ifndef CYW43_DEFAULT_PIN_WL_CLOCK
  139. #define CYW43_DEFAULT_PIN_WL_CLOCK 39ULL
  140. #endif
  141.  
  142. // gpio pin for the spi chip select to the cyw43 chip
  143. #ifndef CYW43_DEFAULT_PIN_WL_CS
  144. #define CYW43_DEFAULT_PIN_WL_CS 38ULL
  145. #endif
  146.  
  147. #endif
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
Add Comment
Please, Sign In to add comment