1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-27 18:02:17 +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

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