コード例 #1
0
 private void InitialiseSPI() throws IOException, SpiDeviceException {
   FileInputStream fr = new FileInputStream("q3remoteadd.cfg");
   fr.read(TxAddress);
   fr.close();
   SPIFactory.INSTANCE.connectSPI();
   SPIFactory.INSTANCE.setConfiguration();
   // Outpin again has multiple implementation based on whether running on Android or Pi
   chipSelect =
       new OutPin(
           0); // header 11 on Pi (Marked GPIO17) used for Chip Enable (Note: This is not CSN for
   // SPI)
 }