----------------------------------------------- * basically do an itoa using as little ram as possible */
| 252 | /*----------------------------------------------- |
| 253 | * basically do an itoa using as little ram as possible */ |
| 254 | void UnityPrintNumberUnsigned(const UNITY_UINT number) |
| 255 | { |
| 256 | UNITY_UINT divisor = 1; |
| 257 | |
| 258 | /* figure out initial divisor */ |
| 259 | while (number / divisor > 9) |
| 260 | { |
| 261 | divisor *= 10; |
| 262 | } |
| 263 | |
| 264 | /* now mod and print, then divide divisor */ |
| 265 | do |
| 266 | { |
| 267 | UNITY_OUTPUT_CHAR((char)('0' + (number / divisor % 10))); |
| 268 | divisor /= 10; |
| 269 | } while (divisor > 0); |
| 270 | } |
| 271 | |
| 272 | /*-----------------------------------------------*/ |
| 273 | void UnityPrintNumberHex(const UNITY_UINT number, const char nibbles_to_print) |
no outgoing calls
no test coverage detected