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

add missing XCK definitions for USART SPI #43

Merged
merged 2 commits into from
Feb 9, 2021

Conversation

jayzakk
Copy link
Collaborator

@jayzakk jayzakk commented Aug 16, 2020

We are missing definitions for USART-as-SPI, which I was playing around with.

These are usually coming from avr-gcc mcu header files, but - as we know - in using the 328p files we are missing some functions and definitions ^^

I used the ones from iom324pa.h (as the most "identical" mcu) and changed accordingly.

@dbuezas
Copy link
Owner

dbuezas commented Aug 16, 2020

You are really taking every bit ot this board apart! 🎉
Can you also put your code (your "playing around" sketch) in the examples folder?

@jayzakk
Copy link
Collaborator Author

jayzakk commented Aug 17, 2020

At the moment, it got a rather "large" play code -> https://github.com/jayzakk/lgt8f-tests/blob/master/spitest-lgt8f/spitest-lgt8f.ino
Where I even did not need the XCK, as I just wanted to abuse the SPI for LEDs ^^

But I can build up some test code for whatever "real" SPI device I have around here,

@jayzakk
Copy link
Collaborator Author

jayzakk commented Aug 22, 2020

There already is a sample sketch around: SPI_UART, which can be used used with simple defines at the nRF24L01 library.

It's "only" missing correct clock selection (it always assumes 16MHz sysclock) and a possibility to switch pins D0/D1 to alternate D5/D6 (only possible at LGT8F). As of now, could not even used as a replacement for SPI.h, as it's missing all the "new" functions (begin/endTransactions, SPISettings(), ...) and only the long-time-obsoleted ones.

Maybe time to write an replacement for that and include some own SPI_UART as SPI.h companion by default?

It just happened that I ordered a couple of those nrf24 modules two days ago ^^

@jayzakk
Copy link
Collaborator Author

jayzakk commented Aug 26, 2020

@dbuezas, could we merge the two relevant files from https://github.com/jayzakk/spi-uart-test to core?
If yes, I'd like to create a PR.

@dbuezas dbuezas force-pushed the master branch 2 times, most recently from 0dd93f9 to 26248ad Compare September 20, 2020 13:32
@dbuezas
Copy link
Owner

dbuezas commented Sep 20, 2020

So this should be merged before?
#45

@jayzakk
Copy link
Collaborator Author

jayzakk commented Sep 20, 2020

If you merge, would be perfect, though it shows conflicts now

@dbuezas
Copy link
Owner

dbuezas commented Oct 11, 2020

Can you fix them so I can merge this 🙏 :)

@dbuezas
Copy link
Owner

dbuezas commented Feb 7, 2021

hey @jayzakk !
I'd love to merge this one, the conflict looks harmless, can you patch it? :)

@jayzakk
Copy link
Collaborator Author

jayzakk commented Feb 9, 2021

Huh, I never used that web resolve thing. Guess it's ok now :-/

@dbuezas dbuezas merged commit 75e771e into dbuezas:master Feb 9, 2021
@LaZsolt
Copy link
Collaborator

LaZsolt commented Mar 22, 2021

@jayzakk

Huh, I never used that web resolve thing. Guess it's ok now :-/

Wasn't fully success that web resolve thing. I deleted that macros which was defined twice. #122 (comment)

@jayzakk
Copy link
Collaborator Author

jayzakk commented Mar 22, 2021

Thanks @LaZsolt
I won't use that anymore ^^

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

Successfully merging this pull request may close these issues.

3 participants