From 2fe47fb3bd700acebf07cd777e3a1ecb49fb9f46 Mon Sep 17 00:00:00 2001 From: sowgro Date: Fri, 12 Dec 2025 00:25:31 -0500 Subject: reduce warnings, try to get passive speaker to work --- project/Core/Inc/Activities/activity4.h | 2 +- project/Core/Inc/Project/player.h | 24 ++++++++++++++++++++++++ project/Core/Inc/Project/song_info.h | 2 +- 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 project/Core/Inc/Project/player.h (limited to 'project/Core/Inc') diff --git a/project/Core/Inc/Activities/activity4.h b/project/Core/Inc/Activities/activity4.h index fb9d5ce..2a3c714 100644 --- a/project/Core/Inc/Activities/activity4.h +++ b/project/Core/Inc/Activities/activity4.h @@ -18,6 +18,6 @@ typedef struct { void activity4_run(); -header_t *get_header(uint8_t *p_song); +header_t get_header(uint8_t *p_song); #endif /* INC_ACTIVITIES_ACTIVITY4_H_ */ diff --git a/project/Core/Inc/Project/player.h b/project/Core/Inc/Project/player.h new file mode 100644 index 0000000..23853cb --- /dev/null +++ b/project/Core/Inc/Project/player.h @@ -0,0 +1,24 @@ +/* + * player.h + * + * Created on: Dec 10, 2025 + * Author: sowgro + */ + +#ifndef INC_PROJECT_PLAYER_H_ +#define INC_PROJECT_PLAYER_H_ + +typedef struct { + uint8_t ev_type; + uint32_t abs_time; + uint8_t key_number; + uint8_t value; +} note_event_t; + +note_event_t NULL_EVENT = {10, 0, 0, 0}; + +void parse_song(uint8_t *p_song); + +uint8_t *parse_track(uint8_t *p_song, note_event_t *events); + +#endif /* INC_PROJECT_PLAYER_H_ */ diff --git a/project/Core/Inc/Project/song_info.h b/project/Core/Inc/Project/song_info.h index c951fca..9d6d5e6 100644 --- a/project/Core/Inc/Project/song_info.h +++ b/project/Core/Inc/Project/song_info.h @@ -14,6 +14,6 @@ typedef struct { int tempo; } song_info_t; -song_info_t get_song_info(uint8_t *p_song, song_info_t *ret); +uint8_t *get_song_info(uint8_t *p_song, song_info_t *ret); #endif /* INC_PROJECT_SONG_INFO_H_ */ -- cgit v1.2.3