forked from PAWPAW/lib_rgb
18 lines
506 B
C
18 lines
506 B
C
#ifndef MISC_UTILS_H
|
|
#define MISC_UTILS_H
|
|
#include <stdint.h>
|
|
#include <stddef.h>
|
|
|
|
#define MICRO_SECOND 100U // 微秒
|
|
|
|
/**
|
|
* 反转缓冲区中的元素。
|
|
*
|
|
* @param start 指向要反转的缓冲区开始的指针。
|
|
* @param count 要反转的元素数量。
|
|
*
|
|
* 此函数将缓冲区中的元素顺序反转。它通过交换首尾元素,然后向内移动,
|
|
* 直到到达中心点,完成反转过程。
|
|
*/
|
|
void reverse_buf(uint32_t *start, size_t count);
|
|
#endif // MISC_UTILS_H
|