MCPcopy Create free account
hub / github.com/EmbeddedRPC/erpc / main

Function main

test/common/unit_test_zephyr_uart_server.cpp:32–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30////////////////////////////////////////////////////////////////////////////////
31
32int main(void)
33{
34 if (!device_is_ready(uart_dev))
35 {
36 printk("UART device not found!");
37 return -1;
38 }
39
40 erpc_transport_t transport;
41 erpc_mbf_t message_buffer_factory;
42
43 transport = erpc_transport_zephyr_uart_init((void *)uart_dev);
44 message_buffer_factory = erpc_mbf_dynamic_init();
45
46 /* Init server */
47 server = erpc_server_init(transport, message_buffer_factory);
48
49 /* Add test services. This function call erpc_add_service_to_server for all necessary services. */
50 add_services_to_server(server);
51
52 /* Add common service */
53 add_common_service(server);
54
55 /* Add run server */
56 erpc_server_run(server);
57
58 /* Deinit server */
59 erpc_server_deinit(server);
60
61 return 0;
62}
63
64////////////////////////////////////////////////////////////////////////////////
65// Server helper functions

Callers

nothing calls this directly

Calls 7

erpc_mbf_dynamic_initFunction · 0.85
erpc_server_initFunction · 0.85
erpc_server_runFunction · 0.85
erpc_server_deinitFunction · 0.85
add_common_serviceFunction · 0.70
add_services_to_serverFunction · 0.50

Tested by

no test coverage detected