/* Initializes OTS according to the specified parameters in the structure stc_ots_init_t.  */
int32_t OTS_Init(const stc_ots_init_t *pstcOTSInit)
/* Initializes OTS according to the specified parameters in the structure stc_ots_init_t.  */
int32_t OTS_Init(const stc_ots_init_t *pstcOTSInit)
{
    int32_t i32Ret = LL_ERR_INVD_PARAM;
    if (pstcOTSInit != NULL) {
        DDL_ASSERT(IS_OTS_CLK(pstcOTSInit->u16ClockSrc));
        DDL_ASSERT(IS_OTS_AUTO_OFF_EN(pstcOTSInit->u16AutoOffEn));
        OTS_Stop();
        WRITE_REG16(CM_OTS->CTL, (pstcOTSInit->u16ClockSrc | pstcOTSInit->u16AutoOffEn));
        m_f32SlopeK  = pstcOTSInit->f32SlopeK;
        m_f32OffsetM = pstcOTSInit->f32OffsetM;
        i32Ret = LL_OK;
    }
    return i32Ret;
}