Tidy up long lines.

This commit is contained in:
Daniel Beer 2011-07-18 15:00:17 +12:00
parent 3feecd30b6
commit 75f893ef47
5 changed files with 19 additions and 14 deletions

View File

@ -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;
}

View File

@ -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;

View File

@ -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 */

View File

@ -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;

3
util.c
View File

@ -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;