I was debugging the new LCD screen on Ultratronics with SPI. Problem is with the HAL, where the function receive has the SDSS put to LOW. This is the SD pin, which I reckon should not be in a hardware abstraction layer, as this function is also called from temperature.cpp. So maybe we can set the CS pin as parameter in the spiInit function. Or better, replace the whole thing for the SPI library native to Arduino?
uint8_t HAL::spiReceive() {
WRITE(SDSS, LOW); <- This is specific for SD
uint8_t b = spiTransfer(0xff);
WRITE(SDSS, HIGH); <- This is specific for SD
return b;
}
I was debugging the new LCD screen on Ultratronics with SPI. Problem is with the HAL, where the function receive has the SDSS put to LOW. This is the SD pin, which I reckon should not be in a hardware abstraction layer, as this function is also called from temperature.cpp. So maybe we can set the CS pin as parameter in the spiInit function. Or better, replace the whole thing for the SPI library native to Arduino?
uint8_t HAL::spiReceive() { WRITE(SDSS, LOW); <- This is specific for SD uint8_t b = spiTransfer(0xff); WRITE(SDSS, HIGH); <- This is specific for SD return b; }