summaryrefslogtreecommitdiff
path: root/utils/nwztools/plattools/nwz_lib.c
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2016-11-06 00:12:04 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2016-11-06 00:12:04 +0100
commit5017babb307122d8567ca78a5721e96c4d7ff8f2 (patch)
tree26ca7ac1d8a3608e364d59a203c32b81b16f92e3 /utils/nwztools/plattools/nwz_lib.c
parentd492f25c54b4134fd6632156efee07670ab4004f (diff)
downloadrockbox-5017babb307122d8567ca78a5721e96c4d7ff8f2.tar.gz
rockbox-5017babb307122d8567ca78a5721e96c4d7ff8f2.zip
nwztools/plattools: fix black screen issue in dualboot, rework dualboot
Sony added extensions to the frambuffer interface. It is important to take them into account since the OF uses them and might leave the framebuffer in an unusual state which would make the dualboot not display anything. Also rework the dualboot code so that it can boot rockbox (not doing anything at the moment), display all tools or boot the OF. Change-Id: Ia0f589c9ec8558f375270841503c0964aff07f0b
Diffstat (limited to 'utils/nwztools/plattools/nwz_lib.c')
-rw-r--r--utils/nwztools/plattools/nwz_lib.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/utils/nwztools/plattools/nwz_lib.c b/utils/nwztools/plattools/nwz_lib.c
index 087db8834a..43dc977d42 100644
--- a/utils/nwztools/plattools/nwz_lib.c
+++ b/utils/nwztools/plattools/nwz_lib.c
@@ -238,6 +238,27 @@ int nwz_fb_set_brightness(int fd, struct nwz_fb_brightness *bl)
238 return 1; 238 return 1;
239} 239}
240 240
241int nwz_fb_set_standard_mode(int fd)
242{
243 /* disable timer (apparently useless with LCD) */
244 struct nwz_fb_update_timer update_timer;
245 update_timer.timerflag = NWZ_FB_TIMER_OFF;
246 update_timer.timeout = NWZ_FB_DEFAULT_TIMEOUT;
247 if(ioctl(fd, NWZ_FB_UPDATE_TIMER, &update_timer) < 0)
248 return -1;
249 /* set page 0 mode to no transparency and no rotation */
250 struct nwz_fb_image_info mode_info;
251 mode_info.tc_enable = 0;
252 mode_info.t_color = 0;
253 mode_info.alpha = 0;
254 mode_info.rot = 0;
255 mode_info.page = 0;
256 mode_info.update = NWZ_FB_ONLY_2D_MODE;
257 if(ioctl(fd, NWZ_FB_UPDATE, &mode_info) < 0)
258 return -2;
259 return 0;
260}
261
241int nwz_adc_open(void) 262int nwz_adc_open(void)
242{ 263{
243 return open(NWZ_ADC_DEV, O_RDONLY); 264 return open(NWZ_ADC_DEV, O_RDONLY);