Skip to content

Conversation

@the-snowwhite
Copy link
Contributor

I found 2 bugs trying to implement spi functionality on the mksocfpga.
Then looked at the bspi.c file history in Linuxcnc:
https://github.com/LinuxCNC/linuxcnc/commits/master/src/hal/drivers/mesa-hostmot2/bspi.c
And found the same fixes and some additional enhancements I added also.
Lastly I added support for the dbspi (buffered spi's with decoded chip selects), as a separete file.
Tested to work on Mksocfpga.

          hm2_bspi_setup_chan(): Change clock divisor mask to 8 bits
                               : transfer length field is 6 bits wide
Fixes: hm2_bspi_write_chan(): sending random values
hm2_bspi_setup_chan(): having uncorrect spi clock rates
And whitespace cleanup

Signed-off-by: Michael Brown <producer@holotronic.dk>
Signed-off-by: Michael Brown <producer@holotronic.dk>
…ptor

Signed-off-by: Michael Brown <producer@holotronic.dk>
Signed-off-by: Michael Brown <producer@holotronic.dk>
@ArcEye
Copy link
Contributor

ArcEye commented Jun 1, 2019

Looks fine to me, but I will leave @cdsteinkuehler to look at this and machinekit/mksocfpga#106 together.

@ArcEye
Copy link
Contributor

ArcEye commented Jun 6, 2019

@cdsteinkuehler is obviously away - tested so merging

@ArcEye ArcEye merged commit a26010d into machinekit:master Jun 6, 2019
@the-snowwhite the-snowwhite deleted the fix_hm2-spi branch June 11, 2019 16:29
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