github.com/la5nta/wl2k-go@v0.11.8/rigcontrol/hamlib/helpers.c (about) 1 // Copyright 2015 Martin Hebnes Pedersen (LA5NTA). All rights reserved. 2 // Use of this source code is governed by the MIT-license that can be 3 // found in the LICENSE file. 4 5 // +build cgo 6 // +build libhamlib 7 8 #include <hamlib/rig.h> 9 10 extern void rigListCb(const struct rig_caps *rc); 11 12 void setBaudRate(RIG *r, int rate) { 13 r->state.rigport.parm.serial.rate = rate; 14 } 15 16 int add_to_list(const struct rig_caps *rc, void* f) 17 { 18 rigListCb(rc); 19 return 1; 20 } 21 22 void populate_rigs_list() { 23 rig_load_all_backends(); 24 rig_list_foreach(add_to_list, 0); 25 }