]> git.ozlabs.org Git - petitboot/blob - ui/common/ps3.h
discover/pxe-parser: Recognise plugin sources
[petitboot] / ui / common / ps3.h
1 /*
2  *  Copyright (C) 2009 Sony Computer Entertainment Inc.
3  *  Copyright 2009 Sony Corp.
4  *
5  *  This program is free software; you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License as published by
7  *  the Free Software Foundation; version 2 of the License.
8  *
9  *  This program is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU General Public License for more details.
13  *
14  *  You should have received a copy of the GNU General Public License
15  *  along with this program; if not, write to the Free Software
16  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18
19 #if !defined(_PB_COMMON_PS3_H)
20 #define _PB_COMMON_PS3_H
21
22 #include <stdint.h>
23
24 int ps3_get_video_mode(unsigned int *mode_id);
25 int ps3_set_video_mode(unsigned int mode_id);
26
27 /**
28  * enum ps3_flash_flags
29  * @ps3_flag_telnet: Allow telnet connections. System use.
30  */
31
32 enum ps3_flash_flags {
33         ps3_flag_telnet = 1,
34 };
35
36 enum ps3_timeouts {
37         ps3_timeout_forever = 255,
38 };
39
40 /**
41  * struct ps3_flash_values - Values from PS3 flash memory.
42  * @default_item: The default menu item.
43  * @timeout: The timeout in seconds.
44  * @video_mode: The default video_mode.
45  * @flags: Logical OR of enum ps3_flash_flags.
46  */
47
48 struct ps3_flash_values {
49         uint32_t default_item;
50         uint16_t video_mode;
51         /* uint16_t flags; */
52         uint8_t timeout;
53 };
54
55 static const struct ps3_flash_values ps3_flash_defaults = {
56         .default_item = 0,
57         .video_mode = 1,
58         .timeout = ps3_timeout_forever,
59 };
60
61 int ps3_flash_get_values(struct ps3_flash_values *values);
62 int ps3_flash_set_values(const struct ps3_flash_values *values);
63
64 #endif