-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate components better and remove audio_board dependencies #110
base: master
Are you sure you want to change the base?
Conversation
…d dependency from http_get_task
@@ -379,9 +349,12 @@ int deinit_player(void) { | |||
/** | |||
* call before http task creation! | |||
*/ | |||
int init_player(void) { | |||
int init_player(i2s_std_gpio_config_t pin_config0_, i2s_port_t i2sNum_) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason for the _
? Couldn't you just drop this and use rhe parameter as a variable directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to assign these paramters (coming from app_main) to the global variables pin_config0
and i2sNum
. Of course I can use a different name instead of the trailing underscore.
Thanks for the feedback. Sorry, I mixed different code style conventions. Should I also move everything from app_main to lightsnapcast component or a new component? Or better leave that for later? |
I've always wanted to seperate decoder part to a own module too. But this I will do when I find a solution to the 20ms bug (#54). I am on this, so it would be easier for me not to change too much currently because this will make it hard to merge later. |
Yes, sure. |
This PR removes dependencies from components and within main.c to allow easier re-use.
audio_board
dependency from player.c by supplying thei2s_pin_config
through player_initaudioDAC_data
(guarded by a semaphore). And on each update it is send to the main task which will handle the actual DAC control.app_main
does not need any global variable anymore and all the tasks and supporting functions could be moved to a component..gitignore
as this file is auto-generated.Draft state, because I need to run more tests.