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

Function ad_write

rigs/kit/dds60.c:310–343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

308}
309
310static void ad_write(hamlib_port_t *port, unsigned long word,
311 unsigned char control)
312{
313 int i;
314
315 /* lock the parallel port */
316 par_lock(port);
317
318 /* shift out the least significant 32 bits of the word */
319 for (i = 0; i < 32; i++)
320 {
321
322 ad_bit(port, word & DATA);
323
324 word >>= 1;
325 }
326
327 /* write out the control byte */
328 for (i = 0; i < 8; i++)
329 {
330
331 ad_bit(port, control & DATA);
332
333 control >>= 1;
334 }
335
336 /* load the register */
337 par_write_data(port, LOAD);
338 ad_delay(1);
339 par_write_data(port, 0);
340
341 /* unlock the parallel port */
342 par_unlock(port);
343}
344
345
346int dds60_set_freq(RIG *rig, vfo_t vfo, freq_t freq)

Callers 1

dds60_set_freqFunction · 0.70

Calls 5

par_lockFunction · 0.85
ad_bitFunction · 0.85
par_write_dataFunction · 0.85
par_unlockFunction · 0.85
ad_delayFunction · 0.70

Tested by

no test coverage detected