eecs-bsp-test-code-2/inc/Vib.h

25 lines
1.1 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**********************************振动传感器SV V2.0 说明 ************************************************************************
SV用于获取"STC-B学习板"上Vib传感器状态.提供一个模块加载函数和一个应用函数,一个Vib事件enumEventVib
(1) VibInit()振动传感器Vib模块初始化函数
(2) char GetVibAct()获取Vib事件。
函数返回值返回当前Vib传感器事件返回值enumVibNull——无enumVibQuake——发生过振动
查询一次后,事件值变成 enumVibNull (仅查询一次有效)
(3) Vib传感器事件enumEventVib
当Vib检测到有”振动“事件时将产生一个”振动事件“响应事件的用户处理函数由用户编写,
并有sys中提供的SetEventCallBack()函数设置.
编写徐成电话18008400450 2021年3月5日设计2021年3月26日更新
*/
#ifndef _Vib_H_
#define _Vib_H_
extern void VibInit();
extern unsigned char GetVibAct(void) reentrant; //获取Vib事件
enum VibActName
{
enumVibNull,
enumVibQuake
}; //返回值enuVibNull——无enuVibQuake——发生过振动
#endif