I have already done many project (Arduino nano,due,mega2560 and esp8266)contain u8g2 on PIO,but when i try to use it on TM4C123GXL as past,somthing happen.
.pio/libdeps/lptm4c1230c3pm/U8g2/src/U8x8lib.cpp: In function 'uint8_t u8x8_gpio_and_delay_arduino(u8x8_t*, uint8_t, uint8_t, void*)':
.pio/libdeps/lptm4c1230c3pm/U8g2/src/U8x8lib.cpp:158:14: error: 'yield' was not declared in this scope
yield();
^
.pio/libdeps/lptm4c1230c3pm/U8g2/src/U8x8lib.cpp: In function 'void arduino_hw_spi_3w_flush()':
.pio/libdeps/lptm4c1230c3pm/U8g2/src/U8x8lib.cpp:715:7: error: 'SPI' was not declared in this scope
SPI.transfer(arduino_hw_spi_3w_buffer[i]);
^
.pio/libdeps/lptm4c1230c3pm/U8g2/src/U8x8lib.cpp: In function 'uint8_t u8x8_byte_arduino_3wire_hw_spi(u8x8_t*, uint8_t, uint8_t, void*)':
.pio/libdeps/lptm4c1230c3pm/U8g2/src/U8x8lib.cpp:787:2: error: 'SPI' was not declared in this scope
SPI.begin();
^
.pio/libdeps/lptm4c1230c3pm/U8g2/src/U8x8lib.cpp:800:45: error: 'SPI_MODE0' was not declared in this scope
case 0: internal_spi_mode = SPI_MODE0; break;
^
.pio/libdeps/lptm4c1230c3pm/U8g2/src/U8x8lib.cpp:801:45: error: 'SPI_MODE1' was not declared in this scope
case 1: internal_spi_mode = SPI_MODE1; break;
^
.pio/libdeps/lptm4c1230c3pm/U8g2/src/U8x8lib.cpp:802:45: error: 'SPI_MODE2' was not declared in this scope
case 2: internal_spi_mode = SPI_MODE2; break;
^
.pio/libdeps/lptm4c1230c3pm/U8g2/src/U8x8lib.cpp:803:45: error: 'SPI_MODE3' was not declared in this scope
case 3: internal_spi_mode = SPI_MODE3; break;
^
.pio/libdeps/lptm4c1230c3pm/U8g2/src/U8x8lib.cpp:808:73: error: 'SPISettings' was not declared in this scope
SPISettings(u8x8->bus_clock, MSBFIRST, internal_spi_mode));
^
.pio/libdeps/lptm4c1230c3pm/U8g2/src/U8x8lib.cpp: In function 'uint8_t u8x8_byte_arduino_hw_spi(u8x8_t*, uint8_t, uint8_t, void*)':
.pio/libdeps/lptm4c1230c3pm/U8g2/src/U8x8lib.cpp:880:2: error: 'SPI' was not declared in this scope
SPI.transfer((uint8_t)*data);
^
.pio/libdeps/lptm4c1230c3pm/U8g2/src/U8x8lib.cpp:918:7: error: 'SPI' was not declared in this scope
SPI.begin();
^
.pio/libdeps/lptm4c1230c3pm/U8g2/src/U8x8lib.cpp:934:30: error: 'SPI_MODE0' was not declared in this scope
case 0: internal_spi_mode = SPI_MODE0; break;
^
.pio/libdeps/lptm4c1230c3pm/U8g2/src/U8x8lib.cpp:935:30: error: 'SPI_MODE1' was not declared in this scope
case 1: internal_spi_mode = SPI_MODE1; break;
^
.pio/libdeps/lptm4c1230c3pm/U8g2/src/U8x8lib.cpp:936:30: error: 'SPI_MODE2' was not declared in this scope
case 2: internal_spi_mode = SPI_MODE2; break;
^
.pio/libdeps/lptm4c1230c3pm/U8g2/src/U8x8lib.cpp:937:30: error: 'SPI_MODE3' was not declared in this scope
case 3: internal_spi_mode = SPI_MODE3; break;
^
.pio/libdeps/lptm4c1230c3pm/U8g2/src/U8x8lib.cpp:941:84: error: 'SPISettings' was not declared in this scope
SPI.beginTransaction(SPISettings(u8x8->bus_clock, MSBFIRST, internal_spi_mode));
^
.pio/libdeps/lptm4c1230c3pm/U8g2/src/U8x8lib.cpp: In function 'uint8_t u8x8_byte_arduino_hw_i2c(u8x8_t*, uint8_t, uint8_t, void*)':
.pio/libdeps/lptm4c1230c3pm/U8g2/src/U8x8lib.cpp:1334:12: error: 'class TwoWire' has no member named 'setClock'
Wire.setClock(u8x8->bus_clock);
^
*** [.pio/build/lptm4c1230c3pm/lib0ce/U8g2/U8x8lib.cpp.o] Error 1
.pio/libdeps/lptm4c1230c3pm/U8g2/src/U8g2lib.cpp: In function 'void u8g2_print_callback(const char*)':
.pio/libdeps/lptm4c1230c3pm/U8g2/src/U8g2lib.cpp:47:9: error: 'yield' was not declared in this scope
yield();
^
*** [.pio/build/lptm4c1230c3pm/lib0ce/U8g2/U8g2lib.cpp.o] Error 1
the console say:
yield() , SPI,Wire no declare.I don’t know what happen in it.and i can’t find any way to solve it.
can anyone help me?pretty thanks.