This is a part of the Kinetiszer project.
timers.h@0:5a419ba2726d, 2014-10-28 (annotated)
- Committer:
- Clemo
- Date:
- Tue Oct 28 12:19:22 2014 +0000
- Revision:
- 0:5a419ba2726d
Error & warning free (I believe as I don't know how to clean).
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Clemo | 0:5a419ba2726d | 1 | /* |
Clemo | 0:5a419ba2726d | 2 | * @brief Timer definitions |
Clemo | 0:5a419ba2726d | 3 | * |
Clemo | 0:5a419ba2726d | 4 | * @note |
Clemo | 0:5a419ba2726d | 5 | * Copyright (C) Elektor, 2014 |
Clemo | 0:5a419ba2726d | 6 | * All rights reserved. |
Clemo | 0:5a419ba2726d | 7 | * |
Clemo | 0:5a419ba2726d | 8 | * @par |
Clemo | 0:5a419ba2726d | 9 | * This software is supplied "AS IS" without any warranties of any kind, |
Clemo | 0:5a419ba2726d | 10 | * and Elektor and its licensor disclaim any and all warranties, express |
Clemo | 0:5a419ba2726d | 11 | * or implied, including all implied warranties of merchantability, |
Clemo | 0:5a419ba2726d | 12 | * fitness for a particular purpose and non-infringement of intellectual |
Clemo | 0:5a419ba2726d | 13 | * property rights. Elektor assumes no responsibility or liability for |
Clemo | 0:5a419ba2726d | 14 | * the use of the software, conveys no license or rights under any patent, |
Clemo | 0:5a419ba2726d | 15 | * copyright, mask work right, or any other intellectual property rights in |
Clemo | 0:5a419ba2726d | 16 | * or to any products. Elektor reserves the right to make changes in the |
Clemo | 0:5a419ba2726d | 17 | * software without notification. Elektor also makes no representation or |
Clemo | 0:5a419ba2726d | 18 | * warranty that such application will be suitable for the specified use |
Clemo | 0:5a419ba2726d | 19 | * without further testing or modification. |
Clemo | 0:5a419ba2726d | 20 | * |
Clemo | 0:5a419ba2726d | 21 | * @par |
Clemo | 0:5a419ba2726d | 22 | * Permission to use, copy, modify, and distribute this software and its |
Clemo | 0:5a419ba2726d | 23 | * documentation is hereby granted, under Elektor's and its licensor's |
Clemo | 0:5a419ba2726d | 24 | * relevant copyrights in the software, without fee. This copyright, |
Clemo | 0:5a419ba2726d | 25 | * permission, and disclaimer notice must appear in all copies of this code. |
Clemo | 0:5a419ba2726d | 26 | */ |
Clemo | 0:5a419ba2726d | 27 | |
Clemo | 0:5a419ba2726d | 28 | #ifndef __TIMERS_H__ |
Clemo | 0:5a419ba2726d | 29 | #define __TIMERS_H__ |
Clemo | 0:5a419ba2726d | 30 | |
Clemo | 0:5a419ba2726d | 31 | |
Clemo | 0:5a419ba2726d | 32 | // Timers you can use. |
Clemo | 0:5a419ba2726d | 33 | #define TIMER16_0 (0) |
Clemo | 0:5a419ba2726d | 34 | #define TIMER16_1 (1) |
Clemo | 0:5a419ba2726d | 35 | #define TIMER32_0 (2) |
Clemo | 0:5a419ba2726d | 36 | #define TIMER32_1 (3) |
Clemo | 0:5a419ba2726d | 37 | |
Clemo | 0:5a419ba2726d | 38 | #define SAMPLE_RATE_TIMER TIMER32_0 |
Clemo | 0:5a419ba2726d | 39 | #define AUDIO_OUT_TIMER TIMER32_1 |
Clemo | 0:5a419ba2726d | 40 | |
Clemo | 0:5a419ba2726d | 41 | #if SAMPLE_RATE_TIMER == AUDIO_OUT_TIMER |
Clemo | 0:5a419ba2726d | 42 | #pragma GCC error "Sample rate timer and audio out timer may not be the same." |
Clemo | 0:5a419ba2726d | 43 | #endif |
Clemo | 0:5a419ba2726d | 44 | |
Clemo | 0:5a419ba2726d | 45 | |
Clemo | 0:5a419ba2726d | 46 | #endif // __TIMERS_H__ |