improve bits_stream_get

This commit is contained in:
lixianjing 2023-08-09 16:33:10 +08:00
parent 878d640aeb
commit 14ab3bffef
2 changed files with 3 additions and 3 deletions

View File

@ -1653,7 +1653,7 @@ const char* ret_code_to_name(ret_t ret) {
}
ret_t bits_stream_get(uint8_t* buff, uint32_t size, uint32_t index, bool_t* value) {
ret_t bits_stream_get(const uint8_t* buff, uint32_t size, uint32_t index, bool_t* value) {
uint8_t v = 0;
uint32_t offset = index % 8;
uint32_t max_index = size * 8;

View File

@ -978,13 +978,13 @@ ret_t ret_code_from_name(const char* name);
/**
* @method bits_stream_get
* buff中获取第index位的值
* @param {uint8_t*} buff
* @param {const uint8_t*} buff
* @param {uint32_t} size
* @param {uint32_t} index
* @param {bool_t*} value
* @return {ret_t} RET_OK表示成功
*/
ret_t bits_stream_get(uint8_t* buff, uint32_t size, uint32_t index, bool_t* value);
ret_t bits_stream_get(const uint8_t* buff, uint32_t size, uint32_t index, bool_t* value);
/**
* @method bits_stream_set