-
Notifications
You must be signed in to change notification settings - Fork 4
/
macros.go
33 lines (28 loc) · 1.02 KB
/
macros.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package bladerf
// #include "macro_wrapper.h"
import "C"
import "unsafe"
var ReTuneNow = Timestamp(C.ReTuneNow)
var MetaFlagTxBurstStart = uint32(C.MetaFlagTxBurstStart)
var MetaFlagTxBurstEnd = uint32(C.MetaFlagTxBurstEnd)
var MetaFlagTxNow = uint32(C.MetaFlagTxNow)
var MetaFlagTxUpdateTimestamp = uint32(C.MetaFlagTxUpdateTimestamp)
var MetaFlagRxNow = uint32(C.MetaFlagRxNow)
var MetaFlagRxHwUnderflow = uint32(C.MetaFlagRxHwUnderflow)
var MetaFlagRxHwMiniexp1 = uint32(C.MetaFlagRxHwMiniexp1)
var MetaFlagRxHwMiniexp2 = uint32(C.MetaFlagRxHwMiniexp2)
var TriggerRegArm = C.TriggerRegArm
var TriggerRegFire = C.TriggerRegFire
var TriggerRegMaster = C.TriggerRegMaster
var TriggerRegLine = C.TriggerRegLine
var StreamNoData = unsafe.Pointer(C.StreamNoData)
var StreamShutdown = unsafe.Pointer(C.StreamShutdown)
func ChannelRx(ch int) Channel {
return Channel(C.ChannelRx(C.int(ch)))
}
func ChannelTx(ch int) Channel {
return Channel(C.ChannelTx(C.int(ch)))
}
func ChannelIsTx(ch int) bool {
return C.ChannelIsTx(C.int(ch)) == 1
}