Álvaro de Rada / X_NUCLEO_PLC01A1
Revision:
4:e97bbb97aa43
Parent:
2:1ec0dea195f8
--- a/BSP/x_nucleo_plc01a1_class.cpp	Tue Feb 23 12:22:08 2016 +0000
+++ b/BSP/x_nucleo_plc01a1_class.cpp	Wed Feb 24 10:52:31 2016 +0000
@@ -53,12 +53,12 @@
   * @param      Input channel state buffer
   * @retval     Input buffer state
   */
-uint8_t PLC::signalMirror(uint8_t In_Array)
+uint8_t X_NUCLEO_PLC01A1::signalMirror(uint8_t In_Array)
 {
   return(In_Array);
 }
 
-void PLC::handleFreezeTo(void)
+void X_NUCLEO_PLC01A1::handleFreezeTo(void)
 {
     freezeTo = true;
 }
@@ -69,14 +69,14 @@
   * @param      Duration of freeze
   * @retval     Output value
   */
-uint8_t PLC::outputFreeze(uint8_t N_Channel, uint16_t msec)
+uint8_t X_NUCLEO_PLC01A1::outputFreeze(uint8_t N_Channel, uint16_t msec)
 {
   if(freezeTo) {
       timeout.detach();
       return(0x00);
   } else if(!attached) {
       attached = true;
-      timeout.attach(this, &PLC::handleFreezeTo, msec/1000);
+      timeout.attach(this, &X_NUCLEO_PLC01A1::handleFreezeTo, msec/1000);
   }
   
   return N_Channel;
@@ -87,7 +87,7 @@
   * @param      Regroup array
   * @retval     Value
   */
-uint8_t PLC::outputRegroup(uint8_t Out_Array)
+uint8_t X_NUCLEO_PLC01A1::outputRegroup(uint8_t Out_Array)
 {
   return(Out_Array);
 }
@@ -97,7 +97,7 @@
   * @param      Input channel state data
   * @retval     Value corresponding to the sum of inputs at high
   */
-uint8_t PLC::inputSum(uint8_t* Buffer, uint8_t In_Array)
+uint8_t X_NUCLEO_PLC01A1::inputSum(uint8_t* Buffer, uint8_t In_Array)
 {
   
   uint8_t inputChannelsOn = 0;
@@ -121,7 +121,7 @@
   * @param      Output to set
   * @retval     Output value 
   */
-uint8_t PLC::setOutput(uint8_t Out_Array)
+uint8_t X_NUCLEO_PLC01A1::setOutput(uint8_t Out_Array)
 {
   return(Out_Array); 
 }
@@ -132,7 +132,7 @@
   * @param      Outputs to be AND with inputs
   * @retval     Result of AND operation
   */
-uint8_t PLC::inputsAND(uint8_t In_Array, uint8_t Out_Channel)
+uint8_t X_NUCLEO_PLC01A1::inputsAND(uint8_t In_Array, uint8_t Out_Channel)
 {
   uint8_t outArray = 0;
   outArray = In_Array & Out_Channel;
@@ -146,7 +146,7 @@
   * @param      Outputs to be OR with inputs
   * @retval     Result of OR operation
   */
-uint8_t PLC::inputsOR(uint8_t In_Array, uint8_t Out_Channel)
+uint8_t X_NUCLEO_PLC01A1::inputsOR(uint8_t In_Array, uint8_t Out_Channel)
 {
   uint8_t outArray = 0;
   outArray = In_Array | Out_Channel;
@@ -159,7 +159,7 @@
   * @param      Input channels state
   * @retval     Result of OR operation
   */
-uint8_t PLC::inputsNOT(uint8_t In_Array)
+uint8_t X_NUCLEO_PLC01A1::inputsNOT(uint8_t In_Array)
 {
   uint8_t outArray = 0;
   In_Array = ~(In_Array);
@@ -174,7 +174,7 @@
   * @param      Outputs to be XOR with inputs
   * @retval     Result of XOR operation
   */
-uint8_t PLC::inputsXOR(uint8_t In_Array, uint8_t Out_Channel)
+uint8_t X_NUCLEO_PLC01A1::inputsXOR(uint8_t In_Array, uint8_t Out_Channel)
 {
   uint8_t outArray = 0;
   outArray = In_Array ^ Out_Channel;
@@ -187,7 +187,7 @@
   * @param      Output value buffer
   * @retval     None
   */
-void PLC::outputParityBits(uint8_t* Buffer)
+void X_NUCLEO_PLC01A1::outputParityBits(uint8_t* Buffer)
 {
   uint8_t Parity_Cal0 = 0x00;
   uint8_t Parity_Cal1 = 0x00;
@@ -261,15 +261,15 @@
   * @param      Output channels to be toggled
   * @retval     None
   */
-void PLC::outputCycling(void)
+void X_NUCLEO_PLC01A1::outputCycling(void)
 {
     if(!attached) {
           attached = true;
-          ticker.attach(this, &PLC::toggleOutput, 0.3);
+          ticker.attach(this, &X_NUCLEO_PLC01A1::toggleOutput, 0.3);
     }
 }
 
-void PLC::toggleOutput(void)
+void X_NUCLEO_PLC01A1::toggleOutput(void)
 {
   /* Reset & set CS1 to refresh VNI watchdog */
   plcIn.setInputSPI(0);
@@ -284,4 +284,4 @@
   plcOut.Ssrelay_SetOutput(outBuff);
 }
 
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 
\ No newline at end of file
+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/