summaryrefslogtreecommitdiff
path: root/chip/g/uart_bitbang.h
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2018-08-10 10:12:38 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-08-15 12:54:54 -0700
commitb7442b335d6b6a8549eb677058ae8f2782a82792 (patch)
treefbde87d65d8e9801d40a829c8c4104616b2f53e6 /chip/g/uart_bitbang.h
parentdb9f64097b0ca46e125ad0f4fc76b80863e9772b (diff)
downloadchrome-ec-b7442b335d6b6a8549eb677058ae8f2782a82792.tar.gz
cr50: bitbang does not need to support multiple UARTs.
The ability to support multiple UART interfaces complicates bit bang EC programming implementation without bringing any real benefits - we are not going to have to bit bang more than one UART interface in real Chrome OS hardware. In preparation in introducing bit a bang speed up patch let's change the API to not require passing the UART number to bit bang functions. To keep servod happy for now, the 'bitbang' cli command is being left unchanged and as such still requires to pass the UART number, it is just ignored. BRANCH=cr50, cr50-mp BUG=b:62539385 TEST=just verified that Cr50 still builds, the real test is done in the speed up patch. Change-Id: Icd5476ad777791ca483844cbf49316ddf58f03a3 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1171220 Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Diffstat (limited to 'chip/g/uart_bitbang.h')
-rw-r--r--chip/g/uart_bitbang.h33
1 files changed, 9 insertions, 24 deletions
diff --git a/chip/g/uart_bitbang.h b/chip/g/uart_bitbang.h
index 7a8a33e923..8ebf5635a0 100644
--- a/chip/g/uart_bitbang.h
+++ b/chip/g/uart_bitbang.h
@@ -54,51 +54,41 @@ extern struct uart_bitbang_properties bitbang_config;
*
* If configuration succeeds, then call uart_bitbang_enable() on the port.
*
- * @param uart: Index of UART to enable bit banging mode.
* @param baud_rate: desired baud rate.
* @param parity: 0: no parity, 1: odd parity, 2: even parity.
*
* @returns EC_SUCCESS on success, otherwise an error.
*/
-int uart_bitbang_config(int uart, int baud_rate, int parity);
+int uart_bitbang_config(int baud_rate, int parity);
/**
* Enable bit banging mode for a UART.
*
* The UART must have been configured first.
- *
- * @param uart: Index of UART to disable bit banging mode.
*/
-int uart_bitbang_enable(int uart);
+int uart_bitbang_enable(void);
/**
* Disable bit banging mode for a UART.
- *
- * @param uart: Index of UART to disable bit banging mode.
*/
-int uart_bitbang_disable(int uart);
+int uart_bitbang_disable(void);
/**
* Returns 1 if bit banging mode is enabled for the UART.
- *
- * @param uart: Index of UART to query.
*/
-int uart_bitbang_is_enabled(int uart);
+int uart_bitbang_is_enabled(void);
/**
* Returns 1 if bit banging mode is wanted for the UART.
- *
- * @param uart: Index of UART to query.
*/
-int uart_bitbang_is_wanted(int uart);
+int uart_bitbang_is_wanted(void);
/**
* TX a character on a UART configured for bit banging mode.
*
- * @param uart: Index of UART to use.
* @param c: Character to send out.
*/
-void uart_bitbang_write_char(int uart, char c);
+void uart_bitbang_write_char(char c);
/**
* Sample the RX line on a UART configured for bit banging mode.
@@ -107,24 +97,19 @@ void uart_bitbang_write_char(int uart, char c);
* receive a character. Incoming data with framing errors or parity errors will
* be discarded.
*
- * @param uart: Index of UART to use.
* @returns EC_SUCCESS if a character was successfully received, EC_ERROR_CRC if
* there was a framing or parity issue.
*/
-int uart_bitbang_receive_char(int uart);
+int uart_bitbang_receive_char(void);
/**
* Returns 1 if there are characters available for consumption, otherwise 0.
- *
- * @param uart: Index of UART to check.
*/
-int uart_bitbang_is_char_available(int uart);
+int uart_bitbang_is_char_available(void);
/**
* Retrieve a character from the bit bang RX buffer.
- *
- * @param uart: Index of UART to use.
*/
-int uart_bitbang_read_char(int uart);
+int uart_bitbang_read_char(void);
#endif /* __CROS_EC_CHIP_G_UART_BITBANG_H */