MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / spi_soft_tog_sclk

Function spi_soft_tog_sclk

components/drivers/spi/dev_soft_spi.c:134–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132
133
134static void spi_soft_tog_sclk(void *data)
135{
136 struct rt_soft_spi_config *cfg = (struct rt_soft_spi_config *)data;
137 if(rt_pin_read(cfg->sck) == PIN_HIGH)
138 {
139 rt_pin_write(cfg->sck, PIN_LOW);
140 }
141 else
142 {
143 rt_pin_write(cfg->sck, PIN_HIGH);
144 }
145}
146
147static void spi_soft_set_sclk(void *data, rt_int32_t state)
148{

Callers

nothing calls this directly

Calls 2

rt_pin_readFunction · 0.50
rt_pin_writeFunction · 0.50

Tested by

no test coverage detected