You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
100 lines
2.9 KiB
100 lines
2.9 KiB
7 months ago
|
/*
|
||
|
* Copyright (c) Hisilicon Technologies Co., Ltd. 2017-2021. All rights reserved.
|
||
|
* Description: Unicable2 iapi interface
|
||
|
* Author: Hisilicon
|
||
|
* Create: 2017-06-30
|
||
|
*/
|
||
|
|
||
|
#include "iapi_unicable2.h"
|
||
|
|
||
|
#include "soc_log.h"
|
||
|
#include "td_type.h"
|
||
|
#include "soc_errno.h"
|
||
|
#include "iapi_unicable.h"
|
||
|
|
||
|
#include "iapi_frontend.h"
|
||
|
|
||
|
td_s32 uapi_unicable2_odu_channel_change(td_u32 port, uapi_unicable2_channel_para *para)
|
||
|
{
|
||
|
if (port >= IAPI_TUNER_NUM) {
|
||
|
soc_log_err("Input parameter(port:%u) invalid.\n", port);
|
||
|
return SOC_ERR_FRONTEND_INVALID_PARA;
|
||
|
}
|
||
|
if (para == NULL) {
|
||
|
soc_log_err("Input parameter(para) invalid.\n");
|
||
|
return SOC_ERR_FRONTEND_INVALID_POINT;
|
||
|
}
|
||
|
return TD_SUCCESS;
|
||
|
}
|
||
|
|
||
|
td_s32 uapi_unicable2_odu_channel_change_pin(td_u32 port, uapi_unicable2_channel_pin_para *para)
|
||
|
{
|
||
|
if (port >= IAPI_TUNER_NUM) {
|
||
|
soc_log_err("Input parameter(port:%u) invalid.\n", port);
|
||
|
return SOC_ERR_FRONTEND_INVALID_PARA;
|
||
|
}
|
||
|
if (para == NULL) {
|
||
|
soc_log_err("Input parameter(para) invalid.\n");
|
||
|
return SOC_ERR_FRONTEND_INVALID_POINT;
|
||
|
}
|
||
|
return TD_SUCCESS;
|
||
|
}
|
||
|
|
||
|
td_s32 uapi_unicable2_odu_power_off(td_u32 port)
|
||
|
{
|
||
|
if (port >= IAPI_TUNER_NUM) {
|
||
|
soc_log_err("Input parameter(port:%u) invalid.\n", port);
|
||
|
return SOC_ERR_FRONTEND_INVALID_PARA;
|
||
|
}
|
||
|
return TD_SUCCESS;
|
||
|
}
|
||
|
|
||
|
td_s32 uapi_unicable2_odu_power_off_pin(td_u32 port)
|
||
|
{
|
||
|
if (port >= IAPI_TUNER_NUM) {
|
||
|
soc_log_err("Input parameter(port:%u) invalid.\n", port);
|
||
|
return SOC_ERR_FRONTEND_INVALID_PARA;
|
||
|
}
|
||
|
return TD_SUCCESS;
|
||
|
}
|
||
|
|
||
|
td_s32 uapi_unicable2_odu_ub_avail(td_u32 port, td_u32 *recv_data)
|
||
|
{
|
||
|
if (port >= IAPI_TUNER_NUM) {
|
||
|
soc_log_err("Input parameter(port:%u) invalid.\n", port);
|
||
|
return SOC_ERR_FRONTEND_INVALID_PARA;
|
||
|
}
|
||
|
if (recv_data == TD_NULL) {
|
||
|
soc_log_err("Input parameter(recv_data) invalid.\n");
|
||
|
return SOC_ERR_FRONTEND_INVALID_POINT;
|
||
|
}
|
||
|
return TD_SUCCESS;
|
||
|
}
|
||
|
|
||
|
td_s32 uapi_unicable2_odu_ub_switches(td_u32 port, td_u8 ub_num, uapi_unicable2_switch_para *para)
|
||
|
{
|
||
|
if (port >= IAPI_TUNER_NUM) {
|
||
|
soc_log_err("Input parameter(port:%u) invalid.\n", port);
|
||
|
return SOC_ERR_FRONTEND_INVALID_PARA;
|
||
|
}
|
||
|
if (ub_num > SCR_USER_BAND_NUMBERS) {
|
||
|
soc_log_err("ub_num:%u is out of bound:%u\n", ub_num, SCR_USER_BAND_NUMBERS);
|
||
|
return SOC_ERR_FRONTEND_INVALID_PARA;
|
||
|
}
|
||
|
if (para == TD_NULL) {
|
||
|
soc_log_err("Input parameter(para) is TD_NULL.\n");
|
||
|
return SOC_ERR_FRONTEND_INVALID_POINT;
|
||
|
}
|
||
|
return TD_SUCCESS;
|
||
|
}
|
||
|
|
||
|
td_s32 uapi_unicable2_odu_ubx_signal_on(td_u32 port)
|
||
|
{
|
||
|
if (port >= IAPI_TUNER_NUM) {
|
||
|
soc_log_err("Input parameter(port:%u) invalid.\n", port);
|
||
|
return SOC_ERR_FRONTEND_INVALID_PARA;
|
||
|
}
|
||
|
return TD_SUCCESS;
|
||
|
}
|
||
|
|