Skip to content

Commit

Permalink
calm cppcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
orgua committed Oct 1, 2024
1 parent 5edc82f commit 5adc38d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion software/firmware/pru0-shepherd-fw/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static uint32_t handle_buffer_swap(volatile struct SharedMem *const shared_mem,
}

#ifdef ENABLE_DEBUG_MATH_FN
uint64_t debug_math_fns(const uint32_t factor, const uint32_t mode)
uint64_t debug_math_fns(const uint32_t factor, const uint32_t mode)
{
uint64_t result = 0;
const uint64_t f2 = (uint64_t) factor + ((uint64_t) (factor) << 32u);
Expand Down
6 changes: 5 additions & 1 deletion software/firmware/pru0-shepherd-fw/sampling.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,13 @@ static inline void sample_hrv_ADCs(struct SampleBuffer *const buffer, const uint
buffer->values_voltage[sample_idx] = adc_fastread(SPI_CS_HRV_V_ADC_PIN);
}


#ifdef EMU_SUPPORT
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,
struct SampleBuffer *const current_buffer_far, const enum ShepherdMode mode)
#endif
{
switch (mode) // reordered to prioritize longer routines
{
Expand Down

0 comments on commit 5adc38d

Please sign in to comment.