1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-08-05 13:16:13 +03:00

Migrate from astyle to clang-format (#8464)

This commit is contained in:
Maxim Prokhorov
2022-02-20 19:23:33 +03:00
committed by Max Prokhorov
parent 46190b61f1
commit 19b7a29720
241 changed files with 15925 additions and 16197 deletions

View File

@@ -24,9 +24,7 @@ void flip() {
++count;
// when the counter reaches a certain value, start blinking like crazy
if (count == 20) {
flipper.attach(0.1, flip);
}
if (count == 20) { flipper.attach(0.1, flip); }
// when the counter reaches yet another value, stop blinking
else if (count == 120) {
flipper.detach();
@@ -41,5 +39,4 @@ void setup() {
flipper.attach(0.3, flip);
}
void loop() {
}
void loop() {}

View File

@@ -1,27 +1,28 @@
#include "Arduino.h"
#include "Ticker.h"
#define LED1 2
#define LED2 4
#define LED3 12
#define LED4 14
#define LED5 15
#define LED1 2
#define LED2 4
#define LED3 12
#define LED4 14
#define LED5 15
class ExampleClass {
public:
ExampleClass(int pin, int duration) : _pin(pin), _duration(duration) {
pinMode(_pin, OUTPUT);
_myTicker.attach_ms(_duration, std::bind(&ExampleClass::classBlink, this));
}
~ExampleClass() {};
public:
ExampleClass(int pin, int duration)
: _pin(pin), _duration(duration) {
pinMode(_pin, OUTPUT);
_myTicker.attach_ms(_duration, std::bind(&ExampleClass::classBlink, this));
}
~ExampleClass(){};
int _pin, _duration;
Ticker _myTicker;
int _pin, _duration;
Ticker _myTicker;
void classBlink() {
digitalWrite(_pin, !digitalRead(_pin));
}
void classBlink() {
digitalWrite(_pin, !digitalRead(_pin));
}
};
void staticBlink() {
@@ -60,5 +61,4 @@ void setup() {
});
}
void loop() {
}
void loop() {}

View File

@@ -46,5 +46,4 @@ void setup() {
tickerSetChar.attach_ms(26, setPinChar, (char)1);
}
void loop() {
}
void loop() {}