mirror of
https://github.com/adafruit/DHT-sensor-library.git
synced 2023-10-23 22:20:38 +03:00
format check with clang
This commit is contained in:
parent
97d11f3fd5
commit
3f20e85202
16
DHT.cpp
16
DHT.cpp
@ -35,17 +35,18 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
DHT::DHT() {
|
DHT::DHT() {
|
||||||
_pin = 2; // pin 2 set as the default data pin
|
_pin = 2; // pin 2 set as the default data pin
|
||||||
_type = DHT11; // using the DHT11 sensor as the default sensor type.
|
_type = DHT11; // using the DHT11 sensor as the default sensor type.
|
||||||
// Note that pin 2 and DHT11 are just default values to
|
// Note that pin 2 and DHT11 are just default values to initialize members
|
||||||
// initialize members _pin and _type in the class definition.
|
// _pin and _type in the class definition. They can be modified via
|
||||||
// They can be modified via DHT::begin(uint8_t pin, uint8_t type, uint8_t usec).
|
// DHT::begin(uint8_t pin, uint8_t type, uint8_t usec).
|
||||||
#ifdef __AVR
|
#ifdef __AVR
|
||||||
_bit = digitalPinToBitMask(_pin);
|
_bit = digitalPinToBitMask(_pin);
|
||||||
_port = digitalPinToPort(_pin);
|
_port = digitalPinToPort(_pin);
|
||||||
#endif
|
#endif
|
||||||
_maxcycles = microsecondsToClockCycles(1000); // 1 millisecond timeout for
|
_maxcycles =
|
||||||
// reading pulses from DHT sensor.
|
microsecondsToClockCycles(1000); // 1 millisecond timeout for
|
||||||
|
// reading pulses from DHT sensor.
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -101,8 +102,7 @@ void DHT::begin(uint8_t usec) {
|
|||||||
* Optionally pass pull-up time (in microseconds) before DHT reading
|
* Optionally pass pull-up time (in microseconds) before DHT reading
|
||||||
* starts. Default is 55 (see function declaration in DHT.h).
|
* starts. Default is 55 (see function declaration in DHT.h).
|
||||||
*/
|
*/
|
||||||
void DHT::begin(uint8_t pin, uint8_t type, uint8_t usec)
|
void DHT::begin(uint8_t pin, uint8_t type, uint8_t usec) {
|
||||||
{
|
|
||||||
_pin = pin;
|
_pin = pin;
|
||||||
_type = type;
|
_type = type;
|
||||||
#ifdef __AVR
|
#ifdef __AVR
|
||||||
|
Loading…
x
Reference in New Issue
Block a user