Skip to content

Commit

Permalink
merge original updates
Browse files Browse the repository at this point in the history
  • Loading branch information
sysrun committed Nov 21, 2013
2 parents 0034206 + 33427f7 commit 2b882e5
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 3 deletions.
11 changes: 10 additions & 1 deletion cmake/Modules/FindLibUSB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,16 @@ if(NOT LIBUSB_FOUND)
/usr/local/include
)

find_library(LIBUSB_LIBRARIES NAMES usb-1.0
#standard library name for libusb-1.0
set(libusb1_library_names usb-1.0)

#libusb-1.0 compatible library on freebsd
if((CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") OR (CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD"))
list(APPEND libusb1_library_names usb)
endif()

find_library(LIBUSB_LIBRARIES
NAMES ${libusb1_library_names}
PATHS
${LIBUSB_PKG_LIBRARY_DIRS}
/usr/lib
Expand Down
2 changes: 2 additions & 0 deletions rtl-sdr.rules
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,5 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d395", MODE:="066
# SVEON STV20 DVB-T USB & FM (FC0012)
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d39d", MODE:="0666"

# SVEON STV21 DVB-T USB & FM
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3b0", MODE:="0666"
3 changes: 2 additions & 1 deletion src/librtlsdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ int r820t_init(void *dev) {

rtlsdr_get_xtal_freq(devt, NULL, &devt->r82xx_c.xtal);

devt->r82xx_c.max_i2c_msg_len = 2;
devt->r82xx_c.max_i2c_msg_len = 8;
devt->r82xx_c.use_predetect = 0;
devt->r82xx_p.cfg = &devt->r82xx_c;

Expand Down Expand Up @@ -301,6 +301,7 @@ static rtlsdr_dongle_t known_devices[] = {
{ 0x1b80, 0xd394, "DIKOM USB-DVBT HD" },
{ 0x1b80, 0xd395, "Peak 102569AGPK" },
{ 0x1b80, 0xd39d, "SVEON STV20 DVB-T USB & FM" },
{ 0x1b80, 0xd3b0, "SVEON STV21 DVB-T USB & FM" },
};

#define DEFAULT_BUF_NUMBER 32
Expand Down
4 changes: 3 additions & 1 deletion src/rtl_eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,9 @@ int main(int argc, char **argv)
if (r < 0)
fprintf(stderr, "Error while writing EEPROM: %i\n", r);
else
fprintf(stderr, "Configuration successfully written.\n");
fprintf(stderr, "\nConfiguration successfully written.\n"
"Please replug the device for changes"
" to take effect.\n");

exit:
if (file)
Expand Down
2 changes: 2 additions & 0 deletions src/rtl_fm.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@
#include <io.h>
#include "getopt/getopt.h"
#define usleep(x) Sleep(x/1000)
#ifdef _MSC_VER
#define round(x) (x > 0.0 ? floor(x + 0.5): ceil(x - 0.5))
#endif
#define _USE_MATH_DEFINES
#endif

Expand Down
2 changes: 2 additions & 0 deletions src/rtl_power.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@
#include <io.h>
#include "getopt/getopt.h"
#define usleep(x) Sleep(x/1000)
#ifdef _MSC_VER
#define round(x) (x > 0.0 ? floor(x + 0.5): ceil(x - 0.5))
#endif
#define _USE_MATH_DEFINES
#endif

Expand Down

0 comments on commit 2b882e5

Please sign in to comment.