diff options
author | Daniel Friesel <derf@finalrewind.org> | 2017-12-14 15:51:11 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2017-12-14 15:51:11 +0100 |
commit | 51a00f59ea9ecb49471b30921f36821fdfa75bc4 (patch) | |
tree | 4c237974cf044d5a7067aba48070ad7f6e3c7d11 /include/msp430fr5969lp | |
parent | 693afffd7b89507916ecd759767b0b7e947dca60 (diff) |
Add I2C and LM75 drivers
Diffstat (limited to 'include/msp430fr5969lp')
-rw-r--r-- | include/msp430fr5969lp/driver/i2c.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/msp430fr5969lp/driver/i2c.h b/include/msp430fr5969lp/driver/i2c.h new file mode 100644 index 0000000..6d6ea66 --- /dev/null +++ b/include/msp430fr5969lp/driver/i2c.h @@ -0,0 +1,19 @@ +#ifndef I2C_H +#define I2C_H + +class I2C { + private: + I2C(const I2C ©); + + public: + I2C () {} + signed char setup(); + void scan(unsigned int *results); + signed char xmit(unsigned char address, + unsigned char tx_len, unsigned char *tx_buf, + unsigned char rx_len, unsigned char *rx_buf); +}; + +extern I2C i2c; + +#endif |