MCPcopy Create free account
hub / github.com/atomic14/ch32v003-audio / Player

Method Player

Talkie/src/player.cpp:9–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7static const uint32_t SAMPLE_PERIOD_US = (1000000UL / FS_HZ);
8
9Player::Player(TIM_TypeDef *timer, int pwm_channel, GPIO_TypeDef *pwm_gpio_port, int pwm_gpio_pin) {
10 this->timer = timer;
11 this->pwm_channel = pwm_channel;
12 this->pwm_gpio_port = pwm_gpio_port;
13 this->pwm_gpio_pin = pwm_gpio_pin;
14 audio_pwm_init();
15}
16
17void Player::audio_pwm_init() {
18 // Clocks - determine which GPIO port clock to enable

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected