1
0
Fork 0

Remote object callable from many places

Change init_transport to add_remote_objects, so that it can be
called many times from different places.
This commit is contained in:
Fred Sundvik 2016-03-12 19:35:09 +02:00
parent 168c5b679f
commit 11bd4ba0dd
4 changed files with 12 additions and 12 deletions

View file

@ -120,7 +120,7 @@ static matrix_object_t last_matrix = {};
SLAVE_TO_MASTER_OBJECT(keyboard_matrix, matrix_object_t);
MASTER_TO_ALL_SLAVES_OBJECT(serial_link_connected, bool);
remote_object_t* test_remote_objects[] = {
static remote_object_t* remote_objects[] = {
REMOTE_OBJECT(serial_link_connected),
REMOTE_OBJECT(keyboard_matrix),
};
@ -128,7 +128,7 @@ remote_object_t* test_remote_objects[] = {
void init_serial_link(void) {
serial_link_connected = false;
init_serial_link_hal();
init_transport(test_remote_objects, sizeof(test_remote_objects)/sizeof(remote_object_t*));
add_remote_objects(remote_objects, sizeof(remote_objects)/sizeof(remote_object_t*));
init_byte_stuffer();
sdStart(&SD1, &config);
sdStart(&SD2, &config);