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