diff options
author | Paul Selkirk <paul@psgd.org> | 2016-03-16 10:15:47 -0400 |
---|---|---|
committer | Paul Selkirk <paul@psgd.org> | 2016-03-16 10:15:47 -0400 |
commit | 79559c5041835ce6835a35265a97e291789ec0b0 (patch) | |
tree | a80ca837adce158a632633922e2e8786f0558871 /rpc_client_loopback.c | |
parent | 8db1d753745bb7b253cf969ff2fb32464b601bf5 (diff) |
Added serial RPC transport and lots more...
Added RPC function to get server version number.
Substantially reworked GNUMakefile with conditionals.
Renamed rpc_*() and xdr_*() to hal_*() for consistency.
Moved hal_io_fmc.c from stm32 repo.
Diffstat (limited to 'rpc_client_loopback.c')
-rw-r--r-- | rpc_client_loopback.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rpc_client_loopback.c b/rpc_client_loopback.c index a3d7e73..b31bdd2 100644 --- a/rpc_client_loopback.c +++ b/rpc_client_loopback.c @@ -43,7 +43,7 @@ static int sock = -1; -hal_error_t rpc_client_transport_init(void) +hal_error_t hal_rpc_client_transport_init(void) { struct sockaddr_in sin; @@ -58,7 +58,7 @@ hal_error_t rpc_client_transport_init(void) return HAL_OK; } -hal_error_t rpc_client_transport_close(void) +hal_error_t hal_rpc_client_transport_close(void) { int ret = close(sock); sock = -1; @@ -67,14 +67,14 @@ hal_error_t rpc_client_transport_close(void) return HAL_OK; } -hal_error_t rpc_send(const uint8_t * const buf, const size_t len) +hal_error_t hal_rpc_send(const uint8_t * const buf, const size_t len) { if (send(sock, buf, len, 0) == -1) return perror("send"), HAL_ERROR_RPC_TRANSPORT; return HAL_OK; } -hal_error_t rpc_recv(uint8_t * const buf, size_t * const len) +hal_error_t hal_rpc_recv(uint8_t * const buf, size_t * const len) { int ret; |