LIS331DL and STM32 I2C patch from Uros
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3467 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
f92d46c409
commit
e08b22d33c
@ -512,15 +512,16 @@ int sif_main(int argc, char *argv[])
|
||||
|
||||
/* Sample some values */
|
||||
|
||||
for (i=0; i<20; i++) {
|
||||
if ( (a = st_lis331dl_getreadings(lis)) )
|
||||
for (i=0; i<200000; i++) {
|
||||
if ( (a = st_lis331dl_getreadings(lis)) ) {
|
||||
printf("%d %d %d\n", a->x, a->y, a->z);
|
||||
else {
|
||||
}
|
||||
else if (errno != 11) {
|
||||
printf("Readings errno %d\n", errno);
|
||||
break;
|
||||
}
|
||||
fflush(stdout);
|
||||
usleep(100000);
|
||||
usleep(10000);
|
||||
}
|
||||
|
||||
st_lis331dl_deinit(lis);
|
||||
|
Loading…
Reference in New Issue
Block a user