NewVPP
#56
Replies: 1 comment
-
hi, it is not a good idea to put vpp value into galinfo struct. The reason is that the same type of gal (lets say GAL16V8) can have different VPP based on the manufacturer (different manufacturer is different VPP). Besides, this structure is held in memory, so it is better not to extend the structure. The VPP value is calculated based on the data stored in the chip itself - so call PES data. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Howdy all.
I'm looking more carefully into setVPP() , and there is something bugging me from the start.
As i understand this, there are two limits on the VPP that is being controled here.
To be safe, starts with the lower bound and goes to the upper bound.
The code shows that even though PES should be the source, it cannot be relied on, so safety checks are done to prevent unintentional magic smoke.
And then there is this vpp = //
., setting., * nothing against it at all ...
*** but just a thougt here , ***
just a thought
would it be more productive in a code stylish way to macro it (the code is repeated various times) ., some thing like a mapping not only from the index table to the voltage table, but the other way around., ?
Wouldn't that allow an improvement on the galinfo_t, since adding VPP there would allow a bit of code to generify (don't know if that word exists, but will try it anyway )
the detection/configuration/programming using parameters for the part.
something like :
which would lead to something like :
Does some of this make any sense?
Beta Was this translation helpful? Give feedback.
All reactions