nrf/modules/music: Remove init of softpwm/ticker upon music module load.

Also update microbit_music_init0 to register low priority ticker callback
for the music module.
This commit is contained in:
Glenn Ruben Bakke 2017-11-25 01:07:13 +01:00 committed by Damien George
parent 789f8f1c4b
commit f8ae6b7bfc
1 changed files with 1 additions and 6 deletions

View File

@ -77,10 +77,7 @@ extern volatile uint32_t ticks;
STATIC uint32_t start_note(const char *note_str, size_t note_len, const pin_obj_t *pin);
void microbit_music_init0(void) {
softpwm_init();
ticker_init(microbit_music_tick);
ticker_start();
pwm_start();
ticker_register_low_pri_callback(microbit_music_tick);
}
void microbit_music_tick(void) {
@ -460,8 +457,6 @@ MP_DEFINE_CONST_FUN_OBJ_KW(microbit_music_set_tempo_obj, 0, microbit_music_set_t
static mp_obj_t music_init(void) {
microbit_music_init0();
music_data = m_new_obj(music_data_t);
music_data->bpm = DEFAULT_BPM;
music_data->ticks = DEFAULT_TICKS;