-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers: serial: uart_async_rx: Optimize RAM usage
Since there is only one consumer of the data stored in the buffers, it is enough to have one read index variable which can be stored in the data associated with the module and not in the buffer space (where there is a read index for each buffer). Additionally, we can safely assume that module works with small buffers so 127 byte limit is enough. Based on that assumption completed flag can be stored on a single byte together with write index. After this change, control data for each buffer takes 1 byte (3 bytes previously). Signed-off-by: Krzysztof Chruściński <[email protected]>
- Loading branch information
1 parent
17dc3da
commit 8bc5111
Showing
2 changed files
with
18 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters