📄 onewirespilcd.java
字号:
package etaai.lcd.onewire;import etaai.lcd.LCDPort;import etaai.lcd.onewire.spi.*;import com.dalsemi.onewire.adapter.*;import etaai.lcd.*;/** * Title: Serial LCD * Description: Comnada display lcd pe seriala * Copyright: Copyright (c) 2001 * Company: ETA AI * @author Mircea Pop * @version 1.0 */public class OneWireSPILCD extends OneWireSPI implements LCDPort{ private OneWireSPI spi; /** * Clasa OneWireLCD implementeaza comunicarea cu afisajul LCD Cristalfontz * * @param DSPortAdapter adapter Adaptorul de 1-wire * @param String adresa1 Adresa DS2406( PIOA - SPI_DATA, PIOB SPI_CLOCK) * @param String adresa2 Adresa DS2406( PIOA - SPI_CS, PIOB /SPI_BUSY) * @throws Exception Eroare LCD */ public OneWireSPILCD(DSPortAdapter adapter ,String adresa1,String adresa2) throws Exception { super(adapter, adresa1, adresa2); } /** * Trimitere la LCD comenzi * @param String lcdData Datele ce se trimit la lcd * @throws LCDException Daca nu s-a reusit trimiterea datelor */ public void sendLCDData(String lcdData) throws LCDException { try { sendSPIData(lcdData); } catch(Exception e) {throw new LCDException("SPILCD : " + e);} } /** * Trimitere la LCD comenzi * @param int lcdData Datele ce se trimit la lcd * @throws LCDException Daca nu s-a reusit trimiterea datelor */ public void sendLCDData(int lcdData) throws LCDException { try { sendSPIData(lcdData); } catch(Exception e) {throw new LCDException("SPILCD : " + e);} } /** * Trimitere la LCD comenzi * @param byte[] lcdData Datele ce se trimit la lcd * @throws LCDException Daca nu s-a reusit trimiterea datelor */ public void sendLCDData(byte[] lcdData) throws LCDException { try { sendSPIData(lcdData); } catch(Exception e) {throw new LCDException("SPILCD : " + e);} } /** * Resetare display */ public void resetDisplay(){ } /**Inchidere port SPI*/ public void close(){ }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -