add hardware testpattern code. ed,w,1 to enable ed,w,2 enable software pattern on board