From 4f8208af89e90338a20a1abad7293348dabc84cd Mon Sep 17 00:00:00 2001 From: Abel Tim Date: Wed, 4 Jun 2025 11:48:33 +0200 Subject: multiple things Signed-off-by: Abel Tim --- code/main/teensy_player/src/main.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'code/main/teensy_player/src') diff --git a/code/main/teensy_player/src/main.c b/code/main/teensy_player/src/main.c index e113c79..5b04ac2 100644 --- a/code/main/teensy_player/src/main.c +++ b/code/main/teensy_player/src/main.c @@ -3,16 +3,18 @@ #include #include #include +#include +#include #include /* size of stack area used by each thread */ -#define STACKSIZE 1024 +#define GEN_THRESD_STACKSIZE 1024 /*the pinout configuration*/ /*https://docs.zephyrproject.org/latest/boards/pjrc/teensy4/doc/index.html*/ /*motors pins*/ -#define m1enA DT_ALIAS(GPIO2_10) /*pin 6*/ -#define m1enB DT_ALIAS(GPIO4_8) /*pin 5*/ +#define m1enA DT_ALIAS(GPIO2_10) /*pin 6*//*Motor 1 EN A*/ +#define m1enB DT_ALIAS(GPIO4_8) /*pin 5*//*Motor 1 EN B*/ #define m1pwm1 DT_ALIAS(GPIO4_6) /*pin 4*/ #define m1pwm2 DT_ALIAS(GPIO4_5) /*pin 3*/ /*encoder pins*/ @@ -43,9 +45,8 @@ void ENCO_ISR(void *encN){ } - void ENC_ISR_installer(void){ - /*sets up the interupts for the encoder at same priority, need to configure FIFO in case of simultanius call*/ + /*sets up the interupts for the encoder at same priority, need to configure FIFO in case of simultaneous call*/ IRQ_CONNECT(m1encoA, ENC_ISR_PRIO, ENCO_ISR, '0', MY_IRQ_FLAGS); IRQ_CONNECT(m1encoB, ENC_ISR_PRIO, ENCO_ISR, '1', MY_IRQ_FLAGS); } -- cgit v1.2.3