Skip to content

Commit

Permalink
integrate fixes from pull-request boschsensortec#80
Browse files Browse the repository at this point in the history
  • Loading branch information
bablokb committed Jun 10, 2021
1 parent 3ddf12e commit c00ee1d
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions examples/linux_userspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@
* \include linux_userspace.c
*/

#ifdef __KERNEL__
#include <linux/i2c-dev.h>
#include <sys/ioctl.h>
#endif

/******************************************************************************/
/*! System header files */
Expand Down Expand Up @@ -154,15 +152,12 @@ int main(int argc, char* argv[])
exit(1);
}

#ifdef __KERNEL__
if (ioctl(id.fd, I2C_SLAVE, id.dev_addr) < 0)
{
fprintf(stderr, "Failed to acquire bus access and/or talk to slave.\n");
exit(1);
}

#endif

/* Make sure to select BME280_I2C_ADDR_PRIM or BME280_I2C_ADDR_SEC as needed */
id.dev_addr = BME280_I2C_ADDR_PRIM;

Expand Down

0 comments on commit c00ee1d

Please sign in to comment.