Skip to content

Commit

Permalink
Fix #335: fix warning in cFlash_AT25SF081::SPICLOCK()
Browse files Browse the repository at this point in the history
  • Loading branch information
terrillmoore committed Jun 12, 2022
1 parent 01dece0 commit 34a51a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Catena_Flash_at25sf081.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ class cFlash_AT25SF081 : public cFlash

static constexpr uint32_t SPICLOCK(uint32_t v)
{
return v > PLATFORM_MAX_SCLK ? PLATFORM_MAX_SCLK : v;
constexpr uint32_t kMaxSclk (PLATFORM_MAX_SCLK);
return v > kMaxSclk ? kMaxSclk : v;
}

public:
Expand Down

0 comments on commit 34a51a1

Please sign in to comment.