mirror of https://github.com/thesofproject/sof.git
Topology: utils: add Decimal to Hexadecimal converting macro
Add macro DEC2HEX marcro to convert 2-digit decimal number to hexadecimal one that prefixed with '0x'. Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
This commit is contained in:
parent
79f97a6a0c
commit
6569b345f5
|
@ -57,6 +57,14 @@ define(`COMP_FORMAT_VALUE',
|
|||
$1, `s32le', `0x02',
|
||||
)')
|
||||
|
||||
# note: only support number < 256 at the moment
|
||||
dnl DEC2HEX(dec_num)
|
||||
define(`DEC2HEX',
|
||||
`ifelse(
|
||||
eval(`$1 < 16'), `1', concat(`0x0',eval($1, 16)),
|
||||
eval(`$1 < 256'), `1', concat(`0x',eval($1, 16)),
|
||||
)')
|
||||
|
||||
dnl P_GRAPH(NAME, PIPELINE_ID, CONNECTIONS)
|
||||
define(`P_GRAPH',
|
||||
`SectionGraph.STR($1 $2) {'
|
||||
|
|
Loading…
Reference in New Issue