摘要: 1 // 打印辅助函数,用于显示位状态 2 void printBits(uint32 value, uint8 bits) 3 { 4 int16 i; 5 uint8 bitNum,cnt; 6 7 bitNum = ((bits+7)/8)*8; 8 cnt = 0; 9 10 // prin 阅读全文
posted @ 2024-08-30 11:40 xiaokangkp 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 1 uint16 FindPosition(uint8 arr[], uint16 length, uint8 target) 2 { 3 uint16 low = 0; 4 uint16 high = length - 1; 5 uint16 closest_position = 0xFFFF; 阅读全文
posted @ 2024-08-30 09:36 xiaokangkp 阅读(4) 评论(0) 推荐(0) 编辑