summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2019-05-29 16:41:40 +0300
committerEvgeny Zinoviev <me@ch1p.io>2019-05-29 16:41:40 +0300
commit984d8f39dcc84eb01b7daf85de50f4026f342528 (patch)
tree5d280788c3708fbe3a29eca33255c4b50ee32573 /README.md
initial
Diffstat (limited to 'README.md')
-rw-r--r--README.md45
1 files changed, 45 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..13c10a9
--- /dev/null
+++ b/README.md
@@ -0,0 +1,45 @@
+# smctool
+
+A Linux userspace tool to read Apple SMC keys. Supports various data types and output formats.
+This tool is a part of the coreboot project.
+
+### Usage
+
+##### Main options
+
+```
+-h, --help: print help
+-k, --key <name>: key name
+-t, --type <type>: data type, see below
+```
+
+##### Output format options:
+```
+--output-hex: print value as a hexadecimal number
+--output-bin: print binary representation
+```
+
+##### Supported data types
+`ui8`, `ui16`, `ui32`, `si8`, `si16`, `flag`, `fpXY`, `spXY`
+
+**fp** and **sp** are unsigned and signed fixed point data types respectively.
+The `X` in **fp** and **sp** data types is integer bits count and `Y` is fraction bits count.
+
+For example: `fpe2` means 14 integer bits, 2 fraction bits, `sp78` means 7 integer bits, 8 fraction bits (and one sign bit).
+
+### Examples
+
+Reading battery level:
+```
+smctool -k B0FC -t ui16 # returns Full Capacity of Battery 0
+smctool -k B0RM -t ui16 # returns Remaining Capacity of Batery 0
+```
+
+Reading fan speed:
+```
+smctool -k F0Ac -t fpe2
+```
+
+### License
+
+GPLv2