refactor: use standard integer types; remove <algorithm> dependency
- Replaced unsigned char, int and long long with uint8_t int32_t and int64_t for platform independence - Removed <algorithm> dependency, implemented custom alternatives
This commit is contained in:
@@ -28,13 +28,13 @@ void logging(const std::string& msg);
|
||||
* @param address 要写入的寄存器地址
|
||||
* @param value 要写入的寄存器值
|
||||
*/
|
||||
void writeSpi(int address, int value);
|
||||
void writeSpi(std::uint16_t address, std::uint8_t value);
|
||||
/**
|
||||
* @brief 需要实现的函数,实现SPI读取寄存器功能
|
||||
* @param address 要读取的寄存器地址
|
||||
* @return 返回的寄存器值
|
||||
*/
|
||||
int readSpi(int address);
|
||||
std::uint8_t readSpi(std::uint16_t address);
|
||||
/**
|
||||
* @brief 需要实现的函数,实现等待功能
|
||||
* @param ms 等待时间,单位毫秒
|
||||
@@ -45,7 +45,7 @@ void pause(double ms);
|
||||
* @param pin 寄存器地址
|
||||
* @param value 寄存器值
|
||||
*/
|
||||
void setPin(int pin, int value);
|
||||
void setPin(std::uint32_t pin, bool value);
|
||||
/**
|
||||
* @brief 初始化芯片状态,写入与具体配置无关的寄存器值
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user