-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Samr21: cpuid implementation #2052
Conversation
/** | ||
* @name CPUID_ID_LEN length of cpuid in bytes | ||
* @{ | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a space here.
Two minor comment above. You also need to |
4bf4ebe
to
207d4f1
Compare
Rebased, and added changes based on your comments |
Needs another rebase because of #2051 |
#include "cpu-conf.h" | ||
#include "periph/cpuid.h" | ||
|
||
#define Word0 (*(volatile uint32_t *)0x0080A00C) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better put a prefix on this generic name, and usualy we write constansts all upcase letters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Troels51 please address this comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another remark: usually these addresses are defined in some header, e.g. cpu/samd21/include/component/component_cpuid.h
needs rebase because of #2053 |
@@ -48,5 +48,11 @@ | |||
/** @} */ | |||
|
|||
|
|||
/** | |||
* @name CPUID_ID_LEN length of cpuid in bytes | |||
* @{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@name
and and braces not needed. Just document with
/**
* @brief Length of CPU ID in bytes
*/
@Troels51 please address comments and rebase. |
1965ccb
to
9fafc45
Compare
Sorry for being a bit slow, i addressed the comments and rebased+squashed |
Still needs rebase to current master. |
+ please squash only when the reviewing is done. Otherwise it can get hard to trace your changes since the last time someone looked at your code ;-) |
9fafc45
to
75b0f41
Compare
Right, my bad :) |
@@ -0,0 +1,17 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
License header missing.
I think if you wrote the code you're the copyright holder in the first place. You're free to concede it to someone (person or organization) else. |
Rebase is required. |
6c32739
to
799ced6
Compare
@Troels51 ping - please squash and rebase. |
oh, and address #2052 (comment) as well, please ( |
4b0ed9a
to
165b718
Compare
Rebased, and changed constant names |
@@ -1 +1 @@ | |||
FEATURES_PROVIDED += transceiver periph_gpio periph_spi cpp periph_timer periph_uart periph_i2c cpp periph_rtc | |||
FEATURES_PROVIDED += transceiver periph_gpio periph_spi cpp periph_timer periph_uart periph_i2c cpp periph_rtc periph_cpuid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a newline.
b3b6b35
to
29b0e73
Compare
Added newline and squashed |
ACK & Go |
Samr21: cpuid implementation
Reading the 128bit serial number in the samd21 by copying it from memory addresses that point to non-volatile memory.
The addresses come from section 8.3.3 in the datasheet.