C Library Import Framework
Posted: Mon Mar 03, 2014 11:46 am
I'm in the process of getting MODBUS working on uPython (using modbus_tk) and am in need of a bit of help on the C side of things.
The modbus_tk code depends on the struct CPython standard library which has yet to be implemented in C for uPython. My plan is to implement the un/pack methods in /micropython/py/struct.c (and whatever else is required to support the modbus_tk python library). I then want to make struct.c an optionally importable uPython library (i.e. import struct) but am unsure how to achieve this.
Can anybody provide a bit of guidance?
The modbus_tk code depends on the struct CPython standard library which has yet to be implemented in C for uPython. My plan is to implement the un/pack methods in /micropython/py/struct.c (and whatever else is required to support the modbus_tk python library). I then want to make struct.c an optionally importable uPython library (i.e. import struct) but am unsure how to achieve this.
Can anybody provide a bit of guidance?