/* Serialize an 8-bit color channel value into an equivalent sequence of SPI frames, MSbit first, where a one bit becomes SPI frame one_frame, and zero bit becomes zero_frame.  */
static void ws2812_spi_ser(uint8_t buf[8], uint8_t color, const uint8_t one_frame, const uint8_t zero_frame)
/* Serialize an 8-bit color channel value into an equivalent sequence of SPI frames, MSbit first, where a one bit becomes SPI frame one_frame, and zero bit becomes zero_frame.  */
static void ws2812_spi_ser(uint8_t buf[8], uint8_t color, const uint8_t one_frame, const uint8_t zero_frame)
{
	int i;
	for (i = 0; i < 8; i++) {
		buf[i] = color & BIT(7 - i) ? one_frame : zero_frame;
	}
}