----------------------------------------------- * basically do an itoa using as little ram as possible */
| 189 | /*----------------------------------------------- |
| 190 | * basically do an itoa using as little ram as possible */ |
| 191 | void UnityPrintNumberUnsigned(const UNITY_UINT number) |
| 192 | { |
| 193 | UNITY_UINT divisor = 1; |
| 194 | |
| 195 | /* figure out initial divisor */ |
| 196 | while (number / divisor > 9) |
| 197 | { |
| 198 | divisor *= 10; |
| 199 | } |
| 200 | |
| 201 | /* now mod and print, then divide divisor */ |
| 202 | do |
| 203 | { |
| 204 | UNITY_OUTPUT_CHAR((char)('0' + (number / divisor % 10))); |
| 205 | divisor /= 10; |
| 206 | } while (divisor > 0); |
| 207 | } |
| 208 | |
| 209 | /*-----------------------------------------------*/ |
| 210 | void UnityPrintNumberHex(const UNITY_UINT number, const char nibbles_to_print) |
no outgoing calls
no test coverage detected
searching dependent graphs…