示例#1
0
        public static async Task StartDevice()
        {
            //TODO: do we need to throw an error if the processor has already been initialized?
            _device = await Tsc2046.GetDefaultAsync();

            _processor = new TouchProcessor(_device);
            _processor.Initialize();
        }
示例#2
0
        public static async Task <Tsc2046> GetDefaultAsync()
        {
            if (_defaultInstance == null)
            {
                _defaultInstance = new Tsc2046();
                await _defaultInstance.InitTSC2046SPI().ConfigureAwait(false);
            }

            return(_defaultInstance);
        }
示例#3
0
 public TouchProcessor(Tsc2046 device)
 {
     this.device = device ?? throw new ArgumentNullException(nameof(device));
 }