示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            byte          hiAddr = Convert.ToByte(textBox1.Text, 16);
            byte          loAddr = Convert.ToByte(textBox2.Text, 16);
            CmdFileManage ci     = new CmdFileManage();

            addrc             = ci.GetWriteToPageCmd(hiAddr, loAddr);
            richTextBox1.Text = DataChange.byteToHexStr(addrc);
        }
示例#2
0
        public void GetWriteToPageCmdTest()
        {
            CmdFileManage cf = new CmdFileManage();

            byte[] ret = cf.GetWriteToPageCmd(0x00, 0x00);
            Assert.AreEqual(ret.Count(), 7);
            Assert.AreEqual(ret[6], 0xDD);

            Assert.AreEqual(ret[0], 0xAA);
            Assert.AreEqual(ret[1], 0x06);
            Assert.AreEqual(ret[2], 0x01);
            Assert.AreEqual(ret[3], 0xDA);
        }