Number of bytes to allocate for the global buffer. In systems with banked memory this parameter is ignored and all banked memory is occupied for the global buffer. In systems without banked memory, the specified number of bytes is taken from heap memory.
Returns:
Pointer to the first buffer segment or null on failures.
char* NutSegBufReadCommit
(
size_t
bc
)
Commit read buffer space.
The read pointer will be incremented by the specified number of bytes. If the pointer reaches the end of a segment, the next segment will be enabled and the pointer will point to the start of the new segement.
Commit written buffer space and finish read access.
The write pointer will be incremented by the specified number of bytes. This call will also enable the current read segment and may disable the current write segment.
Parameters:
bc
Number of bytes to commit.
char* NutSegBufReadRequest
(
size_t *
bcp
)
Request segmented buffer space for reading.
This call will also enable the current read segment and may disable the current write segment.
Parameters:
bcp
Pointer to a variable, which receives the number of consecutive bytes available for reading.
The write pointer will be incremented by the specified number of bytes. If the pointer reaches the end of a segment, the next segment will be enabled and the pointer will point to the start of the new segement.
Commit written buffer space and finish write access.
The write pointer will be incremented by the specified number of bytes. This call will also enable the current read segment and may disable the current write segment.
Parameters:
bc
Number of bytes to commit.
char* NutSegBufWriteRequest
(
size_t *
bcp
)
Request segmented buffer space for writing.
This call will also enable the current write segment and may disable the current read segment.
Parameters:
bcp
Pointer to a variable, which receives the number of consecutive bytes available for writing.