|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectperipherals.Peripheral
public abstract class Peripheral
This is a general class representing the peripherals on the CENG336 Board. Specific peripherals are inherited from this class.
Field Summary | |
---|---|
protected int |
id
Identification number of the peripherals on Ceng 336 Board. |
protected boolean |
isEnabled
Value representing if the peripheral is activated during simulation. |
protected static int |
KEY_PAD
|
protected static int |
LED_ARRAY
|
protected PIC |
pic
Reference of microcontroller |
protected static int |
POTENTIOMETER
|
protected static int |
SEVEN_SEGMENT_DISPLAY_ARRAY
|
Constructor Summary | |
---|---|
Peripheral(int id,
PIC pic)
Constructor with default value(true) of isEnabled. |
|
Peripheral(int id,
PIC pic,
boolean isEnabled)
Main constructor of the Peripheral class. |
Method Summary | |
---|---|
int |
getId()
|
PIC |
getPic()
|
boolean |
isEnabled()
|
void |
setEnabled(boolean isEnabled)
|
void |
setId(int id)
|
void |
setPic(PIC pic)
|
abstract void |
update()
This abstract method communicates with the virtual card and makes necessary changes on it. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static int SEVEN_SEGMENT_DISPLAY_ARRAY
protected static int LED_ARRAY
protected static int KEY_PAD
protected static int POTENTIOMETER
protected int id
protected boolean isEnabled
protected PIC pic
Constructor Detail |
---|
public Peripheral(int id, PIC pic)
id
- type-unique idpublic Peripheral(int id, PIC pic, boolean isEnabled)
id
- type-unique idisEnabled
- status of peripheralMethod Detail |
---|
public abstract void update()
public int getId()
public void setId(int id)
id
- the id to setpublic boolean isEnabled()
public void setEnabled(boolean isEnabled)
isEnabled
- the isEnabled to setpublic PIC getPic()
public void setPic(PIC pic)
pic
- the pic to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |