Beispiel #1
0
        static void cmd_flashWrite(string addr_str, string path)
        {
            int addr = 0;

            Console.Write("Flash programming...");

            if (addr_str.ToLower().Contains("0x"))
            {
                addr = Convert.ToInt32(addr_str, 16);
            }
            else
            {
                addr = Convert.ToInt32(addr_str);
            }

            byte [] data = File.ReadAllBytes(path);

            edio.flaWR(addr, data, 0, data.Length);

            Console.WriteLine("ok");
        }