I want to create this issue to discuss a shared place to store necessary hardware type definitions. These could be stored in the embedded-hal crate, but could also easily be in their own crate. I just think we should discuss a shared place to store these outside the processor specific crates.
There are many type definitions that can be useful when working with low-level sensors. At the moment there are no shared place that such type can or are stored. A couple of very handy types are currently in stm32f30x_hal::time (and also replicated in stm32f103xx_hal) for dealing with time.
An easy first step is to create a type module for embedded-hal and extract the types defined in stm32f30x_hal::time and potentially add more later if necessary.
I'm not sure if there are other definitions apart from time that should be abstracted out. I don't think this issue should be about physical types (e.g. cm or m/s), but should focus on shared types that are necessary for interacting with hardware.
I want to create this issue to discuss a shared place to store necessary hardware type definitions. These could be stored in the
embedded-halcrate, but could also easily be in their own crate. I just think we should discuss a shared place to store these outside the processor specific crates.There are many type definitions that can be useful when working with low-level sensors. At the moment there are no shared place that such type can or are stored. A couple of very handy types are currently in
stm32f30x_hal::time(and also replicated instm32f103xx_hal) for dealing with time.An easy first step is to create a
typemodule forembedded-haland extract the types defined instm32f30x_hal::timeand potentially add more later if necessary.I'm not sure if there are other definitions apart from time that should be abstracted out. I don't think this issue should be about physical types (e.g.
cmorm/s), but should focus on shared types that are necessary for interacting with hardware.