mirror of
https://github.com/RGBCube/superfreq
synced 2025-08-02 11:57:46 +00:00
cpu: set_ep{p,b} actually sets the attributes now
This commit is contained in:
parent
24fa53914d
commit
6caa4f7941
1 changed files with 11 additions and 3 deletions
14
src/cpu.rs
14
src/cpu.rs
|
@ -387,10 +387,14 @@ impl Cpu {
|
||||||
)
|
)
|
||||||
.with_context(|| {
|
.with_context(|| {
|
||||||
format!("this probably means that {self} doesn't exist or doesn't support changing EPP")
|
format!("this probably means that {self} doesn't exist or doesn't support changing EPP")
|
||||||
})
|
})?;
|
||||||
|
|
||||||
|
self.epp = Some(epp.to_owned());
|
||||||
|
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_epb(&self, epb: &str) -> anyhow::Result<()> {
|
pub fn set_epb(&mut self, epb: &str) -> anyhow::Result<()> {
|
||||||
let Self {
|
let Self {
|
||||||
number,
|
number,
|
||||||
available_epbs: ref epbs,
|
available_epbs: ref epbs,
|
||||||
|
@ -410,7 +414,11 @@ impl Cpu {
|
||||||
)
|
)
|
||||||
.with_context(|| {
|
.with_context(|| {
|
||||||
format!("this probably means that {self} doesn't exist or doesn't support changing EPB")
|
format!("this probably means that {self} doesn't exist or doesn't support changing EPB")
|
||||||
})
|
})?;
|
||||||
|
|
||||||
|
self.epb = Some(epb.to_owned());
|
||||||
|
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_frequency_mhz_minimum(&mut self, frequency_mhz: u64) -> anyhow::Result<()> {
|
pub fn set_frequency_mhz_minimum(&mut self, frequency_mhz: u64) -> anyhow::Result<()> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue