Skip to content

Commit

Permalink
Remove trailing whitespace in arduino code
Browse files Browse the repository at this point in the history
  • Loading branch information
abrauchli committed Sep 28, 2018
1 parent f484a6d commit 19f420b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ extern "C" {
* Source:
* https://learn.adafruit.com/using-atsamd21-sercom-to-add-more-spi-i2c-serial-ports/creating-a-new-serial
*/
Uart Serial2 (&sercom1, PIN_UART_RX, PIN_UART_TX, SERCOM_RX_PAD_0,
Uart Serial2 (&sercom1, PIN_UART_RX, PIN_UART_TX, SERCOM_RX_PAD_0,
UART_TX_PAD_2);

void SERCOM1_Handler() {
Expand All @@ -65,7 +65,7 @@ s16 sensirion_uart_open() {
Serial2.begin(BAUDRATE);
pinPeripheral(PIN_UART_TX, PIO_SERCOM);
pinPeripheral(PIN_UART_RX, PIO_SERCOM);

while (!Serial) {
delay(100);
}
Expand All @@ -86,7 +86,7 @@ s16 sensirion_uart_close() {
* sensirion_uart_tx() - transmit data over UART
*
* @data_len: number of bytes to send
* @data: data to sendv v
* @data: data to sendv v
* Return: Number of bytes sent or a negative error code
*/
s16 sensirion_uart_tx(u16 data_len, const u8 *data) {
Expand All @@ -102,7 +102,7 @@ s16 sensirion_uart_tx(u16 data_len, const u8 *data) {
*/
s16 sensirion_uart_rx(u16 max_data_len, u8 *data) {
s16 i = 0;

while (Serial2.available() > 0 && i < max_data_len) {
data[i] = (u8)Serial2.read();
i++;
Expand All @@ -126,4 +126,3 @@ void sensirion_sleep_usec(u32 useconds) {
#ifdef __cplusplus
} // extern "C"
#endif

Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ void setup() {
while (!Serial) {
delay(100);
}

// use built-in LED to show errors
sensirion_uart_open();
sensirion_uart_open();
}

void loop() {
Expand Down

0 comments on commit 19f420b

Please sign in to comment.