summaryrefslogtreecommitdiff
path: root/include/printf.h
diff options
context:
space:
mode:
authorTom Hughes <tomhughes@chromium.org>2022-07-12 10:01:23 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-07-19 16:29:14 +0000
commit8d30a05ed74730fece3ebf0fd617426c565541ce (patch)
tree697a064455230b2358246d52feb5eb4e94ec2fd0 /include/printf.h
parente97b3e407b786e95cabef7977d42998f0ed13be8 (diff)
downloadchrome-ec-8d30a05ed74730fece3ebf0fd617426c565541ce.tar.gz
tree: Remove non-standard "%ph" printf format
The non-standard "%ph" format is replaced with snprintf_hex_buffer and then using "%s" to print the resulting buffer. Using standard format specifiers makes it easier to switch between the "builtin" EC standard library and the C standard library provided by the toolchain (or Zephyr). BRANCH=none BUG=b:238433667, b:234181908 TEST=Enable CONFIG_CMD_RAND in nocturne_fp/board.h On icetower v0.1 with servo_micro and J-Trace: Before change: > rand rand 8ab8b15090ca5ae83bdad671c906d51a5f2b98a359a4106054ee6b54a4087190 After change: > rand rand 2a8645235a31936a28b8d1b9c4948f46d39662e7fcb10a185ddb14c6a998e2eb Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I3bff928d32579440d7cdb27a75899e45159accfb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3759123 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'include/printf.h')
-rw-r--r--include/printf.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/printf.h b/include/printf.h
index e5afb7f2d1..48117042f9 100644
--- a/include/printf.h
+++ b/include/printf.h
@@ -65,8 +65,6 @@
* - 'b' - unsigned integer, print as binary
*
* Special format codes:
- * - '%ph' - binary data, print as hex; Use HEX_BUF(buffer, size) to encode
- * parameters.
* - '%pP' - raw pointer.
*/