Lines Matching refs:cfg
244 uint32_t bsec_set_config(struct bsec_config *cfg) in bsec_set_config() argument
253 value = ((((uint32_t)cfg->freq << BSEC_CONF_FRQ_SHIFT) & in bsec_set_config()
255 (((uint32_t)cfg->pulse_width << BSEC_CONF_PRG_WIDTH_SHIFT) & in bsec_set_config()
257 (((uint32_t)cfg->tread << BSEC_CONF_TREAD_SHIFT) & in bsec_set_config()
266 result = bsec_power_safmem((bool)cfg->power & in bsec_set_config()
272 value = ((((uint32_t)cfg->upper_otp_lock << UPPER_OTP_LOCK_SHIFT) & in bsec_set_config()
274 (((uint32_t)cfg->den_lock << DENREG_LOCK_SHIFT) & in bsec_set_config()
276 (((uint32_t)cfg->prog_lock << GPLOCK_LOCK_SHIFT) & in bsec_set_config()
293 uint32_t bsec_get_config(struct bsec_config *cfg) in bsec_get_config() argument
297 if (cfg == NULL) { in bsec_get_config()
302 cfg->power = (uint8_t)((value & BSEC_CONF_POWER_UP_MASK) >> in bsec_get_config()
304 cfg->freq = (uint8_t)((value & BSEC_CONF_FRQ_MASK) >> in bsec_get_config()
306 cfg->pulse_width = (uint8_t)((value & BSEC_CONF_PRG_WIDTH_MASK) >> in bsec_get_config()
308 cfg->tread = (uint8_t)((value & BSEC_CONF_TREAD_MASK) >> in bsec_get_config()
312 cfg->upper_otp_lock = (uint8_t)((value & UPPER_OTP_LOCK_MASK) >> in bsec_get_config()
314 cfg->den_lock = (uint8_t)((value & DENREG_LOCK_MASK) >> in bsec_get_config()
316 cfg->prog_lock = (uint8_t)((value & GPLOCK_LOCK_MASK) >> in bsec_get_config()