NETMF / llilum

Development Platform for MSIL and UWP apps targeting Micro Controllers. Part of the .NET Micro Framework family.
Other
159 stars 52 forks source link

SerialDevice.FromIdAsync() return type question #168

Closed piwi1263 closed 8 years ago

piwi1263 commented 8 years ago

Is the return type correct here for the SerialDevice.FromIdAsync() ?

image

Or should this match more to return just the Device as is done by the I2cDevice and the SpiDevice ?

kail commented 8 years ago

Hi,

Sorry about the confusion there. The SerialDevice.FromIdAsync is the method that actually has the correct return type, while the ones for SpiDevice and I2cDevice are incorrect.

piwi1263 commented 8 years ago

At least it is clear, but using the await for the SerialDevice.FindIdAsync() returns into a GetAwaiter not implemented/not found error.

kail commented 8 years ago

For now, please use .GetResults() on the IAsyncOperation. You can also use System.IO.Ports.SerialPort for serial communication. For all other peripherals, I would recommend using the classes in Microsoft.Llilum.Devices, as they are more lightweight than their UWP equivalents

piwi1263 commented 8 years ago

Hi Mikhail,

thanks for answer, I'll give it a shot and see how far I come.

Cheers,

Peter.