Lines Matching refs:cfg
180 uint32_t bsec_set_config(struct bsec_config *cfg) in bsec_set_config() argument
185 value = ((((uint32_t)cfg->freq << BSEC_CONF_FRQ_SHIFT) & in bsec_set_config()
187 (((uint32_t)cfg->pulse_width << BSEC_CONF_PRG_WIDTH_SHIFT) & in bsec_set_config()
189 (((uint32_t)cfg->tread << BSEC_CONF_TREAD_SHIFT) & in bsec_set_config()
198 result = bsec_power_safmem((bool)cfg->power & in bsec_set_config()
204 value = ((((uint32_t)cfg->upper_otp_lock << UPPER_OTP_LOCK_SHIFT) & in bsec_set_config()
206 (((uint32_t)cfg->den_lock << DENREG_LOCK_SHIFT) & in bsec_set_config()
208 (((uint32_t)cfg->prog_lock << GPLOCK_LOCK_SHIFT) & in bsec_set_config()
225 uint32_t bsec_get_config(struct bsec_config *cfg) in bsec_get_config() argument
229 if (cfg == NULL) { in bsec_get_config()
234 cfg->power = (uint8_t)((value & BSEC_CONF_POWER_UP_MASK) >> in bsec_get_config()
236 cfg->freq = (uint8_t)((value & BSEC_CONF_FRQ_MASK) >> in bsec_get_config()
238 cfg->pulse_width = (uint8_t)((value & BSEC_CONF_PRG_WIDTH_MASK) >> in bsec_get_config()
240 cfg->tread = (uint8_t)((value & BSEC_CONF_TREAD_MASK) >> in bsec_get_config()
244 cfg->upper_otp_lock = (uint8_t)((value & UPPER_OTP_LOCK_MASK) >> in bsec_get_config()
246 cfg->den_lock = (uint8_t)((value & DENREG_LOCK_MASK) >> in bsec_get_config()
248 cfg->prog_lock = (uint8_t)((value & GPLOCK_LOCK_MASK) >> in bsec_get_config()