From e08b22d33cd111d09371e3a1ed585197837bff34 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 5 Apr 2011 16:25:04 +0000 Subject: [PATCH] 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 --- configs/vsn/src/sif.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/configs/vsn/src/sif.c b/configs/vsn/src/sif.c index a10072ac5a..6f75c4a9e1 100644 --- a/configs/vsn/src/sif.c +++ b/configs/vsn/src/sif.c @@ -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);