Hi Arun, in the uhd/host/examples directory, you'll find gpio.cpp !
Note that you'll need to bitbang SPI that way from the host; that can work, but it's going to be slooooow. Alternatively, if you are familiar with FPGA development, implementing another SPI host in the FPGA should be thoroughly possible. You'd then need to find a smart way to talk to the SPI controller from the host, which I'd say is the bigger challenge. Honestly, if you just need *something* to talk SPI, getting an USB-to- SPI adapter (of the popular FTDI variety, for example) is probably way, way easier and faster. If you need timed execution of SPI transactions, you could also combine the two: Use an easy-to-use SPI bridge or microcontroller or … and just (de)assert the CS line of SPI using timed commands and the standard GPIO. From a bit of a long-time support perspective: 90% of people don't actually need their GPIOs to talk full protocols; if your application needs that, a minor adjustment to architecture is often easier. Best regards, Marcus On Thu, 2018-08-30 at 18:43 +0000, Arun kumar Verma via USRP-users wrote: > Hi > > We brought B205mini recently and we want to use three GPIO to control > some external device which require SPI interface, in the schematics > the header mentioned is J5 for GPIO while website USRP Hardware > Driver and USRP Manual: USRP B2x0 Series is mentioning J6 as GPIO > header. Can you please suggest some example source code for GPIO, so > that we can incorporate in our software. > > Arun Verma > > USRP Hardware Driver and USRP Manual: USRP B2x0 Series > > _______________________________________________ > USRP-users mailing list > USRP-users@lists.ettus.com > http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com _______________________________________________ USRP-users mailing list USRP-users@lists.ettus.com http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com