@@ -236,19 +236,19 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(espnow_active_obj, 1, 2, espnow_activ
236236// timeout: Default read timeout (default=300,000 milliseconds)
237237STATIC mp_obj_t espnow_config (size_t n_args , const mp_obj_t * pos_args , mp_map_t * kw_args ) {
238238 esp_espnow_obj_t * self = _get_singleton ();
239- enum { ARG_get , ARG_buffer , ARG_timeout_ms , ARG_rate };
239+ enum { ARG_get , ARG_rxbuf , ARG_timeout_ms , ARG_rate };
240240 static const mp_arg_t allowed_args [] = {
241241 { MP_QSTR_ , MP_ARG_OBJ , {.u_obj = MP_OBJ_NULL } },
242- { MP_QSTR_buffer , MP_ARG_KW_ONLY | MP_ARG_INT , {.u_int = -1 } },
242+ { MP_QSTR_rxbuf , MP_ARG_KW_ONLY | MP_ARG_INT , {.u_int = -1 } },
243243 { MP_QSTR_timeout_ms , MP_ARG_KW_ONLY | MP_ARG_INT , {.u_int = INT_MIN } },
244244 { MP_QSTR_rate , MP_ARG_KW_ONLY | MP_ARG_INT , {.u_int = -1 } },
245245 };
246246 mp_arg_val_t args [MP_ARRAY_SIZE (allowed_args )];
247247 mp_arg_parse_all (n_args - 1 , pos_args + 1 , kw_args ,
248248 MP_ARRAY_SIZE (allowed_args ), allowed_args , args );
249249
250- if (args [ARG_buffer ].u_int >= 0 ) {
251- self -> recv_buffer_size = args [ARG_buffer ].u_int ;
250+ if (args [ARG_rxbuf ].u_int >= 0 ) {
251+ self -> recv_buffer_size = args [ARG_rxbuf ].u_int ;
252252 }
253253 if (args [ARG_timeout_ms ].u_int != INT_MIN ) {
254254 self -> recv_timeout_ms = args [ARG_timeout_ms ].u_int ;
@@ -268,7 +268,7 @@ STATIC mp_obj_t espnow_config(size_t n_args, const mp_obj_t *pos_args, mp_map_t
268268#define QS (x ) (uintptr_t)MP_OBJ_NEW_QSTR(x)
269269 // Return the value of the requested parameter
270270 uintptr_t name = (uintptr_t )args [ARG_get ].u_obj ;
271- if (name == QS (MP_QSTR_buffer )) {
271+ if (name == QS (MP_QSTR_rxbuf )) {
272272 return mp_obj_new_int (self -> recv_buffer_size );
273273 } else if (name == QS (MP_QSTR_timeout_ms )) {
274274 return mp_obj_new_int (self -> recv_timeout_ms );
0 commit comments