remove sleep from examples
This commit is contained in:
parent
da27083859
commit
574dd1a0fc
9
Makefile
9
Makefile
@ -1,11 +1,12 @@
|
|||||||
CC=gcc
|
CC=gcc
|
||||||
CFLAGS=-O0 -g3 -ggdb -std=c89 -W -Werror -Wall -Wextra -Wpedantic -pedantic-errors -Wformat-signedness -I.
|
CFLAGS=-O0 -g3 -ggdb -std=c89 -W -Werror -Wall -Wextra -Wpedantic -pedantic-errors -Wformat-signedness -I.
|
||||||
CFLAGS+=-Wlogical-op -Wmissing-declarations -Wswitch-default -Wundef -Wformat=2 -lasan
|
CFLAGS+=-Wlogical-op -Wmissing-declarations -Wswitch-default -Wundef -Wformat=2 -lasan -lm
|
||||||
CFLAGS+=-fsanitize=pointer-overflow,undefined,shift,shift-exponent,shift-base,integer-divide-by-zero,null,signed-integer-overflow,bounds
|
CFLAGS+=-fsanitize=pointer-overflow,undefined,shift,shift-exponent,shift-base,integer-divide-by-zero,null,signed-integer-overflow,bounds
|
||||||
LFLAGS=-lm
|
|
||||||
CFILES=$(wildcard *.c)
|
CFILES=$(wildcard *.c)
|
||||||
|
BINFILE=lis3dh
|
||||||
|
|
||||||
all:
|
all:
|
||||||
$(CC) $(CFLAGS) $(CFILES) -o lis3dh $(LFLAGS)
|
$(CC) $(CFLAGS) $(CFILES) -o $(BINFILE)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf lis3dh
|
rm -rf $(BINFILE)
|
||||||
|
@ -123,10 +123,6 @@ int main() {
|
|||||||
LIS3DH_CLICK_SCLICK(lis.src.click),
|
LIS3DH_CLICK_SCLICK(lis.src.click),
|
||||||
LIS3DH_CLICK_DCLICK(lis.src.click));
|
LIS3DH_CLICK_DCLICK(lis.src.click));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* sleep for 5 ms because gpio sysfs is slow at clearing interrupts */
|
|
||||||
/* not necessary with "real" IRQ */
|
|
||||||
usleep(5000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* unregister interrupt */
|
/* unregister interrupt */
|
||||||
|
@ -116,10 +116,6 @@ int main() {
|
|||||||
LIS3DH_INT_SRC_Y_LOW(lis.src.int1),
|
LIS3DH_INT_SRC_Y_LOW(lis.src.int1),
|
||||||
LIS3DH_INT_SRC_X_HIGH(lis.src.int1),
|
LIS3DH_INT_SRC_X_HIGH(lis.src.int1),
|
||||||
LIS3DH_INT_SRC_X_LOW(lis.src.int1));
|
LIS3DH_INT_SRC_X_LOW(lis.src.int1));
|
||||||
|
|
||||||
/* sleep for 5 ms because gpio sysfs is slow at clearing interrupts */
|
|
||||||
/* not necessary with "real" IRQ */
|
|
||||||
usleep(5000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* unregister interrupt */
|
/* unregister interrupt */
|
||||||
|
@ -107,10 +107,6 @@ int main() {
|
|||||||
LIS3DH_CLICK_SCLICK(lis.src.click),
|
LIS3DH_CLICK_SCLICK(lis.src.click),
|
||||||
LIS3DH_CLICK_DCLICK(lis.src.click));
|
LIS3DH_CLICK_DCLICK(lis.src.click));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* sleep for 5 ms because gpio sysfs is slow at clearing interrupts */
|
|
||||||
/* not necessary with "real" IRQ */
|
|
||||||
usleep(5000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* unregister interrupt */
|
/* unregister interrupt */
|
||||||
|
Loading…
Reference in New Issue
Block a user