Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update EEPROM.h #97

Merged
merged 1 commit into from
Nov 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update EEPROM.h
Avoid link error "multiple definition of nvm_write_byte(unsigned int, unsigned char)" when including EEPROM.h in multiple files of a project
  • Loading branch information
f1oat authored Nov 26, 2020
commit 865d41388d3c8c7fa206c8955c66d6d356d63ac1
2 changes: 1 addition & 1 deletion megaavr/libraries/EEPROM/src/EEPROM.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#define nvm_read_byte(idx) *(uint8_t *)((idx & 0xFF) | ((idx & 0x100) ? USER_SIGNATURES_START : EEPROM_START))

void nvm_write_byte(uint16_t idx, uint8_t dat)
static void nvm_write_byte(uint16_t idx, uint8_t dat)
{
*(uint8_t *)((idx & 0xFF) | ((idx & 0x100) ? USER_SIGNATURES_START : EEPROM_START)) = dat;
uint8_t oldSREG = SREG;
Expand Down