[TM4C123] Porting steps after getting the minimal build to work

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
ExXec
Posts: 58
Joined: Sat Oct 20, 2018 4:02 pm

Re: [TM4C123] Porting steps after getting the minimal build to work

Post by ExXec » Tue Nov 20, 2018 10:27 pm

Ah i see, thanks.

Can you also elaborate in what scenario I would use the set_callback and call_callback functions?

Thanks again.

Exec

Online
User avatar
dhylands
Posts: 3180
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: [TM4C123] Porting steps after getting the minimal build to work

Post by dhylands » Tue Nov 20, 2018 10:34 pm

set_callback is an example of the python code registering a callback with the C code.

call_callback is just a way for the python code to call into C code and then the C code calls the callback that was previously registered using set_callback.

call_callback is a bit artificial. Normally the C code would just decide due to some circumstances (whatever your code needs) to call the callback (often triggered via IRQ of some sort).

ExXec
Posts: 58
Joined: Sat Oct 20, 2018 4:02 pm

Re: [TM4C123] Porting steps after getting the minimal build to work

Post by ExXec » Mon Nov 26, 2018 6:49 pm

Hi,
I started working on the pins file and I noticed, that most ports describe the pin state with a mode ( int, out, alt, od, pp) and the pull type.
However the library for the controller I'm porting to uses a direction(in, out, alt) and a type (pullup, pulldown, od) etc.

Is it better to stay as close as possible to the structure of the STM32 port or can I do it so that there is less conversion needed?
And: If I would do it the second way, is the documentation in the wiki on how to use µPython still valid?

Thanks
-Exec

Post Reply