From e0afe07ae2dc80cb04b08c99e0acc9b0d3da01a9 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Fri, 10 Mar 2017 14:20:35 +0100 Subject: [PATCH] hd1/libcoolstream/cs_api.h: Update for new libcoolstream functions - cs_get_lib_version() - cs_compare_lib_versions() - cs_get_chip_type() (dummy function for compatibility with hd2) - Add CS_CHIP_xxx definitions Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/7eecd09eca64a35023d9a1c4d61ae0ea77aa3381 Author: Michael Liebmann Date: 2017-03-10 (Fri, 10 Mar 2017) ------------------ This commit was generated by Migit --- .../coolstream/hd1/libcoolstream/cs_api.h | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/lib/hardware/coolstream/hd1/libcoolstream/cs_api.h b/lib/hardware/coolstream/hd1/libcoolstream/cs_api.h index f778e149b..1051c99c0 100644 --- a/lib/hardware/coolstream/hd1/libcoolstream/cs_api.h +++ b/lib/hardware/coolstream/hd1/libcoolstream/cs_api.h @@ -17,6 +17,13 @@ typedef void (*cs_messenger) (unsigned int msg, unsigned int data); +#define CS_CHIP_APOLLO 0x8490 +#define CS_CHIP_SHINER 0x8470 +#define CS_CHIP_KRONOS_S 0x7540 +#define CS_CHIP_KRONOS_C 0x7550 +#define CS_CHIP_KRONOS_IP 0x7530 +#define CS_CHIP_NEVIS 0x0000 /* workaround for nonexistant nevis chiptype */ + enum CS_LOG_MODULE { CS_LOG_CI = 0, CS_LOG_HDMI_CEC, @@ -71,6 +78,29 @@ int cs_get_tsp_config(unsigned int port, tsrouter_tsp_config_t *tsp_config); // Serial nr and revision accessors unsigned long long cs_get_serial(void); unsigned int cs_get_revision(void); +/* Dummy function for compatibility with hd2 */ +unsigned int cs_get_chip_type(void); +// library version functions +typedef struct cs_libversion_t +{ + int vMajor; + int vMinor; + int vPatch; + char vStr[16]; + char vGit[41]; + char vGitDescribe[64]; + time_t vGitTime; +} cs_libversion_struct_t; + +void cs_get_lib_version(cs_libversion_t *ver); + +/* return value: + ------------- + 1 Library version newer than given version + 0 library version equals given version + -1 Library version older than given version */ +int cs_compare_lib_versions(int Major, int Minor, int Patch); + #endif //__CS_API_H_