Lines Matching +full:buffer +full:- +full:size
4 * SPDX-License-Identifier: Apache-2.0
18 * @brief Initialize tracing buffer.
23 * @brief Tracing buffer is empty or not.
25 * @return true if the ring buffer is empty, or false if not.
30 * @brief Get free space in the tracing buffer.
32 * @return Tracing buffer free space (in bytes).
37 * @brief Get tracing buffer capacity (max size).
39 * @return Tracing buffer capacity (in bytes).
44 * @brief Try to allocate buffer in the tracing buffer.
47 * within the tracing buffer.
48 * @param size Requested buffer size (in bytes).
50 * @return Size of allocated buffer which can be smaller than
51 * requested if there isn't enough free space or buffer wraps.
53 uint32_t tracing_buffer_put_claim(uint8_t **data, uint32_t size);
56 * @brief Indicate number of bytes written to the allocated buffer.
58 * @param size Number of bytes written to the allocated buffer.
61 * @retval -EINVAL Given @a size exceeds free space of tracing buffer.
63 int tracing_buffer_put_finish(uint32_t size);
66 * @brief Write data to tracing buffer.
69 * @param size Data size (in bytes).
71 * @retval Number of bytes written to tracing buffer.
73 uint32_t tracing_buffer_put(uint8_t *data, uint32_t size);
76 * @brief Get address of the first valid data in tracing buffer.
79 * the first valid data within the tracing buffer.
80 * @param size Requested buffer size (in bytes).
82 * @return Size of valid buffer which can be smaller than requested
83 * if there isn't enough valid data or buffer wraps.
85 uint32_t tracing_buffer_get_claim(uint8_t **data, uint32_t size);
88 * @brief Indicate number of bytes read from claimed buffer.
90 * @param size Number of bytes read from claimed buffer.
93 * @retval -EINVAL Given @a size exceeds available data of tracing buffer.
95 int tracing_buffer_get_finish(uint32_t size);
98 * @brief Read data from tracing buffer to output buffer.
100 * @param data Address of the output buffer.
101 * @param size Data size (in bytes).
103 * @retval Number of bytes written to the output buffer.
105 uint32_t tracing_buffer_get(uint8_t *data, uint32_t size);
108 * @brief Get buffer from tracing command buffer.
110 * @param data Pointer to tracing command buffer start address.
112 * @return Tracing command buffer size (in bytes).