Skip to content

Commit ef9dbc5

Browse files
committed
astyle update to new files
1 parent a1cb121 commit ef9dbc5

File tree

7 files changed

+39
-40
lines changed

7 files changed

+39
-40
lines changed

TESTS/mbedmicro-rtos-mbed/systimer/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class SysTimerTest: public rtos::internal::SysTimer {
5050

5151
public:
5252
SysTimerTest() :
53-
SysTimer(), _sem(0, 1)
53+
SysTimer(), _sem(0, 1)
5454
{
5555
}
5656

drivers/MbedCRC.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,46 +26,46 @@ namespace mbed {
2626
*/
2727
template <uint32_t polynomial, uint8_t width>
2828
MbedCRC<polynomial, width>::MbedCRC(uint32_t initial_xor, uint32_t final_xor, bool reflect_data, bool reflect_remainder):
29-
_initial_value(initial_xor), _final_xor(final_xor), _reflect_data(reflect_data), _reflect_remainder(reflect_remainder), _crc_table(NULL)
29+
_initial_value(initial_xor), _final_xor(final_xor), _reflect_data(reflect_data), _reflect_remainder(reflect_remainder), _crc_table(NULL)
3030
{
3131
mbed_crc_ctor();
3232
}
3333

3434
template<>
3535
MbedCRC<POLY_32BIT_ANSI, 32>::MbedCRC(uint32_t initial_xor, uint32_t final_xor, bool reflect_data, bool reflect_remainder):
36-
_initial_value(initial_xor), _final_xor(final_xor), _reflect_data(reflect_data), _reflect_remainder(reflect_remainder),
37-
_crc_table((uint32_t *)Table_CRC_32bit_ANSI)
36+
_initial_value(initial_xor), _final_xor(final_xor), _reflect_data(reflect_data), _reflect_remainder(reflect_remainder),
37+
_crc_table((uint32_t *)Table_CRC_32bit_ANSI)
3838
{
3939
mbed_crc_ctor();
4040
}
4141

4242
template<>
4343
MbedCRC<POLY_8BIT_CCITT, 8>::MbedCRC(uint32_t initial_xor, uint32_t final_xor, bool reflect_data, bool reflect_remainder):
44-
_initial_value(initial_xor), _final_xor(final_xor), _reflect_data(reflect_data), _reflect_remainder(reflect_remainder),
45-
_crc_table((uint32_t *)Table_CRC_8bit_CCITT)
44+
_initial_value(initial_xor), _final_xor(final_xor), _reflect_data(reflect_data), _reflect_remainder(reflect_remainder),
45+
_crc_table((uint32_t *)Table_CRC_8bit_CCITT)
4646
{
4747
mbed_crc_ctor();
4848
}
4949

5050
template<>
5151
MbedCRC<POLY_7BIT_SD, 7>::MbedCRC(uint32_t initial_xor, uint32_t final_xor, bool reflect_data, bool reflect_remainder):
52-
_initial_value(initial_xor), _final_xor(final_xor), _reflect_data(reflect_data), _reflect_remainder(reflect_remainder),
53-
_crc_table((uint32_t *)Table_CRC_7Bit_SD)
52+
_initial_value(initial_xor), _final_xor(final_xor), _reflect_data(reflect_data), _reflect_remainder(reflect_remainder),
53+
_crc_table((uint32_t *)Table_CRC_7Bit_SD)
5454
{
5555
mbed_crc_ctor();
5656
}
5757

5858
template<>
5959
MbedCRC<POLY_16BIT_CCITT, 16>::MbedCRC(uint32_t initial_xor, uint32_t final_xor, bool reflect_data, bool reflect_remainder):
60-
_initial_value(initial_xor), _final_xor(final_xor), _reflect_data(reflect_data), _reflect_remainder(reflect_remainder),
61-
_crc_table((uint32_t *)Table_CRC_16bit_CCITT)
60+
_initial_value(initial_xor), _final_xor(final_xor), _reflect_data(reflect_data), _reflect_remainder(reflect_remainder),
61+
_crc_table((uint32_t *)Table_CRC_16bit_CCITT)
6262
{
6363
}
6464

6565
template<>
6666
MbedCRC<POLY_16BIT_IBM, 16>::MbedCRC(uint32_t initial_xor, uint32_t final_xor, bool reflect_data, bool reflect_remainder):
67-
_initial_value(initial_xor), _final_xor(final_xor), _reflect_data(reflect_data), _reflect_remainder(reflect_remainder),
68-
_crc_table((uint32_t *)Table_CRC_16bit_IBM)
67+
_initial_value(initial_xor), _final_xor(final_xor), _reflect_data(reflect_data), _reflect_remainder(reflect_remainder),
68+
_crc_table((uint32_t *)Table_CRC_16bit_IBM)
6969
{
7070
mbed_crc_ctor();
7171
}

drivers/MbedCRC.h

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,8 @@ typedef enum crc_polynomial {
103103
* @ingroup drivers
104104
*/
105105

106-
template <uint32_t polynomial=POLY_32BIT_ANSI, uint8_t width=32>
107-
class MbedCRC
108-
{
106+
template <uint32_t polynomial = POLY_32BIT_ANSI, uint8_t width = 32>
107+
class MbedCRC {
109108
public:
110109
typedef uint64_t crc_data_size_t;
111110

@@ -115,7 +114,7 @@ class MbedCRC
115114
* @param final_xor Final Xor value
116115
* @param reflect_data
117116
* @param reflect_remainder
118-
* @note Default constructor without any arguments is valid only for supported CRC polynomials. :: crc_polynomial_t
117+
* @note Default constructor without any arguments is valid only for supported CRC polynomials. :: crc_polynomial_t
119118
* MbedCRC <POLY_7BIT_SD, 7> ct; --- Valid POLY_7BIT_SD
120119
* MbedCRC <0x1021, 16> ct; --- Valid POLY_16BIT_CCITT
121120
* MbedCRC <POLY_16BIT_CCITT, 32> ct; --- Invalid, compilation error
@@ -301,7 +300,7 @@ class MbedCRC
301300
*/
302301
uint32_t reflect_bytes(uint32_t data) const
303302
{
304-
if(_reflect_data) {
303+
if (_reflect_data) {
305304
uint32_t reflection = 0x0;
306305

307306
for (uint8_t bit = 0; bit < 8; ++bit) {
@@ -337,7 +336,7 @@ class MbedCRC
337336
data_byte = reflect_bytes(data[byte]);
338337
for (uint8_t bit = 8; bit > 0; --bit) {
339338
p_crc <<= 1;
340-
if (( data_byte ^ p_crc) & get_top_bit()) {
339+
if ((data_byte ^ p_crc) & get_top_bit()) {
341340
p_crc ^= polynomial;
342341
}
343342
data_byte <<= 1;
@@ -361,13 +360,13 @@ class MbedCRC
361360
return 0;
362361
}
363362

364-
/** CRC computation using ROM tables
365-
*
366-
* @param buffer data buffer
367-
* @param size size of the data
368-
* @param crc CRC value is filled in, but the value is not the final
369-
* @return 0 on success or a negative error code on failure
370-
*/
363+
/** CRC computation using ROM tables
364+
*
365+
* @param buffer data buffer
366+
* @param size size of the data
367+
* @param crc CRC value is filled in, but the value is not the final
368+
* @return 0 on success or a negative error code on failure
369+
*/
371370
int32_t table_compute_partial(const void *buffer, crc_data_size_t size, uint32_t *crc) const
372371
{
373372
MBED_ASSERT(crc != NULL);

features/cellular/TESTS/cellular/cellular_all/network.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ static bool wait_register()
7171

7272
void test_attach()
7373
{
74-
cellularDevice.set_timeout(120*1000); // 120 second timeout for at commands after power is up. It might take time to register, attach and connect
74+
cellularDevice.set_timeout(120 * 1000); // 120 second timeout for at commands after power is up. It might take time to register, attach and connect
7575
tr_info("Register to network.");
7676
TEST_ASSERT(wait_register());
7777
tr_info("Attach to network.");

features/netsocket/cellular/generic_modem_driver/PPPCellularInterface.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ nsapi_error_t PPPCellularInterface::setup_context_and_credentials()
502502
}
503503

504504
void PPPCellularInterface::set_credentials(const char *apn, const char *uname,
505-
const char *pwd)
505+
const char *pwd)
506506
{
507507
_apn = apn;
508508
_uname = uname;
@@ -573,7 +573,7 @@ nsapi_error_t PPPCellularInterface::connect()
573573
user_specified_apn = true;
574574
#endif
575575
}
576-
576+
577577
if (is_connected()) {
578578
return NSAPI_ERROR_IS_CONNECTED;
579579
} else if (_connect_status == NSAPI_STATUS_CONNECTING) {
@@ -681,7 +681,7 @@ nsapi_error_t PPPCellularInterface::connect()
681681
}
682682

683683
tr_info("The APN being used is %s.\n", _apn);
684-
684+
685685
/* Attempt to enter data mode */
686686
success = set_atd(_at); //enter into Data mode with the modem
687687
if (!success) {

hal/mbed_sleep_manager.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ typedef struct sleep_statistic {
4242

4343
static sleep_statistic_t sleep_stats[STATISTIC_COUNT];
4444

45-
static const char* strip_path(const char* const filename)
45+
static const char *strip_path(const char *const filename)
4646
{
4747
char *output = strrchr(filename, '/');
4848

@@ -59,7 +59,7 @@ static const char* strip_path(const char* const filename)
5959
return filename;
6060
}
6161

62-
static sleep_statistic_t* sleep_tracker_find(const char *const filename)
62+
static sleep_statistic_t *sleep_tracker_find(const char *const filename)
6363
{
6464
char temp[IDENTIFIER_WIDTH];
6565
strncpy(temp, filename, IDENTIFIER_WIDTH);
@@ -75,7 +75,7 @@ static sleep_statistic_t* sleep_tracker_find(const char *const filename)
7575
return NULL;
7676
}
7777

78-
static sleep_statistic_t* sleep_tracker_add(const char* const filename)
78+
static sleep_statistic_t *sleep_tracker_add(const char *const filename)
7979
{
8080
char temp[IDENTIFIER_WIDTH];
8181
strncpy(temp, filename, IDENTIFIER_WIDTH);
@@ -109,15 +109,15 @@ static void sleep_tracker_print_stats(void)
109109
}
110110

111111
debug("[id: %s, count: %u]\r\n", sleep_stats[i].identifier,
112-
sleep_stats[i].count);
112+
sleep_stats[i].count);
113113
}
114114
}
115115

116-
void sleep_tracker_lock(const char* const filename, int line)
116+
void sleep_tracker_lock(const char *const filename, int line)
117117
{
118-
const char* const stripped_path = strip_path(filename);
118+
const char *const stripped_path = strip_path(filename);
119119

120-
sleep_statistic_t* stat = sleep_tracker_find(stripped_path);
120+
sleep_statistic_t *stat = sleep_tracker_find(stripped_path);
121121

122122
// Entry for this driver does not exist, create one.
123123
if (stat == NULL) {
@@ -129,10 +129,10 @@ void sleep_tracker_lock(const char* const filename, int line)
129129
debug("LOCK: %s, ln: %i, lock count: %u\r\n", stripped_path, line, deep_sleep_lock);
130130
}
131131

132-
void sleep_tracker_unlock(const char* const filename, int line)
132+
void sleep_tracker_unlock(const char *const filename, int line)
133133
{
134-
const char* const stripped_path = strip_path(filename);
135-
sleep_statistic_t* stat = sleep_tracker_find(stripped_path);
134+
const char *const stripped_path = strip_path(filename);
135+
sleep_statistic_t *stat = sleep_tracker_find(stripped_path);
136136

137137
// Entry for this driver does not exist, something went wrong.
138138
if (stat == NULL) {

platform/mbed_interface.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ int mbed_interface_powerdown(void)
7979
}
8080

8181
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This function shouldn't be used in new code."
82-
"For system reset funcionality use system_reset()")
82+
"For system reset funcionality use system_reset()")
8383
void mbed_reset(void)
8484
{
8585
mbed_interface_reset();

0 commit comments

Comments
 (0)