mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-29 05:21:37 +03:00
Migrate from astyle to clang-format (#8464)
This commit is contained in:
committed by
Max Prokhorov
parent
46190b61f1
commit
19b7a29720
@ -10,13 +10,13 @@
|
||||
|
||||
#include <I2S.h>
|
||||
|
||||
const int frequency = 440; // frequency of square wave in Hz
|
||||
const int amplitude = 500; // amplitude of square wave
|
||||
const int sampleRate = 8000; // sample rate in Hz
|
||||
const int frequency = 440; // frequency of square wave in Hz
|
||||
const int amplitude = 500; // amplitude of square wave
|
||||
const int sampleRate = 8000; // sample rate in Hz
|
||||
|
||||
const int halfWavelength = (sampleRate / frequency); // half wavelength of square wave
|
||||
const int halfWavelength = (sampleRate / frequency); // half wavelength of square wave
|
||||
|
||||
short sample = amplitude; // current sample value
|
||||
short sample = amplitude; // current sample value
|
||||
int count = 0;
|
||||
|
||||
void setup() {
|
||||
@ -26,7 +26,8 @@ void setup() {
|
||||
// start I2S at the sample rate with 16-bits per sample
|
||||
if (!I2S.begin(I2S_PHILIPS_MODE, sampleRate, 16)) {
|
||||
Serial.println("Failed to initialize I2S!");
|
||||
while (1); // do nothing
|
||||
while (1)
|
||||
; // do nothing
|
||||
}
|
||||
}
|
||||
|
||||
@ -43,4 +44,3 @@ void loop() {
|
||||
// increment the counter for the next sample
|
||||
count++;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user