Skip to content

Commit b907295

Browse files
committed
Changes for v0.0.2
Added Framework Laptop specific commands Added EC_CMD_TEMP_SENSOR_GET_INFO support Various other changes
1 parent 9161a10 commit b907295

File tree

14 files changed

+649
-38
lines changed

14 files changed

+649
-38
lines changed

README.md

Lines changed: 49 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ As well as a higher-level abstracted interface for easy access to some of the mo
1111
For a basic installation with full Linux Device support, run:
1212

1313
```bash
14-
pip install cros_ec_python
14+
pip install cros-ec-python
1515
```
1616

1717
Some interfaces require additional dependencies, for example the LPC interface performs best with the `portio` package:
1818

1919

2020
```bash
21-
pip install cros_ec_python[lpc]
21+
pip install cros-ec-python[lpc]
2222
```
2323

2424
### Permissions
@@ -40,6 +40,29 @@ The documentation for this project can be found [here](https://steve-tech.github
4040
There are also some examples in the [`examples`](https://github.com/Steve-Tech/CrOS_EC_Python/tree/main/examples) directory,
4141
and every function has usage in the [`tests`](https://github.com/Steve-Tech/CrOS_EC_Python/tree/main/tests) directory.
4242

43+
### Runnings Tests
44+
45+
This package uses the built-in `unittest` module for testing. To run the tests, simply run:
46+
47+
```bash
48+
cd tests
49+
python -m unittest
50+
```
51+
52+
### Generating Documentation
53+
54+
The documentation is generated using `pdoc`. To generate the documentation, run:
55+
56+
```bash
57+
pdoc -o docs/ cros_ec_python
58+
```
59+
60+
Or to generate the documentation and serve it locally:
61+
62+
```bash
63+
pdoc cros_ec_python
64+
```
65+
4366
### Supported Interfaces
4467

4568
- [x] Linux Device (Requires the `cros_ec_dev` kernel module)
@@ -77,7 +100,7 @@ The implemented commands are split up into modules for maintainability reasons.
77100
**Get/Set miscellaneous values (`system`)**
78101

79102
- [ ] `EC_CMD_GSV_PAUSE_IN_S5` (`0x000C`)
80-
- [ ] `EC_CMD_GET_FEATURES` (`0x000D`)
103+
- [x] `EC_CMD_GET_FEATURES` (`0x000D`)
81104
- [ ] `EC_CMD_GET_SKU_ID` (`0x000E`)
82105
- [ ] `EC_CMD_SET_SKU_ID` (`0x000F`)
83106

@@ -178,7 +201,7 @@ The implemented commands are split up into modules for maintainability reasons.
178201

179202
**Temperature sensor commands (`thermal`)**
180203

181-
- [ ] `EC_CMD_TEMP_SENSOR_GET_INFO` (`0x0070`)
204+
- [x] `EC_CMD_TEMP_SENSOR_GET_INFO` (`0x0070`)
182205

183206
**Host event commands (`events`)**
184207

@@ -422,25 +445,38 @@ The implemented commands are split up into modules for maintainability reasons.
422445

423446
- [ ] `EC_CMD_FLASH_NOTIFIED` (`0x3E01`)
424447
- [ ] `EC_CMD_FACTORY_MODE` (`0x3E02`)
425-
- [ ] `EC_CMD_CHARGE_LIMIT_CONTROL` (`0x3E03`)
426-
- [ ] `EC_CMD_PWM_GET_FAN_ACTUAL_RPM` (`0x3E04`)
448+
- [x] `EC_CMD_CHARGE_LIMIT_CONTROL` (`0x3E03`)
449+
- [x] `EC_CMD_PWM_GET_FAN_ACTUAL_RPM` (`0x3E04`)
427450
- [ ] `EC_CMD_SET_AP_REBOOT_DELAY` (`0x3E05`)
428451
- [ ] `EC_CMD_ME_CONTROL` (`0x3E06`)
429-
- [ ] `EC_CMD_CUSTOM_HELLO` (`0x3E07`)
452+
- [ ] `EC_CMD_NON_ACPI_NOTIFY` (`0x3E07`)
430453
- [ ] `EC_CMD_DISABLE_PS2_EMULATION` (`0x3E08`)
431-
- [ ] `EC_CMD_CHASSIS_INTRUSION` (`0x3E09`)
454+
- [x] `EC_CMD_CHASSIS_INTRUSION` (`0x3E09`)
432455
- [ ] `EC_CMD_BB_RETIMER_CONTROL` (`0x3E0A`)
433456
- [ ] `EC_CMD_DIAGNOSIS` (`0x3E0B`)
434457
- [ ] `EC_CMD_UPDATE_KEYBOARD_MATRIX` (`0x3E0C`)
435458
- [ ] `EC_CMD_VPRO_CONTROL` (`0x3E0D`)
436-
- [ ] `EC_CMD_FP_LED_LEVEL_CONTROL` (`0x3E0E`)
437-
- [ ] `EC_CMD_CHASSIS_OPEN_CHECK` (`0x3E0F`)
438-
- [ ] `EC_CMD_CUSTOM_HELLO_ACPI` (`0x3E10`)
459+
- [x] `EC_CMD_FP_LED_LEVEL_CONTROL` (`0x3E0E`)
460+
- [x] `EC_CMD_CHASSIS_OPEN_CHECK` (`0x3E0F`)
461+
- [ ] `EC_CMD_ACPI_NOTIFY` (`0x3E10`)
439462
- [ ] `EC_CMD_READ_PD_VERSION` (`0x3E11`)
440463
- [ ] `EC_CMD_THERMAL_QEVENT` (`0x3E12`)
441464
- [ ] `EC_CMD_STANDALONE_MODE` (`0x3E13`)
442-
- [ ] `EC_CMD_PRIVACY_SWITCHES_CHECK_MODE` (`0x3E14`)
443-
- [ ] `EC_CMD_CHASSIS_COUNTER` (`0x3E15`)
465+
- [x] `EC_CMD_PRIVACY_SWITCHES_CHECK_MODE` (`0x3E14`)
466+
- [x] `EC_CMD_CHASSIS_COUNTER` (`0x3E15`)
467+
- [ ] `EC_CMD_CHECK_DECK_STATE` (`0x3E16`)
468+
- [x] `EC_CMD_GET_SIMPLE_VERSION` (`0x3E17`)
469+
- [x] `EC_CMD_GET_ACTIVE_CHARGE_PD_CHIP` (`0x3E18`)
470+
- [ ] `EC_CMD_UEFI_APP_MODE` (`0x3E19`)
471+
- [ ] `EC_CMD_UEFI_APP_BTN_STATUS` (`0x3E1A`)
472+
- [ ] `EC_CMD_EXPANSION_BAY_STATUS` (`0x3E1B`)
473+
- [ ] `EC_CMD_GET_HW_DIAG` (`0x3E1C`)
474+
- [?] `EC_CMD_GET_GPU_SERIAL` (`0x3E1D`)
475+
- [?] `EC_CMD_GET_GPU_PCIE` (`0x3E1E`)
476+
- [ ] `EC_CMD_PROGRAM_GPU_EEPROM` (`0x3E1F`)
477+
- [?] `EC_CMD_FP_CONTROL` (`0x3E20`)
478+
- [ ] `EC_CMD_GET_CUTOFF_STATUS` (`0x3E21`)
479+
- [x] `EC_CMD_BATTERY_EXTENDER` (`0x3E24`)
444480

445481
</details>
446482

cros_ec_python/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
from .baseclass import CrosEcClass
77
from .devices.dev import CrosEcDev
88
from .devices.lpc import CrosEcLpc
9-
from .commands import memmap, general, features, pwm, leds, thermal
9+
from .commands import memmap, general, features, pwm, leds, thermal, framework_laptop
1010
from .exceptions import ECError

cros_ec_python/commands/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
1010
## Format & Example
1111
12-
Each command is a function that takes a `CrosEcClass` object as the first argument,
12+
Each command is a function that takes a `cros_ec_python.baseclass.CrosEcClass` object as the first argument,
1313
and any other arguments that are required.
1414
1515
**For example:**

0 commit comments

Comments
 (0)