Files
lib_rgb/lib_rgb/api/rgb_driver.h
Vergil Wong 16cb5ed8b2 修复了头文件定义,现在定义effect即可使用其他方法
- 例程中使用手动路径搜索
- 防止头文件被多次包含
2023-11-15 10:40:44 +08:00

33 lines
1.1 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#ifndef _RGB_DRIVER_H
#define _RGB_DRIVER_H
#include "stdint.h"
/** 串行输出24位值。
*
* 此函数接收一个32位无符号整数并将其作为24位值串行输出。
* 假设值的最高有效8位不使用。该函数将位顺序反转然后使用定时器控制
* 的时间信息逐位串行输出。
*
* 输出操作在第4个引脚上完成定时信息由定时器'tmr'提供。该函数会打印
* 每个位的值和fall_time。
* TODO: 适配其他类型的引脚和bit口
*
* \param value 要串行输出为24位的32位值。
*/
void output_24bit_value_serially(uint32_t value);
/** 输出RGB值数组。
*
* 此函数接收一个包含32位RGB值的数组以及要输出的RGB数量。
* 它调用'output_24bit_value_serially'函数为每个RGB值进行串行输出。
*
* 每个RGB值都使用'output_24bit_value_serially'函数作为24位值发送。
*
* \param buf 包含32位RGB值的缓冲区。
* \param num_rgbs 要输出的RGB值数量。
*/
void output_rgb_array(uint32_t buf[], uint32_t num_rgbs);
#endif // _RGB_DRIVER_H