Ejemplo n.º 1
0
        public static async Task VerifyErasedFlash(MeadowSerialDevice meadow)
        {
            await MeadowDeviceManager.ProcessCommand(meadow, HcomMeadowRequestType.HCOM_MDOW_REQUEST_VERIFY_ERASED_FLASH, timeoutMs : 30000);

            //meadowRequestType = HcomMeadowRequestType.HCOM_MDOW_REQUEST_VERIFY_ERASED_FLASH;
            //new SendTargetData(meadow).SendSimpleCommand(meadowRequestType);
        }
Ejemplo n.º 2
0
        public static async Task ListFilesAndCrcs(MeadowSerialDevice meadow, int partition = 0)
        {
            await MeadowDeviceManager.ProcessCommand(meadow, HcomMeadowRequestType.HCOM_MDOW_REQUEST_LIST_PART_FILES_AND_CRC, userData : (uint)partition, timeoutMs : 30000);

            //meadowRequestType = HcomMeadowRequestType.HCOM_MDOW_REQUEST_LIST_PART_FILES_AND_CRC;
            //new SendTargetData(meadow).SendSimpleCommand(meadowRequestType, (uint)partition);
        }
Ejemplo n.º 3
0
        public static async Task FormatFileSystem(MeadowSerialDevice meadow, int partition)
        {
            await MeadowDeviceManager.ProcessCommand(meadow, HcomMeadowRequestType.HCOM_MDOW_REQUEST_FORMAT_FLASH_FILE_SYS, userData : (uint)partition);

            //meadowRequestType = HcomMeadowRequestType.HCOM_MDOW_REQUEST_FORMAT_FLASH_FILE_SYS;
            //new SendTargetData(meadow).SendSimpleCommand(meadowRequestType, (uint)partition);
        }
Ejemplo n.º 4
0
        public static async Task CreateFileSystem(MeadowSerialDevice meadow)
        {
            await MeadowDeviceManager.ProcessCommand(meadow, HcomMeadowRequestType.HCOM_MDOW_REQUEST_CREATE_ENTIRE_FLASH_FS);

            //meadowRequestType = HcomMeadowRequestType.HCOM_MDOW_REQUEST_CREATE_ENTIRE_FLASH_FS;
            //new SendTargetData(meadow).SendSimpleCommand(meadowRequestType);
        }
Ejemplo n.º 5
0
        public static async Task PartitionFileSystem(MeadowSerialDevice meadow, int numberOfPartitions = 2)
        {
            if (numberOfPartitions < 1 || numberOfPartitions > 8)
            {
                throw new IndexOutOfRangeException("Number of partitions must be between 1 & 8 inclusive");
            }

            await MeadowDeviceManager.ProcessCommand(meadow, HcomMeadowRequestType.HCOM_MDOW_REQUEST_PARTITION_FLASH_FS, userData : (uint)numberOfPartitions);
        }
Ejemplo n.º 6
0
 public static async Task EraseFlash(MeadowSerialDevice meadow)
 {
     // not sure why this responds with a SerialReconnect message
     await MeadowDeviceManager.ProcessCommand(meadow, HcomMeadowRequestType.HCOM_MDOW_REQUEST_BULK_FLASH_ERASE, MeadowMessageType.SerialReconnect, timeoutMs : 200000);
 }
Ejemplo n.º 7
0
 public static async Task ListFiles(MeadowSerialDevice meadow, int partition = 0)
 {
     await MeadowDeviceManager.ProcessCommand(meadow, HcomMeadowRequestType.HCOM_MDOW_REQUEST_LIST_PARTITION_FILES, userData : (uint)partition);
 }
Ejemplo n.º 8
0
 public static async Task CreateFileSystem(MeadowSerialDevice meadow)
 {
     await MeadowDeviceManager.ProcessCommand(meadow, HcomMeadowRequestType.HCOM_MDOW_REQUEST_CREATE_ENTIRE_FLASH_FS);
 }
Ejemplo n.º 9
0
 public static async Task InitializeFileSystem(MeadowSerialDevice meadow, int partition)
 {
     await MeadowDeviceManager.ProcessCommand(meadow, HcomMeadowRequestType.HCOM_MDOW_REQUEST_INITIALIZE_FLASH_FS, userData : (uint)partition);
 }
Ejemplo n.º 10
0
 public static async Task EraseFlash(MeadowSerialDevice meadow)
 {
     await MeadowDeviceManager.ProcessCommand(meadow, HcomMeadowRequestType.HCOM_MDOW_REQUEST_BULK_FLASH_ERASE, timeoutMs : 200000);
 }