|
35 | 35 | #include "extint.h" |
36 | 36 | #include "pendsv.h" |
37 | 37 | #include "sdio.h" |
| 38 | +#include "extmod/mpbthci.h" |
38 | 39 |
|
39 | 40 | #define CYW43_USE_SPI (0) |
40 | 41 | #define CYW43_LWIP (1) |
41 | 42 | #define CYW43_USE_STATS (0) |
| 43 | +#define CYW43_ENABLE_BLUETOOTH_OVER_UART (1) |
42 | 44 |
|
43 | 45 | #ifndef CYW43_CHIPSET_FIRMWARE_INCLUDE_FILE |
44 | 46 | #define CYW43_CHIPSET_FIRMWARE_INCLUDE_FILE "lib/cyw43-driver/firmware/w4343WA1_7_45_98_50_combined.h" |
|
48 | 50 | #define CYW43_WIFI_NVRAM_INCLUDE_FILE "lib/cyw43-driver/firmware/wifi_nvram_1dx.h" |
49 | 51 | #endif |
50 | 52 |
|
| 53 | +#ifndef CYW43_BT_FIRMWARE_INCLUDE_FILE |
| 54 | +#define CYW43_BT_FIRMWARE_INCLUDE_FILE "lib/cyw43-driver/firmware/cyw43_btfw_4343A1.h" |
| 55 | +#endif |
| 56 | + |
51 | 57 | #define CYW43_IOCTL_TIMEOUT_US (1000000) |
52 | 58 | #define CYW43_SLEEP_MAX (50) |
53 | 59 | #define CYW43_NETUTILS (1) |
|
76 | 82 | #define CYW43_HAL_PIN_PULL_DOWN MP_HAL_PIN_PULL_DOWN |
77 | 83 |
|
78 | 84 | #define CYW43_HAL_MAC_WLAN0 MP_HAL_MAC_WLAN0 |
| 85 | +#define CYW43_HAL_MAC_BDADDR MP_HAL_MAC_BDADDR |
79 | 86 |
|
80 | 87 | #define cyw43_hal_ticks_us mp_hal_ticks_us |
81 | 88 | #define cyw43_hal_ticks_ms mp_hal_ticks_ms |
|
90 | 97 | #define cyw43_hal_get_mac_ascii mp_hal_get_mac_ascii |
91 | 98 | #define cyw43_hal_generate_laa_mac mp_hal_generate_laa_mac |
92 | 99 |
|
| 100 | +#define cyw43_hal_uart_set_baudrate mp_bluetooth_hci_uart_set_baudrate |
| 101 | +#define cyw43_hal_uart_write mp_bluetooth_hci_uart_write |
| 102 | +#define cyw43_hal_uart_readchar mp_bluetooth_hci_uart_readchar |
| 103 | + |
| 104 | +#define cyw43_bluetooth_controller_init mp_bluetooth_hci_controller_init |
| 105 | +#define cyw43_bluetooth_controller_deinit mp_bluetooth_hci_controller_deinit |
| 106 | +#define cyw43_bluetooth_controller_woken mp_bluetooth_hci_controller_woken |
| 107 | +#define cyw43_bluetooth_controller_wakeup mp_bluetooth_hci_controller_wakeup |
| 108 | +#define cyw43_bluetooth_controller_sleep_maybe mp_bluetooth_hci_controller_sleep_maybe |
| 109 | + |
93 | 110 | #define CYW43_PIN_WL_REG_ON pyb_pin_WL_REG_ON |
94 | 111 | #define CYW43_PIN_WL_HOST_WAKE pyb_pin_WL_HOST_WAKE |
95 | 112 | #define CYW43_PIN_WL_SDIO_1 pyb_pin_WL_SDIO_1 |
|
0 commit comments