STM32F103_WS281x
[TOC]
普通IO方式驱动
利用普通io模拟WS281x的通信时序
SPI_DMA方式驱动
通过硬件SPI8位数据模拟WS281x的一位数据,并通过DMA的方式将数据从内存传输到外设。
11100000 0XE0 WS281X的0码
11111000 0XF8 WS281X的1码
PWM_DMA方式驱动
将pwm频率设为800k,通过更改输出比较寄存器CCR的值来更改占空比。
Example文件夹
文件夹中提供了两个实际应用案例
- 通过串口指令控制LED灯
- 通过CAN指令控制LED灯(为了便于单机测试,这里使用串口发送,CAN回环模式转发的方式实现。)