树莓派B+点亮LCD的源代码。
文档内容节选
Example program for bcm2835 library Shows how to interface with SPI to transfer a number of bytes to and from an SPI device After installing bcm2835 you can build this with something like gcc o oled rpioledc l bcm2835 sudo oled include bcm2835h include stdioh define OLEDDC RPIBPLUSGPIOJ816 define OLEDRST RPIBPLUSGPIOJ818 void OLEDinitial void bcm2835spiinit void spiwritecommanduint8t cmd void spiwritedatauint8t data void filluint8t dat1uint8t dat2 void pane void pictrue uint8t codes......
猜您喜欢
评论