2020-02-15 22:09:55 +01:00
|
|
|
/* Reflow Oven Controller
|
|
|
|
*
|
|
|
|
* Copyright (C) 2020 Mario Hüttel <mario.huettel@gmx.net>
|
|
|
|
*
|
|
|
|
* This file is part of the Reflow Oven Controller Project.
|
|
|
|
*
|
|
|
|
* The reflow oven controller is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
2020-02-21 21:22:01 +01:00
|
|
|
* The Reflow Oven Control Firmware is distributed in the hope that it will be useful,
|
2020-02-15 22:09:55 +01:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with the reflow oven controller project.
|
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2020-02-12 22:24:17 +01:00
|
|
|
#include <stm-periph/unique-id.h>
|
|
|
|
|
|
|
|
#define LOW_WORD_ADDR (0x1FFF7A10UL)
|
|
|
|
#define MID_WORD_ADDR (LOW_WORD_ADDR+4U)
|
|
|
|
#define HIGH_WORD_ADDR (LOW_WORD_ADDR+8U)
|
|
|
|
|
|
|
|
void unique_id_get(uint32_t *high, uint32_t *mid, uint32_t *low)
|
|
|
|
{
|
|
|
|
if (!high || !mid || !low)
|
|
|
|
return;
|
|
|
|
|
|
|
|
*low = *((uint32_t *)LOW_WORD_ADDR);
|
|
|
|
*mid = *((uint32_t *)MID_WORD_ADDR);
|
|
|
|
*high = *((uint32_t *)HIGH_WORD_ADDR);
|
|
|
|
}
|