Is there a way to use MISO pin for something else while using SPI?

Im using SPI with these settings:

 SpiConnectionSettings settingsDisplay = new SpiConnectionSettings()
            {
                ChipSelectType = SpiChipSelectType.None,
                ChipSelectActiveState = false,
                Mode = SpiMode.Mode0,
                ClockFrequency = 4 * 1000 * 1000,
                DataBitLength = 8
            };

            SpiController controllerDisplay = SpiController.FromName(G30.SpiBus.Spi1);
            spiDisplay = controllerDisplay.GetDevice(settingsDisplay);

Only SCK and MOSI, id like to use MISO for GPIO

if I try I get this error:

The thread '<No Name>' (0x2) has exited with code 0 (0x0).
    #### Exception System.InvalidOperationException - CLR_E_INVALID_OPERATION (1) ####
    #### Message: 
    #### GHIElectronics.TinyCLR.Devices.Spi.Provider.SpiControllerApiWrapper::Acquire [IP: 0000] ####
    #### GHIElectronics.TinyCLR.Devices.Spi.Provider.SpiControllerApiWrapper::.ctor [IP: 0015] ####
    #### GHIElectronics.TinyCLR.Devices.Spi.SpiController::FromName [IP: 000c] ####
    #### VepelTrafficLight.Program::InitializeDisplay [IP: 004f] ####
    #### VepelTrafficLight.Program::Main [IP: 001c] ####
Exception thrown: 'System.InvalidOperationException' in GHIElectronics.TinyCLR.Devices.Spi.dll
An unhandled exception of type 'System.InvalidOperationException' occurred in GHIElectronics.TinyCLR.Devices.Spi.dll

There’s no way to use one of the three main SPI pins as GPIO while the rest are used as SPI using our drivers. You’d have to drop down to native code and implement it yourself.

Ok, thanks.

Hmm… that’s 2 pins less :frowning: