<p>laforge <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/14394">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">ASF: add new utils<br><br>AFAIK these are not used yet, but have been added to the upstream<br>ASFv4 library.<br>I added them to avoid future false negative when diffing files.<br><br>Change-Id: Icf6fb641050a1e7132ff2b14c1ce537ec9403b9f<br>---<br>A sysmoOCTSIM/hal/utils/include/utils_decrement_macro.h<br>A sysmoOCTSIM/hal/utils/include/utils_recursion_macro.h<br>2 files changed, 378 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/sysmoOCTSIM/hal/utils/include/utils_decrement_macro.h b/sysmoOCTSIM/hal/utils/include/utils_decrement_macro.h</span><br><span>new file mode 100644</span><br><span>index 0000000..2b52469</span><br><span>--- /dev/null</span><br><span>+++ b/sysmoOCTSIM/hal/utils/include/utils_decrement_macro.h</span><br><span>@@ -0,0 +1,309 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/**</span><br><span style="color: hsl(120, 100%, 40%);">+ * \file</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \brief Decrement macro.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \asf_license_start</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \page License</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Subject to your compliance with these terms, you may use Microchip</span><br><span style="color: hsl(120, 100%, 40%);">+ * software and any derivatives exclusively with Microchip products.</span><br><span style="color: hsl(120, 100%, 40%);">+ * It is your responsibility to comply with third party license terms applicable</span><br><span style="color: hsl(120, 100%, 40%);">+ * to your use of third party software (including open source software) that</span><br><span style="color: hsl(120, 100%, 40%);">+ * may accompany Microchip software.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,</span><br><span style="color: hsl(120, 100%, 40%);">+ * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,</span><br><span style="color: hsl(120, 100%, 40%);">+ * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,</span><br><span style="color: hsl(120, 100%, 40%);">+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE</span><br><span style="color: hsl(120, 100%, 40%);">+ * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL</span><br><span style="color: hsl(120, 100%, 40%);">+ * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE</span><br><span style="color: hsl(120, 100%, 40%);">+ * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE</span><br><span style="color: hsl(120, 100%, 40%);">+ * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE.  TO THE FULLEST EXTENT</span><br><span style="color: hsl(120, 100%, 40%);">+ * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY</span><br><span style="color: hsl(120, 100%, 40%);">+ * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,</span><br><span style="color: hsl(120, 100%, 40%);">+ * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \asf_license_stop</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef _UTILS_DECREMENT_MACRO_H</span><br><span style="color: hsl(120, 100%, 40%);">+#define _UTILS_DECREMENT_MACRO_H</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#ifdef __cplusplus</span><br><span style="color: hsl(120, 100%, 40%);">+extern "C" {</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/**</span><br><span style="color: hsl(120, 100%, 40%);">+ * \brief Compile time decrement, result value is entire integer literal</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param[in] val - value to be decremented</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_VALUE(val) DEC_##val</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+// Preprocessor increment implementation</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_256 255</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_255 254</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_254 253</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_253 252</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_252 251</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_251 250</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_250 249</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_249 248</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_248 247</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_247 246</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_246 245</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_245 244</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_244 243</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_243 242</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_242 241</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_241 240</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_240 239</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_239 238</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_238 237</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_237 236</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_236 235</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_235 234</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_234 233</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_233 232</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_232 231</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_231 230</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_230 229</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_229 228</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_228 227</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_227 226</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_226 225</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_225 224</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_224 223</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_223 222</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_222 221</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_221 220</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_220 219</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_219 218</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_218 217</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_217 216</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_216 215</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_215 214</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_214 213</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_213 212</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_212 211</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_211 210</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_210 209</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_209 208</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_208 207</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_207 206</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_206 205</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_205 204</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_204 203</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_203 202</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_202 201</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_201 200</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_200 199</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_199 198</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_198 197</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_197 196</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_196 195</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_195 194</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_194 193</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_193 192</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_192 191</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_191 190</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_190 189</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_189 188</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_188 187</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_187 186</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_186 185</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_185 184</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_184 183</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_183 182</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_182 181</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_181 180</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_180 179</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_179 178</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_178 177</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_177 176</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_176 175</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_175 174</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_174 173</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_173 172</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_172 171</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_171 170</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_170 169</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_169 168</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_168 167</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_167 166</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_166 165</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_165 164</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_164 163</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_163 162</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_162 161</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_161 160</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_160 159</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_159 158</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_158 157</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_157 156</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_156 155</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_155 154</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_154 153</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_153 152</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_152 151</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_151 150</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_150 149</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_149 148</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_148 147</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_147 146</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_146 145</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_145 144</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_144 143</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_143 142</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_142 141</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_141 140</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_140 139</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_139 138</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_138 137</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_137 136</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_136 135</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_135 134</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_134 133</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_133 132</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_132 131</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_131 130</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_130 129</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_129 128</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_128 127</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_127 126</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_126 125</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_125 124</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_124 123</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_123 122</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_122 121</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_121 120</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_120 119</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_119 118</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_118 117</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_117 116</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_116 115</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_115 114</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_114 113</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_113 112</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_112 111</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_111 110</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_110 109</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_109 108</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_108 107</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_107 106</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_106 105</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_105 104</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_104 103</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_103 102</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_102 101</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_101 100</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_100 99</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_99 98</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_98 97</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_97 96</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_96 95</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_95 94</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_94 93</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_93 92</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_92 91</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_91 90</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_90 89</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_89 88</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_88 87</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_87 86</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_86 85</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_85 84</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_84 83</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_83 82</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_82 81</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_81 80</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_80 79</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_79 78</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_78 77</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_77 76</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_76 75</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_75 74</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_74 73</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_73 72</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_72 71</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_71 70</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_70 69</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_69 68</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_68 67</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_67 66</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_66 65</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_65 64</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_64 63</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_63 62</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_62 61</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_61 60</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_60 59</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_59 58</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_58 57</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_57 56</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_56 55</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_55 54</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_54 53</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_53 52</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_52 51</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_51 50</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_50 49</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_49 48</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_48 47</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_47 46</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_46 45</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_45 44</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_44 43</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_43 42</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_42 41</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_41 40</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_40 39</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_39 38</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_38 37</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_37 36</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_36 35</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_35 34</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_34 33</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_33 32</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_32 31</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_31 30</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_30 29</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_29 28</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_28 27</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_27 26</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_26 25</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_25 24</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_24 23</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_23 22</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_22 21</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_21 20</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_20 19</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_19 18</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_18 17</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_17 16</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_16 15</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_15 14</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_14 13</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_13 12</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_12 11</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_11 10</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_10 9</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_9 8</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_8 7</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_7 6</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_6 5</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_5 4</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_4 3</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_3 2</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_2 1</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEC_1 0</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#ifdef __cplusplus</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span style="color: hsl(120, 100%, 40%);">+#endif /* _UTILS_DECREMENT_MACRO_H */</span><br><span>diff --git a/sysmoOCTSIM/hal/utils/include/utils_recursion_macro.h b/sysmoOCTSIM/hal/utils/include/utils_recursion_macro.h</span><br><span>new file mode 100644</span><br><span>index 0000000..294314c</span><br><span>--- /dev/null</span><br><span>+++ b/sysmoOCTSIM/hal/utils/include/utils_recursion_macro.h</span><br><span>@@ -0,0 +1,69 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/**</span><br><span style="color: hsl(120, 100%, 40%);">+ * \file</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \brief Recursion macro.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \asf_license_start</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \page License</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Subject to your compliance with these terms, you may use Microchip</span><br><span style="color: hsl(120, 100%, 40%);">+ * software and any derivatives exclusively with Microchip products.</span><br><span style="color: hsl(120, 100%, 40%);">+ * It is your responsibility to comply with third party license terms applicable</span><br><span style="color: hsl(120, 100%, 40%);">+ * to your use of third party software (including open source software) that</span><br><span style="color: hsl(120, 100%, 40%);">+ * may accompany Microchip software.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,</span><br><span style="color: hsl(120, 100%, 40%);">+ * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,</span><br><span style="color: hsl(120, 100%, 40%);">+ * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,</span><br><span style="color: hsl(120, 100%, 40%);">+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE</span><br><span style="color: hsl(120, 100%, 40%);">+ * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL</span><br><span style="color: hsl(120, 100%, 40%);">+ * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE</span><br><span style="color: hsl(120, 100%, 40%);">+ * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE</span><br><span style="color: hsl(120, 100%, 40%);">+ * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE.  TO THE FULLEST EXTENT</span><br><span style="color: hsl(120, 100%, 40%);">+ * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY</span><br><span style="color: hsl(120, 100%, 40%);">+ * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,</span><br><span style="color: hsl(120, 100%, 40%);">+ * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \asf_license_stop</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef _UTILS_RECURSION_MACRO_H</span><br><span style="color: hsl(120, 100%, 40%);">+#define _UTILS_RECURSION_MACRO_H</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#ifdef __cplusplus</span><br><span style="color: hsl(120, 100%, 40%);">+extern "C" {</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * \brief Macro recursion</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param[in] macro Macro to be repeated recursively</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param[in] arg A recursive threshold, building on this to decline by times</span><br><span style="color: hsl(120, 100%, 40%);">+ *                defined with parameter n</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param[in] n The number of repetitious calls to macro</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+#define RECURSION_MACRO(macro, arg, n) RECURSION_MACRO_I(macro, arg, n)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * \brief Second level is needed to get integer literal from "n" if it is</span><br><span style="color: hsl(120, 100%, 40%);">+ *        defined as macro</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+#define RECURSION_MACRO_I(macro, arg, n) RECURSION##n(macro, arg)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#define RECURSION0(macro, arg)</span><br><span style="color: hsl(120, 100%, 40%);">+#define RECURSION1(macro, arg) RECURSION0(macro, DEC_VALUE(arg)) macro(arg, 0)</span><br><span style="color: hsl(120, 100%, 40%);">+#define RECURSION2(macro, arg) RECURSION1(macro, DEC_VALUE(arg)) macro(arg, 1)</span><br><span style="color: hsl(120, 100%, 40%);">+#define RECURSION3(macro, arg) RECURSION2(macro, DEC_VALUE(arg)) macro(arg, 2)</span><br><span style="color: hsl(120, 100%, 40%);">+#define RECURSION4(macro, arg) RECURSION3(macro, DEC_VALUE(arg)) macro(arg, 3)</span><br><span style="color: hsl(120, 100%, 40%);">+#define RECURSION5(macro, arg) RECURSION4(macro, DEC_VALUE(arg)) macro(arg, 4)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#ifdef __cplusplus</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include <utils_decrement_macro.h></span><br><span style="color: hsl(120, 100%, 40%);">+#endif /* _UTILS_RECURSION_MACRO_H */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/14394">change 14394</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/14394"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ccid-firmware </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Icf6fb641050a1e7132ff2b14c1ce537ec9403b9f </div>
<div style="display:none"> Gerrit-Change-Number: 14394 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Kévin Redon <kredon@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>