mirror of https://github.com/drowe67/librtlsdr.git
rtlsdr_rpc_get_direct_sampling
parent
f14c3b5e35
commit
d40cd428ba
|
@ -853,6 +853,21 @@ static int handle_query
|
|||
break ;
|
||||
}
|
||||
|
||||
case RTLSDR_RPC_OP_GET_DIRECT_SAMPLING:
|
||||
{
|
||||
uint32_t did;
|
||||
|
||||
PRINTF("get_direct_sampling()\n");
|
||||
|
||||
if (rtlsdr_rpc_msg_pop_uint32(q, &did)) goto on_error;
|
||||
|
||||
if ((rpcd->dev == NULL) || (rpcd->did != did)) goto on_error;
|
||||
|
||||
err = rtlsdr_get_direct_sampling(rpcd->dev);
|
||||
|
||||
break ;
|
||||
}
|
||||
|
||||
case RTLSDR_RPC_OP_RESET_BUFFER:
|
||||
{
|
||||
uint32_t did;
|
||||
|
|
|
@ -875,10 +875,24 @@ int rtlsdr_rpc_set_direct_sampling(void* devp, int on)
|
|||
return err;
|
||||
}
|
||||
|
||||
int rtlsdr_rpc_get_direct_sampling(void* dev)
|
||||
int rtlsdr_rpc_get_direct_sampling(void* devp)
|
||||
{
|
||||
UNIMPL();
|
||||
return -1;
|
||||
rtlsdr_rpc_dev_t* const dev = devp;
|
||||
rtlsdr_rpc_cli_t* const cli = dev->cli;
|
||||
rtlsdr_rpc_msg_t* const q = &cli->query;
|
||||
rtlsdr_rpc_msg_t* const r = &cli->reply;
|
||||
int err = -1;
|
||||
|
||||
rtlsdr_rpc_msg_reset(q);
|
||||
rtlsdr_rpc_msg_set_op(q, RTLSDR_RPC_OP_GET_DIRECT_SAMPLING);
|
||||
if (rtlsdr_rpc_msg_push_uint32(q, dev->index)) goto on_error;
|
||||
|
||||
if (send_recv_msg(cli, q, r)) goto on_error;
|
||||
|
||||
err = rtlsdr_rpc_msg_get_err(r);
|
||||
|
||||
on_error:
|
||||
return err;
|
||||
}
|
||||
|
||||
int rtlsdr_rpc_set_offset_tuning(void* dev, int on)
|
||||
|
|
Loading…
Reference in New Issue