mirror of
https://github.com/rtlsdrblog/rtl-sdr-blog.git
synced 2025-01-13 03:37:17 +01:00
rtlsdr_callback: use correct pointer type for buffer
Silences a clang warning. Signed-off-by: Steve Markgraf <steve@steve-m.de>
This commit is contained in:
parent
d2355cfd91
commit
cdd6c488a3
@ -62,7 +62,7 @@ RTLSDR_API int rtlsdr_reset_buffer(rtlsdr_dev_t *dev);
|
|||||||
|
|
||||||
RTLSDR_API int rtlsdr_read_sync(rtlsdr_dev_t *dev, void *buf, int len, int *n_read);
|
RTLSDR_API int rtlsdr_read_sync(rtlsdr_dev_t *dev, void *buf, int len, int *n_read);
|
||||||
|
|
||||||
typedef void(*rtlsdr_async_read_cb_t)(const char *buf, uint32_t len, void *ctx);
|
typedef void(*rtlsdr_async_read_cb_t)(unsigned char *buf, uint32_t len, void *ctx);
|
||||||
|
|
||||||
RTLSDR_API int rtlsdr_wait_async(rtlsdr_dev_t *dev, rtlsdr_async_read_cb_t cb, void *ctx);
|
RTLSDR_API int rtlsdr_wait_async(rtlsdr_dev_t *dev, rtlsdr_async_read_cb_t cb, void *ctx);
|
||||||
|
|
||||||
|
@ -36,8 +36,8 @@ void usage(void)
|
|||||||
printf("rtl-sdr, an I/Q recorder for RTL2832 based DVB-T receivers\n\n"
|
printf("rtl-sdr, an I/Q recorder for RTL2832 based DVB-T receivers\n\n"
|
||||||
"Usage:\t -f frequency to tune to [Hz]\n"
|
"Usage:\t -f frequency to tune to [Hz]\n"
|
||||||
"\t[-s samplerate (default: 2048000 Hz)]\n"
|
"\t[-s samplerate (default: 2048000 Hz)]\n"
|
||||||
"\t[-d device index (default: 0)]\n"
|
"\t[-d device index (default: 0)]\n"
|
||||||
"\t[-g tuner gain (default: 0 dB)]\n"
|
"\t[-g tuner gain (default: 0 dB)]\n"
|
||||||
"\toutput filename\n");
|
"\toutput filename\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@ -48,7 +48,7 @@ static void sighandler(int signum)
|
|||||||
rtlsdr_cancel_async(dev);
|
rtlsdr_cancel_async(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtlsdr_callback(const char *buf, uint32_t len, void *ctx)
|
void rtlsdr_callback(unsigned char *buf, uint32_t len, void *ctx)
|
||||||
{
|
{
|
||||||
fwrite(buf, len, 1, (FILE*)ctx);
|
fwrite(buf, len, 1, (FILE*)ctx);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user