wm_spi_ck_config (WM_IO_PB_24) ;
wm_spi_di_config (WM_IO_PB_25) ;
wm_spi_do_config (WM_IO_PB_26) ;
tls_spi_init () ;
tls_spi_trans_type (SPI_DMA_TRANSFER) ;
// tls_spi_trans_type (SPI_BYTE_TRANSFER) ;
if (clk " 10000) clk = 10000;
my. clk = clk;
tls_spi_setup (spi_mode, TLS_SPI_CS_LOW, my. clk) ;
初始化代码如上, 输出代码如下
tls_spi_write (tx, 1) ;
逻辑分析仪截图如下: