diff options
Diffstat (limited to 'firmware/export/general.h')
-rw-r--r-- | firmware/export/general.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/firmware/export/general.h b/firmware/export/general.h new file mode 100644 index 0000000000..427e2773b8 --- /dev/null +++ b/firmware/export/general.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006 by Michael Sevakis | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | |||
20 | #ifndef GENERAL_H | ||
21 | #define GENERAL_H | ||
22 | |||
23 | #include <stdbool.h> | ||
24 | |||
25 | /* round a signed/unsigned 32bit value to the closest of a list of values */ | ||
26 | /* returns the index of the closest value */ | ||
27 | int round_value_to_list32(unsigned long value, | ||
28 | const unsigned long list[], | ||
29 | int count, | ||
30 | bool signd); | ||
31 | |||
32 | int make_list_from_caps32(unsigned long src_mask, | ||
33 | const unsigned long *src_list, | ||
34 | unsigned long caps_mask, | ||
35 | unsigned long *caps_list); | ||
36 | |||
37 | |||
38 | #endif /* GENERAL_H */ | ||