if not bcm2835_init():returnbcm2835_spi_begin()bcm2835_spi_setBitOrder(BCM2835_SPI_BIT_ORDER_MSBFIRST) # The defaultbcm2835_spi_setDataMode(BCM2835_SPI_MODE0) # The defaultbcm2835_spi_setClockDivider(BCM2835_SPI_CLOCK_DIVIDER_65536) # The defaultbcm2835_spi_chipSelect(BCM2835_SPI_CS0) # The defaultbcm2835_spi_setChipSelectPolarity(BCM2835_SPI_CS0, LOW) # the default# Send a byte to the slave and simultaneously read a byte back from the slave# If you tie MISO to MOSI, you should read back what was sentdata = bcm2835_spi_transfer(0x23);print "Read from SPI: %02X\n" % databcm2835_spi_end()bcm2835_close()
Thanks for the inclusion. On another note seeing as though the bindings require a shared library object would you accept a patch that sees the autotools configure file made more contemporary so both static and shared libs can be built via the build system?
Cheers,
matb
--
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+u...@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/62341a9c-9b58-4f20-bdae-c99b58f08911%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.