Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
8b97ef12
Commit
8b97ef12
authored
9 years ago
by
Paul Rathgeb
Browse files
Options
Downloads
Patches
Plain Diff
cpu/lpc11u34 : Add CPUID support and added this capability to board/weio
parent
89c0f42b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
boards/weio/Makefile.features
+1
-0
1 addition, 0 deletions
boards/weio/Makefile.features
cpu/lpc11u34/include/cpu_conf.h
+7
-0
7 additions, 0 deletions
cpu/lpc11u34/include/cpu_conf.h
cpu/lpc11u34/periph/cpuid.c
+38
-0
38 additions, 0 deletions
cpu/lpc11u34/periph/cpuid.c
with
46 additions
and
0 deletions
boards/weio/Makefile.features
+
1
−
0
View file @
8b97ef12
...
...
@@ -3,4 +3,5 @@ FEATURES_PROVIDED += periph_uart
FEATURES_PROVIDED
+=
periph_timer
FEATURES_PROVIDED
+=
periph_gpio
FEATURES_PROVIDED
+=
periph_pwm
FEATURES_PROVIDED
+=
periph_cpuid
FEATURES_MCU_GROUP
=
cortex_m0
This diff is collapsed.
Click to expand it.
cpu/lpc11u34/include/cpu_conf.h
+
7
−
0
View file @
8b97ef12
...
...
@@ -36,6 +36,13 @@ extern "C" {
#define CPU_FLASH_BASE LPC_FLASH_BASE
/** @} */
/**
* @brief CPU ID configuration
* @{
*/
#define CPUID_ID_LEN (16U)
/* @} */
#ifdef __cplusplus
}
#endif
...
...
This diff is collapsed.
Click to expand it.
cpu/lpc11u34/periph/cpuid.c
0 → 100644
+
38
−
0
View file @
8b97ef12
/*
* Copyright (C) 2015 Freie Universität Berlin
*
* This file is subject to the terms and conditions of the GNU Lesser General
* Public License v2.1. See the file LICENSE in the top level directory for more
* details.
*/
/**
* @ingroup cpu_lpc11u34
* @{
*
* @file
* @brief Low-level CPUID driver implementation
*
* @author Paul RATHGEB <paul.rathgeb@skynet.be>
*/
#include
<string.h>
#include
"periph/cpuid.h"
/* IAP base address */
#define IAP_ADDRESS 0x1FFF1FF1
void
cpuid_get
(
void
*
id
)
{
uint32_t
result
[
5
];
/* IAP command for UUID : 58 (UM10462 page 409) */
uint32_t
command
=
58
;
/* Define pointer to function type */
void
(
*
iap
)(
uint32_t
[],
uint32_t
[]);
/* Set the function pointer */
iap
=
(
void
(
*
)(
uint32_t
[],
uint32_t
[]))
IAP_ADDRESS
;
/* Read UUID */
iap
(
&
command
,
result
);
memcpy
(
id
,
&
result
[
1
],
CPUID_ID_LEN
);
}
/** @} */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment