Home
last modified time | relevance | path

Searched refs:rmt_buzzer (Results 1 – 1 of 1) sorted by relevance

/hal_espressif-3.6.0/examples/peripherals/rmt/musical_buzzer/components/musical_buzzer/src/
Dmusical_buzzer_rmt.c43 static IRAM_ATTR rmt_item32_t update_notation_freq_duration(rmt_buzzer_t *rmt_buzzer) in update_notation_freq_duration() argument
46 …const musical_buzzer_notation_t *notation = &rmt_buzzer->notation[rmt_buzzer->next_notation_index]; in update_notation_freq_duration()
49 notation_code.duration0 = rmt_buzzer->counter_clk_hz / notation->note_freq_hz / 2; in update_notation_freq_duration()
52 …rmt_set_tx_loop_count(rmt_buzzer->channel, notation->note_duration_ms * notation->note_freq_hz / 1… in update_notation_freq_duration()
54 rmt_buzzer->next_notation_index++; in update_notation_freq_duration()
61 rmt_buzzer_t *rmt_buzzer = __containerof(buzzer, rmt_buzzer_t, parent); in buzzer_play() local
66 rmt_buzzer->notation = notation; in buzzer_play()
67 rmt_buzzer->next_notation_index = 0; in buzzer_play()
68 rmt_buzzer->notation_length = notation_length; in buzzer_play()
70 rmt_item32_t notation_code = update_notation_freq_duration(rmt_buzzer); in buzzer_play()
[all …]