I'm trying to figure out the best use of Git for my development team. We work on multiple C projects that share some common modules, each one varying a bit in each project. A module can be a hardware driver, a sensor driver using a hardware driver, an algorithm library, a task using a library with a sensor module, etc.
That means that if a module is in both projectA and projectB, a developer of projectA might want to change a piece of code in this module, to propose this change to the library owner who will accept it, without that it directly changes the state of the module in projectB. Then, the developer of projectB might want, or not want, to update its module, as well as modifying it a bit to match his needs.
I've already read this Q/A but I am not sure it's the same scenario, I think that in this Q/A the author does not want to modify the module into projectA or projectB. Another difference with this Q/A is that I would really, really prefer if this was possible while having all my modules in the same repository (but the projects in different repositories). This is because we're working on embedded projects so our libraries cannot be really independent, they are organized by layers. It would seem crazy for us to have one repository per software module (sensor this, sensor that, algorithm this, algorithm that, task this, task that, hardware module this, hardware module that, etc).
I have also read this Q/A but I'm not sure if adding all the modules in one submodule allow a project developer to manage each module independently.
Would it be possible to work like this while having one big library/modules repository, and projects repositories ? If so how should we work ? Can we consider the projects as forks of the main modules collection repository or using it as a submodule is the way to go ?