123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- /**
- * @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
- /****************************************
- *
- * 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!
- *************************************************************************/
|