SPI Settings
▪ Bitrate–upto3MHz
▪ Polarity – CPOL = 1; clock transition high-to-low on the leading edge and low-to-high on the
trailing edge
▪ Phase – CPHA = 1; setup on the leading edge and sample on the trailing edge
▪ Bit order – MSB first
▪ Chip select polarity – active low
java.lang.UnsupportedOperationException: This implementation of WiringPi does not support method 'wiringPiSPISetupMode'.
at com.pi4j.wiringpi.Spi.wiringPiSPISetupMode(Native Method)
at com.pi4j.io.spi.impl.SpiDeviceImpl.<init>(SpiDeviceImpl.java:71)
at com.pi4j.io.spi.SpiFactory.getInstance(SpiFactory.java:112)
at station_800.GPIO_Com.<init>(GPIO_Com.java:39)
at station_800.main.main(main.java:21)
Exception in thread "main" java.lang.NullPointerException
at station_800.GPIO_Com.sendCmd(GPIO_Com.java:59)
at station_800.GPIO_Com.getDeviceInfo(GPIO_Com.java:77)
at station_800.main.main(main.java:22)
| /* | |
| * Class: com_pi4j_wiringpi_Spi | |
| * Method: wiringPiSPISetupMode | |
| * Signature: (III)I | |
| */ | |
| JNIEXPORT jint JNICALL Java_com_pi4j_wiringpi_Spi_wiringPiSPISetupMode | |
| (JNIEnv *env, jclass class, jint channel, jint speed, jint mode) | |
| { | |
| #ifdef WIRINGPI_SPI_SETUP_MODE_UNSUPPORTED | |
| throwUnsupportedOperationException(env, | |
| "This implementation of WiringPi does not support method 'wiringPiSPISetupMode'."); | |
| return -1; | |
| #else | |
| return wiringPiSPISetupMode(channel, speed, mode); | |
| #endif | |
| } |