Async requests for power supply status, device id and firmware revision are now working.
1.1 --- a/FutabaVfd.cpp Tue Jul 08 21:50:53 2014 +0200
1.2 +++ b/FutabaVfd.cpp Thu Jul 10 22:05:18 2014 +0200
1.3 @@ -637,6 +637,7 @@
1.4 }
1.5
1.6 /**
1.7 +Tries to complete our current request if we have one pending.
1.8 */
1.9 TMiniDisplayRequest GP1212A01A::AttemptRequestCompletion()
1.10 {
1.11 @@ -708,4 +709,26 @@
1.12 Write(report);
1.13 }
1.14
1.15 +/**
1.16 +*/
1.17 +bool GP1212A01A::PowerOn()
1.18 + {
1.19 + return iPowerOn;
1.20 + }
1.21
1.22 +/**
1.23 +*/
1.24 +char* GP1212A01A::DeviceId()
1.25 + {
1.26 + return iDeviceId;
1.27 + }
1.28 +
1.29 +/**
1.30 +*/
1.31 +char* GP1212A01A::FirmwareRevision()
1.32 + {
1.33 + return iFirmwareRevision;
1.34 + }
1.35 +
1.36 +
1.37 +
2.1 --- a/FutabaVfd.h Tue Jul 08 21:50:53 2014 +0200
2.2 +++ b/FutabaVfd.h Thu Jul 10 22:05:18 2014 +0200
2.3 @@ -163,9 +163,9 @@
2.4 void CancelRequest(){iRequest=EMiniDisplayRequestNone;}
2.5 TMiniDisplayRequest AttemptRequestCompletion();
2.6 FutabaVfdReport& InputReport() {return iInputReport;}
2.7 - bool PowerOn(){return iPowerOn;}
2.8 - char* DeviceId(){return iDeviceId;};
2.9 - char* FirmwareRevision(){return iFirmwareRevision;};
2.10 + bool PowerOn();
2.11 + char* DeviceId();
2.12 + char* FirmwareRevision();
2.13
2.14 private:
2.15 enum DW
3.1 --- a/MiniDisplay.cpp Tue Jul 08 21:50:53 2014 +0200
3.2 +++ b/MiniDisplay.cpp Thu Jul 10 22:05:18 2014 +0200
3.3 @@ -177,7 +177,7 @@
3.4 }
3.5
3.6 //-------------------------------------------------------------
3.7 -TMiniDisplayRequest MiniDisplayAttempRequestCompletion(MiniDisplayDevice aDevice)
3.8 +TMiniDisplayRequest MiniDisplayAttemptRequestCompletion(MiniDisplayDevice aDevice)
3.9 {
3.10 return ((GP1212A01A*)aDevice)->AttemptRequestCompletion();
3.11 }
3.12 @@ -192,4 +192,10 @@
3.13 char* MiniDisplayFirmwareRevision(MiniDisplayDevice aDevice)
3.14 {
3.15 return ((GP1212A01A*)aDevice)->FirmwareRevision();
3.16 + }
3.17 +
3.18 +//-------------------------------------------------------------
3.19 +bool MiniDisplayPowerSupplyStatus(MiniDisplayDevice aDevice)
3.20 + {
3.21 + return ((GP1212A01A*)aDevice)->PowerOn();
3.22 }
3.23 \ No newline at end of file
4.1 --- a/MiniDisplay.h Tue Jul 08 21:50:53 2014 +0200
4.2 +++ b/MiniDisplay.h Thu Jul 10 22:05:18 2014 +0200
4.3 @@ -167,7 +167,7 @@
4.4 Attempt request completion.
4.5 @param [IN] The device to apply this command to.
4.6 */
4.7 -extern "C" MDAPI TMiniDisplayRequest MiniDisplayAttempRequestCompletion(MiniDisplayDevice aDevice);
4.8 +extern "C" MDAPI TMiniDisplayRequest MiniDisplayAttemptRequestCompletion(MiniDisplayDevice aDevice);
4.9
4.10 /**
4.11 Provide device ID.
4.12 @@ -183,6 +183,13 @@
4.13 */
4.14 extern "C" MDAPI char* MiniDisplayFirmwareRevision(MiniDisplayDevice aDevice);
4.15
4.16 +/**
4.17 +Get power supply status.
4.18 +@param [IN] The device to apply this command to.
4.19 +*/
4.20 +extern "C" MDAPI bool MiniDisplayPowerSupplyStatus(MiniDisplayDevice aDevice);
4.21 +
4.22 +
4.23
4.24 #endif
4.25