exit.c
来自「RTEMS (Real-Time Executive for Multiproc」· C语言 代码 · 共 41 行
C
41 行
/* * Cirrus EP7312 BSP Shutdown code * * Copyright (c) 2002 by Jay Monkman <jtm@smoothsmoothie.com> * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at * * http://www.rtems.com/license/LICENSE. * * * $Id: exit.c,v 1.1.2.1 2003/09/04 18:43:48 joel Exp $*/#include <stdio.h>#include <bsp.h>#include <rtems/bspIo.h>#include <rtems/libio.h>int uart_poll_read(int);void rtemsReboot (void){ asm volatile ("b _start");}void bsp_cleanup(void){ static char line[]="\nEXECUTIVE SHUTDOWN! Any key to reboot..."; /* * AT this point, the console driver is disconnected => we must * use polled output/input. This is exactly what printk * does. */ printk("\n"); printk(line); while (uart_poll_read(0) < 0) continue; /* rtemsReboot(); */}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?