[EthercatDevice_DmpLCD_Generic]
描述
Initialize the LCD module on the EtherCAT slave device.
衍生類別:
Class Name | Vendor ID | Product Code |
EthercatDevice_QECR11UN01 | 0x00000bc3 | 0x0086d103 |
EthercatDevice_QECR00UN01 | 0x00000bc3 | 0x0086d100 |
語法
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):
定義 | 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.
回傳值
返回一個 錯誤代碼。如果傳回值為零,則表示該函式執行成功。
備註
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.