mirror of
https://github.com/jscrane/r65emu.git
synced 2024-12-21 12:29:51 +00:00
warn if no sound configured
This commit is contained in:
parent
e0e80a0d87
commit
c4cc897319
@ -55,6 +55,8 @@ const uint8_t *DAC::play(const uint8_t *bytes, unsigned size) {
|
||||
}
|
||||
|
||||
#else
|
||||
#pragma message "No DAC"
|
||||
|
||||
// does nothing by default
|
||||
void DAC::begin(unsigned channel, unsigned freq) {
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "sound_pwm.h"
|
||||
#include "hardware.h"
|
||||
|
||||
#if defined(ESP32)
|
||||
#if defined(PWM_SOUND) && defined(ESP32)
|
||||
#include <driver/ledc.h>
|
||||
|
||||
#define CHANNEL LEDC_CHANNEL_0
|
||||
@ -40,7 +40,7 @@ void PWM::set_freq(unsigned freq) {
|
||||
ESP_ERROR_CHECK(::ledc_set_freq(SPEED_MODE, TIMER, freq));
|
||||
}
|
||||
|
||||
#elif defined(ESP8266)
|
||||
#elif defined(PWM_SOUND) && defined(ESP8266)
|
||||
#include <core_esp8266_waveform.h>
|
||||
|
||||
static unsigned gpio, duty;
|
||||
@ -66,6 +66,8 @@ void PWM::set_freq(unsigned freq) {
|
||||
}
|
||||
|
||||
#else
|
||||
#pragma message "No PWM"
|
||||
|
||||
void PWM::begin(unsigned gpio) {
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user