Skip to content

Commit 7045cc9

Browse files
author
Fill in your name and e-mail
committed
fix: Change some define by constexpr
1 parent 589ce11 commit 7045cc9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

frdm-ke06z/source/CanNetbooting.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#include "ProgramFlash.hpp"
3939

4040

41-
#define BUF_SIZE (256 + 48)
41+
constexpr const size_t BUF_SIZE = (256 + 48); // Page size plus some overhead
4242

4343

4444
enum class NetbootingState {

frdm-ke06z/source/frdm-ke06z.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
#include <CanNetbooting.hpp>
2020
/* TODO: insert other definitions and declarations here. */
2121

22-
#define CAN_NODE_ID 0x801
23-
#define CAN_BAUDRATE 1000000U
24-
#define JUMP_ADDRESS 0x10000
22+
constexpr const uint32_t CAN_NODE_ID = 0x801;
23+
constexpr const uint32_t CAN_BAUDRATE = 1000000U;
24+
constexpr const uint32_t JUMP_ADDRESS = 0x10000;
2525

2626
/*
2727
* @brief Application entry point.

0 commit comments

Comments
 (0)