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();
}

  

posted @ 2018-12-27 16:40  云中虾  阅读(634)  评论(0编辑  收藏  举报