remove sleep from examples

This commit is contained in:
William Clark 2024-01-03 16:02:42 +00:00
parent da27083859
commit 574dd1a0fc
4 changed files with 5 additions and 16 deletions

View File

@ -1,11 +1,12 @@
CC=gcc
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
LFLAGS=-lm
CFILES=$(wildcard *.c)
BINFILE=lis3dh
all:
$(CC) $(CFLAGS) $(CFILES) -o lis3dh $(LFLAGS)
$(CC) $(CFLAGS) $(CFILES) -o $(BINFILE)
clean:
rm -rf lis3dh
rm -rf $(BINFILE)

View File

@ -123,10 +123,6 @@ int main() {
LIS3DH_CLICK_SCLICK(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 */

View File

@ -116,10 +116,6 @@ int main() {
LIS3DH_INT_SRC_Y_LOW(lis.src.int1),
LIS3DH_INT_SRC_X_HIGH(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 */

View File

@ -107,10 +107,6 @@ int main() {
LIS3DH_CLICK_SCLICK(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 */