
/**
 * @file sdr_common_intf.h
 *
 * @brief This file has the control blocks, enumeration and function prototypes of SDR control layer of S-Band module
 *
 * @copyright Copyright 2023 Antaris, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

#ifndef SDR_COMMON_INTF_H
#define SDR_COMMON_INTF_H

#include "exo_osal.h"
#include "exo_ral_cmn.h"
#include "exo_types.h"


#ifdef __cplusplus
extern "C" {
#endif

/**
  * @brief param option in comms
  */
typedef enum
{
    SDR_UHF_2_FSK,
    SDR_UHF_GFSK,
}e_sdr_uhf_mod;

/**
  * @brief param option in comms
  */
typedef enum
{
    SDR_SBAND_QPSK,   
    SDR_SBAND_BPSK,    
}e_sdr_sband_mod;

/**
  * @brief param option in comms
  */
typedef enum
{
    SDR_ROLL_OFF_0,       /*0*/
    SDR_ROLL_OFF_0p20,    /*.20*/
    SDR_ROLL_OFF_0p25,    /*.25*/
    SDR_ROLL_OFF_0p35     /*.35*/
}e_sdr_roll_off;

/**
  * @brief param option in comms
  */
typedef enum
{
    SDR_RSSI_NOISE,  /**<-105dBm*/
    SDR_RSSI_AVG,  /**-102dBm to -105dBm*/
    SDR_RSSI_BETTER,  /**-90dBm to -102dBm*/
    SDR_RSSI_GOOD  /**<-40dBm to 90dBm*/
}e_sdr_rssi_map;

/**
  * @brief param option in comms
  */
typedef enum
{
    SDR_SYM_1_KSPS,
    SDR_SYM_2_KSPS, 
    SDR_SYM_4_KSPS,
    SDR_SYM_8_KSPS,
    SDR_SYM_16_KSPS,
    SDR_SYM_32_KSPS,
    SDR_SYM_64_KSPS,
    SDR_SYM_128_KSPS,
    SDR_SYM_256_KSPS,
    SDR_SYM_512_KSPS,
    SDR_SYM_1024_KSPS,
    SDR_SYM_2048_KSPS,
}e_sdr_sym_freq;

uint8_t sdr_get_rssi0(uint8_t radio_id);

uint8_t sdr_get_rssi1(uint8_t radio_id);

uint32_t sdr_get_rx_err_cnt(uint8_t radio_id);

uint32_t sdr_get_tx_frm_cnt(uint8_t radio_id);
uint32_t sdr_get_rx_freq(uint8_t radio_id);

uint8_t sdr_get_mod(uint8_t radio_id);
uint8_t sdr_get_roll_off(uint8_t radio_id);

uint8_t sdr_get_symb_freq(uint8_t radio_id);

uint8_t sdr_get_cc_enb(uint8_t radio_id);

uint8_t sdr_get_rand_enb(uint8_t radio_id);

uint8_t sdr_get_crc_enb(uint8_t radio_id);

uint8_t sdr_get_rs_enb(uint8_t radio_id);

uint8_t sdr_get_dc_filter_enb(uint8_t radio_id);

uint8_t sdr_get_white_enb(uint8_t radio_id);

uint8_t sdr_get_manchester_enb(uint8_t radio_id);

uint8_t comms_sband_get_sym_freq_map(uint16_t iqs_sym_freq);

uint8_t comms_rssi_map(float act_rssi);

#ifdef __cplusplus
}
#endif
#endif /*SDR_COMMON_INTF_H */
