package devices;

import com.sun.jna.ptr.ShortByReference;

import anywheresoftware.b4a.keywords.Bit;

public class ShortPointer extends ShortByReference {
	
	public ShortPointer() {
		super();
	}
	
	public int toInt() {
		return super.getValue() & 0xFFFF;
	}
	
	public String toHex() {
		return Bit.ToHexString(toInt());
	}
	
	public static short ShortValue_FromInt(int value) {
		return (short)(value & 0xFFFF);
	}
}
