[EthercatDevice_DmpLCD_Generic]
Description
Initialize the LCD module on the EtherCAT slave device.
Derived Class:
Class Name | Vendor ID | Product Code |
EthercatDevice_QECR11UN01 | 0x00000bc3 | 0x0086d103 |
EthercatDevice_QECR00UN01 | 0x00000bc3 | 0x0086d100 |
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):
Definition | ID | IC | Resolution | Xp | Yp | Xm | Ym |
ECAT_LCD_ILI9341_1 | 0 | ILI9341 | 240 X 320 | D9 | A2 | A3 | D8 |
ECAT_LCD_ILI9341_2 | 1 | ILI9341 | 240 X 320 | D6 | A1 | A2 | D7 |
ECAT_LCD_ILI9488_1 | 2 | ILI9488 | 320 X 480 | D8 | A3 | A2 | D9 |
ECAT_LCD_ILI9486_1 | 3 | ILI9486 | 320 X 480 | – | – | – | – |
ECAT_LCD_HX8347I_1 | 4 | HX8347-I(T) | 240 X 320 | D9 | A2 | A3 | D8 |
ECAT_LCD_HX8347D_1 | 5 | HX8347-D | 240 X 320 | D9 | A2 | A3 | D8 |
ECAT_LCD_UNKNOWN_ID | 0xFFFF | – | – | – | – | – | – |
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.