/* Sets the duty cycle of a FAN channel when in manual mode. */
void FanChannelDutySet(unsigned long ulBase, unsigned long ulChannel, unsigned long ulDuty)
/* Sets the duty cycle of a FAN channel when in manual mode. */
void FanChannelDutySet(unsigned long ulBase, unsigned long ulChannel, unsigned long ulDuty)
{
    ASSERT(ulBase == FAN0_BASE);
    ASSERT(ulChannel <= 5);
    ASSERT(ulDuty < 512);
    HWREG(ulBase + FAN_O_CMD0 + (ulChannel * 0x10)) =
            (ulDuty << FAN_CMD0_DC_S) & FAN_CMD0_DC_M;
}