Commit Graph

15 Commits

Author SHA1 Message Date
Sudeep Mohanty
defd3ec220 fix(esp_ringbuf): Updated esp_ringbuf to follow astyle format
This commit updates the esp_ringbuf component to follow astyle
formatting.
2024-01-26 15:20:19 +01:00
Marius Vikhammer
b3dd5cb243 docs(ringbuf): fixed mistake in vRingbufferGetInfo API parameter doc 2024-01-15 16:18:49 +08:00
Darian Leung
7d983fe5a3 esp_ringbuf: Add xRingbufferCreateWithCaps()
This commit adds APIS to create a ring buffer with specific memory caps. The
following APIs have been added:

- xRingbufferGetStaticBuffer()
- xRingbufferCreateWithCaps()
- vRingbufferDeleteWithCaps()
2023-06-26 15:05:29 +08:00
Darian Leung
b104b52b0e ringbuf: Fix ordering of StaticRingbuffer_t
When building on linux/host compilers (e.g., GCC), the compiler may add padding
depending on the size and order of the member types.

This commit fixes the ordering or the StaticRingbuffer_t such that it matches
the internal Ringbuffer_t. The "_Static_assert" is always enabled for all
compilers.

Closes https://github.com/espressif/esp-idf/issues/11726
2023-06-25 15:30:19 +08:00
Darian Leung
a8b9314353 esp_ringbuf: Clarify behavior when sending items of 0 size
Ring buffers permit sending items of 0 size where:

- No-split/allow-split buffers will send an item (i.e., header) but the item
will have a 0 sized data section
- Byte buffers will simply return pdTRUE

This commit fixes an incorrect assert w.r.t 0 item size in
xRingbufferSendAcquire() and also adds a note to the API descriptions regarding
0 item sizes. A test case has also been added.
2023-02-28 23:56:45 +08:00
Darian Leung
443d87c2ff esp_ringbuf: Replace internal semaphores with task event lists
This commit replaces the existing TX/RX semaphores with FreeRTOS task event
lists (similar to how FreeRTOS queues implement task blocking). Using task
event lists allows the ring buffer object to be smaller and various ring buffer
functions to be faster. The ring buffer queue set impelementation was also
updated as a result.
2023-02-28 23:56:45 +08:00
Sudeep Mohanty
722a6b7cf4 docs: update programming guide for esp32s3 chip independent system chapters
This commit updates the chip independent system chapters of the
programming guide for esp32s3.

Signed-off-by: Sudeep Mohanty <sudeep.mohanty@espressif.com>
2021-11-23 12:48:10 +05:30
Ivan Grokhotkov
7f3b16a99d freertos: always enable static allocation
to use it for newlib locks
2020-12-29 16:18:04 +01:00
Angus Gratton
66fb5a29bb Whitespace: Automated whitespace fixes (large commit)
Apply the pre-commit hook whitespace fixes to all files in the repo.

(Line endings, blank lines at end of file, trailing whitespace)
2020-11-11 07:36:35 +00:00
Wang Fang
ee135b8e28 Add a note to specify that two calls to RingbufferReceive are required in wrap mode 2020-08-10 18:25:51 +08:00
Angus Gratton
2e067f5b57 ringbuf: Remove deprecated RingbufferType_t
Deprecated in ESP-IDF V3.1
2019-09-13 09:44:07 +10:00
Michael (XIAO Xufeng)
687908b1e9 ringbuffer: support to allocate memory on the ringbuffer before send 2019-07-01 11:41:50 +08:00
Michael (XIAO Xufeng)
c5150d16b2 ringbuffer: seperate acquire from send 2019-07-01 11:40:45 +08:00
Darian Leung
8a597b865f esp_ringbuf: Add static allocation, refactor, and update API reference
This commit updates does the following:
    - xRingbufferCreateStatic() added to allow ringbuffers via to be statically
      allocated. Docs and unit tests update accordingly. Closes #3064

    - Fix doc typos, closes #3248. Updated API reference regarding to mention
      item size limits of no-split buffers when calling
      xRingbufferGetCurFreeSize() or xRingbufferGetMaxItemSize(), closes #3117.

    - Remove the following deprecated types/functions for v4.0
        - xRingbufferIsNextItemWrapped()
        - xRingbufferAddToQueueSetWrite()
        - xRingbufferRemoveFromQueueSetWrite()
2019-06-26 16:04:38 +08:00
Mahavir Jain
152043d469 esp_ringbuf: move ringbuf to seperate component
Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2018-09-17 17:04:57 +05:30