diff --git a/README.MD b/README.MD index 960078b..88ff2a1 100644 --- a/README.MD +++ b/README.MD @@ -7,8 +7,10 @@ The code bin will demonstrate the basic functionality of T-Watch, including all

⭐ News

-1. Currently there are multiple versions of T-Watch, if you use **T-Watch-2020** version T-Watch, please define the **LILYGO_TWATCH_2020_V1** macro above the sketch `#include ` to preset the program Run in `T-Watch-2020 version hardware`. -2. Some sample programs cannot be run on special versions of hardware, such as the `UserButton` sample program, which cannot be run in the **T-Watch-2020** version, because this version of the hardware does not have physical buttons +1. In order to be compatible with multiple versions of T-Watch, the example includes a `config.h` file. For the first use, you need to define the **T-Watch** model you use in the `config.h` file +2. In the `config.h` file, you can also see similar definitions, such as **LILYGO_WATCH_LVGL**, **LILYGO_WATCH_HAS_MOTOR**, this type of definition, it will be responsible for opening the defined module function, all definitions Will be available here [View](./defined_cn.md) +3. Most of the examples are only used as hardware function demonstrations. This library just helps you complete some initialization work and some demonstrations. For more advanced gameplay, please check [TTGO.h](https://github.com/Xinyuan-LilyGO/TTGO_TWatch_Library/blob/master/src/TTGO.h) for how to initialize. After you are familiar with it, you can completely leave this library and make more changes Advanced gameplay +- About API, please check the source code

🚀 Characteristics

diff --git a/docs/defined_cn.md b/docs/defined_cn.md new file mode 100644 index 0000000..0fcca5d --- /dev/null +++ b/docs/defined_cn.md @@ -0,0 +1,43 @@ +## 套件类型 + +- **LILYGO_WATCH_2019_WITH_TOUCH** + - 带触摸屏幕,可以扩展T-Watch系列的底板 +- **LILYGO_WATCH_2019_NO_TOUCH** + - 不带触摸屏幕,可以扩展T-Watch系列的底板 +- **LILYGO_WATCH_2020_V1** + - 带触摸屏幕,它不可以扩展T-Watch系列的底板 +- **LILYGO_WATCH_BLOCK** + - 没有屏幕和触摸屏功能,它没有BMA423 + +## 功能定义 +- **LILYGO_WATCH_LVGL** + - 开启LVGL功能,它需要有显示器的支持 +- **LILYGO_WATCH_HAS_BLACKLIGHT** + - 开启背光功能 +- **LILYGO_WATCH_HAS_NFC** + - 开启NFC底板功能,它适配T-Watch NFC 的底板 +- **LILYGO_WATCH_HAS_MOTOR** + - 开启震动功能,它适配T-Watch MOTOR 的底板 +- **LILYGO_WATCH_HAS_BUZZER** + - 开启蜂鸣器功能,它适配T-Watch 带有BUZZER的底板 +- **LILYGO_WATCH_HAS_SDCARD** + - 开启SD卡功能,它适配T-Watch 带有SD 功能的底板 +- **LILYGO_WATCH_HAS_S76_S78G** + - 开启S76/S78G功能,它适配T-Watch 带有S76/S78G功能的底板 +- **LILYGO_EINK_TOUCHSCREEN** + - 开启电子墨水屏触摸功能,它仅仅适用于T-Block触摸墨水屏面板 +- **LILYGO_WATCH_HAS_EINK** + - 开启电子墨水屏,它仅仅适用于T-Block墨水屏面板 +- **LILYGO_WATCH_HAS_GAMEPAD** + - 开启游戏手柄功能,它仅仅适用于游戏手柄扩展 +- **LILYGO_WATCH_HAS_MPR121** + - 开启MPR121触摸芯片功能,它仅仅适用于MPR121底板 +- **LILYGO_WATCH_HAS_LORA** + - 开启Lora模块功能,它适配T-Watch 带有Lora功能的底板 +- **LILYGO_WATCH_HAS_GPS** + - 开启GPS模块功能,它适配T-Watch 带有GPS功能的底板 +- **LILYGO_WATCH_HAS_SIM800L** + - 开启SIM800功能,它适配T-Watch 带有SIM800模块底板 + + +**以上定义,必须包含在 #include 上方,否则它不起作用** diff --git a/docs/defined_en.md b/docs/defined_en.md new file mode 100644 index 0000000..0ecded0 --- /dev/null +++ b/docs/defined_en.md @@ -0,0 +1,43 @@ +## Kit Type + +- **LILYGO_WATCH_2019_WITH_TOUCH** + -With touch screen, you can expand the bottom plate of the T-Watch series +- **LILYGO_WATCH_2019_NO_TOUCH** + -Without the touch screen, the bottom plate of the T-Watch series can be expanded +- **LILYGO_WATCH_2020_V1** + -With touch screen, it can not expand the bottom plate of T-Watch series +- **LILYGO_WATCH_BLOCK** + -No screen and touch screen function, it does not have BMA423 + +## Function definition +- **LILYGO_WATCH_LVGL** + -Turn on the LVGL function, it needs to be supported by the display +- **LILYGO_WATCH_HAS_BLACKLIGHT** + -Turn on the backlight function +- **LILYGO_WATCH_HAS_NFC** + -Turn on the NFC backplane function, it adapts to the T-Watch NFC backplane +- **LILYGO_WATCH_HAS_MOTOR** + -Turn on the vibration function, it adapts to the bottom plate of T-Watch MOTOR +- **LILYGO_WATCH_HAS_BUZZER** + -Turn on the buzzer function, it adapts to the T-Watch baseboard with BUZZER +- **LILYGO_WATCH_HAS_SDCARD** + -Turn on the SD card function, it adapts to the T-Watch baseboard with SD function +- **LILYGO_WATCH_HAS_S76_S78G** + -Turn on the S76/S78G function, it adapts to the T-Watch baseboard with S76/S78G function +- **LILYGO_EINK_TOUCHSCREEN** + -Turn on the electronic ink screen touch function, it is only applicable to the T-Block touch ink screen panel +- **LILYGO_WATCH_HAS_EINK** + -Turn on the electronic ink screen, it only applies to the T-Block ink screen panel +- **LILYGO_WATCH_HAS_GAMEPAD** + -Turn on the gamepad function, it only applies to gamepad expansion +- **LILYGO_WATCH_HAS_MPR121** + -Turn on the MPR121 touch chip function, it is only applicable to the MPR121 backplane +- **LILYGO_WATCH_HAS_LORA** + -Turn on the Lora module function, it adapts to the T-Watch baseboard with Lora function +- **LILYGO_WATCH_HAS_GPS** + -Turn on the GPS module function, it adapts to the T-Watch baseboard with GPS function +- **LILYGO_WATCH_HAS_SIM800L** + -Turn on SIM800 function, it adapts to T-Watch with SIM800 module backplane + + +**The above definition must be included above #include , otherwise it will not work** \ No newline at end of file diff --git a/docs/details_cn.md b/docs/details_cn.md index 21326d9..5af023d 100644 --- a/docs/details_cn.md +++ b/docs/details_cn.md @@ -7,8 +7,11 @@

新闻

-1. 当前T-Watch有多种版本,如果使用**T-Watch-2020**版本T-Watch,请在草图`#include ` 上方定义**LILYGO_TWATCH_2020_V1**宏,以预设程序运行在`T-Watch-2020版本硬件`中. -2. 有些示例程序无法运行在特殊版本的硬件中,比如`UserButton`示例程序,在**T-Watch-2020**版本中就无法运行,因为该版本硬件没有物理按键 +1. 为了兼容多种版本的T-Watch,所以示例中都包含一个`config.h`文件,初次使用需要在`config.h`文件中定义你使用的**T-Watch**型号 +2. 在`config.h`文件中,你还能看到类似的定义,如**LILYGO_WATCH_LVGL**, **LILYGO_WATCH_HAS_MOTOR**,这类型的定义,它将负责开启所定义的模块功能,所有定义将在这里可以[查看](./defined_cn.md) +3. 大多数示例只是作为硬件功能演示,这个库只是帮你完成了一些初始化工作和一些演示,更高级的玩法,请查看[TTGO.h](https://github.com/Xinyuan-LilyGO/TTGO_TWatch_Library/blob/master/src/TTGO.h),了解如何初始化, 熟悉了之后,完全可以脱离本库,进行更高级的玩法 +4. 关于API,请查看源码 +

特性

diff --git a/src/LilyGoWatch.h b/src/LilyGoWatch.h index c7cc4cc..338a550 100644 --- a/src/LilyGoWatch.h +++ b/src/LilyGoWatch.h @@ -4,6 +4,7 @@ // #define LILYGO_WATCH_2020_V1 // #define LILYGO_WATCH_BLOCK // #define LILYGO_WATCH_2019_WITH_TOUCH +// #define LILYGO_WATCH_2019_NO_TOUCH // => Options // #define LILYGO_WATCH_HAS_SIM800L