Skip to content

Commit c00ee1d

Browse files
committed
integrate fixes from pull-request boschsensortec#80
1 parent 3ddf12e commit c00ee1d

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

examples/linux_userspace.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@
2020
* \include linux_userspace.c
2121
*/
2222

23-
#ifdef __KERNEL__
2423
#include <linux/i2c-dev.h>
2524
#include <sys/ioctl.h>
26-
#endif
2725

2826
/******************************************************************************/
2927
/*! System header files */
@@ -154,15 +152,12 @@ int main(int argc, char* argv[])
154152
exit(1);
155153
}
156154

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

164-
#endif
165-
166161
/* Make sure to select BME280_I2C_ADDR_PRIM or BME280_I2C_ADDR_SEC as needed */
167162
id.dev_addr = BME280_I2C_ADDR_PRIM;
168163

0 commit comments

Comments
 (0)