diff options
Diffstat (limited to 'src/master.c')
| -rw-r--r-- | src/master.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/master.c b/src/master.c index 2b8401a..09b6b66 100644 --- a/src/master.c +++ b/src/master.c @@ -114,19 +114,20 @@ int main(void) } } - else if (priority_counter == 5 && routing_ptr > 0) { - routing(); - } + /* else if (priority_counter == 5 && routing_ptr > 0) { */ + /* routing(); */ + /* } */ else { for (int device_idx = 0; device_idx < BUS_DEVICE_LIMIT-1; device_idx++) { if (dev_sts[device_idx] == REGISTERED) { device_dataflow(GET_ADDR_FROM_IDX(device_idx), SLAVE_TX, 0); } } + routing(); } priority_counter = ((priority_counter+1)%10); - sprintf((char*)debug_buf, "routing ptr: %ld\r\n", routing_ptr); + sprintf((char*)debug_buf, "Routing pointer: %ld\r\n", routing_ptr); HAL_UART_Transmit(&huart1, debug_buf, sizeof(debug_buf), 100); memset(debug_buf, 0, 128); } @@ -888,7 +889,7 @@ void SystemClock_Config(void) static void MX_I2C1_Init(void) { hi2c1.Instance = I2C1; - hi2c1.Init.ClockSpeed = 100000; + hi2c1.Init.ClockSpeed = 400000; hi2c1.Init.DutyCycle = I2C_DUTYCYCLE_2; hi2c1.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT; hi2c1.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE; |
