Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed X_NUCLEO_PLC01A1
Diff: main.cpp
- Revision:
- 5:321e4e37ba1c
- Parent:
- 4:17b45bcd5b40
- Child:
- 6:afd63b2b2d1a
diff -r 17b45bcd5b40 -r 321e4e37ba1c main.cpp
--- a/main.cpp Tue Feb 23 13:00:04 2016 +0000
+++ b/main.cpp Wed Feb 24 10:54:02 2016 +0000
@@ -67,7 +67,7 @@
* @param None
* @retval None
*/
-void DigitalInputArrayHandler(PLC &plc)
+void DigitalInputArrayHandler(X_NUCLEO_PLC01A1 &plc)
{
plc.plcInput().DigInpArray_GetInput(inputArray);
}
@@ -77,7 +77,7 @@
* @param None
* @retval None
*/
-void SsrelayHandler(PLC &plc)
+void SsrelayHandler(X_NUCLEO_PLC01A1 &plc)
{
/* Set outputArray as DigInpArray RxBuffer */
outputArray[1] = plc.signalMirror(inputArray[1]);
@@ -118,8 +118,8 @@
SPI spi(X_NUCLEO_PLC01A1_PIN_SPI_MOSI, X_NUCLEO_PLC01A1_PIN_SPI_MISO, X_NUCLEO_PLC01A1_PIN_SPI_SCLK);
setup(spi, X_NUCLEO_PLC01A1_PIN_SPI_BITS);
- /* Initializing PLC IO Channels Component. */
- PLC plc(X_NUCLEO_PLC01A1_PIN_SPI_CS1, X_NUCLEO_PLC01A1_PIN_SPI_CS2, X_NUCLEO_PLC01A1_PIN_OUT_EN, spi);
+ /* Initializing X_NUCLEO_PLC01A1 IO Channels Component. */
+ X_NUCLEO_PLC01A1 plc(X_NUCLEO_PLC01A1_PIN_SPI_CS1, X_NUCLEO_PLC01A1_PIN_SPI_CS2, X_NUCLEO_PLC01A1_PIN_OUT_EN, spi);
while(1) {
plc.plcInput().SetReadStatus(1);