Skip to content

Commit

Permalink
Merge pull request #12 from estshorter/add_const_to_setters
Browse files Browse the repository at this point in the history
Add const keywords to parameters of setTime() and setDate() in BM8563
  • Loading branch information
Gitshaoxiang committed Feb 2, 2021
2 parents d66256c + b1dc791 commit d66d435
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/utility/BM8563.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void BM8563::getTime(rtc_time_t *time)
time->hour = Bcd2ToByte(buf[2] & 0x3f);
}

void BM8563::setTime(rtc_time_t *time)
void BM8563::setTime(const rtc_time_t *time)
{

if (time == NULL)
Expand Down Expand Up @@ -150,7 +150,7 @@ void BM8563::getDate(rtc_date_t *date)
}
}

void BM8563::setDate(rtc_date_t *date)
void BM8563::setDate(const rtc_date_t *date)
{

if (date == NULL)
Expand Down
4 changes: 2 additions & 2 deletions src/utility/BM8563.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class BM8563
uint8_t readReg(uint8_t reg);
void getTime(void);

void setTime(rtc_time_t *time);
void setDate(rtc_date_t *date);
void setTime(const rtc_time_t *time);
void setDate(const rtc_date_t *date);

void getTime(rtc_time_t *time);
void getDate(rtc_date_t *date);
Expand Down

0 comments on commit d66d435

Please sign in to comment.