kopia lustrzana https://github.com/pimoroni/pimoroni-pico
Merge pull request #771 from raybellis/macos_fixes
Fixes for compilation under macOS / GCC 13.3.1patch-ci-custom-gcc
commit
ecbd1e66de
|
@ -64,8 +64,8 @@ namespace pimoroni {
|
|||
}
|
||||
|
||||
void LTP305::set_character(uint8_t x, uint16_t ch) {
|
||||
uint8_t *data = nullptr;
|
||||
for(auto c : dotfont) {
|
||||
const uint8_t *data = nullptr;
|
||||
for(const auto& c : dotfont) {
|
||||
if(c.code == ch) {
|
||||
data = &c.data[0];
|
||||
break;
|
||||
|
@ -128,4 +128,4 @@ namespace pimoroni {
|
|||
i2c->reg_write_uint8(address, CMD_BRIGHTNESS, brightness);
|
||||
i2c->reg_write_uint8(address, CMD_UPDATE, 0x01);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -217,7 +217,7 @@ namespace pimoroni {
|
|||
i2c->read_blocking(address, (uint8_t *)&value, 4, false);
|
||||
|
||||
// TODO do we need to bswap this return value?
|
||||
return __bswap32(value);
|
||||
return __builtin_bswap32(value);
|
||||
}
|
||||
|
||||
// set distance mode to Short, Medium, or Long
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <map>
|
||||
#include <string>
|
||||
#include <functional>
|
||||
#include <cstdint>
|
||||
|
||||
namespace hershey {
|
||||
struct font_glyph_t {
|
||||
|
@ -50,4 +51,4 @@ namespace hershey {
|
|||
|
||||
bool has_font(std::string_view font);
|
||||
const font_t* font(std::string_view font);
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue