Skip to content

Commit

Permalink
Add CMake component support (#3)
Browse files Browse the repository at this point in the history
* fix compiler warning for RTC

Signed-off-by: Martin Strob <mwiechmann@techfak.uni-bielefeld.de>

* add CMakeLists.txt for esp-idf CMake component mode

Signed-off-by: Martin Strob <mwiechmann@techfak.uni-bielefeld.de>

* fix compiler warning for missing case in switch 'hzk16Type'

Signed-off-by: Martin Strob <mwiechmann@techfak.uni-bielefeld.de>
  • Loading branch information
nexero authored and zhouyangyale committed May 22, 2019
1 parent 4b44e69 commit a40ca45
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
15 changes: 15 additions & 0 deletions CMakeLists.txt
@@ -0,0 +1,15 @@
set(COMPONENT_SRCDIRS src
src/Fonts
src/utility)

set(COMPONENT_ADD_INCLUDEDIRS src)

set(COMPONENT_PRIV_INCLUDEDIRS src/Fonts
src/Fonts/Custom
src/Fonts/GFXFF
src/Fonts/TrueType
src/utility)

set(COMPONENT_PRIV_REQUIRES arduino)

register_component()
4 changes: 4 additions & 0 deletions src/M5Display.cpp
Expand Up @@ -170,6 +170,10 @@ bool M5Display::initHzk16(boolean use, const char *HZK16Path,

}

default: {
break;
}

}

return hzk16Type != DontUsedHzk16;
Expand Down
2 changes: 1 addition & 1 deletion src/RTC.cpp
Expand Up @@ -70,7 +70,7 @@ void RTC::Bcd2asc(void)
uint8_t i,j;
for (j=0,i=0; i<7; i++){
asc[j++] =(trdata[i]&0xf0)>>4|0x30 ;/*格式为: 秒 分 时 日 月 星期 年 */
asc[j++] =trdata[i]&0x0f|0x30;
asc[j++] =(trdata[i]&0x0f)|0x30;
}
}

Expand Down

0 comments on commit a40ca45

Please sign in to comment.