Originally Posted by thloh85
Do you think that the spi_flash.c should be located in a more common location? I don't think that the SPI flash protocol applies to only Devo8. This made me confused for a while when reading the code.
Please correct me if I made a wrong assumption.
All of the code to interact with the hardware is in target/devo8/ Think of it as a hardware abstraction layer. it is true that the Devo10 and Devo12 will share large amounts of the code that is currently in devo8, however, that code is specific to using a specific flash family with an stm32 CPU, and the deviation firmware should be able to compile against different architectures. So yes, the code belongs where it is. For an initial port, I would copy the entire contents of the devo8 dir to devo10, and figure out which pieces are different (since most of that code can be reused with minimal modification). At some point we may decide to share routines across targets where it makes sense so there isn't code duplication, but I don't think now is the time to make those changes.