Skip to content

Commit

Permalink
remove useless / harmful modm log level overwrite + debug logs from p…
Browse files Browse the repository at this point in the history
…rescaler
  • Loading branch information
kikass13 committed Feb 27, 2022
1 parent 2b5b355 commit 5aa143e
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/modm/driver/can/mcp2515_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
#include "mcp2515_options.hpp"
#include <modm/architecture/interface/assert.hpp>

// Set the log level
#undef MODM_LOG_LEVEL
#define MODM_LOG_LEVEL modm::log::DISABLED

// ----------------------------------------------------------------------------

template <typename SPI, typename CS, typename INT>
Expand All @@ -42,18 +38,10 @@ modm::Mcp2515<SPI, CS, INT>::initializeWithPrescaler(
static constexpr uint8_t CNF1_idx = 2;
static constexpr uint8_t CNF2_idx = 1;
static constexpr uint8_t CNF3_idx = 0;

MODM_LOG_DEBUG.printf("SJW: %d\nProp: %d\nPS1: %d\nPS2: %d\nprescaler: %d\n",
sjw, prop, ps1, ps2, prescaler);

cnf[CNF1_idx] = ((sjw - 1) << 6) | ((prescaler / 2 - 1) & 0x3f);

cnf[CNF2_idx] = (1 << 7) | ( (ps1 - 1) << 3) | ( (prop - 1) << 0);

cnf[CNF3_idx] = (ps2 - 1);

MODM_LOG_DEBUG.printf("CNF1 %02x, CNF2 %02x, CNF3 %02x\n", cnf[CNF1_idx], cnf[CNF2_idx], cnf[CNF3_idx]);

using namespace mcp2515;

// software reset for the mcp2515, after this the chip is back in the
Expand Down

0 comments on commit 5aa143e

Please sign in to comment.