10PCA8561::PCA8561( TwoWire& wire, uint8_t i2c_address ) : I2C_device( wire, i2c_address )
17 for (
int i = 0; i < 12; i++ )
36 const int reg[ 4 ][ 3 ] = {
43 bit_op8( reg[ com][ seg / 8 ], (uint8_t)(~(1 << (seg % 8))), v << (seg % 8) );
48 while (
int c = *s++ ) {
56 if ( (
'\n' == c) || (
'\r' == c)) {
62 for (
int i = 0; i < (4 - 1); i++ )
71 for (
int i = 0; i <
str_pos; i++ )
84 for (
int i = 0; i < 12; i++ )
97 if ( (c < 32) || (92 < c) )
102 uint8_t c0 = p & 0x0F;
103 uint8_t c1 = (p >> 4) & 0x0F;
104 uint8_t c2 = (p >> 8) & 0x0F;
105 uint8_t c3 = (p >> 12) & 0x0F;
107 bf[ pos / 2 + 0 ] &= ~(0x0F << (4 * (pos % 2)));
108 bf[ pos / 2 + 3 ] &= ~(0x0F << (4 * (pos % 2)));
109 bf[ pos / 2 + 6 ] &= ~(0x0F << (4 * (pos % 2)));
110 bf[ pos / 2 + 9 ] &= ~(0x0F << (4 * (pos % 2)));
112 bf[ pos / 2 + 0 ] |= c0 << (4 * (pos % 2));
113 bf[ pos / 2 + 3 ] |= c1 << (4 * (pos % 2));
114 bf[ pos / 2 + 6 ] |= c2 << (4 * (pos % 2));
115 bf[ pos / 2 + 9 ] |= c3 << (4 * (pos % 2));
119 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4001,
120 0x0000, 0x0000, 0x2AA8, 0x8282, 0x8282, 0x0280, 0x4000, 0x0820,
121 0x1D74, 0x0440, 0x13C4, 0x16C4, 0x06D0, 0x1694, 0x1794, 0x0444,
122 0x17D4, 0x16D4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
123 0x0000, 0x07D4, 0x17B4, 0x1114, 0x9446, 0x1394, 0x0394, 0x1714,
124 0x07D0, 0x9006, 0x1540, 0x21B0, 0x1110, 0x0578, 0x2558, 0x1554,
125 0x03D4, 0x3554, 0x23D4, 0x1694, 0x8006, 0x1550, 0x0930, 0x2D50,
126 0x2828, 0x8028, 0x1824, 0x0000, 0x2008,
void bit_op8(uint8_t reg, uint8_t mask, uint8_t value)
void clear(bool no_flush=false)
void puts(const char *s, int dly=0)
void com_seg(int com, int seg, bool v)
static uint16_t char_pattern[61]
PCA8561(uint8_t i2c_address=(0x70 > > 1))
void char2seg(int pos, int c)
int reg_w(uint8_t reg_adr, const uint8_t *data, uint16_t size)