lvgl / lv_apps

Ready to use UIs and high level components for applications
MIT License
11 stars 12 forks source link

lv_port.c shall be added. #5

Open ttxs1002004 opened 5 years ago

ttxs1002004 commented 5 years ago

hi! I think that lv_port.c shall be added to lvgl or l_apps git. the lv_port.c shall include user port code for their LCD or input device. so that 1,lvgl is more structure and user friendly. 2,is more easy to make use of lvgl. 3,is more easy to adaptive code tree of different project.

kisvegabor commented 5 years ago

We can add lv_port_tamplate.c to porting which looks like a main.c and calls lv_init, dispi_init, touchpad_init() etc.

Did you mean something like this?

ttxs1002004 commented 5 years ago

no. lv_port_template.c shall only include interface to hardware or drvier code. so main.c can independent hardware or os or MCU .main.c shall be completely independent of hardware,just is the main loop or logic of app. main.c shall call code within lv_port_template.c, so it is up to user to implement lv_port_template.c to adaptive one's system or arch.

kisvegabor commented 5 years ago

@ttxs1002004 That's also fine. Can you send a PR with the new file?