diff options
| author | Aditya Naik | 2020-05-15 14:59:07 -0400 |
|---|---|---|
| committer | Aditya Naik | 2020-05-28 14:40:31 -0400 |
| commit | bb639c42d04457fe37f3cbd9a407296b2047cb45 (patch) | |
| tree | 47e5ffa7cdaa07c2f4620a09cbb4adcedd8373b4 /src/config.h | |
| parent | f5109a42e901608515b57e5256f56a841a0a05c1 (diff) | |
This CL adds bookkeeping structures for routing, including the routing buffer, routing index buffer, and the routing table. It also adds the main routing function, slave-side implementation of receiving subscribed data and master implementation of managed data in the routing buffer. This CL supports only routing data (branch 1) and only honors subscriptions based on module ID. CL also adds minor changes to the dataflow process, including inserting data into the routing buffer and incrementing routing pointer. CL also adds a configuration macro MASTER_I2C_BUS_INTERVAL in config.h to delay master I2C operations in order to minimize I2C timeout errors on the bus.
Author: Aditya Naik
Reviewers: None
Task list: ef9e3917106842259ce2c32f40d7e9be
2f0c741a66db4b79904e295356b657cd
Diffstat (limited to 'src/config.h')
| -rw-r--r-- | src/config.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h index 059c0d3..ad035c9 100644 --- a/src/config.h +++ b/src/config.h @@ -4,3 +4,19 @@ /* Enable testing mode */ #define TESTING_ENABLE 1 + +/* Buffer size for routing */ +#define ROUTING_BUFSIZE 128 + +/** + * \def MASTER_I2C_BUS_INTERVAL + * \brief General interval value used by master in milliseconds + * + * Master uses this value to introduce delays on the I2C bus in order to reduce I2C timeout values. + * The optimum interval is usually dependent on I2C bus configuration on the hardware. Testing and debug UART + * operations will also affect this value. + * If unforeseen I2C timeout issues are encountered on master side, this value should be increased to suit the + * hardware. + * +*/ +#define MASTER_I2C_BUS_INTERVAL 150 |
