MAX_CARLINK_A270S/MXC_A27-PCB4.5-270S/app/moto/protocol/user_protocol.h

19 lines
610 B
C
Raw Permalink 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.

#ifndef USER_PROTOCOL_H
#define USER_PROTOCOL_H
#include "tkc/types_def.h"
// 封装的函数,根据位位置获取对应的值
uint8_t getBitValue(uint8_t count, int bitPosition);
// 封装的函数获取2个bit组合成的值
uint8_t getBit2Value(uint8_t count, int bitPosition);
// 封装的函数获取3个bit组合成的值
uint8_t getBit3Value(uint8_t count, int bitPosition);
// 封装的函数获取4个bit组合成的值
uint8_t getBit4Value(uint8_t count, int bitPosition);
// 封装的函数获取5个bit组合成的值
uint8_t getBit5Value(uint8_t count, int bitPosition);
#endif