This scenario shows how to use the InputStream and OutputStream properties of Windows.Devices.CustomDevice to send read and write commands to the device driver.

The Write Block button writes a message to the Fx2 device's internal memory, and the call to WriteAsync completes once the driver has committed the data to the device. The device has four message buffers, and once they are full the next write will be blocked until a buffer is free.

The Read Button reads a message from the memory. The read operation will block if no messages are available, otherwise the driver will read one message and free the slot. This may allow a pending write to complete.

## Output Log: