/*------------------------------------------------------------------------------ Copyright 2016-2019 Sony Semiconductor Solutions Corporation Last Updated : 2019/06/28 Modification ID : 4d12c6351929bcae29649d686be7d406fd4718c8 ------------------------------------------------------------------------------*/ /** @file sony_example_common.h @brief Common declarations and definitions used in example files. */ #ifndef SONY_EXAMPLE_COMMON_H #define SONY_EXAMPLE_COMMON_H /*------------------------------------------------------------------------------ Defines ------------------------------------------------------------------------------*/ /** @brief Tuner IC definition to be used. SONY_EXAMPLE_TUNER_ASCOT3 : Sony ASCOT3 tuner (Terrestrial) SONY_EXAMPLE_TUNER_HELENE : Sony HELENE tuner (Terrestrial/Satellite) SONY_EXAMPLE_TUNER_HELENE2 : Sony HELENE2 tuner (Terrestrial/Satellite) SONY_EXAMPLE_TUNER_CXD680X_SIP : Sony SiP series (CXD680X) (Terrestrial) SONY_EXAMPLE_TUNER_NONE : Tuner is not controlled by this example code. */ #define SONY_EXAMPLE_TUNER_CXD680X_SIP /** @brief LNBC definition to be used. SONY_EXAMPLE_LNBC_ALLEGRO_A8290 : Allegro A8290 SONY_EXAMPLE_LNBC_ST_LNBH23 : STMicro LNBH23 SONY_EXAMPLE_LNBC_INTERSIL_ISL9492 : Intersil ISL9492 SONY_EXAMPLE_LNBC_NONE : LNBC is not controlled by this example code. */ #define SONY_EXAMPLE_LNBC_NONE /*------------------------------------------------------------------------------ Includes ------------------------------------------------------------------------------*/ #include "sony_integ.h" #include "sat_device_ctrl/sony_integ_sat_device_ctrl.h" #include "sony_i2c.h" #include "sat_device_ctrl/lnb_controller/sony_lnbc.h" #if defined(SONY_EXAMPLE_TUNER_ASCOT3) #include "sony_tuner_ascot3.h" #elif defined(SONY_EXAMPLE_TUNER_HELENE) #include "sony_tuner_helene.h" #elif defined(SONY_EXAMPLE_TUNER_HELENE2) #include "sony_tuner_helene2.h" #elif defined(SONY_EXAMPLE_TUNER_CXD680X_SIP) #include "tuner/terr_cable_ascot3/sony_tuner_ascot3.h" #endif //#if defined(_WINDOWS) //#include "drvi2c_feusb.h" //#endif /*------------------------------------------------------------------------------ Structs ------------------------------------------------------------------------------*/ /** @brief Necessary struct instances to control reference code. */ typedef struct { sony_demod_t demod; /**< Demod IC driver struct instance */ sony_integ_t integ; /**< Integ struct instance */ sony_integ_singlecable_data_t singleCableData; /**< Single Cable control data */ sony_i2c_t i2c; /**< I2C struct instance */ #if defined(_WINDOWS) drvi2c_feusb_t feusb; /**< Sony EVB dependent USB-I2C driver dependent information */ #endif sony_tuner_t tuner; /**< Tuner driver instance */ sony_lnbc_t lnbc; /**< LNB controller driver instance */ #if defined(SONY_EXAMPLE_TUNER_ASCOT3) sony_ascot3_t ascot3; /**< Sony ASCOT3 tuner driver instance */ #elif defined(SONY_EXAMPLE_TUNER_HELENE) sony_helene_t helene; /**< Sony HELENE tuner driver instance */ #elif defined(SONY_EXAMPLE_TUNER_HELENE2) sony_helene2_t helene2; /**< Sony HELENE2 tuner driver instance */ #elif defined(SONY_EXAMPLE_TUNER_CXD680X_SIP) sony_ascot3_t ascot3; /**< Sony ASCOT3 tuner driver instance (SiP internal) */ #endif } sony_example_driver_instance_t; /*------------------------------------------------------------------------------ Variables ------------------------------------------------------------------------------*/ extern const char *Common_Result[13]; /**< Table to convert sony_result_t value to character */ extern const char *Common_System[15]; /**< Table to convert sony_dtv_system_t value to character */ extern const char *Common_Bandwidth[11]; /**< Table to convert sony_dtv_bandwidth_t value to character */ /*------------------------------------------------------------------------------ Functions ------------------------------------------------------------------------------*/ /** @brief Initialize driver instance for Single system. Prepare I2C communication. @param pDriver The sony_example_driver_instance_t instance. @param enableLNBC Enable LNB controller or not. @return SONY_RESULT_OK if successful. */ sony_result_t sony_example_InitializeDriver (sony_example_driver_instance_t *pDriver, uint8_t enableLNBC); /** @brief Finalize driver instance. Close I2C communication. @param pDriver The sony_example_driver_instance_t instance. @return SONY_RESULT_OK if successful. */ sony_result_t sony_example_FinalizeDriver (sony_example_driver_instance_t *pDriver); #endif /* SONY_EXAMPLE_COMMON_H */