Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem in HAL #35

Open
brupje opened this issue Aug 9, 2016 · 0 comments
Open

Problem in HAL #35

brupje opened this issue Aug 9, 2016 · 0 comments

Comments

@brupje
Copy link

brupje commented Aug 9, 2016

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;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant