reformat source in uvosstyle
This commit is contained in:
5
CL56.cpp
5
CL56.cpp
@ -1,7 +1,7 @@
|
|||||||
#include "CL56.h"
|
#include "CL56.h"
|
||||||
|
|
||||||
DualCl56::DualCl56(ShiftReg<16>* shiftReg):
|
DualCl56::DualCl56(ShiftReg<16>* shiftReg):
|
||||||
_shiftReg(shiftReg)
|
_shiftReg(shiftReg)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -13,7 +13,8 @@ void DualCl56::tick()
|
|||||||
_currentLit = 0;
|
_currentLit = 0;
|
||||||
|
|
||||||
unsigned char bits[2] = {static_cast<unsigned char>(0b10000000 >> _currentLit),
|
unsigned char bits[2] = {static_cast<unsigned char>(0b10000000 >> _currentLit),
|
||||||
static_cast<unsigned char>(~(_segments[_currentLit]))};
|
static_cast<unsigned char>(~(_segments[_currentLit]))
|
||||||
|
};
|
||||||
|
|
||||||
if(!_blank)
|
if(!_blank)
|
||||||
_shiftReg->write(reinterpret_cast<unsigned char*>(&bits));
|
_shiftReg->write(reinterpret_cast<unsigned char*>(&bits));
|
||||||
|
7
CL56.h
7
CL56.h
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
class DualCl56
|
class DualCl56
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
static constexpr uint8_t SEG_A = 0b10000000;
|
static constexpr uint8_t SEG_A = 0b10000000;
|
||||||
static constexpr uint8_t SEG_B = 0b01000000;
|
static constexpr uint8_t SEG_B = 0b01000000;
|
||||||
@ -27,7 +27,7 @@ class DualCl56
|
|||||||
static constexpr uint8_t DP_G = 0b01000000;
|
static constexpr uint8_t DP_G = 0b01000000;
|
||||||
static constexpr uint8_t DP_H = 0b10000000;
|
static constexpr uint8_t DP_H = 0b10000000;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
static constexpr uint8_t ZERO = SEG_A | SEG_B | SEG_C | SEG_D | SEG_E | SEG_F;
|
static constexpr uint8_t ZERO = SEG_A | SEG_B | SEG_C | SEG_D | SEG_E | SEG_F;
|
||||||
static constexpr uint8_t ONE = SEG_B | SEG_C;
|
static constexpr uint8_t ONE = SEG_B | SEG_C;
|
||||||
@ -74,7 +74,7 @@ class DualCl56
|
|||||||
|
|
||||||
bool _blank = false;
|
bool _blank = false;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
DualCl56(ShiftReg<16>* shiftReg);
|
DualCl56(ShiftReg<16>* shiftReg);
|
||||||
|
|
||||||
@ -85,4 +85,3 @@ class DualCl56
|
|||||||
void setString(const char* string, const uint8_t dp = 0);
|
void setString(const char* string, const uint8_t dp = 0);
|
||||||
void setSegments(const uint8_t segments, const uint8_t place);
|
void setSegments(const uint8_t segments, const uint8_t place);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#include "dht11.h"
|
#include "dht11.h"
|
||||||
|
|
||||||
Dht11::Dht11(volatile unsigned char * const port, volatile unsigned char * const inPort, volatile unsigned char * const port_ctl, const unsigned char pin): _port(port), _port_ctl(port_ctl), _inPort(inPort), _pin(pin)
|
Dht11::Dht11(volatile unsigned char * const port, volatile unsigned char * const inPort,
|
||||||
|
volatile unsigned char * const port_ctl, const unsigned char pin): _port(port), _port_ctl(port_ctl), _inPort(inPort),
|
||||||
|
_pin(pin)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
uint8_t Dht11::read()
|
uint8_t Dht11::read()
|
||||||
|
3
dht11.h
3
dht11.h
@ -16,7 +16,8 @@ class Dht11
|
|||||||
const unsigned char _pin;
|
const unsigned char _pin;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Dht11(volatile unsigned char * const port, volatile unsigned char * const inPort, volatile unsigned char * const port_ctl, const unsigned char pin);
|
Dht11(volatile unsigned char * const port, volatile unsigned char * const inPort,
|
||||||
|
volatile unsigned char * const port_ctl, const unsigned char pin);
|
||||||
uint8_t read();
|
uint8_t read();
|
||||||
int16_t humidity = 0;
|
int16_t humidity = 0;
|
||||||
int16_t temperature = 0;
|
int16_t temperature = 0;
|
||||||
|
2
main.cpp
2
main.cpp
@ -196,7 +196,6 @@ inline static void printHelp(Serial* serial)
|
|||||||
"list : List sensors.\n"));
|
"list : List sensors.\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int freeRAM()
|
int freeRAM()
|
||||||
{
|
{
|
||||||
extern int __heap_start, *__brkval;
|
extern int __heap_start, *__brkval;
|
||||||
@ -502,4 +501,3 @@ int main()
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user