Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: i2c_mbed_fpga.h
- Revision:
- 5:daab0e0e67e2
- Parent:
- 0:fe3c7dde9771
- Child:
- 6:019ab407ac3c
--- a/i2c_mbed_fpga.h Tue Jan 12 12:01:27 2021 +0000 +++ b/i2c_mbed_fpga.h Fri Jan 22 14:06:54 2021 +0000 @@ -3,15 +3,23 @@ #define i2c_slave_addr 0x18<<1 -extern char i2cKey[4]; -extern char CtrPortWactive[4]; -extern char CtrPortRactive[4]; +//Class delclarations +class i2c_mbed_fpga { + +public: + /*constructor*/ + i2c_mbed_fpga(): i2c_master(p9, p10){ + i2c_master.frequency(35000); + }; -//Funtion delclarations -int i2c_word_write(I2C i2c_master, char *word); -int i2c_word_read(I2C i2c_master, char *word); -int i2c_keyEntry(I2C i2c_master); -int ctrPort_WriteActive(I2C i2c_master); -int ctrPort_ReadActive(I2C i2c_master); + int i2c_word_write(char *word); + int i2c_word_read(char *word); + int i2c_window_open(); + int i2c_motor_start(); + +private: + I2C i2c_master; +}; + #endif \ No newline at end of file