freebsd-ports/comms/usrp/files/patch-firmware_fx2_common_i2c.c
Diane Bruce 2ee7eac59d UHD is the "Universal Software Radio Peripheral" (USRP) Hardware Driver. It
works on all major platforms (Linux, Windows, and Mac); and can be built with
GCC, Clang, and MSVC compilers.

The goal of UHD is to provide a host driver and API for current and
future Ettus Research products. Users will be able to use the UHD driver
standalone or with third-party applications such as:

    GNU Radio
    LabVIEW
    Simulink
    OpenBTS

Submitted by:	adrian@
Reviewed by:	db@
2012-12-09 19:43:02 +00:00

20 lines
716 B
C

--- firmware/fx2/common/i2c.c.orig 2012-07-30 14:09:48.000000000 -0500
+++ firmware/fx2/common/i2c.c 2012-10-07 19:37:38.000000000 -0500
@@ -30,7 +30,7 @@
// returns non-zero if successful, else 0
unsigned char
-i2c_read (unsigned char addr, xdata unsigned char *buf, unsigned char len)
+i2c_read (unsigned char addr, __xdata unsigned char *buf, unsigned char len)
{
volatile unsigned char junk;
@@ -89,7 +89,7 @@
// returns non-zero if successful, else 0
unsigned char
-i2c_write (unsigned char addr, xdata const unsigned char *buf, unsigned char len)
+i2c_write (unsigned char addr, __xdata const unsigned char *buf, unsigned char len)
{
while (I2CS & bmSTOP) // wait for stop to clear
;