diff options
author | Patrice Chotard <patrice.chotard@st.com> | 2018-08-03 15:07:41 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-09-10 20:48:12 -0400 |
commit | d7c09684d73c4831a0240ce1fcbe7644bc3ab6e7 (patch) | |
tree | 84ef39679153e3ec0ec159b5a46e597acb7e16ad /include/serial.h | |
parent | ad060c052bf8593c3d21bdab1f72f5f181064972 (diff) | |
download | u-boot-d7c09684d73c4831a0240ce1fcbe7644bc3ab6e7.tar.gz u-boot-d7c09684d73c4831a0240ce1fcbe7644bc3ab6e7.tar.bz2 u-boot-d7c09684d73c4831a0240ce1fcbe7644bc3ab6e7.zip |
sandbox: Add serial test
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/serial.h')
-rw-r--r-- | include/serial.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/serial.h b/include/serial.h index ffda48a141..020cd392e8 100644 --- a/include/serial.h +++ b/include/serial.h @@ -102,6 +102,11 @@ enum serial_stop { #define SERIAL_GET_STOP(config) \ ((config & SERIAL_STOP_MASK) >> SERIAL_STOP_SHIFT) +#define SERIAL_CONFIG(par, bits, stop) \ + (par << SERIAL_PAR_SHIFT | \ + bits << SERIAL_BITS_SHIFT | \ + stop << SERIAL_STOP_SHIFT) + #define SERIAL_DEFAULT_CONFIG SERIAL_PAR_NONE << SERIAL_PAR_SHIFT | \ SERIAL_8_BITS << SERIAL_BITS_SHIFT | \ SERIAL_ONE_STOP << SERIAL_STOP_SHIFT |