Lines Matching defs:freq
432 static int32_t HiGetFreq(struct RtcHost *host, uint32_t *freq)
440 if (host == NULL || host->data == NULL || freq == NULL) {
453 *freq = FREQ_DIFF + (value * FREQ_UNIT) / FREQ_COEFFICIENT; /* freq convert: 3270000+(freq*10000)/3052 */
457 static int32_t HiSetFreq(struct RtcHost *host, uint32_t freq)
469 freq *= FREQ_ROUND_OFF_NUMBER;
470 if (freq > FREQ_MAX_VAL || freq < FREQ_MIN_VAL) {
475 freq = (freq - FREQ_DIFF) * FREQ_COEFFICIENT / FREQ_UNIT; /* freq convert: (freq-3270000)*3052/10000 */
476 lowFreq = (freq & 0xff); /* 8:[7:0] for freq low */
477 highFreq = ((freq >> SHIFT_BYTE) & 0xf); /* 8:[12:8] for freq high */