kopia lustrzana https://github.com/pimoroni/pimoroni-pico
Pico Wireless: Use tracked alloc.
rodzic
aa91450f59
commit
a45eeb1623
|
@ -2,6 +2,7 @@
|
||||||
#include "hardware/sync.h"
|
#include "hardware/sync.h"
|
||||||
#include "pico/binary_info.h"
|
#include "pico/binary_info.h"
|
||||||
|
|
||||||
|
#include "micropython/modules/util.hpp"
|
||||||
#include "libraries/pico_wireless/pico_wireless.hpp"
|
#include "libraries/pico_wireless/pico_wireless.hpp"
|
||||||
|
|
||||||
using namespace pimoroni;
|
using namespace pimoroni;
|
||||||
|
@ -51,7 +52,7 @@ mp_obj_t mp_ip_to_obj(IPAddress ip) {
|
||||||
|
|
||||||
mp_obj_t picowireless_init() {
|
mp_obj_t picowireless_init() {
|
||||||
if(wireless == nullptr)
|
if(wireless == nullptr)
|
||||||
wireless = new PicoWireless();
|
wireless = m_tracked_alloc_class(PicoWireless);
|
||||||
wireless->init();
|
wireless->init();
|
||||||
return mp_const_none;
|
return mp_const_none;
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue