diff --git a/platform/esb/dev/sound-sensor.c b/platform/esb/dev/sound-sensor.c index 3358d2ff5..76c1f4dec 100644 --- a/platform/esb/dev/sound-sensor.c +++ b/platform/esb/dev/sound-sensor.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * @(#)$Id: sound-sensor.c,v 1.2 2008/04/25 15:55:37 joxe Exp $ + * @(#)$Id: sound-sensor.c,v 1.3 2008/07/08 12:35:05 nifi Exp $ */ #include #include "contiki-esb.h" @@ -153,7 +153,7 @@ configure(int type, void *c) } else if (type == SOUND_SET_BUFFER_SIZE) { buffer_size = (int) c; } else if (type == SOUND_SET_DIV) { - sample_div = (int8_t) c; + sample_div = (int) c & 0xff; } else if(type == SOUND_START_SAMPLE) { if(buffer_size > 0) { leds_on(LEDS_RED);