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:
Gatsby
2024-11-07 14:13:37 +08:00
parent d4159ec998
commit 2fc5941f0f
7 changed files with 144 additions and 144 deletions
+3 -3
View File
@@ -520,14 +520,14 @@ void CX9261A::logging(const std::string& msg) {
}
#endif
void CX9261A::writeSpi(int address, int value) {
void CX9261A::writeSpi(std::uint16_t address, std::uint8_t value) {
if(writeSpiFunc == NULL) {
exit(-1);
}
return writeSpiFunc(address, value);
}
int CX9261A::readSpi(int address) {
std::uint8_t CX9261A::readSpi(std::uint16_t address) {
if(readSpiFunc == NULL) {
exit(-1);
}
@@ -541,7 +541,7 @@ void CX9261A::pause(double ms) {
return pauseFunc(ms);
}
void CX9261A::setPin(int pin, int value) {
void CX9261A::setPin(std::uint32_t pin, bool value) {
if(setPinFunc == NULL) {
exit(-1);
}