diff --git a/demo/non_os/stm32f10x/app/src/app.c b/demo/non_os/stm32f10x/app/src/app.c index 9beaa79..44cfe64 100644 --- a/demo/non_os/stm32f10x/app/src/app.c +++ b/demo/non_os/stm32f10x/app/src/app.c @@ -36,9 +36,9 @@ static void test_elog(void); int main(void){ - + BSP_Init(); - + /* initialize EasyLogger */ elog_init(); /* set EasyLogger log format */ @@ -50,7 +50,7 @@ int main(void){ elog_set_fmt(ELOG_LVL_VERBOSE, ELOG_FMT_ALL & ~(ELOG_FMT_FUNC | ELOG_FMT_T_INFO | ELOG_FMT_P_INFO)); /* start EasyLogger */ elog_start(); - + /* dynamic set enable or disable for output logs (true or false) */ // elog_set_output_enabled(false); /* dynamic set output logs's level (from ELOG_LVL_ASSERT to ELOG_LVL_VERBOSE) */ @@ -68,9 +68,9 @@ int main(void){ LED_RUN_ON; delay(10000000); LED_RUN_OFF; - delay(10000000); + delay(10000000); } - + return 0; } diff --git a/demo/non_os/stm32f10x/components/others/bsp.c b/demo/non_os/stm32f10x/components/others/bsp.c index d05d344..d110253 100644 --- a/demo/non_os/stm32f10x/components/others/bsp.c +++ b/demo/non_os/stm32f10x/components/others/bsp.c @@ -32,20 +32,20 @@ */ static void RCC_Configuration(void) { - //下面是给各模块开启时钟 - //启动GPIO + //涓嬮潰鏄粰鍚勬ā鍧楀紑鍚椂閽 + //鍚姩GPIO RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB | \ RCC_APB2Periph_GPIOC | RCC_APB2Periph_GPIOD | \ RCC_APB2Periph_GPIOE | RCC_APB2Periph_GPIOG, ENABLE); - //启动AFIO + //鍚姩AFIO RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO, ENABLE); - //启动USART1时钟 + //鍚姩USART1鏃堕挓 RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1, ENABLE); - //启动USART2时钟 + //鍚姩USART2鏃堕挓 RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART2, ENABLE); - //启动DMA时钟 + //鍚姩DMA鏃堕挓 RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA1, ENABLE); /* Enable ADC1 and GPIOC clock */ RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1, ENABLE); @@ -95,13 +95,13 @@ static void GPIO_Configuration(void) GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_Init(GPIOB, &GPIO_InitStructure); - + /* USART1_TX */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; GPIO_Init(GPIOA, &GPIO_InitStructure); - + /* USART1_RX */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING; @@ -118,7 +118,7 @@ static void GPIO_Configuration(void) void USART1_Configuration(void) { USART_InitTypeDef USART_InitStructure; - + USART_InitStructure.USART_BaudRate = 115200; USART_InitStructure.USART_WordLength = USART_WordLength_8b; USART_InitStructure.USART_StopBits = USART_StopBits_1; @@ -126,14 +126,14 @@ void USART1_Configuration(void) USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None; USART_InitStructure.USART_Mode = USART_Mode_Tx | USART_Mode_Rx; USART_Init(USART1, &USART_InitStructure); - + USART_Cmd(USART1, ENABLE); } /** * IWDG_Configuration */ -static void IWDG_Configuration(void) +static void IWDG_Configuration(void) { IWDG_WriteAccessCmd(IWDG_WriteAccess_Enable); IWDG_SetPrescaler(IWDG_Prescaler_64); @@ -161,12 +161,12 @@ int fputc(int ch, FILE *f) int fgetc(FILE *f) { - + while(!(USART_GetFlagStatus(USART1, USART_FLAG_RXNE) == SET)) { } - - + + return (USART_ReceiveData(USART1)); } diff --git a/demo/non_os/stm32f10x/components/others/bsp.h b/demo/non_os/stm32f10x/components/others/bsp.h index 54a1ae8..b5386cd 100644 --- a/demo/non_os/stm32f10x/components/others/bsp.h +++ b/demo/non_os/stm32f10x/components/others/bsp.h @@ -26,38 +26,38 @@ */ /* board configuration */ // SDCard Driver <1=>SDIO sdcard <0=>SPI MMC card -// Default: 1 -#define STM32_USE_SDIO 0 +// Default: 1 +#define STM32_USE_SDIO 0 /* whether use board external SRAM memory */ // Use external SRAM memory on the board -// Enable External SRAM memory +// Enable External SRAM memory #define STM32_EXT_SRAM 0 -// Begin Address of External SRAM -// Default: 0x68000000 +// Begin Address of External SRAM +// Default: 0x68000000 #define STM32_EXT_SRAM_BEGIN 0x68000000 /* the begining address of external SRAM */ -// End Address of External SRAM -// Default: 0x68080000 +// End Address of External SRAM +// Default: 0x68080000 #define STM32_EXT_SRAM_END 0x68080000 /* the end address of external SRAM */ // // Internal SRAM memory size[Kbytes] <8-64> -// Default: 64 +// Default: 64 #define STM32_SRAM_SIZE 64 #define STM32_SRAM_END (SRAM_BASE + STM32_SRAM_SIZE * 1024) #define VECT_TAB_FLASH /* use Flash to store vector table */ -#define LED_RUN_ON GPIO_SetBits (GPIOB,GPIO_Pin_5) //RUN -#define LED_RUN_OFF GPIO_ResetBits(GPIOB,GPIO_Pin_5) //RUN +#define LED_RUN_ON GPIO_SetBits (GPIOB,GPIO_Pin_5) //RUN +#define LED_RUN_OFF GPIO_ResetBits(GPIOB,GPIO_Pin_5) //RUN /*********************************************************************************************************/ -/** MACRO'S */ +/** MACRO'S */ /***********************************************************************************************************/ /***********************************************************************************************************/ -/* DATA TYPES */ +/* DATA TYPES */ /***********************************************************************************************************/ diff --git a/demo/non_os/stm32f10x/components/others/types.h b/demo/non_os/stm32f10x/components/others/types.h index 72fff45..380f6cc 100644 --- a/demo/non_os/stm32f10x/components/others/types.h +++ b/demo/non_os/stm32f10x/components/others/types.h @@ -7,15 +7,15 @@ typedef int bool_t; /**< boolean type */ #ifndef TRUE - #define TRUE 1 + #define TRUE 1 #endif #ifndef FALSE - #define FALSE 0 + #define FALSE 0 #endif #ifndef NULL - #define NULL 0 + #define NULL 0 #endif #define success 0 diff --git a/demo/os/linux/easylogger/port/elog_file_port.c b/demo/os/linux/easylogger/port/elog_file_port.c index f700517..15bbe05 100755 --- a/demo/os/linux/easylogger/port/elog_file_port.c +++ b/demo/os/linux/easylogger/port/elog_file_port.c @@ -95,7 +95,7 @@ void elog_file_port_deinit(void) } /** - * initialize the lock + * initialize the lock */ static void lock_init(void) { @@ -129,7 +129,7 @@ __exit: } /** - * gets the lock + * gets the lock */ static int lock_open(void) { @@ -163,7 +163,7 @@ err: } /** - * deinitialize the lock + * deinitialize the lock */ static void lock_deinit(void) { diff --git a/demo/os/linux/easylogger/port/elog_port.c b/demo/os/linux/easylogger/port/elog_port.c index d36284e..b9e629e 100755 --- a/demo/os/linux/easylogger/port/elog_port.c +++ b/demo/os/linux/easylogger/port/elog_port.c @@ -82,7 +82,7 @@ void elog_port_output(const char *log, size_t size) { #ifdef ELOG_FILE_ENABLE /* write the file */ elog_file_write(log, size); -#endif +#endif } /** diff --git a/demo/os/rt-thread/stm32f10x/app/inc/app_task.h b/demo/os/rt-thread/stm32f10x/app/inc/app_task.h index 60a51f4..40eb523 100644 --- a/demo/os/rt-thread/stm32f10x/app/inc/app_task.h +++ b/demo/os/rt-thread/stm32f10x/app/inc/app_task.h @@ -4,7 +4,7 @@ #ifndef APP_TASK_H #define APP_TASK_H -#include +#include #include #include diff --git a/demo/os/rt-thread/stm32f10x/app/inc/delay_conf.h b/demo/os/rt-thread/stm32f10x/app/inc/delay_conf.h index 36c376b..39b060a 100644 --- a/demo/os/rt-thread/stm32f10x/app/inc/delay_conf.h +++ b/demo/os/rt-thread/stm32f10x/app/inc/delay_conf.h @@ -4,29 +4,29 @@ #include"rtconfig.h" #if RT_TICK_PER_SECOND == 1 -#define DELAY_1S (RT_TICK_PER_SECOND) -#define DELAY_S(X) (X*DELAY_1S) +#define DELAY_1S (RT_TICK_PER_SECOND) +#define DELAY_S(X) (X*DELAY_1S) -#elif RT_TICK_PER_SECOND == 10 -#define DELAY_100MS(X) (X) -#define DELAY_S(X) (X*10) +#elif RT_TICK_PER_SECOND == 10 +#define DELAY_100MS(X) (X) +#define DELAY_S(X) (X*10) -#elif RT_TICK_PER_SECOND == 100 -#define DELAY_10MS(X) (X) -#define DELAY_100MS(X) (X*10) -#define DELAY_S(X) (X*100) +#elif RT_TICK_PER_SECOND == 100 +#define DELAY_10MS(X) (X) +#define DELAY_100MS(X) (X*10) +#define DELAY_S(X) (X*100) #elif (RT_TICK_PER_SECOND == 1000) -#define DELAY_1MS (RT_TICK_PER_SECOND/1000) +#define DELAY_1MS (RT_TICK_PER_SECOND/1000) #define DELAY_MS(X) (X*DELAY_1MS) -#define DELAY_S(X) (X*1000*DELAY_1MS) +#define DELAY_S(X) (X*1000*DELAY_1MS) #elif (RT_TICK_PER_SECOND == 10000) #define DELAY_100US(X) (X*RT_TICK_PER_SECOND/10000) -#define DELAY_1MS (RT_TICK_PER_SECOND/1000) +#define DELAY_1MS (RT_TICK_PER_SECOND/1000) #define DELAY_MS(X) (X*DELAY_1MS) -#define DELAY_S(X) (X*1000*DELAY_1MS) +#define DELAY_S(X) (X*1000*DELAY_1MS) #endif @@ -37,5 +37,5 @@ #define DELAY_SYS_FAULT_LED_ON DELAY_MS(50) #define DELAY_SYS_FAULT_LED_OFF DELAY_MS(950) -#endif +#endif diff --git a/demo/os/rt-thread/stm32f10x/app/inc/rtconfig.h b/demo/os/rt-thread/stm32f10x/app/inc/rtconfig.h index 8db10fd..6de5516 100644 --- a/demo/os/rt-thread/stm32f10x/app/inc/rtconfig.h +++ b/demo/os/rt-thread/stm32f10x/app/inc/rtconfig.h @@ -3,16 +3,16 @@ #define __RTTHREAD_CFG_H__ /* RT_NAME_MAX*/ -#define RT_NAME_MAX 24 +#define RT_NAME_MAX 24 /* RT_ALIGN_SIZE*/ -#define RT_ALIGN_SIZE 8 +#define RT_ALIGN_SIZE 8 /* PRIORITY_MAX */ -#define RT_THREAD_PRIORITY_MAX 32 +#define RT_THREAD_PRIORITY_MAX 32 /* Tick per Second */ -#define RT_TICK_PER_SECOND 10000 //0.1ms +#define RT_TICK_PER_SECOND 10000 //0.1ms /* SECTION: RT_DEBUG */ /* Thread Debug */ @@ -26,9 +26,9 @@ /* Using Software Timer */ /* #define RT_USING_TIMER_SOFT */ -#define RT_TIMER_THREAD_PRIO 4 -#define RT_TIMER_THREAD_STACK_SIZE 512 -#define RT_TIMER_TICK_PER_SECOND 1000 +#define RT_TIMER_THREAD_PRIO 4 +#define RT_TIMER_THREAD_STACK_SIZE 512 +#define RT_TIMER_TICK_PER_SECOND 1000 /* SECTION: IPC */ /* Using Semaphore*/ @@ -60,11 +60,11 @@ /* Using Device System */ #define RT_USING_CONSOLE // -#define RT_CONSOLE_DEVICE_NAME "uart1" +#define RT_CONSOLE_DEVICE_NAME "uart1" /* SECTION: Console options */ /* the buffer size of console*/ -#define RT_CONSOLEBUF_SIZE 512 +#define RT_CONSOLEBUF_SIZE 512 /* SECTION: finsh, a C-Express shell */ #define RT_USING_FINSH diff --git a/demo/os/rt-thread/stm32f10x/app/src/app.c b/demo/os/rt-thread/stm32f10x/app/src/app.c index d92c3c3..bfd5b26 100644 --- a/demo/os/rt-thread/stm32f10x/app/src/app.c +++ b/demo/os/rt-thread/stm32f10x/app/src/app.c @@ -1,13 +1,13 @@ #include "app_task.h" int main(void){ - /* disable interrupt first */ - rt_hw_interrupt_disable(); + /* disable interrupt first */ + rt_hw_interrupt_disable(); - /* startup RT-Thread RTOS */ - rtthread_startup(); + /* startup RT-Thread RTOS */ + rtthread_startup(); - return 0; + return 0; } diff --git a/demo/os/rt-thread/stm32f10x/app/src/app_task.c b/demo/os/rt-thread/stm32f10x/app/src/app_task.c index 4e5418e..e304c47 100644 --- a/demo/os/rt-thread/stm32f10x/app/src/app_task.c +++ b/demo/os/rt-thread/stm32f10x/app/src/app_task.c @@ -82,7 +82,7 @@ static void test_elog(void) { * @param parameter parameter */ void sys_init_thread(void* parameter){ - set_system_status(SYSTEM_STATUS_INIT); + set_system_status(SYSTEM_STATUS_INIT); /* initialize EasyFlash and EasyLogger */ if ((easyflash_init() == EF_NO_ERR)&&(elog_init() == ELOG_NO_ERR)) { diff --git a/demo/os/rt-thread/stm32f10x/components/easyflash/port/ef_port.c b/demo/os/rt-thread/stm32f10x/components/easyflash/port/ef_port.c index 7c81b62..c70fb53 100644 --- a/demo/os/rt-thread/stm32f10x/components/easyflash/port/ef_port.c +++ b/demo/os/rt-thread/stm32f10x/components/easyflash/port/ef_port.c @@ -53,7 +53,7 @@ static struct rt_semaphore env_cache_lock; */ EfErrCode ef_port_init(ef_env const **default_env, size_t *default_env_size) { EfErrCode result = EF_NO_ERR; - + *default_env = default_env_set; *default_env_size = sizeof(default_env_set) / sizeof(default_env_set[0]); @@ -99,10 +99,10 @@ EfErrCode ef_port_erase(uint32_t addr, size_t size) { EfErrCode result = EF_NO_ERR; FLASH_Status flash_status; size_t erase_pages, i; - + /* make sure the start address is a multiple of FLASH_ERASE_MIN_SIZE */ EF_ASSERT(addr % EF_ERASE_MIN_SIZE == 0); - + /* calculate pages */ erase_pages = size / PAGE_SIZE; if (size % PAGE_SIZE != 0) { diff --git a/demo/os/rt-thread/stm32f10x/components/easylogger/port/elog_port.c b/demo/os/rt-thread/stm32f10x/components/easylogger/port/elog_port.c index 14022e5..01a61ab 100644 --- a/demo/os/rt-thread/stm32f10x/components/easylogger/port/elog_port.c +++ b/demo/os/rt-thread/stm32f10x/components/easylogger/port/elog_port.c @@ -48,10 +48,10 @@ ElogErrCode elog_port_init(void) { ElogErrCode result = ELOG_NO_ERR; rt_sem_init(&output_lock, "elog lock", 1, RT_IPC_FLAG_PRIO); - + #ifdef ELOG_ASYNC_OUTPUT_ENABLE rt_thread_t async_thread = NULL; - + rt_sem_init(&output_notice, "elog async", 0, RT_IPC_FLAG_PRIO); async_thread = rt_thread_create("elog_async", async_output, NULL, 1024, RT_THREAD_PRIORITY_MAX - 1, 10); diff --git a/demo/os/rt-thread/stm32f10x/components/others/bsp.c b/demo/os/rt-thread/stm32f10x/components/others/bsp.c index c3a3d11..aed4058 100644 --- a/demo/os/rt-thread/stm32f10x/components/others/bsp.c +++ b/demo/os/rt-thread/stm32f10x/components/others/bsp.c @@ -39,20 +39,20 @@ void rt_hw_board_init() */ static void RCC_Configuration(void) { - //下面是给各模块开启时钟 - //启动GPIO + //涓嬮潰鏄粰鍚勬ā鍧楀紑鍚椂閽 + //鍚姩GPIO RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB | \ RCC_APB2Periph_GPIOC | RCC_APB2Periph_GPIOD | \ RCC_APB2Periph_GPIOE | RCC_APB2Periph_GPIOG, ENABLE); - //启动AFIO + //鍚姩AFIO RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO, ENABLE); - //启动USART1时钟 + //鍚姩USART1鏃堕挓 RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1, ENABLE); - //启动USART2时钟 + //鍚姩USART2鏃堕挓 RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART2, ENABLE); - //启动DMA时钟 + //鍚姩DMA鏃堕挓 RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA1, ENABLE); /* Enable ADC1 and GPIOC clock */ RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1, ENABLE); @@ -108,7 +108,7 @@ static void GPIO_Configuration(void) /** * IWDG_Configuration */ -static void IWDG_Configuration(void) +static void IWDG_Configuration(void) { IWDG_WriteAccessCmd(IWDG_WriteAccess_Enable); IWDG_SetPrescaler(IWDG_Prescaler_64); diff --git a/demo/os/rt-thread/stm32f10x/components/others/bsp.h b/demo/os/rt-thread/stm32f10x/components/others/bsp.h index 7a3b1b4..b0f7da0 100644 --- a/demo/os/rt-thread/stm32f10x/components/others/bsp.h +++ b/demo/os/rt-thread/stm32f10x/components/others/bsp.h @@ -29,23 +29,23 @@ */ /* board configuration */ // SDCard Driver <1=>SDIO sdcard <0=>SPI MMC card -// Default: 1 -#define STM32_USE_SDIO 0 +// Default: 1 +#define STM32_USE_SDIO 0 /* whether use board external SRAM memory */ // Use external SRAM memory on the board -// Enable External SRAM memory +// Enable External SRAM memory #define STM32_EXT_SRAM 0 -// Begin Address of External SRAM -// Default: 0x68000000 +// Begin Address of External SRAM +// Default: 0x68000000 #define STM32_EXT_SRAM_BEGIN 0x68000000 /* the begining address of external SRAM */ -// End Address of External SRAM -// Default: 0x68080000 +// End Address of External SRAM +// Default: 0x68080000 #define STM32_EXT_SRAM_END 0x68080000 /* the end address of external SRAM */ // // Internal SRAM memory size[Kbytes] <8-64> -// Default: 64 +// Default: 64 #define STM32_SRAM_SIZE 64 #define STM32_SRAM_END (SRAM_BASE + STM32_SRAM_SIZE * 1024) @@ -53,18 +53,18 @@ /* RT_USING_UART */ #define RT_USING_UART1 -#define RT_UART_RX_BUFFER_SIZE 64 +#define RT_UART_RX_BUFFER_SIZE 64 -#define LED_RUN_ON GPIO_SetBits (GPIOA,GPIO_Pin_10) //RUN -#define LED_RUN_OFF GPIO_ResetBits(GPIOA,GPIO_Pin_10) //RUN +#define LED_RUN_ON GPIO_SetBits (GPIOA,GPIO_Pin_10) //RUN +#define LED_RUN_OFF GPIO_ResetBits(GPIOA,GPIO_Pin_10) //RUN /*********************************************************************************************************/ -/** MACRO'S */ +/** MACRO'S */ /***********************************************************************************************************/ /***********************************************************************************************************/ -/* DATA TYPES */ +/* DATA TYPES */ /***********************************************************************************************************/ diff --git a/demo/os/rt-thread/stm32f10x/components/others/types.h b/demo/os/rt-thread/stm32f10x/components/others/types.h index 72fff45..380f6cc 100644 --- a/demo/os/rt-thread/stm32f10x/components/others/types.h +++ b/demo/os/rt-thread/stm32f10x/components/others/types.h @@ -7,15 +7,15 @@ typedef int bool_t; /**< boolean type */ #ifndef TRUE - #define TRUE 1 + #define TRUE 1 #endif #ifndef FALSE - #define FALSE 0 + #define FALSE 0 #endif #ifndef NULL - #define NULL 0 + #define NULL 0 #endif #define success 0 diff --git a/demo/os/rt-thread/stm32f10x/components/rtt_uart/usart.c b/demo/os/rt-thread/stm32f10x/components/rtt_uart/usart.c index 3770e5e..02567c7 100644 --- a/demo/os/rt-thread/stm32f10x/components/rtt_uart/usart.c +++ b/demo/os/rt-thread/stm32f10x/components/rtt_uart/usart.c @@ -1,7 +1,7 @@ /* * File : usart.c * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006-2013, RT-Thread Development Team + * COPYRIGHT (C) 2006-2021, RT-Thread Development Team * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at @@ -155,18 +155,18 @@ static rt_err_t stm32_control(struct rt_serial_device *serial, int cmd, void *ar if (irq_type == RT_DEVICE_FLAG_INT_RX) { /* return rx irq flag */ - return USART_GetFlagStatus(uart->uart_device, USART_FLAG_RXNE); + return USART_GetFlagStatus(uart->uart_device, USART_FLAG_RXNE); } else if (irq_type == RT_DEVICE_FLAG_INT_TX) { /* return tx flag */ if (uart->tx_irq_type == USART_IT_TC) { - return USART_GetFlagStatus(uart->uart_device, USART_FLAG_TC); + return USART_GetFlagStatus(uart->uart_device, USART_FLAG_TC); } else if (uart->tx_irq_type == USART_IT_TXE) { - return USART_GetFlagStatus(uart->uart_device, USART_FLAG_TXE); + return USART_GetFlagStatus(uart->uart_device, USART_FLAG_TXE); } } break; diff --git a/demo/os/windows/easylogger/port/elog_port.c b/demo/os/windows/easylogger/port/elog_port.c index 68b43ec..fdc307d 100644 --- a/demo/os/windows/easylogger/port/elog_port.c +++ b/demo/os/windows/easylogger/port/elog_port.c @@ -49,7 +49,7 @@ ElogErrCode elog_port_init(void) { #ifdef ELOG_FILE_ENABLE elog_file_init(); #endif - + return result; } @@ -65,7 +65,7 @@ void elog_port_output(const char *log, size_t size) { #ifdef ELOG_FILE_ENABLE /* write the file */ elog_file_write(log, size); -#endif +#endif } /** diff --git a/easylogger/plugins/flash/elog_flash_port.c b/easylogger/plugins/flash/elog_flash_port.c index af9f75b..02206c4 100644 --- a/easylogger/plugins/flash/elog_flash_port.c +++ b/easylogger/plugins/flash/elog_flash_port.c @@ -35,7 +35,7 @@ */ ElogErrCode elog_flash_port_init(void) { ElogErrCode result = ELOG_NO_ERR; - + /* add your code here */ return result; @@ -48,25 +48,25 @@ ElogErrCode elog_flash_port_init(void) { * @param size log size */ void elog_flash_port_output(const char *log, size_t size) { - + /* add your code here */ - + } /** * flash log lock */ void elog_flash_port_lock(void) { - + /* add your code here */ - + } /** * flash log unlock */ void elog_flash_port_unlock(void) { - + /* add your code here */ - -} \ No newline at end of file + +} diff --git a/easylogger/port/elog_port.c b/easylogger/port/elog_port.c index 4b5409c..1da6a36 100755 --- a/easylogger/port/elog_port.c +++ b/easylogger/port/elog_port.c @@ -25,7 +25,7 @@ * Function: Portable interface for each platform. * Created on: 2015-04-28 */ - + #include /** @@ -37,7 +37,7 @@ ElogErrCode elog_port_init(void) { ElogErrCode result = ELOG_NO_ERR; /* add your code here */ - + return result; } @@ -58,27 +58,27 @@ void elog_port_deinit(void) { * @param size log size */ void elog_port_output(const char *log, size_t size) { - + /* add your code here */ - + } /** * output lock */ void elog_port_output_lock(void) { - + /* add your code here */ - + } /** * output unlock */ void elog_port_output_unlock(void) { - + /* add your code here */ - + } /** @@ -87,9 +87,9 @@ void elog_port_output_unlock(void) { * @return current time */ const char *elog_port_get_time(void) { - + /* add your code here */ - + } /** @@ -98,9 +98,9 @@ const char *elog_port_get_time(void) { * @return current process name */ const char *elog_port_get_p_info(void) { - + /* add your code here */ - + } /** @@ -109,7 +109,7 @@ const char *elog_port_get_p_info(void) { * @return current thread name */ const char *elog_port_get_t_info(void) { - + /* add your code here */ - -} \ No newline at end of file + +} diff --git a/easylogger/src/elog.c b/easylogger/src/elog.c index 7ae5de6..aa35866 100755 --- a/easylogger/src/elog.c +++ b/easylogger/src/elog.c @@ -211,7 +211,7 @@ void elog_deinit(void) { if (!elog.init_ok) { return ; } - + #ifdef ELOG_ASYNC_OUTPUT_ENABLE elog_async_deinit(); #endif @@ -230,7 +230,7 @@ void elog_start(void) { if (!elog.init_ok) { return ; } - + /* enable output */ elog_set_output_enabled(true); @@ -280,7 +280,7 @@ void elog_set_output_enabled(bool enabled) { #ifdef ELOG_COLOR_ENABLE /** * set log text color enable or disable - * + * * @param enabled TRUE: enable FALSE:disable */ void elog_set_text_color_enabled(bool enabled) { @@ -363,7 +363,7 @@ void elog_set_filter_kw(const char *keyword) { } /** - * lock output + * lock output */ void elog_output_lock(void) { if (elog.output_lock_enabled) { diff --git a/easylogger/src/elog_async.c b/easylogger/src/elog_async.c index a8b7e2f..d65e1f5 100755 --- a/easylogger/src/elog_async.c +++ b/easylogger/src/elog_async.c @@ -374,7 +374,7 @@ void elog_async_deinit(void) { elog_async_output_notice(); pthread_join(async_output_thread, NULL); - + sem_destroy(&output_notice); #endif