void DecrementVortexClockDivisor(
Chip chip,
ClockDivisor nDivisor
);
void DecrementApexClockDivisor(
Chip chip,
ClockDivisor nDivisor
);
Description
Decrements the current value of a clock divisor to the next valid divisor value.
Parameters
chip
The ID the C Code generated for the chip. This will be something like chipName or an_chipName, depending on the name of the chip and the generation options.
nDivisor
A clock divisor ID generated by the C Code. The possible values for an OkikaVortex chip are:
VortexClockDivisor_PreScale
VortexClockDivisor_Clock0
VortexClockDivisor_Clock1
VortexClockDivisor_Clock2
VortexClockDivisor_Clock3
VortexClockDivisor_Chop1
VortexClockDivisor_Chop2
Possible OkikaApex chip values are:
ApexClockDivisor_ClockSys1Sys2Flag
ApexClockDivisor_ClockSys2
ApexClockDivisor_ClockSys1
ApexClockDivisor_Clock0
ApexClockDivisor_Clock1
ApexClockDivisor_Clock2
ApexClockDivisor_Clock3
ApexClockDivisor_Clock4DelayClock4
ApexClockDivisor_Clock5
ApexClockDivisor_Clock5DelayClock5
Return Value
None
Remarks
This function appends bytes to the current reconfiguration data for the chip. It is assumed that nDivisor is a valid clock divisor value. The change takes place immediately internally, meaning subsequent calls to GetClockDivisor for this chip and divisor will return the value set here. If the divisor is already at its lowest value, this function has no effect, and no new bytes will be appended to the reconfiguration data.
Important
When a reconfiguration that changes clock divisor values is sent, there is a Update_CLKS bit that must also be set for the clocks to actually be updated. All of the clock-setting functions (SetClockDivisor, IncrementClockDivisor, DecrementClockDivisor) ensure that this bit is set. However, for an OkikaVortex chip, after the reconfiguration is sent the bit must be turned off manually using ClockUpdatesFinished. See the documentation of ClockUpdatesFinished for more detail.