Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(683)

Side by Side Diff: developer_switch.h

Issue 3530001: first cut: establishes base helper classes and main (Closed) Base URL: http://git.chromium.org/git/cros_boot_mode.git
Patch Set: truncation is bad, m'kay. . . Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « common.mk ('k') | developer_switch.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 //
5 // Concrete class for DeveloperSwitch. This class represents the physical
6 // developer mode switch on the Chrome OS device and maps its value to
7 // kEnabled, kDisabled, and kUnsupported as per PlatformSwitch.
8 //
9 // The developer mode switch shares a file in /sys which is provided by
10 // chromeos_acpi for the x86 plaform (ARM TBD). The file contains an integer
11 // in ASCII format (-1, 0, 544, whatever) with one bit representing a
12 // platform switch value. The developer switch is allocated the 6th
13 // bit (0x20). The file in use (CHSW) indicates the boot-time position
14 // of the switch and not a current measurement (available in GPIO.* files).
15 #ifndef CROS_BOOT_MODE_DEVELOPER_SWITCH_H_
16 #define CROS_BOOT_MODE_DEVELOPER_SWITCH_H_
17
18 #include "platform_switch.h"
19
20 namespace cros_boot_mode {
21
22 class DeveloperSwitch : public PlatformSwitch {
23 public:
24 DeveloperSwitch();
25 virtual ~DeveloperSwitch();
26 virtual const char *name() const {
27 return "developer";
28 }
29 virtual unsigned int bitmask() const {
30 return 0x00000020; // specified in the firmware spec.
31 }
32 };
33
34 } // namespace cros_boot_mode
35 #endif // CROS_BOOT_MODE_DEVELOPER_SWITCH_H_
OLDNEW
« no previous file with comments | « common.mk ('k') | developer_switch.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698