Skip to content

Commit 9f116d9

Browse files
committed
Applied more astyle fixes
1 parent 005df35 commit 9f116d9

File tree

10 files changed

+206
-150
lines changed

10 files changed

+206
-150
lines changed

TESTS/usb_device/basic/main.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void control_basic_test()
113113

114114
{
115115
USBTester serial(get_phy(), vendor_id, product_id, product_release);
116-
sprintf (str, "%s %d %d", serial.get_serial_desc_string(), vendor_id, product_id);
116+
sprintf(str, "%s %d %d", serial.get_serial_desc_string(), vendor_id, product_id);
117117
greentea_send_kv("control_basic_test", str);
118118
// Wait for host before terminating
119119
greentea_parse_kv(_key, _value, sizeof(_key), sizeof(_value));
@@ -447,30 +447,30 @@ void device_reset_test()
447447
USBTester serial(get_phy(), vendor_id, product_id, product_release);
448448
serial.clear_reset_count();
449449
greentea_send_kv("device_reset_test", serial.get_serial_desc_string());
450-
while(serial.get_reset_count() == 0);
450+
while (serial.get_reset_count() == 0);
451451
// Wait for host before terminating
452452
greentea_parse_kv(_key, _value, sizeof(_key), sizeof(_value));
453453
TEST_ASSERT_EQUAL_STRING("pass", _key);
454454

455-
while(!serial.configured());
455+
while (!serial.configured());
456456

457457
serial.clear_reset_count();
458458
greentea_send_kv("device_reset_test", serial.get_serial_desc_string());
459-
while(serial.get_reset_count() == 0);
459+
while (serial.get_reset_count() == 0);
460460
// Wait for host before terminating
461461
greentea_parse_kv(_key, _value, sizeof(_key), sizeof(_value));
462462
TEST_ASSERT_EQUAL_STRING("pass", _key);
463463

464-
while(!serial.configured());
464+
while (!serial.configured());
465465

466466
serial.clear_reset_count();
467467
greentea_send_kv("device_reset_test", serial.get_serial_desc_string());
468-
while(serial.get_reset_count() == 0);
468+
while (serial.get_reset_count() == 0);
469469
// Wait for host before terminating
470470
greentea_parse_kv(_key, _value, sizeof(_key), sizeof(_value));
471471
TEST_ASSERT_EQUAL_STRING("pass", _key);
472472

473-
while(!serial.configured());
473+
while (!serial.configured());
474474

475475
greentea_send_kv("device_reset_test", serial.get_serial_desc_string());
476476
// Wait for host before terminating
@@ -504,7 +504,7 @@ void device_soft_reconnection_test()
504504
greentea_parse_kv(_key, _value, sizeof(_key), sizeof(_value));
505505
TEST_ASSERT_EQUAL_STRING("pass", _key);
506506

507-
for(int i = 0; i < reconnect_try_count; i++) {
507+
for (int i = 0; i < reconnect_try_count; i++) {
508508
serial.disconnect();
509509
wait_us(MIN_DISCONNECT_TIME_US);
510510
serial.connect();

usb/device/USBPhy/USBPhy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ class USBPhy {
178178
* can be used, the functionality of those endpoints and the
179179
* resource cost.
180180
*/
181-
virtual const usb_ep_table_t* endpoint_table() = 0;
181+
virtual const usb_ep_table_t *endpoint_table() = 0;
182182

183183
/**
184184
* Set wMaxPacketSize of endpoint 0

usb/device/USBPhy/USBPhyTypes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ enum {
3434
USB_EP_ATTR_ALLOW_INT = 1 << USB_EP_TYPE_INT,
3535
USB_EP_ATTR_ALLOW_ISO = 1 << USB_EP_TYPE_ISO,
3636
USB_EP_ATTR_ALLOW_ALL = USB_EP_ATTR_ALLOW_CTRL | USB_EP_ATTR_ALLOW_BULK |
37-
USB_EP_ATTR_ALLOW_INT | USB_EP_ATTR_ALLOW_ISO,
37+
USB_EP_ATTR_ALLOW_INT | USB_EP_ATTR_ALLOW_ISO,
3838

3939
USB_EP_ATTR_DIR_IN = 0 << 4,
4040
USB_EP_ATTR_DIR_OUT = 1 << 4,

usb/device/USBSerial/USBCDC.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class USBCDC: public USBDevice {
4141
* @param product_id Your product_id
4242
* @param product_release Your product_release
4343
*/
44-
USBCDC(bool connect_blocking=true, uint16_t vendor_id=0x1f00, uint16_t product_id=0x2012, uint16_t product_release=0x0001);
44+
USBCDC(bool connect_blocking = true, uint16_t vendor_id = 0x1f00, uint16_t product_id = 0x2012, uint16_t product_release = 0x0001);
4545

4646
/**
4747
* Fully featured constructor
@@ -114,7 +114,7 @@ class USBCDC: public USBDevice {
114114
* or NULL to read the full size
115115
* @returns true if successful false if interrupted due to a state change
116116
*/
117-
bool receive(uint8_t *buffer, uint32_t size, uint32_t *actual=NULL);
117+
bool receive(uint8_t *buffer, uint32_t size, uint32_t *actual = NULL);
118118

119119
/**
120120
* Read from the receive buffer

usb/device/USBSerial/USBSerial.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121

2222
USBSerial::USBSerial(bool connect_blocking, uint16_t vendor_id, uint16_t product_id, uint16_t product_release):
23-
USBCDC(get_usb_phy(), vendor_id, product_id, product_release)
23+
USBCDC(get_usb_phy(), vendor_id, product_id, product_release)
2424
{
2525
_settings_changed_callback = 0;
2626

@@ -33,7 +33,7 @@ USBSerial::USBSerial(bool connect_blocking, uint16_t vendor_id, uint16_t product
3333
}
3434

3535
USBSerial::USBSerial(USBPhy *phy, uint16_t vendor_id, uint16_t product_id, uint16_t product_release):
36-
USBCDC(phy, vendor_id, product_id, product_release)
36+
USBCDC(phy, vendor_id, product_id, product_release)
3737
{
3838
_settings_changed_callback = 0;
3939
}

usb/device/utilities/AsyncOp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class AsyncOp: public LinkEntry {
5252
*
5353
* @note - the host object's lock MUST NOT be held when this call is made
5454
*/
55-
void wait(rtos::Mutex *host_mutex, uint32_t milliseconds=osWaitForever);
55+
void wait(rtos::Mutex *host_mutex, uint32_t milliseconds = osWaitForever);
5656

5757
/**
5858
* Abort this asynchronous operation

usb/device/utilities/ByteBuffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class ByteBuffer {
2727
*
2828
* @param size Number of bytes this buffer can hold
2929
*/
30-
ByteBuffer(uint32_t size=0);
30+
ByteBuffer(uint32_t size = 0);
3131

3232
/**
3333
* Delete this byte buffer

usb/device/utilities/events/PolledQueue.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ void PolledQueue::dispatch()
4242
break;
4343
}
4444
MBED_ASSERT(sizeof(buf) >= task_size(task));
45-
TaskBase::run_callback_t callback = task_start(task, (uint8_t*)buf, sizeof(buf));
45+
TaskBase::run_callback_t callback = task_start(task, (uint8_t *)buf, sizeof(buf));
4646

4747
// Run the callback outside the critical section
4848
core_util_critical_section_exit();
49-
callback((uint8_t*)buf);
49+
callback((uint8_t *)buf);
5050
core_util_critical_section_enter();
5151

5252
// Finish

usb/device/utilities/events/PolledQueue.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class PolledQueue: public TaskQueue {
3939
*
4040
* @param cb Callback called when dispatch needs to be called
4141
*/
42-
PolledQueue(mbed::Callback<void()> cb=NULL);
42+
PolledQueue(mbed::Callback<void()> cb = NULL);
4343

4444
virtual ~PolledQueue();
4545

0 commit comments

Comments
 (0)