📄 scoop.c
字号:
/* * File : scoop.c * This file is part of RT-Thread RTOS * COPYRIGHT (C) 2006, RT-Thread Develop Team * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at * http://openlab.rt-thread.com/license/LICENSE * * Change Logs: * Date Author Notes * 2006-11-04 Bernard the first version */#include "scoop.h"void rt_scoop_init(void){ SCP_MCR = 0x0140; /* 00 */ SCP_MCR = 0x0100; SCP_CDR = 0x0000; /* 04 */ SCP_CPR = 0x0000; /* 0C */ SCP_CCR = 0x0000; /* 10 */ SCP_IMR = 0x0000; /* 18 */ SCP_IRM = 0x00FF; /* 14 */ SCP_ISR = 0x0000; /* 1C */ SCP_IRM = 0x0000; SCP_GPCR = SCP_IO_DIR; /* 20 */ SCP_GPWR = SCP_IO_OUT; /* 24 */}rt_uint16 rt_scoop_setgpio(rt_uint16 bit){ rt_uint16 gpio_bit; rt_base flag; flag = rt_hw_interrupt_disable(); gpio_bit = SCP_GPWR | bit; SCP_GPWR = gpio_bit; rt_hw_interrupt_enable(flag); return gpio_bit;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -