Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup hal drivers (part 2) #23

Closed
puzrin opened this issue Aug 14, 2020 · 6 comments
Closed

Cleanup hal drivers (part 2) #23

puzrin opened this issue Aug 14, 2020 · 6 comments

Comments

@puzrin
Copy link
Collaborator

puzrin commented Aug 14, 2020

Continue of #22.

Pio fixed bug with search paths or our devboard and we can finish with the rest. I already removed some files https://github.com/lvgl/lv_platformio/commits/master.

@kisvegabor could you check content of ttf/touchpad src https://github.com/lvgl/lv_platformio/tree/master/hal/stm32f429_disco? Can those be reduced by reuse of board drivers from hal?

See ~/.platformio/packages/framework-stm32cube/f4/Drivers/BSP/STM32F429I-Discovery

@kisvegabor
Copy link
Member

It seems the rest of the init function are not part of BSP. They are added manually in the official examples too. See:

@puzrin
Copy link
Collaborator Author

puzrin commented Aug 18, 2020

Ok. Let me ask different. There are 2 BSP files:

  • ~/.platformio/packages/framework-stm32cube/f4/Drivers/BSP/STM32F429I-Discovery/stm32f429i_discovery_lcd.c
  • ~/.platformio/packages/framework-stm32cube/f4/Drivers/BSP/STM32F429I-Discovery/stm32f429i_discovery_ts.c

Can those be reused by driver to reduce code size? A first glance, those already have everything and need only very thin wrapper.

@kisvegabor
Copy link
Member

Thanks!

I could drop most of the functions. Now tft.c is only 200 lines. I don't have the dev board with me now so I can test it only a little bit later.

@kisvegabor
Copy link
Member

I've tested an pushed the tft changes.

@puzrin puzrin closed this as completed Aug 19, 2020
@puzrin
Copy link
Collaborator Author

puzrin commented Aug 19, 2020

Thanks! I think now drivers looks "simple" and will no scare anyone :).

@kisvegabor
Copy link
Member

Looks great! Especially after removing the tft and touchpad directories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants