How does micropython leverage the generic Zephyr driver APIs?

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
Yadnik
Posts: 65
Joined: Thu May 13, 2021 6:01 am

How does micropython leverage the generic Zephyr driver APIs?

Post by Yadnik » Sat Jul 03, 2021 5:28 pm

I am writing a zephyr device drivers and want to know how can micropython leverage the generic Zephyr driver APIs as micropython already has a zephyr port.
The main goal is to have micropython functionality on the board, it already has zephyr firmware flashed on it.Can the community please guide me, that which will be a better option, to add board specific drivers to zephyr and let micropython leverage the generic Zephyr driver APIs something like this https://github.com/zephyrproject-rtos/z ... ivers/gpio .Or add remaining peripheral classes on the existing port as seen here https://github.com/micropython/micropyt ... rts/zephyr (where machine_i2c.c and machine_uart.c are already there).
The final goal of my project is to have complete micropython functionality and have mikrobus click boards running on it.
The details of the board are :https://github.com/Yadnik1/zephyr/tree/ ... om_cc1352r
Thank you very much!!

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: How does micropython leverage the generic Zephyr driver APIs?

Post by jimmo » Thu Jul 08, 2021 12:19 am

Yadnik wrote:
Sat Jul 03, 2021 5:28 pm
Or add remaining peripheral classes on the existing port as seen here https://github.com/micropython/micropyt ... rts/zephyr (where machine_i2c.c and machine_uart.c are already there).
This sounds like the best outcome for the MicroPython project!

Which drivers did you have in mind?

Yadnik
Posts: 65
Joined: Thu May 13, 2021 6:01 am

Re: How does micropython leverage the generic Zephyr driver APIs?

Post by Yadnik » Fri Jul 09, 2021 12:36 pm

I wanted to get Mickroe click boards running for ADC,PWM,GPIO,I2C,UART and SPI protocols.
Just saw that SPI class was also added.Will I have to write the remaining protocol classes and create pull requests in the repository.

Also if you have any resources I can look upto for running click boards on MicroPython it would be very helpful since the readme(https://github.com/micropython/micropyt ... /README.md) file only gives references upto flashing LED.
Thank you very much !!

Post Reply