mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 03:30:14 +01:00
stm32: Integrate in the cyw43 driver and network.WLAN class.
Enable it by setting MICROPY_PY_NETWORK_CYW43=1 at the Makefile level.
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
|
||||
#if MICROPY_PY_LWIP
|
||||
#include "lwip/init.h"
|
||||
#include "drivers/cyw43/cyw43.h"
|
||||
#endif
|
||||
|
||||
#include "systick.h"
|
||||
@@ -481,6 +482,17 @@ void stm32_main(uint32_t reset_mode) {
|
||||
systick_enable_dispatch(SYSTICK_DISPATCH_LWIP, mod_network_lwip_poll_wrapper);
|
||||
#endif
|
||||
|
||||
#if MICROPY_PY_NETWORK_CYW43
|
||||
{
|
||||
cyw43_init(&cyw43_state);
|
||||
uint8_t buf[8];
|
||||
memcpy(&buf[0], "PYBD", 4);
|
||||
mp_hal_get_mac_ascii(MP_HAL_MAC_WLAN0, 8, 4, (char*)&buf[4]);
|
||||
cyw43_wifi_ap_set_ssid(&cyw43_state, 8, buf);
|
||||
cyw43_wifi_ap_set_password(&cyw43_state, 8, (const uint8_t*)"pybd0123");
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(MICROPY_HW_UART_REPL)
|
||||
// Set up a UART REPL using a statically allocated object
|
||||
pyb_uart_repl_obj.base.type = &pyb_uart_type;
|
||||
|
||||
Reference in New Issue
Block a user