$ sudo raspi-config
Interfacing OptionsP4 SPI--
You received this message because you are subscribed to the Google Groups "bcm2835" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bcm2835+unsubscribe@googlegroups.com.
To post to this group, send email to bcm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bcm2835/e9ddae9b-5233-445f-81e6-92ecdd223472%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Op 10 jun. 2018, om 01:22 heeft Christian Kevin Alvarado Rimas <cke...@gmail.com> het volgende geschreven:Did you enable SPI interface in the raspi-config?
Op 10 jun. 2018, om 04:02 heeft July Jim <tccio...@gmail.com> het volgende geschreven:During doing so I was wondering if setting GPIO to SPI pins ALT0 mode is really necessary if SPI is also "configured" in RPi.So what does "raspi_config" actually do for SPI?
Op 10 jun. 2018, om 04:02 heeft July Jim <tccio...@gmail.com> het volgende geschreven:
I am "porting" this "library" into C++,
in my case, I used the Rasbian stretch. follow your instructions I already open Spi configure. but I still the same problem.
bcm2835_spi_begin returns 0 when bcm2835_spi0 ==
MAP_FAILED --> bcm2835_spi0 is set in bcm2835_init
when bcm2835_init returns 1 (OK).
if (bcm2835_spi1 == MAP_FAILED)
return 0; /* bcm2835_init() failed, or not root */
So we can expect that bcm2835_spi_begin fails when bcm2835_init failed before or is not called with root.
Please be aware that you must call bcm2835_init
in each thread where you are using the library functions.
- Arjan
Op 11 jun. 2018, om 09:54 heeft Chhour Vongchivorn <chho...@gmail.com> het volgende geschreven:Finally, I can solve it.