update credits
[librepilot.git] / flight / pios / stm32f4xx / inc / pios_delay_raw.h
blob6a494156339ab6c7fc542bc92d8ea1a13efc4784
1 /**
2 ******************************************************************************
3 * @addtogroup PIOS PIOS Core hardware abstraction layer
4 * @{
5 * @addtogroup PIOS_DELAY Delay Functions
6 * @brief PiOS Delay functionality
7 * @{
9 * @file pios_delay_raw.h
10 * @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2016-2017.
11 * The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
12 * @brief Settings functions header
13 * @see The GNU Public License (GPL) Version 3
15 *****************************************************************************/
17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License as published by
19 * the Free Software Foundation; either version 3 of the License, or
20 * (at your option) any later version.
22 * This program is distributed in the hope that it will be useful, but
23 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
24 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
25 * for more details.
27 * You should have received a copy of the GNU General Public License along
28 * with this program; if not, write to the Free Software Foundation, Inc.,
29 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
31 #ifndef PIOS_DELAY_RAW_H
32 #define PIOS_DELAY_RAW_H
34 /* these should be defined by CMSIS, but they aren't */
35 #define DWT_CTRL (*(volatile uint32_t *)0xe0001000)
36 #define CYCCNTENA (1 << 0)
37 #define DWT_CYCCNT (*(volatile uint32_t *)0xe0001004)
39 #define PIOS_DELAY_GetRaw() (DWT_CYCCNT)
41 extern uint32_t PIOS_DELAY_GetRawHz();
43 #endif /* PIOS_DELAY_RAW_H */