Skip to content

Commit

Permalink
fixup! drivers/ws281x: add SysTick + GPIO LL backend
Browse files Browse the repository at this point in the history
  • Loading branch information
maribu committed May 3, 2024
1 parent 51d2b85 commit 1bbce1f
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions drivers/ws281x/systick_gpio_ll.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,6 @@
#define ENABLE_DEBUG 0
#include "debug.h"

/* (+ NS_PER_SEC - 1): Rounding up, as T1H is the time that needs to distinctly
* longer than T0H.
*
* Then adding +1 extra, because the spin loop adds another layer of jitter. A
* more correct version would be to add the spin loop time before rounding (and
* then rounding up), but as that time is not available, spending one more
* cycle is the next best thing to do. */
const int ticks_one = ((uint64_t)WS281X_T_DATA_ONE_NS * WS281X_TIMER_FREQ + NS_PER_SEC - 1)
/ NS_PER_SEC + 1;
/* Rounding down, zeros are better shorter */
const int ticks_zero = (uint64_t)WS281X_T_DATA_ZERO_NS * (uint64_t)WS281X_TIMER_FREQ / NS_PER_SEC;
/* No particular known requirements, but we're taking longer than that anyway
* because we don't clock the times between bits. */
const int ticks_data = (uint64_t)WS281X_T_DATA_NS * (uint64_t)WS281X_TIMER_FREQ / NS_PER_SEC;

static void _systick_start(uint32_t ticks)
{
/* disable SysTick, clear value */
Expand Down

0 comments on commit 1bbce1f

Please sign in to comment.