「App:Library:LVGL:docs:Porting:Set up a project」の版間の差分
112行目: | 112行目: | ||
LVGL also can be used via <code>'''Kconfig'''</code> and <code>'''menuconfig'''</code>. You can use <code>'''lv_conf.h'''</code> together with Kconfig, but keep in mind that the value from <code>'''lv_conf.h'''</code> or build settings (<code>'''-D...'''</code>) overwrite the values set in Kconfig. To ignore the configs from <code>'''lv_conf.h'''</code> simply remove its content, or define <code>'''LV_CONF_SKIP'''</code>. | LVGL also can be used via <code>'''Kconfig'''</code> and <code>'''menuconfig'''</code>. You can use <code>'''lv_conf.h'''</code> together with Kconfig, but keep in mind that the value from <code>'''lv_conf.h'''</code> or build settings (<code>'''-D...'''</code>) overwrite the values set in Kconfig. To ignore the configs from <code>'''lv_conf.h'''</code> simply remove its content, or define <code>'''LV_CONF_SKIP'''</code>. | ||
− | | | + | |'''lv_conf.hと呼ばれるLVGL'''の構成ヘッダーファイルがあります。このヘッダーを変更して、ライブラリの基本的な動作を設定したり、未使用のモジュールや機能を無効にしたり、コンパイル時のメモリバッファのサイズを調整したりします。 |
+ | |||
+ | ディレクトリの横にある'''lvgl/lv_conf_template.h'''を<code>'''lv_conf.h'''</code>コピーして、名前を'''''lv_conf.h'''''に変更します。ファイルを開き、最初のを変更してそのコンテンツを有効にします。したがって、ファイルのレイアウトは次のようになります。 <code>'''lvgl#if 0#if 1'''</code> | ||
+ | | -lvgl | ||
+ | <nowiki>|</nowiki> -lv_conf 。h | ||
+ | <nowiki>|-他の ファイル と フォルダ</nowiki> | ||
+ | 設定ファイルのコメントは、オプションの意味を説明しています。少なくとも<code>'''LV_COLOR_DEPTH'''</code>ディスプレイの色深度に応じて設定してください。例とデモはで明示的に有効にする必要があることに注意してください<code>'''lv_conf.h'''</code>。 | ||
+ | |||
+ | |||
+ | または、<code>'''lv_conf.h'''</code>別の場所にコピーすることもできますが<code>'''LV_CONF_INCLUDE_SIMPLE'''</code>、コンパイラオプションに定義を追加し(<code>'''-DLV_CONF_INCLUDE_SIMPLE'''</code>GCCコンパイラなど)、インクルードパスを手動で設定する必要があります(例<code>'''-I../include/gui'''</code>)。この場合、LVGLは<code>'''lv_conf.h'''</code>単純に。を含めようとし<code>'''#include "lv_conf.h"'''</code>ます。 | ||
+ | |||
+ | |||
+ | に別の名前を使用することもできます<code>'''lv_conf.h'''</code>。カスタムパスは、<code>'''LV_CONF_PATH'''</code>defineを介して設定できます。例えば<code>'''-DLV_CONF_PATH="/home/joe/my_project/my_custom_conf.h"'''</code> | ||
+ | |||
+ | |||
+ | が定義されている場合<code>'''LV_CONF_SKIP'''</code>、LVGLはを含めようとしません<code>'''lv_conf.h'''</code>。代わりに、ビルドオプションを使用して構成定義を渡すことができます。たとえば<code>'''"-DLV_COLOR_DEPTH=32 -DLV_USE_BTN 1"'''</code>。設定されていないオプションは、のオプションと同じデフォルト値を取得します<code>'''lv_conf_template.h'''</code>。 | ||
+ | |||
+ | |||
+ | <code>'''Kconfig'''</code>LVGLは、および を介して使用することもできます<code>'''menuconfig'''</code>。<code>'''lv_conf.h'''</code>Kconfigと一緒に使用できますが、からの値<code>'''lv_conf.h'''</code>またはビルド設定(<code>'''-D...'''</code>)がKconfigで設定された値を上書きすることに注意してください。構成を無視するには、<code>'''lv_conf.h'''</code>単にそのコンテンツを削除するか、を定義します<code>'''LV_CONF_SKIP'''</code>。 | ||
|} | |} | ||
131行目: | 149行目: | ||
# Call <code>'''lv_timer_handler()'''</code> every few milliseconds to handle LVGL related tasks. Learn more. | # Call <code>'''lv_timer_handler()'''</code> every few milliseconds to handle LVGL related tasks. Learn more. | ||
| | | | ||
+ | |||
+ | |||
+ | グラフィックライブラリを使用するには、ライブラリを初期化し、必要なコンポーネントをセットアップする必要があります。初期化の順序は次のとおりです。 | ||
+ | |||
+ | # を呼び出し<code>'''lv_init()'''</code>ます。 | ||
+ | # ドライバーを初期化します。 | ||
+ | # ディスプレイおよび入力デバイスのドライバーをLVGLに登録します。ディスプレイおよび入力デバイスの登録の詳細をご覧ください。 | ||
+ | # の構成ヘッダーファイルがあります。このヘッダーを変更して、ライブラリの基本的な動作を設定したり、未使用のモジュールや機能を無効にしたり、コンパイル時のメモリバッファのサイズを調整したりします。<code>'''lv_tick_inc(x)'''</code>割り込みでミリ秒ごとに呼び出して<code>'''x'''</code>、経過時間をLVGLに報告します。もっと詳しく知る。 | ||
+ | # の構成ヘッダーファイルがあります。このヘッダーを変更して、ライブラリの基本的な動作を設定したり、未使用のモジュールや機能を無効にしたり、コンパイル時のメモリバッファのサイズを調整したりします。<code>'''lv_timer_handler()'''</code>LVGL関連のタスクを処理するには、数ミリ秒ごとに呼び出します。もっと詳しく知る。 | ||
|} | |} | ||
:[[App:Library:LVGL:docs:Porting|戻る : Previous]] | :[[App:Library:LVGL:docs:Porting|戻る : Previous]] |
2022年6月21日 (火) 20:39時点における版
https://docs.lvgl.io/8.2/porting/project.html
Set up a project
Get the library
英文 | 自動翻訳 |
---|---|
LVGL is available on GitHub: https://github.com/lvgl/lvgl. You can clone it or Download the latest version of the library from GitHub. |
LVGLはGitHubで入手できます:https://github.com/lvgl/lvgl。
クローンを作成するか、GitHubからライブラリの最新バージョンをダウンロードできます。 |
Add lvgl to your project
英文 | 自動翻訳 |
---|---|
The graphics library itself is the |
グラフィックライブラリ自体がlvgl ディレクトリです。いくつかのフォルダが含まれていますが、使用するにはフォルダのファイルlvgl のみが必要です。 .c.hsrc
|
Automatically add files
英文 | 自動翻訳 |
---|---|
If your IDE automatically adds the files from the folders copied to the project folder (as Eclipse or VSCode does), you can simply copy the |
IDEが(EclipseまたはVSCodeのように)プロジェクトフォルダーにコピーされたフォルダーからファイルを自動的に追加する場合は、フォルダーをそのままプロジェクトにコピーするだけですlvgl 。
|
Make and CMake
英文 | 自動翻訳 |
---|---|
LVGL also supports LVGL_DIR_NAME ?= lvgl #The name of the lvgl folder (change this if you have renamed it) LVGL_DIR ?= ${shell pwd} #The path where the lvgl folder is include $(LVGL_DIR)/$(LVGL_DIR_NAME)/lvgl.mk For integration with CMake take a look this section of the Documentation. |
LVGLは、すぐに使用できるシステムのサポートmake とCMake 構築も行います。MakefileベースのビルドシステムにLVGLを追加するには、次の行をメインのMakefileに追加します。
LVGL_DIR_NAME?= lvgl#lvglフォルダーの名前(名前を変更した場合はこれを変更してください) LVGL_DIR?= $ {shell pwd}#lvglフォルダーがあるパス $(LVGL_DIR)/ $(LVGL_DIR_NAME)/lvgl.mkを含める CMakeとの統合については、ドキュメントのこのセクションをご覧ください。 |
Other platforms and tools
英文 | 自動翻訳 |
---|---|
The Get started section contains many platform specific descriptions e.g. for ESP32, Arduino, NXP, RT-Thread, NuttX, etc. |
[はじめに]セクションには、ESP32、Arduino、NXP、RT-Thread、NuttXなどのプラットフォーム固有の説明が多数含まれています。 |
Demos and Examples
英文 | 自動翻訳 |
---|---|
The |
このフォルダには、とlvgl フォルダも含まれています。プロジェクトにソースファイルを手動で追加する必要がある場合は、これら2つのフォルダーのソースファイルでも同じことができます。例とデモを処理するため、これらの場合に追加のアクションは必要ありません。 examplesdemosmakeCMake
|
Configuration file
英文 | 自動翻訳 | |
---|---|---|
There is a configuration header file for LVGL called lv_conf.h. You modify this header to set the library's basic behavior, disable unused modules and features, adjust the size of memory buffers in compile-time, etc. To get |-lvgl
|-lv_conf.h
|-other files and folders
Comments in the config file explain the meaning of the options. Be sure to set at least
|
lv_conf.hと呼ばれるLVGLの構成ヘッダーファイルがあります。このヘッダーを変更して、ライブラリの基本的な動作を設定したり、未使用のモジュールや機能を無効にしたり、コンパイル時のメモリバッファのサイズを調整したりします。
ディレクトリの横にあるlvgl/lv_conf_template.hを |
-lvgl
| -lv_conf 。h |-他の ファイル と フォルダ 設定ファイルのコメントは、オプションの意味を説明しています。少なくとも
|
Initialization
英文 | 自動翻訳 |
---|---|
To use the graphics library you have to initialize it and setup required components. The order of the initialization is:
|
|