2014-03-04 13:10:11 +01:00
|
|
|
/*
|
2015-02-08 18:51:25 +01:00
|
|
|
* Copyright (C) 2014 Martine Lenders <mlenders@inf.fu-berlin.de>
|
2014-03-04 13:10:11 +01:00
|
|
|
*
|
2014-08-23 15:43:13 +02:00
|
|
|
* 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.
|
2014-03-04 13:10:11 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2015-11-19 15:54:52 +01:00
|
|
|
* @defgroup drivers_periph_cpuid CPUID
|
|
|
|
* @ingroup drivers_periph
|
2014-12-04 10:03:15 +01:00
|
|
|
* @brief Low-level CPU ID peripheral driver
|
|
|
|
*
|
|
|
|
* Provides access the CPU's serial number
|
2014-03-04 13:10:11 +01:00
|
|
|
*
|
2014-12-04 10:03:15 +01:00
|
|
|
* @{
|
2014-10-25 15:37:04 +02:00
|
|
|
* @file
|
2014-12-04 10:03:15 +01:00
|
|
|
* @brief Low-level CPUID peripheral driver interface definitions
|
2014-03-04 13:10:11 +01:00
|
|
|
*
|
|
|
|
* @author Martine Lenders <mlenders@inf.fu-berlin.de>
|
|
|
|
*/
|
|
|
|
|
2017-01-18 13:00:05 +01:00
|
|
|
#ifndef PERIPH_CPUID_H
|
|
|
|
#define PERIPH_CPUID_H
|
2014-03-04 13:10:11 +01:00
|
|
|
|
2016-02-07 20:32:44 +01:00
|
|
|
#include "periph_cpu.h"
|
2014-03-04 13:10:11 +01:00
|
|
|
|
2014-10-13 15:49:17 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2014-10-16 14:39:24 +02:00
|
|
|
/**
|
2016-02-07 20:32:44 +01:00
|
|
|
* @def CPUID_LEN
|
2014-10-16 14:39:24 +02:00
|
|
|
*
|
|
|
|
* @brief The length in byte of the CPU's serial number.
|
|
|
|
*
|
2015-05-22 14:31:23 +02:00
|
|
|
* @note Must be defined in the CPU's @ref cpu_conf.h
|
2014-10-16 14:39:24 +02:00
|
|
|
*/
|
2016-02-07 20:32:44 +01:00
|
|
|
#if CPUID_LEN
|
2014-10-16 14:39:24 +02:00
|
|
|
|
2014-03-04 13:10:11 +01:00
|
|
|
/**
|
|
|
|
* @brief Gets the serial number of the CPU.
|
|
|
|
*
|
|
|
|
* @param[out] id The serial number of the CPU of length CPU_ID_LEN (must be
|
2015-05-22 14:31:23 +02:00
|
|
|
* defined in the CPU's cpu_conf.h)
|
2014-03-04 13:10:11 +01:00
|
|
|
*/
|
|
|
|
void cpuid_get(void *id);
|
2016-02-07 20:32:44 +01:00
|
|
|
#endif /* CPUID_LEN */
|
2014-03-04 13:10:11 +01:00
|
|
|
|
2014-10-13 15:49:17 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2017-01-18 13:00:05 +01:00
|
|
|
#endif /* PERIPH_CPUID_H */
|
2014-03-04 13:10:11 +01:00
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
*/
|