|
53 | 53 |
|
54 | 54 | #define CYW43_HOST_NAME mod_network_hostname_data
|
55 | 55 |
|
| 56 | +#if CYW43_PIN_WL_DYNAMIC |
| 57 | + |
| 58 | +// Dynamic pins can be changed at runtime before initialising the CYW43 |
| 59 | + |
| 60 | +typedef enum cyw43_pin_index_t { |
| 61 | + CYW43_PIN_INDEX_WL_REG_ON, |
| 62 | + CYW43_PIN_INDEX_WL_DATA_OUT, |
| 63 | + CYW43_PIN_INDEX_WL_DATA_IN, |
| 64 | + CYW43_PIN_INDEX_WL_HOST_WAKE, |
| 65 | + CYW43_PIN_INDEX_WL_CLOCK, |
| 66 | + CYW43_PIN_INDEX_WL_CS, |
| 67 | + CYW43_PIN_INDEX_WL_COUNT // last |
| 68 | +} cyw43_pin_index_t; |
| 69 | + |
| 70 | +// Function to retrieve a cyw43 dynamic pin |
| 71 | +uint cyw43_get_pin_wl(cyw43_pin_index_t pin_id); |
| 72 | + |
| 73 | +#define CYW43_PIN_WL_REG_ON cyw43_get_pin_wl(CYW43_PIN_INDEX_WL_REG_ON) |
| 74 | +#define CYW43_PIN_WL_DATA_OUT cyw43_get_pin_wl(CYW43_PIN_INDEX_WL_DATA_OUT) |
| 75 | +#define CYW43_PIN_WL_DATA_IN cyw43_get_pin_wl(CYW43_PIN_INDEX_WL_DATA_IN) |
| 76 | +#define CYW43_PIN_WL_HOST_WAKE cyw43_get_pin_wl(CYW43_PIN_INDEX_WL_HOST_WAKE) |
| 77 | +#define CYW43_PIN_WL_CLOCK cyw43_get_pin_wl(CYW43_PIN_INDEX_WL_CLOCK) |
| 78 | +#define CYW43_PIN_WL_CS cyw43_get_pin_wl(CYW43_PIN_INDEX_WL_CS) |
| 79 | + |
| 80 | +#else |
| 81 | + |
| 82 | +#define CYW43_PIN_WL_REG_ON CYW43_DEFAULT_PIN_WL_REG_ON |
| 83 | +#define CYW43_PIN_WL_DATA_OUT CYW43_DEFAULT_PIN_WL_DATA_OUT |
| 84 | +#define CYW43_PIN_WL_DATA_IN CYW43_DEFAULT_PIN_WL_DATA_IN |
| 85 | +#define CYW43_PIN_WL_HOST_WAKE CYW43_DEFAULT_PIN_WL_HOST_WAKE |
| 86 | +#define CYW43_PIN_WL_CLOCK CYW43_DEFAULT_PIN_WL_CLOCK |
| 87 | +#define CYW43_PIN_WL_CS CYW43_DEFAULT_PIN_WL_CS |
| 88 | + |
| 89 | +#endif |
| 90 | + |
56 | 91 | #define CYW43_SDPCM_SEND_COMMON_WAIT \
|
57 | 92 | if (get_core_num() == 0) { \
|
58 | 93 | cyw43_yield(); \
|
|
0 commit comments