From 75f893ef47f05eec91710c55a364b3f37c1a8dad Mon Sep 17 00:00:00 2001 From: Daniel Beer Date: Mon, 18 Jul 2011 15:00:17 +1200 Subject: [PATCH] Tidy up long lines. --- flash_bsl.c | 9 ++++++--- simio_hwmult.c | 16 ++++++++-------- simio_timer.c | 2 +- usbutil.c | 3 ++- util.c | 3 ++- 5 files changed, 19 insertions(+), 14 deletions(-) diff --git a/flash_bsl.c b/flash_bsl.c index dc5af7f..c8e94d7 100644 --- a/flash_bsl.c +++ b/flash_bsl.c @@ -98,7 +98,8 @@ static void crc_selftest(void) { #define TX_BSL_VERSION 0x19 #define TX_BUFFER_SIZE 0x1a -static int flash_bsl_send(struct flash_bsl_device *dev, const uint8_t *data, int len) +static int flash_bsl_send(struct flash_bsl_device *dev, + const uint8_t *data, int len) { uint16_t crc; uint8_t cmd_buf[MAX_PACKET + 5]; @@ -413,7 +414,8 @@ static int flash_bsl_unlock(struct flash_bsl_device *dev) #endif } - if (flash_bsl_send(dev, rx_password_cmd, dev->long_password ? 33 : 17) < 0) { + if (flash_bsl_send(dev, rx_password_cmd, + dev->long_password ? 33 : 17) < 0) { printc_err("flash_bsl_unlock: send password failed\n"); return -1; } @@ -669,7 +671,8 @@ static device_t flash_bsl_open(const struct device_args *args) } - if (flash_bsl_send(dev, tx_bsl_version_command, sizeof(tx_bsl_version_command)) < 0) { + if (flash_bsl_send(dev, tx_bsl_version_command, + sizeof(tx_bsl_version_command)) < 0) { printc_err("flash_bsl: failed to read BSL version"); goto fail; } diff --git a/simio_hwmult.c b/simio_hwmult.c index 05cd8a9..b1e08fa 100644 --- a/simio_hwmult.c +++ b/simio_hwmult.c @@ -25,14 +25,14 @@ #include "expr.h" /* Multiplier register addresses - taken from mspgcc */ -#define MPY 0x0130 /* Multiply Unsigned/Operand 1 */ -#define MPYS 0x0132 /* Multiply Signed/Operand 1 */ -#define MAC 0x0134 /* Multiply Unsigned and Accumulate/Operand 1 */ -#define MACS 0x0136 /* Multiply Signed and Accumulate/Operand 1 */ -#define OP2 0x0138 /* Operand 2 */ -#define RESLO 0x013A /* Result Low Word */ -#define RESHI 0x013C /* Result High Word */ -#define SUMEXT 0x013E /* Sum Extend */ +#define MPY 0x0130 /* Multiply Unsigned/Operand 1 */ +#define MPYS 0x0132 /* Multiply Signed/Operand 1 */ +#define MAC 0x0134 /* Multiply Unsigned and Accumulate/Operand 1 */ +#define MACS 0x0136 /* Multiply Signed and Accumulate/Operand 1 */ +#define OP2 0x0138 /* Operand 2 */ +#define RESLO 0x013A /* Result Low Word */ +#define RESHI 0x013C /* Result High Word */ +#define SUMEXT 0x013E /* Sum Extend */ struct hwmult { struct simio_device base; diff --git a/simio_timer.c b/simio_timer.c index a3e05b3..6fadad3 100644 --- a/simio_timer.c +++ b/simio_timer.c @@ -25,7 +25,7 @@ #include "output.h" /* TACTL bits (taken from mspgcc headers) */ -#define TASSEL2 0x0400 /* unused */ /* to distinguish from UART SSELx */ +#define TASSEL2 0x0400 /* unused */ #define TASSEL1 0x0200 /* Timer A clock source select 1 */ #define TASSEL0 0x0100 /* Timer A clock source select 0 */ #define ID1 0x0080 /* Timer A clock input divider 1 */ diff --git a/usbutil.c b/usbutil.c index d03d72b..647c540 100644 --- a/usbutil.c +++ b/usbutil.c @@ -88,7 +88,8 @@ void usbutil_list(void) } } -struct usb_device *usbutil_find_by_id(int vendor, int product, const char *requested_serial) +struct usb_device *usbutil_find_by_id(int vendor, int product, + const char *requested_serial) { struct usb_bus *bus; diff --git a/util.c b/util.c index a42123e..b6a256f 100644 --- a/util.c +++ b/util.c @@ -164,7 +164,8 @@ int write_all(int fd, const uint8_t *data, int len) return 0; } -static int open_serial_and_set_cflags(const char *device, int rate, tcflag_t set) +static int open_serial_and_set_cflags(const char *device, + int rate, tcflag_t set) { int fd = open(device, O_RDWR | O_NOCTTY); struct termios attr;