1
0
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:
Stephen Crane 2018-11-25 13:21:05 +00:00
parent e0e80a0d87
commit c4cc897319
2 changed files with 6 additions and 2 deletions

View File

@ -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) {
}

View File

@ -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) {
}