|
34 | 34 | ** **
|
35 | 35 | ** Vers. Date Developer Comments **
|
36 | 36 | ** ====== ========== ============================= ============================================================== **
|
| 37 | +** 1.0.4 2018-06-29 https://github.com/SV-Zanshin Issue #3 added support for faster I2C bus speeds ** |
37 | 38 | ** 1.0.2a 2017-09-06 https://github.com/SV-Zanshin Added fillMemory() function as a template **
|
38 | 39 | ** 1.0.1 2017-09-06 https://github.com/SV-Zanshin Completed testing for large structures **
|
39 | 40 | ** 1.0.1b 2017-09-06 https://github.com/SV-Zanshin Allow structures > 32 bytes, optimized memory use **
|
|
48 | 49 | /*****************************************************************************************************************
|
49 | 50 | ** Declare constants used in the class **
|
50 | 51 | *****************************************************************************************************************/
|
51 |
| - const uint8_t MB85_MIN_ADDRESS = 0x50; // Minimum FRAM address // |
52 |
| - const uint8_t MB85_MAX_DEVICES = 8; // Maximum number of FRAM devices // |
| 52 | + const uint16_t I2C_STANDARD_MODE = 100000; // Default normal I2C comms speed // |
| 53 | + const uint16_t I2C_FAST_MODE = 400000; // Fast mode // |
| 54 | + const uint16_t I2C_FAST_MODE_PLUS_MODE = 1000000; // Really fast mode // |
| 55 | + const uint16_t I2C_HIGH_SPEED_MODE = 3400000; // Turbo mode // |
| 56 | + const uint8_t MB85_MIN_ADDRESS = 0x50; // Minimum FRAM address // |
| 57 | + const uint8_t MB85_MAX_DEVICES = 8; // Maximum number of FRAM devices // |
53 | 58 |
|
54 | 59 | /*****************************************************************************************************************
|
55 | 60 | ** Main MB85_FRAM class for the temperature / humidity / pressure sensor **
|
|
58 | 63 | public: // Publicly visible methods //
|
59 | 64 | MB85_FRAM_Class(); // Class constructor //
|
60 | 65 | ~MB85_FRAM_Class(); // Class destructor //
|
61 |
| - uint8_t begin(); // Start using I2C Communications // |
| 66 | + uint8_t begin(const uint16_t i2cSpeed = I2C_STANDARD_MODE); // Start using I2C Communications // |
62 | 67 | uint32_t totalBytes(); // Return the total memory available//
|
63 | 68 | uint32_t memSize(const uint8_t memNumber); // Return memory size in bytes //
|
64 | 69 | /*************************************************************************************************************
|
|
0 commit comments