summaryrefslogtreecommitdiff
path: root/code/main/teensy_player/src
diff options
context:
space:
mode:
authorAbel Tim <git@abeltim.com>2025-06-04 11:48:33 +0200
committerAbel Tim <git@abeltim.com>2025-06-04 11:48:33 +0200
commit4f8208af89e90338a20a1abad7293348dabc84cd (patch)
treeda96ffe0d41d5a6850335d28ebc1718731489d81 /code/main/teensy_player/src
parent8d8ba16aa4c60e5c5d83297f0213dd474c5057b4 (diff)
downloadrobotica-4f8208af89e90338a20a1abad7293348dabc84cd.tar.gz
robotica-4f8208af89e90338a20a1abad7293348dabc84cd.zip
multiple things
Signed-off-by: Abel Tim <git@abeltim.com>
Diffstat (limited to 'code/main/teensy_player/src')
-rw-r--r--code/main/teensy_player/src/main.c11
1 files changed, 6 insertions, 5 deletions
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 <zephyr/drivers/gpio.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/__assert.h>
+#include <zephyr/drivers/uart.h>
+#include <zephyr/drivers/pwm.h>
#include <string.h>
/* 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);
}