📄 cmd_nereid.c
字号:
/* cmd_nereid.c - Nereid USB Monitor / Nereid command * Copyright (C) 2003 Tachibana Eriko * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */#include "include/nereid_usb.h"#include "cmd_nereid.h"#include "usbmon.h"#include "usbinfo.h"/* Command: SL811HST 傪儕僙僢僩忬懺偵偡傞 */intnereid_reset_on (int argc, char* argv[]){ *NEREID_CTRL &= ~NEREID_USB_ENA; init_all_usbinfo (); /* 惓忢廔椆 */ return RET_SUCCESS;}/* Command: SL811HST 偺儕僙僢僩傪夝彍偡傞 */intnereid_reset_off (int argc, char* argv[]){ *NEREID_CTRL |= NEREID_USB_ENA; /* 惓忢廔椆 */ return RET_SUCCESS;}/* Command: USB 5V 嫙媼僆儞 */intnereid_power_on (int argc, char* argv[]){ *NEREID_CTRL |= NEREID_USB_POW; /* 惓忢廔椆 */ return RET_SUCCESS;}/* Command: USB 5V 嫙媼僆僼 */intnereid_power_off (int argc, char* argv[]){ *NEREID_CTRL &= ~NEREID_USB_POW; init_all_usbinfo (); /* 惓忢廔椆 */ return RET_SUCCESS;}/* Command: USB 妱傝崬傒嫋壜(Nereid 懁) */intnereid_int_on (int argc, char* argv[]){ *NEREID_CTRL |= NEREID_USB_INT; /* 惓忢廔椆 */ return RET_SUCCESS;}/* Command: USB 妱傝崬傒嬛巭(Nereid 懁) */intnereid_int_off (int argc, char* argv[]){ *NEREID_CTRL &= ~NEREID_USB_INT; /* 惓忢廔椆 */ return RET_SUCCESS;}/* Command: SL811HST 偺儕僙僢僩傪夝彍 + USB 5V 嫙媼僆儞 */intnereid_enable (int argc, char* argv[]){ /* 儕僙僢僩夝彍 */ *NEREID_CTRL |= NEREID_USB_ENA;#if 0 DELAYMS(40);#endif /* 5V 嫙媼僆儞 */ *NEREID_CTRL |= NEREID_USB_POW; /* 惓忢廔椆 */ return RET_SUCCESS;}/* Command: SL811HST 傪儕僙僢僩忬懺 + USB 5V 嫙媼僆僼 */intnereid_disable (int argc, char* argv[]){ /* 5V 嫙媼僆僼 & 儕僙僢僩忬懺 */ *NEREID_CTRL &= ~(NEREID_USB_POW | NEREID_USB_ENA); init_all_usbinfo (); /* 惓忢廔椆 */ return RET_SUCCESS;}/* EOF */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -