MCPcopy Create free account
hub / github.com/Hamlib/Hamlib / ad_write

Function ad_write

rigs/kit/elektor304.c:316–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314}
315
316static int ad_write(hamlib_port_t *port, unsigned data)
317{
318 unsigned mask = 0x8000;
319 int i;
320
321 ad_sclk(port, 0); /* TXD 0 */
322 ad_fsync(port, 1); /* DTR 1, CE */
323
324 for (i = 0; i < 16; i++)
325 {
326
327 ad_sdata(port, (data & mask) ? 0 : 1); /* RTS 0 or 1 */
328 ad_sclk(port, 1); /* TXD 1, clock */
329 ad_sclk(port, 0); /* TXD 0 */
330 mask >>= 1; /* Next bit for masking */
331 }
332
333 ad_fsync(port, 0); /* DTR 0 */
334
335 return RIG_OK;
336}
337
338
339int elektor304_set_freq(RIG *rig, vfo_t vfo, freq_t freq)

Callers 1

elektor304_set_freqFunction · 0.70

Calls 3

ad_fsyncFunction · 0.85
ad_sdataFunction · 0.85
ad_sclkFunction · 0.70

Tested by

no test coverage detected