mirror of https://gerrit.osmocom.org/libusrp
89 lines
2.7 KiB
Scheme
89 lines
2.7 KiB
Scheme
;; -*- scheme -*- ; not really, but tells emacs how to format this
|
|
;;
|
|
;; Copyright 2007 Free Software Foundation, Inc.
|
|
;;
|
|
;; This file is part of GNU Radio
|
|
;;
|
|
;; GNU Radio is free software; you can redistribute it and/or modify
|
|
;; it under the terms of the GNU General Public License as published by
|
|
;; the Free Software Foundation; either version 2, or (at your option)
|
|
;; any later version.
|
|
;;
|
|
;; GNU Radio is distributed in the hope that it will be useful,
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
;; GNU General Public License for more details.
|
|
;;
|
|
;; You should have received a copy of the GNU General Public License along
|
|
;; with this program; if not, write to the Free Software Foundation, Inc.,
|
|
;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
;;
|
|
|
|
;; ----------------------------------------------------------------
|
|
;; This is an mblock header file
|
|
;;
|
|
;; The format is very much a work-in-progress.
|
|
;; It'll be compiled to C++.
|
|
;; ----------------------------------------------------------------
|
|
|
|
;; ----------------------------------------------------------------
|
|
;; usrp-interface-cs
|
|
;;
|
|
;; Handles interaction between the usrp_sever and the USB interface
|
|
|
|
(define-protocol-class usrp-interface-cs
|
|
|
|
(:outgoing
|
|
(cmd-usrp-open invocation-handle which-usrp)
|
|
(cmd-usrp-close invocation-handle)
|
|
(cmd-usrp-ntx-chan invocation-handle)
|
|
(cmd-usrp-nrx-chan invocation-handle)
|
|
(cmd-usrp-write invocation-handle channel data)
|
|
(cmd-usrp-start-reading invocation-handle channel)
|
|
)
|
|
|
|
(:incoming
|
|
(response-usrp-open invocation-handle status)
|
|
(response-usrp-close invocation-handle status)
|
|
(response-usrp-ntx-chan invocation-handle ntx-chan)
|
|
(response-usrp-nrx-chan invocation-handle nrx-chan)
|
|
(response-usrp-write invocation-handle status channel)
|
|
(response-usrp-read invocation-handle status data)
|
|
)
|
|
)
|
|
|
|
;; ----------------------------------------------------------------
|
|
;; usrp-tx-cs
|
|
;;
|
|
;; Handles interaction between the USB interface and TX interface
|
|
|
|
(define-protocol-class usrp-tx-cs
|
|
|
|
(:outgoing
|
|
(cmd-usrp-tx-write invocation-handle channel data tx-handle)
|
|
)
|
|
|
|
(:incoming
|
|
(response-usrp-tx-write invocation-handle status channel)
|
|
)
|
|
)
|
|
|
|
;; ----------------------------------------------------------------
|
|
;; usrp-rx-cs
|
|
;;
|
|
;; Handles interaction between the USB interface and RX interface
|
|
|
|
(define-protocol-class usrp-rx-cs
|
|
|
|
(:outgoing
|
|
(cmd-usrp-rx-start-reading invocation-handle rx-handle)
|
|
(cmd-usrp-rx-stop-reading invocation-handle)
|
|
)
|
|
|
|
(:incoming
|
|
(response-usrp-rx-read invocation-handle status data)
|
|
|
|
;; There is currently no response to a stop reading
|
|
)
|
|
)
|