Format code according to conventions (#16322)
This commit is contained in:
parent
afcdd7079c
commit
63646e8906
345 changed files with 4916 additions and 3229 deletions
|
@ -26,7 +26,7 @@
|
|||
|
||||
# ifndef SLAVE_I2C_TIMEOUT
|
||||
# define SLAVE_I2C_TIMEOUT 100
|
||||
# endif // SLAVE_I2C_TIMEOUT
|
||||
# endif // SLAVE_I2C_TIMEOUT
|
||||
|
||||
# ifndef SLAVE_I2C_ADDRESS
|
||||
# define SLAVE_I2C_ADDRESS 0x32
|
||||
|
@ -40,8 +40,12 @@ _Static_assert(sizeof(split_shared_memory_t) <= I2C_SLAVE_REG_COUNT, "split_shar
|
|||
|
||||
split_shared_memory_t *const split_shmem = (split_shared_memory_t *)i2c_slave_reg;
|
||||
|
||||
void transport_master_init(void) { i2c_init(); }
|
||||
void transport_slave_init(void) { i2c_slave_init(SLAVE_I2C_ADDRESS); }
|
||||
void transport_master_init(void) {
|
||||
i2c_init();
|
||||
}
|
||||
void transport_slave_init(void) {
|
||||
i2c_slave_init(SLAVE_I2C_ADDRESS);
|
||||
}
|
||||
|
||||
i2c_status_t transport_trigger_callback(int8_t id) {
|
||||
// If there's no callback, indicate that we were successful
|
||||
|
@ -82,15 +86,19 @@ bool transport_execute_transaction(int8_t id, const void *initiator2target_buf,
|
|||
return true;
|
||||
}
|
||||
|
||||
#else // USE_I2C
|
||||
#else // USE_I2C
|
||||
|
||||
# include "serial.h"
|
||||
|
||||
static split_shared_memory_t shared_memory;
|
||||
split_shared_memory_t *const split_shmem = &shared_memory;
|
||||
|
||||
void transport_master_init(void) { soft_serial_initiator_init(); }
|
||||
void transport_slave_init(void) { soft_serial_target_init(); }
|
||||
void transport_master_init(void) {
|
||||
soft_serial_initiator_init();
|
||||
}
|
||||
void transport_slave_init(void) {
|
||||
soft_serial_target_init();
|
||||
}
|
||||
|
||||
bool transport_execute_transaction(int8_t id, const void *initiator2target_buf, uint16_t initiator2target_length, void *target2initiator_buf, uint16_t target2initiator_length) {
|
||||
split_transaction_desc_t *trans = &split_transaction_table[id];
|
||||
|
@ -111,8 +119,12 @@ bool transport_execute_transaction(int8_t id, const void *initiator2target_buf,
|
|||
return true;
|
||||
}
|
||||
|
||||
#endif // USE_I2C
|
||||
#endif // USE_I2C
|
||||
|
||||
bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { return transactions_master(master_matrix, slave_matrix); }
|
||||
bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
|
||||
return transactions_master(master_matrix, slave_matrix);
|
||||
}
|
||||
|
||||
void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { transactions_slave(master_matrix, slave_matrix); }
|
||||
void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
|
||||
transactions_slave(master_matrix, slave_matrix);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue