summaryrefslogtreecommitdiff
path: root/project/Core
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2025-11-06 22:20:44 -0500
committersowgro <tpoke.ferrari@gmail.com>2025-11-06 22:20:44 -0500
commit3598489dc5465ad643031b6d9b2c246d99602982 (patch)
tree9dcf65a2a36cc18f050d6489337bdec81676b321 /project/Core
parentff93296322bcff19d9983c3d800bffbd08a35941 (diff)
download340-repo-Sowgro-3598489dc5465ad643031b6d9b2c246d99602982.tar.gz
340-repo-Sowgro-3598489dc5465ad643031b6d9b2c246d99602982.tar.bz2
340-repo-Sowgro-3598489dc5465ad643031b6d9b2c246d99602982.zip
remove warnings
Diffstat (limited to '')
-rw-r--r--project/Core/Inc/Project/player_actions.h2
-rw-r--r--project/Core/Inc/System/systick.h2
-rw-r--r--project/Core/Src/Project/local_control.c3
-rw-r--r--project/Core/Src/Project/player_actions.c2
-rw-r--r--project/Core/Src/Project/remote_control.c6
-rw-r--r--project/Core/Src/System/systick.c3
6 files changed, 16 insertions, 2 deletions
diff --git a/project/Core/Inc/Project/player_actions.h b/project/Core/Inc/Project/player_actions.h
index 9f67ba4..8f8fa1d 100644
--- a/project/Core/Inc/Project/player_actions.h
+++ b/project/Core/Inc/Project/player_actions.h
@@ -21,4 +21,6 @@ void player_play();
void player_pause();
void player_stop();
+void player_action_tick(int count);
+
#endif /* INC_PROJECT_PLAYER_ACTIONS_H_ */
diff --git a/project/Core/Inc/System/systick.h b/project/Core/Inc/System/systick.h
index bb5454d..294cf33 100644
--- a/project/Core/Inc/System/systick.h
+++ b/project/Core/Inc/System/systick.h
@@ -25,4 +25,6 @@ void delay_systick();
int check_systick();
+uint32_t systick_get_count();
+
#endif /* INC_SYSTICK_H_ */
diff --git a/project/Core/Src/Project/local_control.c b/project/Core/Src/Project/local_control.c
index 8b12bc3..5957e1a 100644
--- a/project/Core/Src/Project/local_control.c
+++ b/project/Core/Src/Project/local_control.c
@@ -11,12 +11,15 @@
#include <stdint.h>
#include "GPIO.h"
#include "project.h"
+#include "systick.h"
int click_count = 0;
uint32_t last_press = 0;
uint32_t time_down = 0;
int hold_pending = 0;
+void handle_press(int pressed);
+
/**
* Initialize local control mode (does not enable it)
*/
diff --git a/project/Core/Src/Project/player_actions.c b/project/Core/Src/Project/player_actions.c
index 8318e08..2fe1732 100644
--- a/project/Core/Src/Project/player_actions.c
+++ b/project/Core/Src/Project/player_actions.c
@@ -90,7 +90,7 @@ void player_stop() {
/**
* Toggles the LED every second if in pause mode
*/
-void SysTick_Handler2(int count) {
+void player_action_tick(int count) {
if (state != PAUSED_STATE)
return;
diff --git a/project/Core/Src/Project/remote_control.c b/project/Core/Src/Project/remote_control.c
index c549eb1..68d3f21 100644
--- a/project/Core/Src/Project/remote_control.c
+++ b/project/Core/Src/Project/remote_control.c
@@ -18,6 +18,8 @@
static char buffer[80];
static char* cur = buffer;
+void parse_input(char buffer[]);
+
/**
* Initialize remote control mode (does not enable it)
*/
@@ -39,6 +41,10 @@ void remote_control_loop() {
}
}
+/**
+ * Parses the input string and calls the correct command
+ * @param buffer a null terminated string of the input
+ */
void parse_input(char buffer[]) {
if (!strcmp(buffer, "HELP")) {
player_help();
diff --git a/project/Core/Src/System/systick.c b/project/Core/Src/System/systick.c
index c18707e..f9e2470 100644
--- a/project/Core/Src/System/systick.c
+++ b/project/Core/Src/System/systick.c
@@ -1,4 +1,5 @@
#include "systick.h"
+#include "player_actions.h"
systick_t *get_systick() {
return (systick_t *) 0xE000E010;
@@ -59,7 +60,7 @@ int check_systick() {
static uint32_t count = 0;
void SysTick_Handler() {
- SysTick_Handler2(count++);
+ player_action_tick(count++);
}
uint32_t systick_get_count() {