tlc5615驱动 c语言

void Dev_TLC5615_Write_Data(u16 data)
{
  u8 i = 0;
  
  data <<= 6;
  
  TLC5615_SPI_CS_LOW();  
  for(i=0; i<12; i++)
  {
    TLC5615_SPI_CLK_LOW();

    if(data & 0x8000)
      TLC5615_SPI_DOUT_HIGH();
    else
      TLC5615_SPI_DOUT_LOW();

    TLC5615_SPI_CLK_HIGH();
    data <<= 1;
  }
  TLC5615_SPI_CS_HIGH();
}

  

你可能感兴趣的:(tlc5615驱动 c语言)