Closed
Description
What do you think about having ada-enet as a crate (or two crates) in Alire? Does it worth spending time?
I mean we split the code into a target independent part and stm32 dependent driver. I guess we can have a target independent crate rather easily. I can send a PR if you want. It won't break current configure
scripts. By having an independent part, people will be able to write drivers for specific hardware.
Wrapping stm32 driver as a crate is harder, because it depends on STM32 packages and no crate provides these packages right now. I did an experiment with next approach:
- I've made a
enet_stm32
crate that depends on "virtual"stm32
crate and haswith "stm32.gpr";
clause in the project file. - a board (in my case
stm32f4xx_m
) hasprovides = ["stm32=1.0"]
inalire.toml
. It providesstm32.gpr
project with a copy of Ada_Drivers_Library for STM32 and STM32_SVD packages. - an application crate uses
enet
,enet_stm32
,stm32f4xx_m
crates and configures network device as needed.
Metadata
Metadata
Assignees
Labels
No labels