From 22a58216681df01d20cfa0a5cfc5c49d15e6c606 Mon Sep 17 00:00:00 2001 From: Paul Selkirk Date: Mon, 17 Apr 2017 15:06:25 -0400 Subject: Move hal_rpc_server_main() to test code. --- rpc_server.c | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'rpc_server.c') diff --git a/rpc_server.c b/rpc_server.c index b28f90c..8d8af18 100644 --- a/rpc_server.c +++ b/rpc_server.c @@ -985,27 +985,6 @@ hal_error_t hal_rpc_server_dispatch(const uint8_t * const ibuf, const size_t ile return HAL_OK; } -#define interrupt 0 - -static uint8_t inbuf[HAL_RPC_MAX_PKT_SIZE], outbuf[HAL_RPC_MAX_PKT_SIZE]; - -void hal_rpc_server_main(void) -{ - size_t ilen, olen; - void *opaque; - hal_error_t ret; - - while (!interrupt) { - ilen = sizeof(inbuf); - ret = hal_rpc_recvfrom(inbuf, &ilen, &opaque); - if (ret == HAL_OK) { - olen = sizeof(outbuf); - if (hal_rpc_server_dispatch(inbuf, ilen, outbuf, &olen) == HAL_OK) - hal_rpc_sendto(outbuf, olen, opaque); - } - } -} - /* * Dispatch vectors. */ -- cgit v1.2.3