- Accessattribute and Accessmode added
git-svn-id: https://svn.code.sf.net/p/libusbjava/code/trunk@116 94ad28fe-ef68-46b1-9651-e7ae4fcf1c4c
This commit is contained in:
@@ -5,8 +5,20 @@ package ch.ntb.mcdp.dict;
|
|||||||
*
|
*
|
||||||
* @author schlaepfer
|
* @author schlaepfer
|
||||||
*/
|
*/
|
||||||
|
/**
|
||||||
|
* @author schlaepfer
|
||||||
|
*
|
||||||
|
*/
|
||||||
public abstract class Register {
|
public abstract class Register {
|
||||||
|
|
||||||
|
public enum Accessmode {
|
||||||
|
none, supervisor, user, test
|
||||||
|
};
|
||||||
|
|
||||||
|
public enum Accessattr {
|
||||||
|
none, readonly, writeonly
|
||||||
|
};
|
||||||
|
|
||||||
private static final String INIT_STRING = "***";
|
private static final String INIT_STRING = "***";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -48,7 +60,17 @@ public abstract class Register {
|
|||||||
/**
|
/**
|
||||||
* A string description of the register
|
* A string description of the register
|
||||||
*/
|
*/
|
||||||
private String description;
|
private String description = "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The register access mode
|
||||||
|
*/
|
||||||
|
private Accessmode accessmode = Accessmode.none;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The register access attribute
|
||||||
|
*/
|
||||||
|
private Accessattr accessattr = Accessattr.none;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the mnemonic of this register
|
* @return the mnemonic of this register
|
||||||
@@ -175,4 +197,36 @@ public abstract class Register {
|
|||||||
public static String[] getTypes() {
|
public static String[] getTypes() {
|
||||||
return types;
|
return types;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the access attributes of the register
|
||||||
|
*/
|
||||||
|
public Accessattr getAccessattr() {
|
||||||
|
return accessattr;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the access attribute of the register
|
||||||
|
*
|
||||||
|
* @param accessattr
|
||||||
|
*/
|
||||||
|
public void setAccessattr(Accessattr accessattr) {
|
||||||
|
this.accessattr = accessattr;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the access mode of this register
|
||||||
|
*/
|
||||||
|
public Accessmode getAccessmode() {
|
||||||
|
return accessmode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the access mode of this register
|
||||||
|
*
|
||||||
|
* @param accessmode
|
||||||
|
*/
|
||||||
|
public void setAccessmode(Accessmode accessmode) {
|
||||||
|
this.accessmode = accessmode;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user