diff --git a/bsp/qemu-vexpress-a9/drivers/automac.h b/bsp/qemu-vexpress-a9/drivers/automac.h deleted file mode 100644 index 5f08b79a41d262ffab75f25f61ecb6f4e20fdd5f..0000000000000000000000000000000000000000 --- a/bsp/qemu-vexpress-a9/drivers/automac.h +++ /dev/null @@ -1,15 +0,0 @@ - -#ifndef __MAC_AUTO_GENERATE_H__ -#define __MAC_AUTO_GENERATE_H__ - -/* Automatically generated file; DO NOT EDIT. */ -/* mac configure file for RT-Thread qemu */ - -#define AUTOMAC0 0x52 -#define AUTOMAC1 0x54 -#define AUTOMAC2 0x00 -#define AUTOMAC3 0x28 -#define AUTOMAC4 0xae -#define AUTOMAC5 0xeb - -#endif diff --git a/components/lwp/lwp_syscall.c b/components/lwp/lwp_syscall.c index 481d510017a177779b5ab2a3f1fe3379ca64ef98..fb89fce9ce959d2bc84a89525b2f5166f7c8bfd5 100644 --- a/components/lwp/lwp_syscall.c +++ b/components/lwp/lwp_syscall.c @@ -813,11 +813,28 @@ void sys_exit_critical(void) } /* syscall: "sys_log" ret: "int" args: "const char*" "size" */ +static int __sys_log_enable = 0; +static int sys_log_enable(int argc, char** argv) +{ + if (argc == 1) + { + rt_kprintf("sys_log = %d\n", __sys_log_enable); + return 0; + } + else + { + __sys_log_enable = atoi(argv[1]); + } + + return 0; +} +MSH_CMD_EXPORT_ALIAS(sys_log_enable, sys_log, sys_log 1(enable)/0(disable)); + int sys_log(const char* log, int size) { rt_device_t console = rt_console_get_device(); - if (console) rt_device_write(console, -1, log, size); + if (console && __sys_log_enable) rt_device_write(console, -1, log, size); return 0; }