diff options
| author | Bernard Xiong <[email protected]> | 2021-05-28 16:20:08 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-05-28 16:20:08 +0800 |
| commit | 92beddf3bccf6346e26aa097f82464456fb8e6bd (patch) | |
| tree | 197e4a108118dda016ea02274172f0c40e7ee8ed /bsp/w60x/oneshot/oneshot.c | |
| parent | b18a99b44240ec3152011e159cc24a5af8dff0ce (diff) | |
| parent | 03f4d40e30f3c94e1db0b3a65b3610dee695694a (diff) | |
Merge pull request #4737 from mysterywolf/3,1,xformatv3.1.5
[lts 3.1.x] format codes
Diffstat (limited to 'bsp/w60x/oneshot/oneshot.c')
| -rw-r--r-- | bsp/w60x/oneshot/oneshot.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/bsp/w60x/oneshot/oneshot.c b/bsp/w60x/oneshot/oneshot.c index ee60a0b907..21beeeb90d 100644 --- a/bsp/w60x/oneshot/oneshot.c +++ b/bsp/w60x/oneshot/oneshot.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * @@ -16,37 +16,37 @@ /* start oneshot */ int wm_oneshot_start(WM_ONESHOT_MODE mode, wm_oneshot_callback callback) { - tls_wifi_oneshot_callback_register(callback); - if(mode == WM_UDP) - { - tls_wifi_set_oneshot_config_mode(0); - } + tls_wifi_oneshot_callback_register(callback); + if(mode == WM_UDP) + { + tls_wifi_set_oneshot_config_mode(0); + } else if (mode == WM_APSOCKET) { tls_wifi_set_oneshot_config_mode(1); - } - else if(mode == WM_APWEB) - { - tls_wifi_set_oneshot_config_mode(2); - } - else - { - return -1; - } - tls_wifi_set_oneshot_flag(1); - return 0; + } + else if(mode == WM_APWEB) + { + tls_wifi_set_oneshot_config_mode(2); + } + else + { + return -1; + } + tls_wifi_set_oneshot_flag(1); + return 0; } /* stop oneshot */ int wm_oneshot_stop(void) { - tls_wifi_oneshot_callback_delete(); - tls_wifi_set_oneshot_flag(0); - return 0; + tls_wifi_oneshot_callback_delete(); + tls_wifi_set_oneshot_flag(0); + return 0; } /* get status */ int wm_oneshot_get(void) { - return tls_wifi_get_oneshot_flag(); + return tls_wifi_get_oneshot_flag(); } |
