cpu/stm32f0: added cpuid_get for stm32f0

dev/timer
James Hollister 9 years ago
parent 96e6d2aee3
commit 3d6ab85bb3

@ -1,2 +1,2 @@
FEATURES_PROVIDED += periph_adc periph_gpio periph_spi periph_uart cpp
FEATURES_PROVIDED += periph_adc periph_gpio periph_spi periph_uart cpp periph_cpuid
FEATURES_MCU_GROUP = cortex_m0

@ -58,6 +58,11 @@ extern "C" {
#endif
/** @} */
/**
* @brief Length for reading CPU_ID
*/
#define CPUID_ID_LEN (12)
#ifdef __cplusplus
}
#endif

@ -0,0 +1,31 @@
/*
* Copyright (C) 2015 James Hollister
*
* 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.
*/
/**
* @addtogroup driver_periph
* @{
*
* @file
* @brief Low-level CPUID driver implementation
*
* @author James Hollister <jhollisterjr@gmail.com>
*/
#include <string.h>
#include "cpu-conf.h"
#include "periph/cpuid.h"
#define STM32F0_CPUID_ADDR (0x1ffff7ac)
void cpuid_get(void *id)
{
memcpy(id, (void *)(STM32F0_CPUID_ADDR), CPUID_ID_LEN);
}
/** @} */
Loading…
Cancel
Save