I want to find...

Search

Shares

Table of Content

EthercatDevice_DmpLCD.lcdInit()

[EthercatDevice_DmpLCD_Generic]

Description

Initialize the LCD module on the EtherCAT slave device.

Derived Class:

Class NameVendor IDProduct Code
EthercatDevice_QECR11UN010x00000bc30x0086d103
EthercatDevice_QECR00UN010x00000bc30x0086d100

Syntax

int lcdInit(uint16_t lcd_id = ECAT_LCD_UNKNOWN_ID);

Parameters

  • [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):
DefinitionIDICResolutionXpYpXmYm
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.

Return Value

Return an error code. If the returned value is zero, it indicates a successful execution of this function.

Comment

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

Example

#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 Class for more QEC Stepper Drivers instructions and API usage.

Scroll to Top