ESP-IDF in CPP 11: Non-volatile Storage Continued

Поделиться
HTML-код
  • Опубликовано: 1 янв 2025

Комментарии •

  • @OckertM
    @OckertM 3 года назад +1

    0:00 Hello and welcome, Where we left off
    4:40 Continue the implementation
    57:45 Next Video
    Thanks Simon!

  • @mynameismole
    @mynameismole Год назад +1

    Would be great to hear a bit about the smart pointers.

  • @iiilllii140
    @iiilllii140 2 года назад +1

    Just a small question:
    You have created a get_buffer public member method that executes the private static method _get_buf. Why is it static and not just a private member method, such that as a bonus it is not necessary to pass in the first function parameter (handle), since handle is already given as class property? On my own implementation I wouldn't have set _get_buf as static.
    Is there an "advantage" of static?
    A wonderful series

  • @vektoralexanderman4979
    @vektoralexanderman4979 3 месяца назад

    Could we instead use a fixed-size buffer allocated on the stack at compile time, rather than dynamic memory allocation, to handle data in the _verify_buf function? If the data exceeds this buffer size, we could read or write it in chunks.
    Thanks for the great videos.

    • @DrGreenGiant
      @DrGreenGiant  3 месяца назад

      You could indeed. That static allocation would then not be able to be used for anything else, and as you say, you would have to chunk it up for bigger buffers. If you _can't_ use heap allocs which allow the memory reuse afterwards then static would be fine. You could possibly consider doing it on the stack with small chunks too, but be wary of the FREERTOS stack size for that task.
      Thanks for the great comment!