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

drivers/periph/cpuid: Fix typo in doc #14080

Merged
merged 1 commit into from May 14, 2020
Merged

Conversation

maribu
Copy link
Member

@maribu maribu commented May 14, 2020

Contribution description

Just as the title says.

Testing procedure

Read the docu and confirm that it should indeed be named CPUID_LEN rather than CPU_ID_LEN.

Issues/PRs references

None

@maribu maribu added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: doc Area: Documentation Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Area: drivers Area: Device drivers CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs labels May 14, 2020
@maribu maribu requested review from benpicco and aabadie May 14, 2020 14:54
@maribu maribu requested a review from MrKevinWeiss as a code owner May 14, 2020 14:54
Copy link
Contributor

@kaspar030 kaspar030 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK.

@@ -48,7 +48,7 @@ extern "C" {
/**
* @brief Gets the serial number of the CPU.
*
* @param[out] id The serial number of the CPU of length CPU_ID_LEN (must be
* @param[out] id The serial number of the CPU of length CPUID_LEN (must be
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See here:

/**
* @def CPUID_LEN
*
* @brief The length in byte of the CPU's serial number.
*
* @note Must be defined in the CPU's @ref cpu_conf.h
*/
#if CPUID_LEN

Copy link
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

obvious typo:

git grep CPU_ID_LEN
drivers/include/periph/cpuid.h: * @param[out] id   The serial number of the CPU of length CPU_ID_LEN (must be
git grep CPUID_LEN
cpu/atmega_common/include/periph_cpu_common.h:#define CPUID_LEN           (4U)
cpu/cc2538/include/periph_cpu.h:#define CPUID_LEN           (8U)
cpu/cc26xx_cc13xx/include/periph_cpu_common.h:#define CPUID_LEN           (16U)
cpu/efm32/include/periph_cpu.h:#define CPUID_LEN           (8U)
cpu/esp32/include/periph_cpu.h:#define CPUID_LEN           (7U)
cpu/esp32/startup.c:    uint8_t cpu_id[CPUID_LEN];
cpu/esp32/startup.c:    for (unsigned i = 0; i < CPUID_LEN; i++) {
cpu/esp8266/include/periph_cpu.h:#define CPUID_LEN           (4U)
cpu/esp8266/periph/cpuid.c:    memcpy(id, &(chip_id), CPUID_LEN);
cpu/ezr32wg/include/periph_cpu.h:#define CPUID_LEN           (8U)
cpu/fe310/include/periph_cpu.h:#define CPUID_LEN           (12U)
cpu/fe310/periph/cpuid.c:    memcpy(id, &result[0], CPUID_LEN);
cpu/kinetis/include/periph_cpu.h:#define CPUID_LEN           (16U)
cpu/kinetis/include/periph_cpu.h:#define CPUID_LEN           (12U)
cpu/lpc1768/include/cpu_conf.h:#define CPUID_LEN                       (16U)
cpu/lpc1768/periph/cpuid.c:        memcpy(id, &result[1], CPUID_LEN);
cpu/lpc1768/periph/cpuid.c:        memset(id, 0xFF, CPUID_LEN);
cpu/mips_pic32_common/include/periph_cpu_common.h:#define CPUID_LEN           (4U)
cpu/mips_pic32_common/periph/cpuid.c:    memcpy(id, (uint32_t*)&DEVID, CPUID_LEN);
cpu/native/include/periph_cpu.h:#ifndef CPUID_LEN
cpu/native/include/periph_cpu.h:#define CPUID_LEN           (4U)
cpu/native/periph/cpuid.c:    /* Just in case _native_id is shorter than CPUID_LEN: */
cpu/native/periph/cpuid.c:    size_t len = CPUID_LEN;
cpu/native/periph/cpuid.c:    if (sizeof(_native_id) < CPUID_LEN) {
cpu/native/periph/cpuid.c:                CPUID_LEN - sizeof(_native_id));
cpu/nrf5x_common/include/periph_cpu_common.h:#define CPUID_LEN           (8U)
cpu/nrf5x_common/radio/nrfmin/nrfmin.c:    uint8_t cpuid[CPUID_LEN];
cpu/nrf5x_common/radio/nrfmin/nrfmin.c:    for (unsigned i = 0; i < CPUID_LEN; i++) {
cpu/sam0_common/include/periph_cpu_common.h:#define CPUID_LEN           (16U)
cpu/sam0_common/periph/cpuid.c:    memcpy(id, &addr[0], CPUID_LEN);
cpu/sam3/include/periph_cpu.h:#define CPUID_LEN           (16U)
cpu/sam3/periph/cpuid.c:    memcpy(id, (void*)cpuid, CPUID_LEN);
cpu/stm32_common/include/periph_cpu_common.h:#define CPUID_LEN           (12U)
doc/doxygen/riot.doxyfile:                         CPUID_LEN \
drivers/include/periph/cpuid.h: * @def CPUID_LEN
drivers/include/periph/cpuid.h:#if CPUID_LEN
drivers/include/periph/cpuid.h:#endif /* CPUID_LEN */
drivers/periph_common/cpuid.c:    memcpy(id, (void *)CPUID_ADDR, CPUID_LEN);
pkg/openthread/contrib/platform_random.c:#ifdef CPUID_LEN
pkg/openthread/contrib/platform_random.c:    char cpu_id[CPUID_LEN];
pkg/openthread/contrib/platform_random.c:    for (unsigned i = 0; i < CPUID_LEN; i++) {
sys/luid/luid.c:#if CPUID_LEN
sys/luid/luid.c:    uint8_t cid[CPUID_LEN];
sys/luid/luid.c:    for (size_t i = 0; i < MAX(len, CPUID_LEN); i++) {
sys/luid/luid.c:        out[i % len] ^= cid[i % CPUID_LEN];
tests/periph_cpuid/main.c:    uint8_t id[CPUID_LEN];
tests/periph_cpuid/main.c:    printf("CPUID_LEN: %u\n", CPUID_LEN);
tests/periph_cpuid/main.c:    for (unsigned int i = 0; i < CPUID_LEN; i++) {
tests/periph_cpuid/tests/01-run.py:    child.expect(r'CPUID_LEN: (\d+)\r\n')

@kaspar030 kaspar030 merged commit 3d3d606 into RIOT-OS:master May 14, 2020
@maribu
Copy link
Member Author

maribu commented May 14, 2020

So many ACKs so promptly! Thanks :-)

@maribu maribu deleted the cpuid_doc_fix branch May 14, 2020 15:09
@miri64 miri64 added this to the Release 2020.07 milestone Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: doc Area: Documentation Area: drivers Area: Device drivers CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants