12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- /**
- * @file bikebrake.h
- * @author Wang, Zhiyu(wangzy49@midea.com)
- * @brief Brake of ebike
- * @version 0.1
- * @date 2021-10-08
- *
- * @copyright Copyright (c) 2021
- *
- */
- /************************************************************************
- Beginning of File, do not put anything above here except notes
- Compiler Directives:
- *************************************************************************/
- #ifndef BIKEBRAKE_H
- #define BIKEBRAKE_H
- #include "typedefine.h"
- /****************************************
- *
- * Definitions & Macros
- *
- ****************************************/
- #define BIKEBRAKE_OUT_DEFAULT \
- { \
- 0,0, FALSE \
- } // Default value of BIKELIGHT_OUT
- #define BRAKE_DETECT_PORT 10 // PB10
- /***************************************
- *
- * Type Definations
- *
- ***************************************/
- /**
- * @brief Bikebrake out
- *
- */
- typedef struct
- {
- UWORD uwDetectTimeCnt; // Cnt of detect GPIO state change
- UWORD uwBikeBrakeCnt; // Cnt of detect GPIO state change
- BOOL blBikeBrakeOnFlg; // flag of brake on or off
- } BIKEBRAKE_OUT;
- /*****************************************
- *
- * Exported variable
- *
- ****************************************/
- /***************************************
- *
- * Function Definations
- *
- ***************************************/
- void bikebrake_voBikeBrakeInit(void); // api function
- void bikebrake_voBikeBrakeDetect(void); // api function
- BOOL BikeBrake_blGetstate(void);
- /************************************************************************/
- #endif
- /************************************************************************
- End of this File (EOF):
- Do not put anything after this part!
- *************************************************************************/
|