Skip to content

Commit

Permalink
Rename end() function to avoid potential duplicate with linker symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasMahieu committed Dec 14, 2016
1 parent 2476df8 commit 4bc6c45
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/telemetry/c/framing.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void outgoing_storage(uint8_t * buf, uint32_t bufSize)
outgoingStorage.size = bufSize;
}

void begin()
void begin_frame()
{
if(outgoingStorage.size == 0 || outgoingStorage.ptr == NULL)
return;
Expand Down Expand Up @@ -97,7 +97,7 @@ void append4(uint32_t fourbytes)
append(ptr[3]);
}

uint32_t end()
uint32_t end_frame()
{
if(outgoingStorage.size == 0 || outgoingStorage.ptr == NULL)
return 0;
Expand Down
4 changes: 2 additions & 2 deletions src/telemetry/c/telemetry_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ uint16_t payload(const void * p, uint32_t size, uint16_t crc)
void frame(const char * t, TM_type type, const void * data, uint32_t datasize)
{
// start new frame
begin();
begin_frame();

// header
uint16_t crc = header(type);
Expand All @@ -207,7 +207,7 @@ void frame(const char * t, TM_type type, const void * data, uint32_t datasize)
append2(crc);

// complete frame
uint32_t bytesAmount = end();
uint32_t bytesAmount = end_frame();

// send data
send(outgoingBuffer, bytesAmount);
Expand Down
4 changes: 2 additions & 2 deletions src/telemetry/headers/framing.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ void initialize_framing();
// Set storage for the outgoing frame
void outgoing_storage(uint8_t * buf, uint32_t bufSize);

void begin();
void begin_frame();
void append(uint8_t byte);
void append2(uint16_t twobytes);
void append4(uint32_t fourbytes);
uint32_t end();
uint32_t end_frame();

// Incoming data
// Set storage for the incoming data
Expand Down

0 comments on commit 4bc6c45

Please sign in to comment.