Skip to content

Commit

Permalink
pru - calm cppcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
orgua committed Oct 1, 2024
1 parent b67e863 commit d784c6d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
5 changes: 4 additions & 1 deletion software/firmware/pru0-shepherd-fw/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ ASM_SOURCES = $(notdir $(wildcard ./*.asm))
# ... currently empty

ifeq ($(TYPE), HRV) # switch to HRV with "make TYPE=HRV"
CFLAGS += -D HRV_SUPPORT
CFLAGS += -DHRV_SUPPORT
endif
ifeq ($(TYPE), EMU)
CFLAGS += -DEMU_SUPPORT
endif

# look for gcc, but use cgt as fallback / default
Expand Down
14 changes: 11 additions & 3 deletions software/firmware/pru0-shepherd-fw/include/sampling.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@

#include "commons.h"

void sample_init(const volatile struct SharedMem *shared_mem);
void sample(volatile struct SharedMem *shared_mem, struct SampleBuffer *current_buffer_far,
enum ShepherdMode mode);
void sample_init(const volatile struct SharedMem *shared_mem);

#ifdef EMU_SUPPORT
void sample(volatile struct SharedMem *const shared_mem,
struct SampleBuffer *const current_buffer_far, const enum ShepherdMode mode);
#else
void sample(const volatile struct SharedMem *const shared_mem,
struct SampleBuffer *const current_buffer_far, const enum ShepherdMode mode);
#endif


uint32_t sample_dbg_adc(uint32_t channel_num);
void sample_dbg_dac(uint32_t value);

Expand Down
2 changes: 1 addition & 1 deletion software/firmware/pru0-shepherd-fw/sampling.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ static inline void sample_hrv_ADCs(struct SampleBuffer *const buffer, const uint
void sample(volatile struct SharedMem *const shared_mem,
struct SampleBuffer *const current_buffer_far, const enum ShepherdMode mode)
#else
void sample(volatile const struct SharedMem *const shared_mem,
void sample(const volatile struct SharedMem *const shared_mem,
struct SampleBuffer *const current_buffer_far, const enum ShepherdMode mode)
#endif
{
Expand Down

0 comments on commit d784c6d

Please sign in to comment.