Skip to content

Commit f90f1fc

Browse files
committed
sleep test: fix coding style
1 parent 8fd6bec commit f90f1fc

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

TESTS/mbed_hal/sleep/sleep_test_utils.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@
4646

4747
unsigned int ticks_to_us(unsigned int ticks, unsigned int freq)
4848
{
49-
return (unsigned int) ((unsigned long long) ticks * US_PER_S / freq);
49+
return (unsigned int)((unsigned long long) ticks * US_PER_S / freq);
5050
}
5151

5252
unsigned int us_to_ticks(unsigned int us, unsigned int freq)
5353
{
54-
return (unsigned int) ((unsigned long long) us * freq / US_PER_S);
54+
return (unsigned int)((unsigned long long) us * freq / US_PER_S);
5555
}
5656

5757
unsigned int overflow_protect(unsigned int timestamp, unsigned int ticker_width)
@@ -87,7 +87,7 @@ void busy_wait_ms(int ms)
8787
{
8888
const ticker_info_t *info = us_ticker_get_info();
8989
uint32_t mask = (1 << info->bits) - 1;
90-
int delay = (int) ((uint64_t) ms * info->frequency / 1000);
90+
int delay = (int)((uint64_t) ms * info->frequency / 1000);
9191

9292
uint32_t prev = us_ticker_read();
9393
while (delay > 0) {
@@ -97,13 +97,13 @@ void busy_wait_ms(int ms)
9797
}
9898
}
9999

100-
void us_ticker_isr(const ticker_data_t * const ticker_data)
100+
void us_ticker_isr(const ticker_data_t *const ticker_data)
101101
{
102102
us_ticker_clear_interrupt();
103103
}
104104

105105
#ifdef DEVICE_LPTICKER
106-
void lp_ticker_isr(const ticker_data_t * const ticker_data)
106+
void lp_ticker_isr(const ticker_data_t *const ticker_data)
107107
{
108108
lp_ticker_clear_interrupt();
109109
}

TESTS/mbed_hal/sleep_manager/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ void test_lock_gt_ushrt_max()
110110

111111
#if DEVICE_LPTICKER
112112
#if DEVICE_USTICKER
113-
utest::v1::status_t testcase_setup(const Case * const source, const size_t index_of_case)
113+
utest::v1::status_t testcase_setup(const Case *const source, const size_t index_of_case)
114114
{
115115
// Suspend the RTOS kernel scheduler to prevent interference with duration of sleep.
116116
osKernelSuspend();
@@ -130,8 +130,8 @@ utest::v1::status_t testcase_setup(const Case * const source, const size_t index
130130
return utest::v1::greentea_case_setup_handler(source, index_of_case);
131131
}
132132

133-
utest::v1::status_t testcase_teardown(const Case * const source, const size_t passed, const size_t failed,
134-
const utest::v1::failure_t failure)
133+
utest::v1::status_t testcase_teardown(const Case *const source, const size_t passed, const size_t failed,
134+
const utest::v1::failure_t failure)
135135
{
136136
ticker_resume(get_us_ticker_data());
137137
#if DEVICE_LPTICKER

0 commit comments

Comments
 (0)