Hello,
I am trying to write a driver for an FPGA development board. I am using the NIOS2 port posted here:
https://github.com/bitmachinejc/micropython-nios2
It works well, but I need to access some hardware resources both in the FPGA and on the dev board. I would like to know the best approach. I think from my research in the forums and documentation, that my best option is to use the macros "MP_DEFINE_CONST_FUN_OBJ_x" to define a C based module that could then be imported and run from python. But I am not finding a lot of documentation on those macros, and I wonder if there is another approach I should consider. I may want to run some SPI and I2C commands, and it would be nice to be able to leverage all the work that has already been done to support those protocols. Obviously it would also be preferable to define my driver in pure python, but I don't think that is possible since there is no board defined for my specific hardware.
Thanks.
New hardware driver for new board
Re: New hardware driver for new board
If I'm understanding correctly, you're trying to "port" micropython to your board, rather than "writing a driver"? If so, I'll move your topic to somewhere more appropriate. You you might want to ask your question in "Development of Micropython" subforum, since it's kind of independent of the board you're using. Let me search for a similar question that was answered before: http://forum.micropython.org/viewtopic. ... 858#p10461