This commit is contained in:
2023-04-03 01:06:58 +02:00
parent 7b936642ad
commit 99ba609f6f
6 changed files with 392 additions and 330 deletions

19
CL56.h
View File

@ -3,18 +3,18 @@
#include <avr/io.h>
#include "shiftreg.h"
#define SEG_A 0b10000000
#define SEG_B 0b01000000
#define SEG_C 0b00100000
#define SEG_D 0b00010000
#define SEG_E 0b00001000
#define SEG_F 0b00000100
#define SEG_G 0b00000010
#define SEG_DP 0b00000001
class DualCl56
{
public:
static constexpr uint8_t SEG_A = 0b10000000;
static constexpr uint8_t SEG_B = 0b01000000;
static constexpr uint8_t SEG_C = 0b00100000;
static constexpr uint8_t SEG_D = 0b00010000;
static constexpr uint8_t SEG_E = 0b00001000;
static constexpr uint8_t SEG_F = 0b00000100;
static constexpr uint8_t SEG_G = 0b00000010;
static constexpr uint8_t SEG_DP= 0b00000001;
static constexpr uint8_t COLEN_A = 0b00000010;
static constexpr uint8_t COLEN_B = 0b00100000;
@ -79,5 +79,6 @@ class DualCl56
void tick();
void setString(const char* string, const uint8_t dp = 0);
void setSegments(const uint8_t segments, const uint8_t place);
};