Lines Matching refs:PWMCMP_MASK
40 #define PWMCMP_MASK 0xFFFF macro
99 uint64_t pwms = (pwmcount & (PWMCMP_MASK << scale)) >> scale; in sifive_pwm_set_alarms()
102 uint64_t pwmcmp = s->pwmcmp[i] & PWMCMP_MASK; in sifive_pwm_set_alarms()
130 uint64_t pwms = (pwmcount & (PWMCMP_MASK << scale)) >> scale; in sifive_pwm_set_alarms()
133 uint64_t pwmcmp = s->pwmcmp[i] & PWMCMP_MASK; in sifive_pwm_set_alarms()
254 return ((cur_time & PWMCOUNT_MASK) >> scale) & PWMCMP_MASK; in sifive_pwm_read()
256 return s->pwmcmp[0] & PWMCMP_MASK; in sifive_pwm_read()
258 return s->pwmcmp[1] & PWMCMP_MASK; in sifive_pwm_read()
260 return s->pwmcmp[2] & PWMCMP_MASK; in sifive_pwm_read()
262 return s->pwmcmp[3] & PWMCMP_MASK; in sifive_pwm_read()
345 new_offset = (((value & PWMCMP_MASK) << scale) & PWMCOUNT_MASK); in sifive_pwm_write()
354 s->pwmcmp[0] = value & PWMCMP_MASK; in sifive_pwm_write()
357 s->pwmcmp[1] = value & PWMCMP_MASK; in sifive_pwm_write()
360 s->pwmcmp[2] = value & PWMCMP_MASK; in sifive_pwm_write()
363 s->pwmcmp[3] = value & PWMCMP_MASK; in sifive_pwm_write()