22using System ;
33using System . Diagnostics ;
44using System . Threading ;
5- using Windows . Devices . Gpio ;
5+ using System . Device . Gpio ;
66
77namespace Can . TestApp
88{
@@ -15,12 +15,11 @@ public class Program
1515 public static void Main ( )
1616 {
1717 // PJ5 is LD2 in STM32F769I_DISCO
18- //_led = GpioController.GetDefault ().OpenPin(PinNumber('J', 5));
18+ //_led = new GpioController().OpenPin(PinNumber('J', 5), PinMode.Output );
1919 // PG14 is LEDLD4 in F429I_DISCO
20- //_led = GpioController.GetDefault ().OpenPin(PinNumber('G', 14));
20+ //_led = new GpioController().OpenPin(PinNumber('G', 14), PinMode.Output );
2121 // PD13 is LED3 in DISCOVERY4
22- _led = GpioController . GetDefault ( ) . OpenPin ( PinNumber ( 'D' , 13 ) ) ;
23- _led . SetDriveMode ( GpioPinDriveMode . Output ) ;
22+ _led = new GpioController ( ) . OpenPin ( PinNumber ( 'D' , 13 ) , PinMode . Output ) ;
2423
2524 // set settings for CAN controller
2625 CanSettings canSettings = new CanSettings ( 6 , 8 , 1 , 0 ) ;
@@ -74,7 +73,7 @@ private static void CanController_DataReceived(object sender, CanMessageReceived
7473 static void BlinkLED ( )
7574 {
7675 // blink led for each message received
77- _led . Write ( GpioPinValue . High ) ;
76+ _led . Write ( PinValue . High ) ;
7877 Thread . Sleep ( 500 ) ;
7978 _led . Toggle ( ) ;
8079 }
0 commit comments