public ISPACK InitBL() { byte[] cmd_init = new byte[] { 0x7f }; Write(cmd_init, 1); ISPACK ack = get_ack(); return(ack); }
public ISPACK Read_protect() { byte[] cmd_rp = new byte[] { 0x82, 0x7d }; Write(cmd_rp, 2); ISPACK ack = get_ack(); if (ack == ISPACK.ISP_ACK) { ack = get_ack(); return(ack); } return(ack); }
public ISPACK Go(UInt32 target) { byte[] cmd_go = new byte[] { 0x21, 0xDE }; byte[] cmd_app = new byte[] { (byte)(target >> 24), (byte)(target >> 16), (byte)(target >> 8), (byte)(target >> 0), 0x08 }; Write(cmd_go, 2); ISPACK ack = get_ack(); if (ack == ISPACK.ISP_ACK) { Write(cmd_app, 5); ack = get_ack(); return(ack); } return(ack); }