Skip to content

Commit 9fb4fb6

Browse files
committed
Merge branch 'develop'
2 parents b246ae1 + dc672a5 commit 9fb4fb6

10 files changed

Lines changed: 18 additions & 17 deletions

File tree

examples/UnitUnified/PlotToSerial/main/PlotToSerial.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ void setup()
6060
M5_LOGI("M5UnitUnified has been begun");
6161
M5_LOGI("%s", Units.debugInfo().c_str());
6262
#if defined(USING_UNIT_CARDKB)
63-
M5_LOGI("Hardware:%02X Firmware:%02X", unit.hardwareType(), unit.firmwareVersion());
63+
M5.Log.printf("Hardware:%02X Firmware:%02X\n", unit.hardwareType(), unit.firmwareVersion());
6464
#endif
6565
#if defined(USING_UNIT_FACES_QWERTY)
66-
M5_LOGI("FacesType:%02X Firmware:%02X", unit.facesType(), unit.firmwareVersion());
66+
M5.Log.printf("FacesType:%02X Firmware:%02X\n", unit.facesType(), unit.firmwareVersion());
6767
#endif
6868
lcd.fillScreen(TFT_DARKGREEN);
6969

examples/UnitUnified/SimpleDisplay/main/SimpleDisplay.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ void setup()
7070
M5_LOGI("M5UnitUnified has been begun");
7171
M5_LOGI("%s", Units.debugInfo().c_str());
7272
#if defined(USING_UNIT_CARDKB)
73-
M5_LOGI("Hardware:%02X Firmware:%02X", unit.hardwareType(), unit.firmwareVersion());
73+
M5.Log.printf("Hardware:%02X Firmware:%02X\n", unit.hardwareType(), unit.firmwareVersion());
7474
#endif
7575
#if defined(USING_UNIT_FACES_QWERTY)
76-
M5_LOGI("FacesType:%02X Firmware:%02X", unit.facesType(), unit.firmwareVersion());
76+
M5.Log.printf("FacesType:%02X Firmware:%02X\n", unit.facesType(), unit.firmwareVersion());
7777
#endif
7878

7979
lcd.setFont(&fonts::AsciiFont8x16);

library.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
"type": "git",
1111
"url": "https://github.com/m5stack/M5Unit-KEYBOARD.git"
1212
},
13-
"dependencies": {
14-
"M5UnitUnified": "https://github.com/m5stack/M5UnitUnified.git@^0.0.5"
13+
"dependencies":
14+
{
15+
"m5stack/M5UnitUnified": ">=0.1.0"
1516
},
1617
"version": "0.0.1",
1718
"frameworks": [

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/M5UnitUnifiedKEYBOARD.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
@file M5UnitUnifiedKEYBOARD.h
88
@brief Main header of M5UnitKEYBOARD using M5UnitUnfied
99
*/
10-
#ifndef M5_UNIT_UNIFIED_KEYBARD_H
11-
#define M5_UNIT_UNIFIED_KEYBARD_H
10+
#ifndef M5_UNIT_UNIFIED_KEYBOARD_H
11+
#define M5_UNIT_UNIFIED_KEYBOARD_H
1212
#ifdef __cplusplus
1313
#include "M5UnitUnifiedKEYBOARD.hpp"
1414
#else

src/unit/unit_CardKB.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ namespace unit {
225225
// class UnitCardKB
226226
const char UnitCardKB::name[] = "UnitCardKB";
227227
const types::uid_t UnitCardKB::uid{"UnitCardKB"_mmh3};
228-
const types::uid_t UnitCardKB::attr{0};
228+
const types::attr_t UnitCardKB::attr{attribute::AccessI2C};
229229

230230
key_index_t UnitCardKB::character_to_key_index(const char ch)
231231
{

src/unit/unit_CardKB.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
@file unit_CardKB.hpp
88
@brief CardKB Unit for M5UnitUnified
99
*/
10-
#ifndef M5_UNIT_KEYBOARD_UNIT_CARDKB_HPP
11-
#define M5_UNIT_KEYBOARD_UNIT_CARDKB_HPP
10+
#ifndef M5_UNIT_KEYBOARD_UNIT_CARD_KB_HPP
11+
#define M5_UNIT_KEYBOARD_UNIT_CARD_KB_HPP
1212

1313
#include "unit_Keyboard.hpp"
1414
#include <m5_utility/container/circular_buffer.hpp>

src/unit/unit_FacesQWERTY.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ namespace unit {
226226
// class UnitFacesQWERTY
227227
const char UnitFacesQWERTY::name[] = "UnitFacesQWERTY";
228228
const types::uid_t UnitFacesQWERTY::uid{"UnitFacesQWERTY"_mmh3};
229-
const types::uid_t UnitFacesQWERTY::attr{0};
229+
const types::attr_t UnitFacesQWERTY::attr{attribute::AccessI2C};
230230

231231
key_index_t UnitFacesQWERTY::character_to_key_index(const char ch)
232232
{
@@ -300,7 +300,7 @@ bool UnitFacesQWERTY::begin()
300300
#if defined(ARDUINO)
301301
#if defined(digitalPinToInterrupt)
302302
if (_handle_irq) {
303-
adapter()->pinMode(INTERRUPT_PIN, INPUT_PULLUP);
303+
pinMode(INTERRUPT_PIN, INPUT_PULLUP);
304304
attachInterrupt(digitalPinToInterrupt(INTERRUPT_PIN), handle_faces_qwerty, FALLING);
305305
}
306306
#else

src/unit/unit_Keyboard.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace unit {
2121
// class UnitKeyboard
2222
const char UnitKeyboard::name[] = "UnitKeyboard";
2323
const types::uid_t UnitKeyboard::uid{"UnitKeyboard"_mmh3};
24-
const types::uid_t UnitKeyboard::attr{0};
24+
const types::attr_t UnitKeyboard::attr{attribute::AccessI2C};
2525

2626
bool UnitKeyboard::begin()
2727
{
@@ -46,7 +46,7 @@ void UnitKeyboard::update(const bool force)
4646
// class UnitKeyboardBitwise
4747
const char UnitKeyboardBitwise::name[] = "UnitKeyboardBitwise";
4848
const types::uid_t UnitKeyboardBitwise::uid{"UnitKeyboardBitwise"_mmh3};
49-
const types::uid_t UnitKeyboardBitwise::attr{0};
49+
const types::attr_t UnitKeyboardBitwise::attr{attribute::AccessI2C};
5050

5151
void UnitKeyboardBitwise::update(const bool force)
5252
{

test/embedded/test_cardkb/cardkb_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ TEST_P(TestCardKB, M5UnitUnifiedFirmware)
8484
EXPECT_TRUE(unit->readHardwareType(htype));
8585
EXPECT_EQ(htype, unit->hardwareType());
8686
EXPECT_TRUE(htype == TYPE_CARDKB || htype == TYPE_CARDKB_V11);
87-
87+
8888
Mode mode{};
8989
for (auto&& m : mode_table) {
9090
EXPECT_TRUE(unit->writeMode(m));

0 commit comments

Comments
 (0)