Skip to content

features: fix coding style #8591

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Nov 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .astyleignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,22 @@ cmsis
features/cryptocell
features/mbedtls
features/lwipstack/lwip
features/lwipstack/lwip-sys
rtos/TARGET_CORTEX/rtx4
features/storage/filesystem/littlefs/littlefs/
features/storage/filesystem/fat/ChaN
features/storage/FEATURE_STORAGE
features/frameworks
features/FEATURE_BLE/targets
features/FEATURE_BLE
features/unsupported/
features/netsocket/emac-drivers
hal/storage_abstraction
FEATURE_NANOSTACK/coap-service
FEATURE_NANOSTACK/sal-stack-nanostack
TESTS/mbed_hal/trng/pithy
features/nanostack/coap-service
features/nanostack/sal-stack-nanostack
rtos/TARGET_CORTEX/rtx5
TESTS/mbed_hal/trng/pithy
targets
components/802.15.4_RF
components/wifi
tools
5 changes: 3 additions & 2 deletions TESTS/mbed_hal/minimum_requirements/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static void minimum_data_test()
}


utest::v1::status_t greentea_test_setup(const size_t number_of_cases)
utest::v1::status_t greentea_test_setup(const size_t number_of_cases)
{
GREENTEA_SETUP(30, "default_auto");
return greentea_test_setup_handler(number_of_cases);
Expand All @@ -66,6 +66,7 @@ Case cases[] = {

Specification specification(greentea_test_setup, cases, greentea_test_teardown_handler);

int main() {
int main()
{
Harness::run(specification);
}
4 changes: 2 additions & 2 deletions TESTS/network/wifi/wifi_connect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void wifi_connect(void)
{
WiFiInterface *wifi = get_interface();

char ssid[SSID_MAX_LEN+1] = MBED_CONF_APP_WIFI_UNSECURE_SSID;
char ssid[SSID_MAX_LEN + 1] = MBED_CONF_APP_WIFI_UNSECURE_SSID;

TEST_ASSERT_EQUAL_INT(NSAPI_ERROR_OK, wifi->set_credentials(ssid, NULL));
TEST_ASSERT_EQUAL_INT(NSAPI_ERROR_OK, wifi->connect());
Expand All @@ -42,7 +42,7 @@ void wifi_connect(void)
TEST_ASSERT_EQUAL_INT(NSAPI_ERROR_OK, wifi->disconnect());

// Driver is expected to cache the credentials
memset(ssid, 0, SSID_MAX_LEN+1);
memset(ssid, 0, SSID_MAX_LEN + 1);

TEST_ASSERT_EQUAL_INT(NSAPI_ERROR_OK, wifi->connect());
TEST_ASSERT_EQUAL_INT(NSAPI_ERROR_OK, wifi->disconnect());
Expand Down
8 changes: 4 additions & 4 deletions TEST_APPS/device/socket_app/cmd_socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class SInfo {
{
assert(sock);
}
SInfo(Socket* sock, bool delete_on_exit=true):
SInfo(Socket *sock, bool delete_on_exit = true):
_id(id_count++),
_sock(sock),
_type(SInfo::OTHER),
Expand Down Expand Up @@ -1162,11 +1162,11 @@ static int cmd_socket(int argc, char *argv[])
cmd_printf("Invalid socket id\r\n");
return CMDLINE_RETCODE_FAIL;
}
TCPSocket *new_sock = static_cast<TCPSocket*>(&new_info->socket());
nsapi_error_t ret = static_cast<TCPServer&>(info->socket()).accept(new_sock, &addr);
TCPSocket *new_sock = static_cast<TCPSocket *>(&new_info->socket());
nsapi_error_t ret = static_cast<TCPServer &>(info->socket()).accept(new_sock, &addr);
if (ret == NSAPI_ERROR_OK) {
cmd_printf("TCPServer::accept() new socket sid: %d connection from %s port %d\r\n",
new_info->id(), addr.get_ip_address(), addr.get_port());
new_info->id(), addr.get_ip_address(), addr.get_port());
}
return handle_nsapi_error("TCPServer::accept()", ret);
}
Expand Down
46 changes: 23 additions & 23 deletions UNITTESTS/features/lorawan/loraphy/Test_LoRaPHY.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class my_LoRaPHY : public LoRaPHY {
phy_params.adr_ack_delay = 1;
}

virtual ~my_LoRaPHY()
virtual ~my_LoRaPHY()
{
}

Expand All @@ -40,19 +40,19 @@ class my_LoRaPHY : public LoRaPHY {
class my_radio : public LoRaRadio {
public:

virtual void init_radio(radio_events_t *events)
virtual void init_radio(radio_events_t *events)
{
};

virtual void radio_reset()
virtual void radio_reset()
{
};

virtual void sleep(void)
virtual void sleep(void)
{
};

virtual void standby(void)
virtual void standby(void)
{
};

Expand All @@ -62,31 +62,31 @@ class my_radio : public LoRaRadio {
uint16_t symb_timeout, bool fix_len,
uint8_t payload_len,
bool crc_on, bool freq_hop_on, uint8_t hop_period,
bool iq_inverted, bool rx_continuous)
bool iq_inverted, bool rx_continuous)
{
};

virtual void set_tx_config(radio_modems_t modem, int8_t power, uint32_t fdev,
uint32_t bandwidth, uint32_t datarate,
uint8_t coderate, uint16_t preamble_len,
bool fix_len, bool crc_on, bool freq_hop_on,
uint8_t hop_period, bool iq_inverted, uint32_t timeout)
uint8_t hop_period, bool iq_inverted, uint32_t timeout)
{
};

virtual void send(uint8_t *buffer, uint8_t size)
virtual void send(uint8_t *buffer, uint8_t size)
{
};

virtual void receive(void)
virtual void receive(void)
{
};

virtual void set_channel(uint32_t freq)
virtual void set_channel(uint32_t freq)
{
};

virtual uint32_t random(void)
virtual uint32_t random(void)
{
};

Expand All @@ -95,15 +95,15 @@ class my_radio : public LoRaRadio {
return uint8_value;
};

virtual void set_max_payload_length(radio_modems_t modem, uint8_t max)
virtual void set_max_payload_length(radio_modems_t modem, uint8_t max)
{
};

virtual void set_public_network(bool enable)
virtual void set_public_network(bool enable)
{
};

virtual uint32_t time_on_air(radio_modems_t modem, uint8_t pkt_len)
virtual uint32_t time_on_air(radio_modems_t modem, uint8_t pkt_len)
{
};

Expand All @@ -115,7 +115,7 @@ class my_radio : public LoRaRadio {
return bool_value;
};

virtual void start_cad(void)
virtual void start_cad(void)
{
};

Expand All @@ -124,15 +124,15 @@ class my_radio : public LoRaRadio {
return bool_value;
};

virtual void set_tx_continuous_wave(uint32_t freq, int8_t power, uint16_t time)
virtual void set_tx_continuous_wave(uint32_t freq, int8_t power, uint16_t time)
{
};

virtual void lock(void)
virtual void lock(void)
{
};

virtual void unlock(void)
virtual void unlock(void)
{
};

Expand Down Expand Up @@ -422,10 +422,10 @@ TEST_F(Test_LoRaPHY, compute_rx_win_params)
list[0] = 125000;
object->get_phy_params().bandwidths.table = list;
uint8_t list2[1];
list2[0]= 12;
list2[0] = 12;
object->get_phy_params().datarates.table = &list2;
channel_params_t ch_lst[16];
memset(ch_lst, 0, sizeof(channel_params_t)*16);
memset(ch_lst, 0, sizeof(channel_params_t) * 16);
ch_lst[0].band = 0;
ch_lst[0].dr_range.fields.min = DR_0;
ch_lst[0].dr_range.fields.max = DR_5;
Expand Down Expand Up @@ -513,7 +513,7 @@ TEST_F(Test_LoRaPHY, link_ADR_request)

object->get_phy_params().max_channel_cnt = 16;
channel_params_t li[16];
memset(li, 0, sizeof(channel_params_t)*16);
memset(li, 0, sizeof(channel_params_t) * 16);
object->get_phy_params().channels.channel_list = li;
li[0].frequency = 0;
li[1].frequency = 5;
Expand Down Expand Up @@ -673,7 +673,7 @@ TEST_F(Test_LoRaPHY, set_next_channel)
ch = 5;
t1 = 16;
t2 = 32;
memset(b, 0, sizeof(band_t)*4);
memset(b, 0, sizeof(band_t) * 4);
object->get_phy_params().bands.size = 2;
object->get_phy_params().bands.table = &b;
b[0].off_time = 0;
Expand Down Expand Up @@ -767,7 +767,7 @@ TEST_F(Test_LoRaPHY, set_tx_cont_mode)

cw_mode_params_t p;
p.max_eirp = 0;
p.channel=0;
p.channel = 0;
p.tx_power = -1;
p.datarate = 0;
p.antenna_gain = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ class my_radio : public LoRaRadio {
uint8_t payload_len,
bool crc_on, bool freq_hop_on, uint8_t hop_period,
bool iq_inverted, bool rx_continuous)
{
{

};
};

virtual void set_tx_config(radio_modems_t modem, int8_t power, uint32_t fdev,
uint32_t bandwidth, uint32_t datarate,
Expand Down
Loading