Conversation
What: as follows: 1. 修复 get_bits_btn_buffer_capacity() 返回实际可用容量(SIZE-1)而非数组大小; 2. 添加 BITS_BTN_MAX_BUTTONS 宏定义(基于 button_mask_type_t 大小); 3. 增强参数校验:添加 btns_cnt 超限检查(-5)、单按钮 param NULL 检查(-6)、组合按钮 param NULL 检查(-7); 4. 优化 bits_btn_write_buffer_overwrite_c11 函数逻辑(调整 current_read 读取时机); 5. 修正 bits_btn_clear_buffer_c11 中的 memory_order_relaxed 为 memory_order_release; 6. bits_button_set_buffer_ops 声明添加 #ifdef BITS_BTN_USE_USER_BUFFER 条件编译; 7. 补充7个测试用例:参数校验4个(按钮数超限、param NULL)、缓冲区覆写3个(数据正确性、多轮覆写、计数准确性); 8. 更新文档:bits_button_init 添加错误码说明、get_bits_btn_buffer_capacity 说明容量语义;
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What: as follows: