Skip to content

Commit 7d9bfd8

Browse files
committed
Merge branch 'develop'
2 parents 3b9c5bf + fd8a431 commit 7d9bfd8

File tree

8 files changed

+17
-16
lines changed

8 files changed

+17
-16
lines changed

examples/UnitUnified/UnitExtIO2/AnaDigInput/main/AnaDigInput.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ void analog8_function()
103103
}
104104
latest = at;
105105
render_status(v);
106-
M5_LOGI("ANA8:%3u,%3u,%3u,%3u,%3u,%3u,%3u,%3u", v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7]);
106+
M5.Log.printf("ANA8:%3u,%3u,%3u,%3u,%3u,%3u,%3u,%3u\n", v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7]);
107107
}
108108
}
109109

@@ -119,7 +119,7 @@ void analog12_function()
119119
}
120120
latest = at;
121121
render_status(v);
122-
M5_LOGI("ANA12:%4u,%4u,%4u,%4u,%4u,%4u,%4u,%4u", v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7]);
122+
M5.Log.printf("ANA12:%4u,%4u,%4u,%4u,%4u,%4u,%4u,%4u\n", v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7]);
123123
}
124124
}
125125

@@ -135,7 +135,7 @@ void digital_function()
135135
}
136136
latest = at;
137137
render_status(high_bits);
138-
M5_LOGI("DIG:%X", high_bits);
138+
M5.Log.printf("DIG:%X\n", high_bits);
139139
}
140140
}
141141
} // namespace

examples/UnitUnified/UnitExtIO2/DigOutput/main/DigOutput.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ void setup()
7070

7171
unit.writeAllMode(Mode::DigitalOutput);
7272
unit.writeAllDigitalOutput(false); // All pins to LOW
73-
M5_LOGI("Current Pin:%u", current);
73+
M5.Log.printf("Current Pin:%u\n", current);
7474
}
7575

7676
void loop()
@@ -83,12 +83,12 @@ void loop()
8383
if (M5.BtnA.wasClicked() || touch.wasClicked()) {
8484
// Toggle HIGH/LOW
8585
state ^= (1U << current);
86-
M5_LOGI("Change Pin:%u to %s", current, (state & (1U << current)) ? "HIGH" : "LOW");
86+
M5.Log.printf("Change Pin:%u to %s\n", current, (state & (1U << current)) ? "HIGH" : "LOW");
8787
dirty = true;
8888
} else if (M5.BtnA.wasHold() || touch.wasHold()) {
8989
// Change current to next
9090
current = (current + 1) % UnitExtIO2::NUMBER_OF_PINS;
91-
M5_LOGI("Current Pin:%u", current);
91+
M5.Log.printf("Current Pin:%u\n", current);
9292
dirty = true;
9393
}
9494

@@ -97,9 +97,9 @@ void loop()
9797
M5_LOGE("Failed to output");
9898
}
9999
render();
100-
M5_LOGI("Output Pin0:%u%u%u%u%u%u%u%u:Pin7", (bool)(state & 0x01), (bool)(state & 0x02), (bool)(state & 0x04),
101-
(bool)(state & 0x08), (bool)(state & 0x10), (bool)(state & 0x20), (bool)(state & 0x40),
102-
(bool)(state & 0x80));
100+
M5.Log.printf("Output Pin0:%u%u%u%u%u%u%u%u:Pin7\n", (bool)(state & 0x01), (bool)(state & 0x02),
101+
(bool)(state & 0x04), (bool)(state & 0x08), (bool)(state & 0x10), (bool)(state & 0x20),
102+
(bool)(state & 0x40), (bool)(state & 0x80));
103103

104104
dirty = false;
105105
}

examples/UnitUnified/UnitExtIO2/LEDControl/main/LEDControl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ void loop()
102102

103103
lcd.setCursor(16, 32 + 16);
104104
lcd.printf("RGB(%3u,%3u,%3u)", r, g, b);
105-
M5_LOGI("RGB(%3u,%3u,%3u)", r, g, b);
105+
M5.Log.printf("RGB(%3u,%3u,%3u)\n", r, g, b);
106106
lcd.fillRect(16, 32 * 2, lcd.width(), 16, (uint16_t)lgfx::rgb565_t(r, g, b));
107107

108108
++counter;

examples/UnitUnified/UnitExtIO2/ServoControl/main/ServoControl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ void loop()
8989
}
9090
lcd.setCursor(16, 48);
9191
lcd.printf("Angle:%3u(deg)", deg);
92+
M5.Log.printf("Angle:%3u(deg)\n", deg);
9293
m5::utility::delay(500);
9394
}
9495
m5::utility::delay(1000);

library.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
"url": "https://github.com/m5stack/M5Unit-EXTIO.git"
1212
},
1313
"dependencies": {
14-
"M5UnitUnified": "https://github.com/m5stack/M5UnitUnified.git@^0.0.5"
14+
"m5stack/M5UnitUnified": ">=0.1.0"
1515
},
16-
"version": "0.0.1",
16+
"version": "0.1.0",
1717
"frameworks": [
1818
"arduino"
1919
],
@@ -27,4 +27,4 @@
2727
"docs/html"
2828
]
2929
}
30-
}
30+
}

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=M5Unit-EXTIO
2-
version=0.0.1
2+
version=0.1.0
33
author=M5Stack
44
maintainer=M5Stack
55
sentence=Library for M5Stack UNIT EXTIO using M5UnitUnified

platformio.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ lib_ldf_mode = deep
1010
test_framework = googletest
1111
test_build_src = true
1212
lib_deps=m5stack/M5Unified
13-
m5stack/M5UnitUnified@^0.0.5
13+
m5stack/M5UnitUnified@>=0.1.0
1414

1515
; --------------------------------
1616
[m5base]

src/unit/unit_ExtIO2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace unit {
3535
// class UnitExtIO2
3636
const char UnitExtIO2::name[] = "UnitExtIO2";
3737
const types::uid_t UnitExtIO2::uid{"UnitExtIO2"_mmh3};
38-
const types::uid_t UnitExtIO2::attr{0};
38+
const types::attr_t UnitExtIO2::attr{attribute::AccessI2C};
3939

4040
bool UnitExtIO2::begin()
4141
{

0 commit comments

Comments
 (0)