Lines Matching refs:bundle

193     dedic_gpio_bundle_t *bundle = NULL;  in dedic_gpio_new_bundle()  local
205 bundle = calloc(1, bundle_size); in dedic_gpio_new_bundle()
206 ESP_GOTO_ON_FALSE(bundle, ESP_ERR_NO_MEM, err, TAG, "no mem for bundle"); in dedic_gpio_new_bundle()
233 …ESP_LOGD(TAG, "new outward bundle(%p) on core[%d], offset=%d, mask(%x)", bundle, core_id, out_offs… in dedic_gpio_new_bundle()
255 …ESP_LOGD(TAG, "new inward bundle(%p) on core[%d], offset=%d, mask(%x)", bundle, core_id, in_offset… in dedic_gpio_new_bundle()
276 bundle->core_id = core_id; in dedic_gpio_new_bundle()
277 bundle->out_mask = out_mask; in dedic_gpio_new_bundle()
278 bundle->in_mask = in_mask; in dedic_gpio_new_bundle()
279 bundle->out_offset = out_offset; in dedic_gpio_new_bundle()
280 bundle->in_offset = in_offset; in dedic_gpio_new_bundle()
281 bundle->nr_gpio = config->array_size; in dedic_gpio_new_bundle()
282 …memcpy(bundle->gpio_array, config->gpio_array, config->array_size * sizeof(config->gpio_array[0])); in dedic_gpio_new_bundle()
284 *ret_bundle = bundle; // return bundle instance in dedic_gpio_new_bundle()
294 if (bundle) { in dedic_gpio_new_bundle()
295 free(bundle); in dedic_gpio_new_bundle()
300 esp_err_t dedic_gpio_del_bundle(dedic_gpio_bundle_handle_t bundle) in dedic_gpio_del_bundle() argument
304 ESP_GOTO_ON_FALSE(bundle, ESP_ERR_INVALID_ARG, err, TAG, "invalid argument"); in dedic_gpio_del_bundle()
307 ESP_GOTO_ON_FALSE(core_id == bundle->core_id, ESP_FAIL, err, TAG, "del bundle on wrong CPU"); in dedic_gpio_del_bundle()
310 s_platform[core_id]->out_occupied_mask &= ~(bundle->out_mask); in dedic_gpio_del_bundle()
311 s_platform[core_id]->in_occupied_mask &= ~(bundle->in_mask); in dedic_gpio_del_bundle()
317 free(bundle); in dedic_gpio_del_bundle()
330 esp_err_t dedic_gpio_get_out_mask(dedic_gpio_bundle_handle_t bundle, uint32_t *mask) in dedic_gpio_get_out_mask() argument
333 ESP_GOTO_ON_FALSE(bundle && mask, ESP_ERR_INVALID_ARG, err, TAG, "invalid argument"); in dedic_gpio_get_out_mask()
334 *mask = bundle->out_mask; in dedic_gpio_get_out_mask()
339 esp_err_t dedic_gpio_get_in_mask(dedic_gpio_bundle_handle_t bundle, uint32_t *mask) in dedic_gpio_get_in_mask() argument
342 ESP_GOTO_ON_FALSE(bundle && mask, ESP_ERR_INVALID_ARG, err, TAG, "invalid argument"); in dedic_gpio_get_in_mask()
343 *mask = bundle->in_mask; in dedic_gpio_get_in_mask()
348 void dedic_gpio_bundle_write(dedic_gpio_bundle_handle_t bundle, uint32_t mask, uint32_t value) in dedic_gpio_bundle_write() argument
352 …cpu_ll_write_dedic_gpio_mask(bundle->out_mask & (mask << bundle->out_offset), value << bundle->out… in dedic_gpio_bundle_write()
355 uint32_t dedic_gpio_bundle_read_out(dedic_gpio_bundle_handle_t bundle) in dedic_gpio_bundle_read_out() argument
360 return (value & bundle->out_mask) >> (bundle->out_offset); in dedic_gpio_bundle_read_out()
363 uint32_t dedic_gpio_bundle_read_in(dedic_gpio_bundle_handle_t bundle) in dedic_gpio_bundle_read_in() argument
368 return (value & bundle->in_mask) >> (bundle->in_offset); in dedic_gpio_bundle_read_in()
372 esp_err_t dedic_gpio_bundle_set_interrupt_and_callback(dedic_gpio_bundle_handle_t bundle, uint32_t … in dedic_gpio_bundle_set_interrupt_and_callback() argument
375 ESP_GOTO_ON_FALSE(bundle, ESP_ERR_INVALID_ARG, err, TAG, "invalid argument"); in dedic_gpio_bundle_set_interrupt_and_callback()
380 uint32_t channel_mask = bundle->in_mask & (mask << bundle->in_offset); in dedic_gpio_bundle_set_interrupt_and_callback()
390 s_platform[core_id]->in_bundles[channel] = bundle; in dedic_gpio_bundle_set_interrupt_and_callback()