You can look at the LSM303DLHC driver I implemented here as a starting
point for I2C ... that should cover the basics like the I2C
transactions, which is 1/2 the work already:
https://github.com/apache/incubator-mynewt-core/tree/sensors_branch/hw/drivers/sensors/lsm303dlhc
You have to look in 'sensors_branch' though.
K.
On 17/01/17 17:32, David G. Simmons wrote:
Devs,
Has anyone used the SPI or I2C on Arduino Primo? Anyone have any
sample code? Kevin Townsend wrote the Adafruit_BME280_Library in C++
and this is the part I'm working with right now, so I do have a
starting point from that end, but from the MyNewt end?
TIA,
dg
--
David G. Simmons
(919) 534-5099
Web <https://davidgs.com> • Blog <https://davidgs.com/davidgs_blog> •
Linkedin <http://linkedin.com/in/davidgsimmons> • Twitter
<http://twitter.com/TechEvangelist1> • GitHub <http://github.com/davidgs>
/** Message digitally signed for security and authenticity.
* If you cannot read the PGP.sig attachment, please go to
* http://www.gnupg.com/ Secure your email!!!
* Public key available at keyserver.pgp.com <http://keyserver.pgp.com/>
**/
♺ This email uses 100% recycled electrons. Don't blow it by printing!
There are only 2 hard things in computer science: Cache invalidation,
naming things, and off-by-one errors.