diff options
Diffstat (limited to 'project/Core')
| -rw-r--r-- | project/Core/Src/Activties/activity4.c | 26 | ||||
| -rw-r--r-- | project/Core/Src/main.c | 2 |
2 files changed, 28 insertions, 0 deletions
diff --git a/project/Core/Src/Activties/activity4.c b/project/Core/Src/Activties/activity4.c new file mode 100644 index 0000000..c6b9b22 --- /dev/null +++ b/project/Core/Src/Activties/activity4.c @@ -0,0 +1,26 @@ +/* + * activity4.c + * + * Created on: Sep 16, 2025 + * Author: sowgro + */ + +#include "song.h" +#include <printf.h> + +typedef struct { + char chunk_type[4]; + unsigned int length; + unsigned short format; + unsigned short ntrcks; + unsigned short division; +} header; + +void run() { + header* p_header; + + p_header = (header *) (get_song(0).p_song); + + printf("type: %s, length: %u, format: %u, trackCount: %u, division: %u\r\n", p_header->chunk_type, p_header->length, p_header->format, p_header->ntrcks, p_header->division); +} + diff --git a/project/Core/Src/main.c b/project/Core/Src/main.c index 1b6d449..247ed1c 100644 --- a/project/Core/Src/main.c +++ b/project/Core/Src/main.c @@ -20,6 +20,8 @@ int main(void){ printf("Hello world \r\n"); + run(); + // application run function // run_demo() ; } |
