[stm32] format codes

This commit is contained in:
Meco Man 2021-12-29 22:27:06 -05:00
parent 5187d75af5
commit 9c67e061df
31 changed files with 75 additions and 75 deletions

View File

@ -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 * SPDX-License-Identifier: Apache-2.0
* *
@ -7,7 +7,7 @@
* Date Author Notes * Date Author Notes
* 2018-11-06 SummerGift first version * 2018-11-06 SummerGift first version
*/ */
#include "board.h" #include "board.h"
void SystemClock_Config(void) void SystemClock_Config(void)

View File

@ -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 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2006-2018, RT-Thread Development Team * Copyright (c) 2006-2021, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *
* Change Logs: * Change Logs:
* Date Author Notes * Date Author Notes
* 2020-07-13 Dozingfiretruck first version * 2020-07-13 Dozingfiretruck first version
*/ */

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2006-2018, RT-Thread Development Team * Copyright (c) 2006-2021, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *
* Change Logs: * Change Logs:
* Date Author Notes * Date Author Notes
* 2020-07-13 Dozingfiretruck first version * 2020-07-13 Dozingfiretruck first version
*/ */
@ -16,11 +16,11 @@ void SystemClock_Config(void)
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0}; RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
/** Configure the main internal regulator output voltage /** Configure the main internal regulator output voltage
*/ */
__HAL_RCC_PWR_CLK_ENABLE(); __HAL_RCC_PWR_CLK_ENABLE();
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1); __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
/** Initializes the CPU, AHB and APB busses clocks /** Initializes the CPU, AHB and APB busses clocks
*/ */
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSI|RCC_OSCILLATORTYPE_HSE RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSI|RCC_OSCILLATORTYPE_HSE
|RCC_OSCILLATORTYPE_LSE; |RCC_OSCILLATORTYPE_LSE;
@ -37,7 +37,7 @@ void SystemClock_Config(void)
{ {
Error_Handler(); Error_Handler();
} }
/** Initializes the CPU, AHB and APB busses clocks /** Initializes the CPU, AHB and APB busses clocks
*/ */
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2; |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2006-2018, RT-Thread Development Team * Copyright (c) 2006-2021, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *
* Change Logs: * Change Logs:
* Date Author Notes * Date Author Notes
* 2020-07-13 Dozingfiretruck first version * 2020-07-13 Dozingfiretruck first version
*/ */

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2006-2018, RT-Thread Development Team * Copyright (c) 2006-2021, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *
* Change Logs: * Change Logs:
* Date Author Notes * Date Author Notes
* 2020-07-13 Dozingfiretruck first version * 2020-07-13 Dozingfiretruck first version
*/ */

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2006-2018, RT-Thread Development Team * Copyright (c) 2006-2021, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *
* Change Logs: * Change Logs:
* Date Author Notes * Date Author Notes
* 2020-07-13 Dozingfiretruck first version * 2020-07-13 Dozingfiretruck first version
*/ */

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2006-2018, RT-Thread Development Team * Copyright (c) 2006-2021, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *
* Change Logs: * Change Logs:
* Date Author Notes * Date Author Notes
* 2020-07-13 Dozingfiretruck first version * 2020-07-13 Dozingfiretruck first version
*/ */

View File

@ -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 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -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 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -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 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2006-2020, RT-Thread Development Team * Copyright (c) 2006-2021, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *
@ -534,4 +534,4 @@ void sdcard_change(void)
mmcsd_change(host1); mmcsd_change(host1);
} }
#endif /* RT_USING_SDIO */ #endif /* RT_USING_SDIO */

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2006-2020, RT-Thread Development Team * Copyright (c) 2006-2021, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -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 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -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 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -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 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -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 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -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 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -260,4 +260,4 @@ void wlan_autoconnect_init(void)
rt_wlan_cfg_cache_refresh(); rt_wlan_cfg_cache_refresh();
} }
#endif #endif

View File

@ -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 * SPDX-License-Identifier: Apache-2.0
* *
@ -202,7 +202,7 @@ static int rt_hw_lcd_init(void)
rt_thread_mdelay(100); rt_thread_mdelay(100);
lcd_clear(WHITE); lcd_clear(WHITE);
lcd_show_string(0, 0, 32, "RT-Thread"); lcd_show_string(0, 0, 32, "RT-Thread");
/* display on */ /* display on */
rt_pin_write(LCD_PWR_PIN, PIN_HIGH); rt_pin_write(LCD_PWR_PIN, PIN_HIGH);
@ -818,4 +818,4 @@ rt_err_t lcd_show_image(rt_uint16_t x, rt_uint16_t y, rt_uint16_t length, rt_uin
rt_spi_send(spi_dev_lcd, p, length * wide * 2); rt_spi_send(spi_dev_lcd, p, length * wide * 2);
return RT_EOK; return RT_EOK;
} }

View File

@ -1,5 +1,5 @@
#ifndef __DRV_LCD_FONT_H__ #ifndef __DRV_LCD_FONT_H__
#define __DRV_LCD_FONT_H__ #define __DRV_LCD_FONT_H__
#include <stdint.h> #include <stdint.h>
#define ASC2_1608 #define ASC2_1608

View File

@ -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 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -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 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -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 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -579,7 +579,7 @@ int rt_hw_sdio_init(void)
#endif #endif
#ifdef BSP_USING_SDIO2 #ifdef BSP_USING_SDIO2
if (IS_ENGINEERING_BOOT_MODE()) if (IS_ENGINEERING_BOOT_MODE())
{ {
MX_RTC_Init(); MX_RTC_Init();

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2006-2022, RT-Thread Development Team * Copyright (c) 2006-2021, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *
@ -43,7 +43,7 @@ static void hw_crc_sample(uint8_t *temp, int size)
{ {
struct rt_hwcrypto_ctx *ctx; struct rt_hwcrypto_ctx *ctx;
rt_uint32_t result = 0; rt_uint32_t result = 0;
struct hwcrypto_crc_cfg cfg = struct hwcrypto_crc_cfg cfg =
{ {
.last_val = 0xFFFFFFFF, .last_val = 0xFFFFFFFF,
@ -58,9 +58,9 @@ static void hw_crc_sample(uint8_t *temp, int size)
result = rt_hwcrypto_crc_update(ctx, temp, size); result = rt_hwcrypto_crc_update(ctx, temp, size);
rt_kprintf("crc result: %x \n", result); rt_kprintf("crc result: %x \n", result);
rt_hwcrypto_crc_destroy(ctx); rt_hwcrypto_crc_destroy(ctx);
} }
#endif #endif
@ -70,19 +70,19 @@ static void hw_hash_sample()
int i = 0; int i = 0;
struct rt_hwcrypto_ctx *ctx = RT_NULL; struct rt_hwcrypto_ctx *ctx = RT_NULL;
const uint8_t hash_input[] = "RT-Thread was born in 2006, it is an open source, neutral, and community-based real-time operating system (RTOS)."; const uint8_t hash_input[] = "RT-Thread was born in 2006, it is an open source, neutral, and community-based real-time operating system (RTOS).";
static uint8_t sha1_output[20]; static uint8_t sha1_output[20];
static uint8_t sha1_except[20] = {0xff, 0x3c, 0x95, 0x54, 0x95, 0xf0, 0xad, static uint8_t sha1_except[20] = {0xff, 0x3c, 0x95, 0x54, 0x95, 0xf0, 0xad,
0x02, 0x1b, 0xa8, 0xbc, 0xa2, 0x2e, 0xa5, 0x02, 0x1b, 0xa8, 0xbc, 0xa2, 0x2e, 0xa5,
0xb0, 0x62, 0x1b, 0xdf, 0x7f, 0xec}; 0xb0, 0x62, 0x1b, 0xdf, 0x7f, 0xec};
static uint8_t md5_output[16]; static uint8_t md5_output[16];
static uint8_t md5_except[16] = {0x40, 0x86, 0x03, 0x80, 0x0d, 0x8c, 0xb9, static uint8_t md5_except[16] = {0x40, 0x86, 0x03, 0x80, 0x0d, 0x8c, 0xb9,
0x4c, 0xd6, 0x7d, 0x28, 0xfc, 0xf6, 0xc3, 0x4c, 0xd6, 0x7d, 0x28, 0xfc, 0xf6, 0xc3,
0xac, 0x8b}; 0xac, 0x8b};
static uint8_t sha224_output[28]; static uint8_t sha224_output[28];
static uint8_t sha224_except[28] = {0x6f, 0x62, 0x52, 0x7d, 0x80, 0xe6, static uint8_t sha224_except[28] = {0x6f, 0x62, 0x52, 0x7d, 0x80, 0xe6,
0x9f, 0x82, 0x78, 0x7a, 0x46, 0x91, 0x9f, 0x82, 0x78, 0x7a, 0x46, 0x91,
0xb0, 0xe9, 0x64, 0x89, 0xe6, 0xc3, 0xb0, 0xe9, 0x64, 0x89, 0xe6, 0xc3,
0x6b, 0x7e, 0xcf, 0xca, 0x11, 0x42, 0x6b, 0x7e, 0xcf, 0xca, 0x11, 0x42,
@ -101,7 +101,7 @@ static void hw_hash_sample()
rt_kprintf("%c", hash_input[i]); rt_kprintf("%c", hash_input[i]);
} }
rt_kprintf("\n"); rt_kprintf("\n");
/* sh1 test*/ /* sh1 test*/
ctx = rt_hwcrypto_hash_create(rt_hwcrypto_dev_default(), HWCRYPTO_TYPE_SHA1); ctx = rt_hwcrypto_hash_create(rt_hwcrypto_dev_default(), HWCRYPTO_TYPE_SHA1);
if (ctx == RT_NULL) if (ctx == RT_NULL)
@ -114,13 +114,13 @@ static void hw_hash_sample()
for (i = 0; i < sizeof(sha1_except); i++) for (i = 0; i < sizeof(sha1_except); i++)
{ {
rt_kprintf("%x ", sha1_except[i]); rt_kprintf("%x ", sha1_except[i]);
} }
rt_kprintf("\n"); rt_kprintf("\n");
/* start sha1 */ /* start sha1 */
rt_hwcrypto_hash_update(ctx, hash_input, rt_strlen((char const *)hash_input)); rt_hwcrypto_hash_update(ctx, hash_input, rt_strlen((char const *)hash_input));
/* get sha1 result */ /* get sha1 result */
rt_hwcrypto_hash_finish(ctx, sha1_output, rt_strlen((char const *)sha1_output)); rt_hwcrypto_hash_finish(ctx, sha1_output, rt_strlen((char const *)sha1_output));
rt_kprintf("Actual sha1 result: \n"); rt_kprintf("Actual sha1 result: \n");
for (i = 0; i < sizeof(sha1_output); i++) for (i = 0; i < sizeof(sha1_output); i++)
{ {
@ -137,7 +137,7 @@ static void hw_hash_sample()
} }
/* deinit hash*/ /* deinit hash*/
rt_hwcrypto_hash_destroy(ctx); rt_hwcrypto_hash_destroy(ctx);
/* md5 test*/ /* md5 test*/
ctx = rt_hwcrypto_hash_create(rt_hwcrypto_dev_default(), HWCRYPTO_TYPE_MD5); ctx = rt_hwcrypto_hash_create(rt_hwcrypto_dev_default(), HWCRYPTO_TYPE_MD5);
if (ctx == RT_NULL) if (ctx == RT_NULL)
@ -150,13 +150,13 @@ static void hw_hash_sample()
for (i = 0; i < sizeof(md5_except); i++) for (i = 0; i < sizeof(md5_except); i++)
{ {
rt_kprintf("%x ", md5_except[i]); rt_kprintf("%x ", md5_except[i]);
} }
rt_kprintf("\n"); rt_kprintf("\n");
/* start md5 */ /* start md5 */
rt_hwcrypto_hash_update(ctx, hash_input, rt_strlen((char const *)hash_input)); rt_hwcrypto_hash_update(ctx, hash_input, rt_strlen((char const *)hash_input));
/* get md5 result */ /* get md5 result */
rt_hwcrypto_hash_finish(ctx, md5_output, rt_strlen((char const *)md5_output)); rt_hwcrypto_hash_finish(ctx, md5_output, rt_strlen((char const *)md5_output));
rt_kprintf("Actual md5 result: \n"); rt_kprintf("Actual md5 result: \n");
for (i = 0; i < sizeof(md5_output); i++) for (i = 0; i < sizeof(md5_output); i++)
{ {
@ -173,7 +173,7 @@ static void hw_hash_sample()
} }
/* deinit hash*/ /* deinit hash*/
rt_hwcrypto_hash_destroy(ctx); rt_hwcrypto_hash_destroy(ctx);
/* sha224 test */ /* sha224 test */
ctx = rt_hwcrypto_hash_create(rt_hwcrypto_dev_default(), HWCRYPTO_TYPE_SHA224); ctx = rt_hwcrypto_hash_create(rt_hwcrypto_dev_default(), HWCRYPTO_TYPE_SHA224);
if (ctx == RT_NULL) if (ctx == RT_NULL)
@ -186,13 +186,13 @@ static void hw_hash_sample()
for (i = 0; i < sizeof(sha224_except); i++) for (i = 0; i < sizeof(sha224_except); i++)
{ {
rt_kprintf("%x ", sha224_except[i]); rt_kprintf("%x ", sha224_except[i]);
} }
rt_kprintf("\n"); rt_kprintf("\n");
/* start sha224 */ /* start sha224 */
rt_hwcrypto_hash_update(ctx, hash_input, rt_strlen((char const *)hash_input)); rt_hwcrypto_hash_update(ctx, hash_input, rt_strlen((char const *)hash_input));
/* get sha224 result */ /* get sha224 result */
rt_hwcrypto_hash_finish(ctx, sha224_output, rt_strlen((char const *)sha224_output)); rt_hwcrypto_hash_finish(ctx, sha224_output, rt_strlen((char const *)sha224_output));
rt_kprintf("Actual sha224 result: \n"); rt_kprintf("Actual sha224 result: \n");
for (i = 0; i < sizeof(sha224_output); i++) for (i = 0; i < sizeof(sha224_output); i++)
{ {
@ -216,13 +216,13 @@ static void hw_hash_sample()
rt_kprintf("create hash[%08x] context err!\n", HWCRYPTO_TYPE_SHA256); rt_kprintf("create hash[%08x] context err!\n", HWCRYPTO_TYPE_SHA256);
return ; return ;
} }
rt_kprintf("Create sha256 type success!\n"); rt_kprintf("Create sha256 type success!\n");
rt_kprintf("Except sha256 result: \n"); rt_kprintf("Except sha256 result: \n");
for (i = 0; i < sizeof(sha256_except); i++) for (i = 0; i < sizeof(sha256_except); i++)
{ {
rt_kprintf("%x ", sha256_except[i]); rt_kprintf("%x ", sha256_except[i]);
} }
rt_kprintf("\n"); rt_kprintf("\n");
/* start sha256 */ /* start sha256 */
rt_hwcrypto_hash_update(ctx, hash_input, rt_strlen((char const *)hash_input)); rt_hwcrypto_hash_update(ctx, hash_input, rt_strlen((char const *)hash_input));
@ -235,7 +235,7 @@ static void hw_hash_sample()
rt_kprintf("%x ", sha256_output[i]); rt_kprintf("%x ", sha256_output[i]);
} }
rt_kprintf("\n"); rt_kprintf("\n");
if(rt_memcmp(sha256_output, sha256_except, sizeof(sha256_except)/sizeof(sha256_except[0])) != 0) if(rt_memcmp(sha256_output, sha256_except, sizeof(sha256_except)/sizeof(sha256_except[0])) != 0)
{ {
rt_kprintf("Hash type sha256 Test error, The actual result is not equal to the except result\n"); rt_kprintf("Hash type sha256 Test error, The actual result is not equal to the except result\n");
@ -245,7 +245,7 @@ static void hw_hash_sample()
rt_kprintf("Hash type sha256 Test success, The actual result is equal to the except result\n"); rt_kprintf("Hash type sha256 Test success, The actual result is equal to the except result\n");
} }
rt_hwcrypto_hash_destroy(ctx); rt_hwcrypto_hash_destroy(ctx);
rt_kprintf("Hash Test over!\n"); rt_kprintf("Hash Test over!\n");
} }
#endif #endif
@ -254,7 +254,7 @@ static int crypto(int argc, char **argv)
int result = RT_EOK; int result = RT_EOK;
static rt_device_t device = RT_NULL; static rt_device_t device = RT_NULL;
char *result_str; char *result_str;
if (argc > 1) if (argc > 1)
{ {
if (!strcmp(argv[1], "probe")) if (!strcmp(argv[1], "probe"))
@ -293,7 +293,7 @@ static int crypto(int argc, char **argv)
{ {
rt_kprintf("rng <number> - generate <number> digital\n"); rt_kprintf("rng <number> - generate <number> digital\n");
} }
#else #else
rt_kprintf("please enable RNG first!\n"); rt_kprintf("please enable RNG first!\n");
#endif #endif
@ -301,7 +301,7 @@ static int crypto(int argc, char **argv)
else if (!strcmp(argv[1], "crc")) else if (!strcmp(argv[1], "crc"))
{ {
#if defined (BSP_USING_CRC) #if defined (BSP_USING_CRC)
int size = 0, i = 0; int size = 0, i = 0;
if (argc > 3) if (argc > 3)
{ {
size = argc - 2; size = argc - 2;
@ -312,7 +312,7 @@ static int crypto(int argc, char **argv)
{ {
data[i] = strtol(argv[2 + i], NULL, 0); data[i] = strtol(argv[2 + i], NULL, 0);
} }
hw_crc_sample(data, size); hw_crc_sample(data, size);
rt_free(data); rt_free(data);
} }
else else
@ -333,16 +333,16 @@ static int crypto(int argc, char **argv)
#if defined (BSP_USING_HASH) #if defined (BSP_USING_HASH)
if (argc == 3) if (argc == 3)
{ {
hw_hash_sample(); hw_hash_sample();
} }
else else
{ {
rt_kprintf("crypto hash sample - hash use sample\n"); rt_kprintf("crypto hash sample - hash use sample\n");
} }
#else #else
rt_kprintf("please enable CRC first!\n"); rt_kprintf("please enable CRC first!\n");
#endif #endif
} }
else else
{ {
@ -359,7 +359,7 @@ static int crypto(int argc, char **argv)
rt_kprintf("crypto hash sample - hash use sample\n"); rt_kprintf("crypto hash sample - hash use sample\n");
result = -RT_ERROR; result = -RT_ERROR;
} }
return result; return result;
} }
MSH_CMD_EXPORT(crypto, crypto function); MSH_CMD_EXPORT(crypto, crypto function);

View File

@ -34,7 +34,7 @@ static rt_err_t uart_input(rt_device_t dev, rt_size_t size)
result = rt_mq_send(&rx_mq, &msg, sizeof(msg)); result = rt_mq_send(&rx_mq, &msg, sizeof(msg));
if ( result == -RT_EFULL) if ( result == -RT_EFULL)
{ {
rt_kprintf("message queue full\n"); rt_kprintf("message queue full!\n");
} }
return result; return result;
} }

View File

@ -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 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -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 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -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 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -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 * SPDX-License-Identifier: Apache-2.0
* *