Commit b513b9e0 authored by Chun Fan's avatar Chun Fan
Browse files

Clean code

parent 87e857ae
......@@ -39,16 +39,14 @@
#include "conn_systemreset.h"
uint32_t conn_systemreset(uint8_t * const p_buf,
uint32_t * const p_buf_len)
uint32_t * const p_buf_len)
{
uint32_t index = 0;
SER_ASSERT_NOT_NULL(p_buf);
SER_ASSERT_NOT_NULL(p_buf_len);
SER_ASSERT_LENGTH_LEQ(index + 2, *p_buf_len);
SER_ASSERT_LENGTH_LEQ(2, *p_buf_len);
p_buf[index++] = CONN_SYSTEMRESET;
*p_buf_len = index;
*p_buf = CONN_SYSTEMRESET;
*p_buf_len = 1;
return NRF_SUCCESS;
}
......@@ -44,7 +44,7 @@ extern "C" {
enum CONN_SVCS
{
CONN_SYSTEMRESET = 0,
CONN_SYSTEMRESET = 0,
};
/**
......@@ -71,7 +71,6 @@ enum CONN_SVCS
* @retval NRF_SUCCESS Encoding success.
* @retval NRF_ERROR_INTERNAL Encoding failure. Transport error.
*/
// uint32_t conn_systemreset(void);
uint32_t conn_systemreset(uint8_t * const p_buf,
uint32_t * const p_buf_len);
......
......@@ -46,7 +46,7 @@ extern "C" {
enum CONN_SVCS
{
CONN_SYSTEMRESET = 0,
CONN_SYSTEMRESET = 0,
};
/**
......@@ -73,7 +73,6 @@ enum CONN_SVCS
* @retval NRF_SUCCESS Encoding success.
* @retval NRF_ERROR_INTERNAL Encoding failure. Transport error.
*/
// uint32_t conn_systemreset(void);
uint32_t conn_systemreset(uint8_t * const p_buf,
uint32_t * const p_buf_len);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment