summaryrefslogtreecommitdiff
path: root/include/serial.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/serial.h')
-rw-r--r--include/serial.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/serial.h b/include/serial.h
index ffda48a1410..020cd392e88 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