Open ethanjli opened 4 years ago
An exception to this is that it may be acceptable to define inner namespaces inside files to help organize variables, e.g. as in https://github.com/pez-globo/pufferfish-software/blob/27d44e4bc473fc011b55cfa1061bdc272f19139c/firmware/ventilator-controller-stm32/Core/Inc/Pufferfish/Driver/Serial/FDO2/Commands.h . However, if the file becomes too big, it may be better to convert it into a folder with files, each of which corresponds to one sub-namespace. (cc @rohanpurohit )
Right now the namespace vs. file path relationships for drivers and HAL modules are not totally consistent/logical. We should move all driver modules into drivers, and we should establish a 1-to-1 correspondence between namespace paths and file paths everywhere. For example, the STM32 HAL modules are currently in files like
Pufferfish/HAL/STM32/HALPWM.h
and classes likePufferfish::HAL::HALPWM
; they should instead be in files likePufferfish/HAL/STM32/PWM.h
and classes likePufferfish::HAL::STM32::PWM
.