Skip to content

janfietz/ws281x

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ws281x

WS281x ChibiOS driver for STM32 Platforms

##Sample Configuration

Configuration is used on STM32F103 minimal development board.

#define LEDCOUNT 15

struct ws281xLEDSetting LED1[] =
{
        {WS281X_GRB},
        {WS281X_GRB},
        {WS281X_GRB},
        {WS281X_GRB},
        {WS281X_GRB},
        {WS281X_GRB},
        {WS281X_GRB},
        {WS281X_GRB},
        {WS281X_GRB},
        {WS281X_GRB},
        {WS281X_GRB},
        {WS281X_GRB},
        {WS281X_GRB},
        {WS281X_GRB},
        {WS281X_GRB},
};

static ws2811Config ws2811_cfg =
{
    LEDCOUNT,
    LED1,
    {
        12000000,
        WS2811_BIT_PWM_WIDTH,
        NULL,
        {
            { PWM_OUTPUT_ACTIVE_HIGH, NULL },
            { PWM_OUTPUT_ACTIVE_HIGH, NULL },
            { PWM_OUTPUT_ACTIVE_HIGH, NULL },
            { PWM_OUTPUT_ACTIVE_HIGH, NULL }
        },
        0,
        TIM_DIER_UDE | TIM_DIER_CC2DE | TIM_DIER_CC1DE,
    },
    &PWMD2, // Timer has to be 16bit only
    1,
    WS2811_ZERO_PWM_WIDTH,
    WS2811_ONE_PWM_WIDTH,
    STM32_DMA1_STREAM7,
    7,
};

About

WS281x ChibiOS driver for STM32 Platforms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published