mirror of
https://github.com/hirschmann/nbfc.git
synced 2026-04-26 09:06:00 +03:00
[GH-ISSUE #683] Ability to read register, apply logical operation (specifically OR) and write Register #606
Labels
No labels
Stale
bug
config
discussion
duplicate
enhancement
experimental
feature
help-wanted
info
invalid
invalid
pull-request
question
up-for-grabs
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nbfc-hirschmann#606
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SirLugash on GitHub (May 11, 2019).
Original GitHub issue: https://github.com/hirschmann/nbfc/issues/683
Is your feature request related to a problem? Please describe.
I'm about to create a config for my Asus Eee PC 1015PN as it's fan would always run at max speed. I was able to figure out the relevant registers. However the EC has automatic firmware control over the fan unless a flag in a certain register is set. Switching the flag allows to change the fan speed target which allows the fan to run at lower speeds. Since it's only a single bit that needs to be changed, the read value needs an OR operation to set the right flag without changing any other flags of which I don't know what they do.
Describe the solution you'd like
Implementation of a special sequence that realizes the above. Let user set the register to be read, the logical operation and the value to use in that operation.
Example for my config:
The operation would make sure that the second bit of the register is set to 1, thereby enabling manual mode, without interfering with any other flag in that register.
Additionally, allow the register/flag to be read with every poll or another period of time in case the EC resets the flag for some reason. Read value, check if the flag is set. If not, calculate new value and write register.
Additional context
Currently, in order to use Notebook FanControl on my Eee PC, I have to enable manual mode by hand every time I'm booting Windows. This could potentially be reduced to a script automatically running at startup, however having that feature built into NBFC would mean I could have all relevant things in this one application and wouldn't need a second one.
@hirschmann commented on GitHub (May 12, 2019):
NBFc already supports setting bit flags as explained here: https://github.com/hirschmann/nbfc/wiki/Register-write-configuration
In your case the settings could look like this:
WriteMode is marked as deprecated because I want to implement an easier way of setting bit flags, which will look like this:
This way, you can set a value to a specific bit and mark all bits which should be left unchanged with
-("don't care").@SirLugash commented on GitHub (May 15, 2019):
Thank you so much for your reply, it works almost perfectly. A little issue I noticed is that whenever I open the updated config, the ResetWriteMode will be changed to Set rather than And and it appears that closing the application also doesn't reset the control mode (the fan would go to max speed again). Either way this works for me, thank you!