@@ -255,6 +255,35 @@ void EWLassert(bool expr, const char *str_expr, const char *file, unsigned int l
255
255
void EWLtrace (const char * s );
256
256
void EWLtraceparam (const char * fmt , const char * param , unsigned int val );
257
257
258
+ /* Build hardware configuration structure */
259
+ static inline EWLHwConfig_t EWLBuildHwConfig (uint32_t cfgval , uint32_t cfgval2 )
260
+ {
261
+ EWLHwConfig_t cfg_info ;
262
+
263
+ cfg_info .maxEncodedWidth = cfgval & ((1U << 12U ) - 1U );
264
+ cfg_info .h264Enabled = (cfgval >> 27U ) & 1U ;
265
+ cfg_info .vp8Enabled = (cfgval >> 26U ) & 1U ;
266
+ cfg_info .jpegEnabled = (cfgval >> 25U ) & 1U ;
267
+ cfg_info .vsEnabled = (cfgval >> 24U ) & 1U ;
268
+ cfg_info .rgbEnabled = (cfgval >> 28U ) & 1U ;
269
+ cfg_info .searchAreaSmall = (cfgval >> 29U ) & 1U ;
270
+ cfg_info .scalingEnabled = (cfgval >> 30U ) & 1U ;
271
+ cfg_info .busType = (cfgval >> 20U ) & 15U ;
272
+ cfg_info .synthesisLanguage = (cfgval >> 16U ) & 15U ;
273
+ cfg_info .busWidth = (cfgval >> 12U ) & 15U ;
274
+ cfg_info .addr64Support = (cfgval2 >> 31U ) & 1U ;
275
+ cfg_info .dnfSupport = (cfgval2 >> 30U ) & 1U ;
276
+ cfg_info .rfcSupport = (cfgval2 >> 28U ) & 3U ;
277
+ cfg_info .enhanceSupport = (cfgval2 >> 27U ) & 1U ;
278
+ cfg_info .instantSupport = (cfgval2 >> 26U ) & 1U ;
279
+ cfg_info .svctSupport = (cfgval2 >> 25U ) & 1U ;
280
+ cfg_info .inAxiIdSupport = (cfgval2 >> 24U ) & 1U ;
281
+ cfg_info .inLoopbackSupport = (cfgval2 >> 23U ) & 1U ;
282
+ cfg_info .irqEnhanceSupport = (cfgval2 >> 22U ) & 1U ;
283
+
284
+ return cfg_info ;
285
+ }
286
+
258
287
#ifdef __cplusplus
259
288
}
260
289
#endif
0 commit comments