diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2016-10-19 18:19:57 +0200 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2016-10-19 18:20:27 +0200 |
commit | 0b01ca69e073c3e140f6e819be62665ad6d513ae (patch) | |
tree | 467831af33aaf5b82c30c750a7f31b3134daad80 /utils/nwztools/plattools/nwz_fb.h | |
parent | 8d24b62912305191b0aa83b802ac6f12014f1dc5 (diff) | |
download | rockbox-0b01ca69e073c3e140f6e819be62665ad6d513ae.tar.gz rockbox-0b01ca69e073c3e140f6e819be62665ad6d513ae.zip |
nwztools/plattools: add adc test
Change-Id: Ic3ef964e8b5cc7b8ca3f02f141e9e4436a4d41db
Diffstat (limited to 'utils/nwztools/plattools/nwz_fb.h')
-rw-r--r-- | utils/nwztools/plattools/nwz_fb.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/utils/nwztools/plattools/nwz_fb.h b/utils/nwztools/plattools/nwz_fb.h new file mode 100644 index 0000000000..c857c5eb8a --- /dev/null +++ b/utils/nwztools/plattools/nwz_fb.h | |||
@@ -0,0 +1,56 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2016 Amaury Pouly | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | #ifndef __NWZ_FB_H__ | ||
22 | #define __NWZ_FB_H__ | ||
23 | |||
24 | #define NWZ_FB_LCD_DEV "/dev/fb/0" | ||
25 | #define NWZ_FB_TV_DEV "/dev/fb/1" | ||
26 | |||
27 | #define NWZ_FB_TYPE 'N' | ||
28 | |||
29 | /* How backlight works: | ||
30 | * | ||
31 | * The brightness interface is a bit strange. There 6 levels: 0 throught 5. | ||
32 | * Level 0 means backlight off. When changing brightness, one sets level to the | ||
33 | * target brightness. The driver is gradually change the brightness to reach the | ||
34 | * target level. The step parameters control how many hardware steps will be done. | ||
35 | * For example, setting step to 1 will brutally change the level in one step. | ||
36 | * Setting step to 2 will change brightness in two steps: one intermediate and | ||
37 | * finally the target one. The more steps, the more gradual the transition. The | ||
38 | * period parameters controls the speed to changes between steps. Using this | ||
39 | * interface, one can achieve fade in/out at various speeds. */ | ||
40 | #define NWZ_FB_BL_MIN_LEVEL 0 | ||
41 | #define NWZ_FB_BL_MAX_LEVEL 5 | ||
42 | #define NWZ_FB_BL_MIN_STEP 1 | ||
43 | #define NWZ_FB_BL_MAX_STEP 100 | ||
44 | #define NWZ_FB_BL_MIN_PERIOD 10 | ||
45 | |||
46 | struct nwz_fb_brightness | ||
47 | { | ||
48 | int level; /* brightness level: 0-5 */ | ||
49 | int step; /* number of hardware steps to do when changing: 1-100 */ | ||
50 | int period; /* period in ms between steps when changing: >=10 */ | ||
51 | }; | ||
52 | |||
53 | #define NWZ_FB_SET_BRIGHTNESS _IOW(NWZ_FB_TYPE, 0x07, struct nwz_fb_brightness) | ||
54 | #define NWZ_FB_GET_BRIGHTNESS _IOR(NWZ_FB_TYPE, 0x08, struct nwz_fb_brightness) | ||
55 | |||
56 | #endif /* __NWZ_FB_H__ */ | ||