From 4ee6eadf9e88b89f017c3c06e2d376cf953f6a42 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 21 Feb 2016 12:53:51 +0200 Subject: Local and remote objects WIP --- serial_link/tests/transport_tests.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'serial_link/tests/transport_tests.c') diff --git a/serial_link/tests/transport_tests.c b/serial_link/tests/transport_tests.c index a64e7446d8..f9f5b47737 100644 --- a/serial_link/tests/transport_tests.c +++ b/serial_link/tests/transport_tests.c @@ -25,6 +25,32 @@ SOFTWARE. #include #include "protocol/transport.c" +typedef struct { + uint32_t test; +} test_object1_t; + +typedef struct { + uint32_t test1; + uint32_t test2; +} test_object2_t; + +MASTER_REMOTE_OBJECT(0, test_object1_t); +SLAVE_REMOTE_OBJECT(1, test_object1_t); +MASTER_REMOTE_OBJECT(2, test_object2_t); +SLAVE_REMOTE_OBJECT(3, test_object2_t); + +// We want +// master -> slave = 1 local(target all), 1 remote object +// slave -> master = 1 local(target 0), multiple remote objects +// master -> single slave (multiple local, target id), 1 remote object + +remote_object_t* remote_objects[] = { + REMOTE_OBJECT(0), + REMOTE_OBJECT(1), + REMOTE_OBJECT(2), + REMOTE_OBJECT(3), +}; + Describe(Transport); BeforeEach(Transport) { init_transport(); -- cgit v1.2.3