@@ -545,60 +545,60 @@ MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ipv4_subnet_ap_obj, wifi_radio_get_ipv4
545545MP_PROPERTY_GETTER (wifi_radio_ipv4_subnet_ap_obj ,
546546 (mp_obj_t )& wifi_radio_get_ipv4_subnet_ap_obj );
547547
548- //| def set_ipv4_address(
549- //| self,
550- //| *,
551- //| ipv4: ipaddress.IPv4Address,
552- //| netmask: ipaddress.IPv4Address,
553- //| gateway: ipaddress.IPv4Address,
554- //| ipv4_dns: Optional[ipaddress.IPv4Address]
555- //| ) -> None:
556- //| """Sets the IP v4 address of the station. Must include the netmask and gateway. DNS address is optional.
557- //| Setting the address manually will stop the DHCP client."""
558- //| ...
559- STATIC mp_obj_t wifi_radio_set_ipv4_address (size_t n_args , const mp_obj_t * pos_args , mp_map_t * kw_args ) {
560- enum { ARG_ipv4 , ARG_netmask , ARG_gateway , ARG_ipv4_dns };
561- static const mp_arg_t allowed_args [] = {
562- { MP_QSTR_ipv4 , MP_ARG_REQUIRED | MP_ARG_KW_ONLY | MP_ARG_OBJ , },
563- { MP_QSTR_netmask , MP_ARG_REQUIRED | MP_ARG_KW_ONLY | MP_ARG_OBJ , },
564- { MP_QSTR_gateway , MP_ARG_REQUIRED | MP_ARG_KW_ONLY | MP_ARG_OBJ , },
565- { MP_QSTR_ipv4_dns , MP_ARG_OBJ | MP_ARG_KW_ONLY , {.u_obj = MP_OBJ_NULL } },
566- };
567-
568- wifi_radio_obj_t * self = MP_OBJ_TO_PTR (pos_args [0 ]);
569- mp_arg_val_t args [MP_ARRAY_SIZE (allowed_args )];
570- mp_arg_parse_all (n_args - 1 , pos_args + 1 , kw_args , MP_ARRAY_SIZE (allowed_args ), allowed_args , args );
571-
572- common_hal_wifi_radio_set_ipv4_address (self , args [ARG_ipv4 ].u_obj , args [ARG_netmask ].u_obj , args [ARG_gateway ].u_obj , args [ARG_ipv4_dns ].u_obj );
573- return mp_const_none ;
574- }
575- STATIC MP_DEFINE_CONST_FUN_OBJ_KW (wifi_radio_set_ipv4_address_obj , 1 , wifi_radio_set_ipv4_address );
576-
577- //| def set_ipv4_address_ap(
578- //| self,
579- //| *,
580- //| ipv4: ipaddress.IPv4Address,
581- //| netmask: ipaddress.IPv4Address,
582- //| gateway: ipaddress.IPv4Address,
583- //| ) -> None:
584- //| """Sets the IP v4 address of the access point. Must include the netmask and gateway."""
585- //| ...
586- STATIC mp_obj_t wifi_radio_set_ipv4_address_ap (size_t n_args , const mp_obj_t * pos_args , mp_map_t * kw_args ) {
587- enum { ARG_ipv4 , ARG_netmask , ARG_gateway };
588- static const mp_arg_t allowed_args [] = {
589- { MP_QSTR_ipv4 , MP_ARG_REQUIRED | MP_ARG_KW_ONLY | MP_ARG_OBJ , },
590- { MP_QSTR_netmask , MP_ARG_REQUIRED | MP_ARG_KW_ONLY | MP_ARG_OBJ , },
591- { MP_QSTR_gateway , MP_ARG_REQUIRED | MP_ARG_KW_ONLY | MP_ARG_OBJ , },
592- };
593-
594- wifi_radio_obj_t * self = MP_OBJ_TO_PTR (pos_args [0 ]);
595- mp_arg_val_t args [MP_ARRAY_SIZE (allowed_args )];
596- mp_arg_parse_all (n_args - 1 , pos_args + 1 , kw_args , MP_ARRAY_SIZE (allowed_args ), allowed_args , args );
597-
598- common_hal_wifi_radio_set_ipv4_address_ap (self , args [ARG_ipv4 ].u_obj , args [ARG_netmask ].u_obj , args [ARG_gateway ].u_obj );
599- return mp_const_none ;
600- }
601- STATIC MP_DEFINE_CONST_FUN_OBJ_KW (wifi_radio_set_ipv4_address_ap_obj , 1 , wifi_radio_set_ipv4_address_ap );
548+ //| def set_ipv4_address(
549+ //| self,
550+ //| *,
551+ //| ipv4: ipaddress.IPv4Address,
552+ //| netmask: ipaddress.IPv4Address,
553+ //| gateway: ipaddress.IPv4Address,
554+ //| ipv4_dns: Optional[ipaddress.IPv4Address]
555+ //| ) -> None:
556+ //| """Sets the IP v4 address of the station. Must include the netmask and gateway. DNS address is optional.
557+ //| Setting the address manually will stop the DHCP client."""
558+ //| ...
559+ STATIC mp_obj_t wifi_radio_set_ipv4_address (size_t n_args , const mp_obj_t * pos_args , mp_map_t * kw_args ) {
560+ enum { ARG_ipv4 , ARG_netmask , ARG_gateway , ARG_ipv4_dns };
561+ static const mp_arg_t allowed_args [] = {
562+ { MP_QSTR_ipv4 , MP_ARG_REQUIRED | MP_ARG_KW_ONLY | MP_ARG_OBJ , },
563+ { MP_QSTR_netmask , MP_ARG_REQUIRED | MP_ARG_KW_ONLY | MP_ARG_OBJ , },
564+ { MP_QSTR_gateway , MP_ARG_REQUIRED | MP_ARG_KW_ONLY | MP_ARG_OBJ , },
565+ { MP_QSTR_ipv4_dns , MP_ARG_OBJ | MP_ARG_KW_ONLY , {.u_obj = MP_OBJ_NULL } },
566+ };
567+
568+ wifi_radio_obj_t * self = MP_OBJ_TO_PTR (pos_args [0 ]);
569+ mp_arg_val_t args [MP_ARRAY_SIZE (allowed_args )];
570+ mp_arg_parse_all (n_args - 1 , pos_args + 1 , kw_args , MP_ARRAY_SIZE (allowed_args ), allowed_args , args );
571+
572+ common_hal_wifi_radio_set_ipv4_address (self , args [ARG_ipv4 ].u_obj , args [ARG_netmask ].u_obj , args [ARG_gateway ].u_obj , args [ARG_ipv4_dns ].u_obj );
573+ return mp_const_none ;
574+ }
575+ STATIC MP_DEFINE_CONST_FUN_OBJ_KW (wifi_radio_set_ipv4_address_obj , 1 , wifi_radio_set_ipv4_address );
576+
577+ //| def set_ipv4_address_ap(
578+ //| self,
579+ //| *,
580+ //| ipv4: ipaddress.IPv4Address,
581+ //| netmask: ipaddress.IPv4Address,
582+ //| gateway: ipaddress.IPv4Address,
583+ //| ) -> None:
584+ //| """Sets the IP v4 address of the access point. Must include the netmask and gateway."""
585+ //| ...
586+ STATIC mp_obj_t wifi_radio_set_ipv4_address_ap (size_t n_args , const mp_obj_t * pos_args , mp_map_t * kw_args ) {
587+ enum { ARG_ipv4 , ARG_netmask , ARG_gateway };
588+ static const mp_arg_t allowed_args [] = {
589+ { MP_QSTR_ipv4 , MP_ARG_REQUIRED | MP_ARG_KW_ONLY | MP_ARG_OBJ , },
590+ { MP_QSTR_netmask , MP_ARG_REQUIRED | MP_ARG_KW_ONLY | MP_ARG_OBJ , },
591+ { MP_QSTR_gateway , MP_ARG_REQUIRED | MP_ARG_KW_ONLY | MP_ARG_OBJ , },
592+ };
593+
594+ wifi_radio_obj_t * self = MP_OBJ_TO_PTR (pos_args [0 ]);
595+ mp_arg_val_t args [MP_ARRAY_SIZE (allowed_args )];
596+ mp_arg_parse_all (n_args - 1 , pos_args + 1 , kw_args , MP_ARRAY_SIZE (allowed_args ), allowed_args , args );
597+
598+ common_hal_wifi_radio_set_ipv4_address_ap (self , args [ARG_ipv4 ].u_obj , args [ARG_netmask ].u_obj , args [ARG_gateway ].u_obj );
599+ return mp_const_none ;
600+ }
601+ STATIC MP_DEFINE_CONST_FUN_OBJ_KW (wifi_radio_set_ipv4_address_ap_obj , 1 , wifi_radio_set_ipv4_address_ap );
602602
603603//| ipv4_address: Optional[ipaddress.IPv4Address]
604604//| """IP v4 Address of the station when connected to an access point. None otherwise. (read-only)"""
0 commit comments