/* Compare one source clock to another source clock.  */
uint32_t CGU_RealFrequencyCompare(CGU_ENTITY_T Clock, CGU_ENTITY_T CompareToClock, uint32_t *m, uint32_t *d)
/* Compare one source clock to another source clock.  */
uint32_t CGU_RealFrequencyCompare(CGU_ENTITY_T Clock, CGU_ENTITY_T CompareToClock, uint32_t *m, uint32_t *d)
{
    uint32_t m1, m2, d1, d2;
    if ((Clock > CGU_CLKSRC_IDIVE) || (CompareToClock > CGU_CLKSRC_IDIVE)) {
        return CGU_ERROR_INVALID_PARAM;
    }
    CGU_FrequencyMonitor(Clock, &m1, &d1);
    CGU_FrequencyMonitor(CompareToClock, &m2, &d2);
    *m = m1 * d2;
    *d = d1 * m2;
    return 0;
}