我想找...

搜尋

分享

目錄

EthercatDevice_DmpLCD.lcdInit()

[EthercatDevice_DmpLCD_Generic]

描述

Initialize the LCD module on the EtherCAT slave device.

衍生類別:

Class NameVendor IDProduct Code
EthercatDevice_QECR11UN010x00000bc30x0086d103
EthercatDevice_QECR00UN010x00000bc30x0086d100

語法

int lcdInit(uint16_t lcd_id = ECAT_LCD_UNKNOWN_ID);

參數

  • [in] uint16_t lcd_id
    The ID of the LCD module to be initialized. The list of supported LCD modules is as follows, including the configuration of the touch pins (Xp, Yp, Xm, Ym):
定義IDICResolutionXpYpXmYm
ECAT_LCD_ILI9341_10ILI9341240 X 320D9A2A3D8
ECAT_LCD_ILI9341_21ILI9341240 X 320D6A1A2D7
ECAT_LCD_ILI9488_12ILI9488320 X 480D8A3A2D9
ECAT_LCD_ILI9486_13ILI9486320 X 480
ECAT_LCD_HX8347I_14HX8347-I(T)240 X 320D9A2A3D8
ECAT_LCD_HX8347D_15HX8347-D240 X 320D9A2A3D8
ECAT_LCD_UNKNOWN_ID0xFFFF

If this parameter is ECAT_LCD_UNKNOWN_ID, the ID of the LCD module and calibration parameters are loaded from the storage on the EtherCAT slave device.

回傳值

返回一個 錯誤代碼。如果傳回值為零,則表示該函式執行成功。

備註

This function must be called after a successful execution of EthercatMaster::begin(). This function is blocking and cannot be called within the Cyclic Callback.

範例

#include "Ethercat.h"

EthercatMaster master;
EthercatDevice_QECR00UN01 slave;

void setup() {
  master.begin();
  slave.attach(0, master);
  slave.lcdInit(ECAT_LCD_ILI9341_1);
  // ...
}

void loop() {
  // ...
}

Please see EthercatDevice_DmpLCD_Generic 類別 for more QEC Stepper Drivers instructions and API usage.

返回頂端