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);
        }
        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);
        }
        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);
        }
        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);
        }
Beispiel #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);
        }
Beispiel #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);
 }
Beispiel #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);
 }
Beispiel #8
0
 public static async Task CreateFileSystem(MeadowSerialDevice meadow)
 {
     await MeadowDeviceManager.ProcessCommand(meadow, HcomMeadowRequestType.HCOM_MDOW_REQUEST_CREATE_ENTIRE_FLASH_FS);
 }
Beispiel #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);
 }
 public static async Task EraseFlash(MeadowSerialDevice meadow)
 {
     await MeadowDeviceManager.ProcessCommand(meadow, HcomMeadowRequestType.HCOM_MDOW_REQUEST_BULK_FLASH_ERASE, timeoutMs : 200000);
 }