-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use model for rtnl audio id workaround
- Loading branch information
Showing
9 changed files
with
116 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#pragma once | ||
|
||
#include <stdbool.h> | ||
#include <stdint.h> | ||
|
||
typedef struct | ||
{ | ||
const char *id; | ||
const char *name; | ||
} toniebox_state_box_t; | ||
|
||
typedef struct | ||
{ | ||
uint64_t uid; | ||
bool valid; | ||
uint32_t audio_id; | ||
} toniebox_state_tag_t; | ||
|
||
typedef struct | ||
{ | ||
toniebox_state_box_t box; | ||
toniebox_state_tag_t tag; | ||
} toniebox_state_t; | ||
|
||
void toniebox_state_init(); | ||
toniebox_state_t *get_toniebox_state(); | ||
toniebox_state_t *get_toniebox_state_id(uint8_t id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include "toniebox_state.h" | ||
#include "settings.h" | ||
|
||
static toniebox_state_t Box_State_Overlay[MAX_OVERLAYS]; | ||
|
||
void toniebox_state_init() | ||
{ | ||
for (size_t i = 0; i < MAX_OVERLAYS; i++) | ||
{ | ||
osMemset(&Box_State_Overlay[i], 0, sizeof(toniebox_state_t)); | ||
} | ||
} | ||
|
||
toniebox_state_t *get_toniebox_state() | ||
{ | ||
return get_toniebox_state_id(0); | ||
} | ||
toniebox_state_t *get_toniebox_state_id(uint8_t id) | ||
{ | ||
return &Box_State_Overlay[id]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters