Formatting and shrink build size on C3
This commit is contained in:
parent
e9d81c2826
commit
6f0d62d85e
@ -26,19 +26,19 @@
|
|||||||
|
|
||||||
#include "shared-bindings/mdns/RemoteService.h"
|
#include "shared-bindings/mdns/RemoteService.h"
|
||||||
|
|
||||||
const char * common_hal_mdns_remoteservice_get_service_type(mdns_remoteservice_obj_t *self) {
|
const char *common_hal_mdns_remoteservice_get_service_type(mdns_remoteservice_obj_t *self) {
|
||||||
return self->result->service_type;
|
return self->result->service_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char * common_hal_mdns_remoteservice_get_protocol(mdns_remoteservice_obj_t *self) {
|
const char *common_hal_mdns_remoteservice_get_protocol(mdns_remoteservice_obj_t *self) {
|
||||||
return self->result->proto;
|
return self->result->proto;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char * common_hal_mdns_remoteservice_get_instance_name(mdns_remoteservice_obj_t *self) {
|
const char *common_hal_mdns_remoteservice_get_instance_name(mdns_remoteservice_obj_t *self) {
|
||||||
return self->result->instance_name;
|
return self->result->instance_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char * common_hal_mdns_remoteservice_get_hostname(mdns_remoteservice_obj_t *self) {
|
const char *common_hal_mdns_remoteservice_get_hostname(mdns_remoteservice_obj_t *self) {
|
||||||
return self->result->hostname;
|
return self->result->hostname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ bool common_hal_mdns_server_deinited(mdns_server_obj_t *self) {
|
|||||||
return mdns_instance_name_set(NULL) == ESP_ERR_INVALID_STATE;
|
return mdns_instance_name_set(NULL) == ESP_ERR_INVALID_STATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char * common_hal_mdns_server_get_hostname(mdns_server_obj_t *self) {
|
const char *common_hal_mdns_server_get_hostname(mdns_server_obj_t *self) {
|
||||||
return self->hostname;
|
return self->hostname;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ void common_hal_mdns_server_set_hostname(mdns_server_obj_t *self, const char *ho
|
|||||||
self->hostname = hostname;
|
self->hostname = hostname;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char * common_hal_mdns_server_get_instance_name(mdns_server_obj_t *self) {
|
const char *common_hal_mdns_server_get_instance_name(mdns_server_obj_t *self) {
|
||||||
if (self->instance_name == NULL) {
|
if (self->instance_name == NULL) {
|
||||||
return self->hostname;
|
return self->hostname;
|
||||||
}
|
}
|
||||||
@ -121,7 +121,7 @@ mp_obj_t common_hal_mdns_server_find(mdns_server_obj_t *self, const char *servic
|
|||||||
// Don't error if we're out of memory. Instead, truncate the tuple.
|
// Don't error if we're out of memory. Instead, truncate the tuple.
|
||||||
uint8_t added = 0;
|
uint8_t added = 0;
|
||||||
while (next != NULL) {
|
while (next != NULL) {
|
||||||
mdns_remoteservice_obj_t *service = gc_alloc(sizeof(mdns_remoteservice_obj_t), true, false);
|
mdns_remoteservice_obj_t *service = gc_alloc(sizeof(mdns_remoteservice_obj_t), GC_ALLOC_FLAG_HAS_FINALISER, false);
|
||||||
if (service == NULL) {
|
if (service == NULL) {
|
||||||
if (added == 0) {
|
if (added == 0) {
|
||||||
m_malloc_fail(sizeof(mdns_remoteservice_obj_t));
|
m_malloc_fail(sizeof(mdns_remoteservice_obj_t));
|
||||||
|
@ -34,18 +34,19 @@ CIRCUITPY_ESPIDF ?= 1
|
|||||||
CIRCUITPY_MODULE ?= none
|
CIRCUITPY_MODULE ?= none
|
||||||
|
|
||||||
ifeq ($(IDF_TARGET),esp32c3)
|
ifeq ($(IDF_TARGET),esp32c3)
|
||||||
CIRCUITPY_USB = 0
|
|
||||||
CIRCUITPY_ALARM = 0
|
CIRCUITPY_ALARM = 0
|
||||||
|
CIRCUITPY_AUDIOBUSIO = 0
|
||||||
CIRCUITPY_BLEIO = 1
|
CIRCUITPY_BLEIO = 1
|
||||||
CIRCUITPY_BLEIO_HCI = 0
|
CIRCUITPY_BLEIO_HCI = 0
|
||||||
CIRCUITPY_COUNTIO = 0
|
CIRCUITPY_COUNTIO = 0
|
||||||
CIRCUITPY_ROTARYIO = 0
|
|
||||||
CIRCUITPY_AUDIOBUSIO = 0
|
|
||||||
CIRCUITPY_FREQUENCYIO = 0
|
CIRCUITPY_FREQUENCYIO = 0
|
||||||
CIRCUITPY_IMAGECAPTURE = 0
|
CIRCUITPY_IMAGECAPTURE = 0
|
||||||
|
CIRCUITPY_MDNS = 0
|
||||||
CIRCUITPY_PARALLELDISPLAY = 0
|
CIRCUITPY_PARALLELDISPLAY = 0
|
||||||
|
CIRCUITPY_ROTARYIO = 0
|
||||||
CIRCUITPY_TOUCHIO ?= 1
|
CIRCUITPY_TOUCHIO ?= 1
|
||||||
CIRCUITPY_TOUCHIO_USE_NATIVE = 0
|
CIRCUITPY_TOUCHIO_USE_NATIVE = 0
|
||||||
|
CIRCUITPY_USB = 0
|
||||||
else ifeq ($(IDF_TARGET),esp32s3)
|
else ifeq ($(IDF_TARGET),esp32s3)
|
||||||
CIRCUITPY_BLEIO = 1
|
CIRCUITPY_BLEIO = 1
|
||||||
CIRCUITPY_BLEIO_HCI = 0
|
CIRCUITPY_BLEIO_HCI = 0
|
||||||
|
@ -140,7 +140,6 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(mdns_remoteservice_deinit_obj, mdns_remoteservi
|
|||||||
STATIC const mp_rom_map_elem_t mdns_remoteservice_locals_dict_table[] = {
|
STATIC const mp_rom_map_elem_t mdns_remoteservice_locals_dict_table[] = {
|
||||||
{ MP_ROM_QSTR(MP_QSTR_hostname), MP_ROM_PTR(&mdns_remoteservice_hostname_obj) },
|
{ MP_ROM_QSTR(MP_QSTR_hostname), MP_ROM_PTR(&mdns_remoteservice_hostname_obj) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR_instance_name), MP_ROM_PTR(&mdns_remoteservice_instance_name_obj) },
|
{ MP_ROM_QSTR(MP_QSTR_instance_name), MP_ROM_PTR(&mdns_remoteservice_instance_name_obj) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR_ipv4_address), MP_ROM_PTR(&mdns_remoteservice_instance_name_obj) },
|
|
||||||
{ MP_ROM_QSTR(MP_QSTR_service_type), MP_ROM_PTR(&mdns_remoteservice_service_type_obj) },
|
{ MP_ROM_QSTR(MP_QSTR_service_type), MP_ROM_PTR(&mdns_remoteservice_service_type_obj) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR_protocol), MP_ROM_PTR(&mdns_remoteservice_protocol_obj) },
|
{ MP_ROM_QSTR(MP_QSTR_protocol), MP_ROM_PTR(&mdns_remoteservice_protocol_obj) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR_port), MP_ROM_PTR(&mdns_remoteservice_port_obj) },
|
{ MP_ROM_QSTR(MP_QSTR_port), MP_ROM_PTR(&mdns_remoteservice_port_obj) },
|
||||||
|
@ -33,9 +33,9 @@
|
|||||||
|
|
||||||
extern const mp_obj_type_t mdns_remoteservice_type;
|
extern const mp_obj_type_t mdns_remoteservice_type;
|
||||||
|
|
||||||
const char * common_hal_mdns_remoteservice_get_service_type(mdns_remoteservice_obj_t *self);
|
const char *common_hal_mdns_remoteservice_get_service_type(mdns_remoteservice_obj_t *self);
|
||||||
const char * common_hal_mdns_remoteservice_get_protocol(mdns_remoteservice_obj_t *self);
|
const char *common_hal_mdns_remoteservice_get_protocol(mdns_remoteservice_obj_t *self);
|
||||||
const char * common_hal_mdns_remoteservice_get_instance_name(mdns_remoteservice_obj_t *self);
|
const char *common_hal_mdns_remoteservice_get_instance_name(mdns_remoteservice_obj_t *self);
|
||||||
const char * common_hal_mdns_remoteservice_get_hostname(mdns_remoteservice_obj_t *self);
|
const char *common_hal_mdns_remoteservice_get_hostname(mdns_remoteservice_obj_t *self);
|
||||||
mp_int_t common_hal_mdns_remoteservice_get_port(mdns_remoteservice_obj_t *self);
|
mp_int_t common_hal_mdns_remoteservice_get_port(mdns_remoteservice_obj_t *self);
|
||||||
void common_hal_mdns_remoteservice_deinit(mdns_remoteservice_obj_t *self);
|
void common_hal_mdns_remoteservice_deinit(mdns_remoteservice_obj_t *self);
|
||||||
|
@ -35,9 +35,9 @@ extern const mp_obj_type_t mdns_server_type;
|
|||||||
void common_hal_mdns_server_construct(mdns_server_obj_t *self, mp_obj_t network_interface);
|
void common_hal_mdns_server_construct(mdns_server_obj_t *self, mp_obj_t network_interface);
|
||||||
void common_hal_mdns_server_deinit(mdns_server_obj_t *self);
|
void common_hal_mdns_server_deinit(mdns_server_obj_t *self);
|
||||||
bool common_hal_mdns_server_deinited(mdns_server_obj_t *self);
|
bool common_hal_mdns_server_deinited(mdns_server_obj_t *self);
|
||||||
const char * common_hal_mdns_server_get_hostname(mdns_server_obj_t *self);
|
const char *common_hal_mdns_server_get_hostname(mdns_server_obj_t *self);
|
||||||
void common_hal_mdns_server_set_hostname(mdns_server_obj_t *self, const char *hostname);
|
void common_hal_mdns_server_set_hostname(mdns_server_obj_t *self, const char *hostname);
|
||||||
const char * common_hal_mdns_server_get_instance_name(mdns_server_obj_t *self);
|
const char *common_hal_mdns_server_get_instance_name(mdns_server_obj_t *self);
|
||||||
void common_hal_mdns_server_set_instance_name(mdns_server_obj_t *self, const char *instance_name);
|
void common_hal_mdns_server_set_instance_name(mdns_server_obj_t *self, const char *instance_name);
|
||||||
mp_obj_t common_hal_mdns_server_find(mdns_server_obj_t *self, const char *service_type, const char *protocol, mp_float_t timeout);
|
mp_obj_t common_hal_mdns_server_find(mdns_server_obj_t *self, const char *service_type, const char *protocol, mp_float_t timeout);
|
||||||
void common_hal_mdns_server_advertise_service(mdns_server_obj_t *self, const char *service_type, const char *protocol, mp_int_t port);
|
void common_hal_mdns_server_advertise_service(mdns_server_obj_t *self, const char *service_type, const char *protocol, mp_int_t port);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user