Hi, I've noticed at least one (SPIConfig) untagged struct.
I've been toying with introducing more C++ into my pet projects, and one thing this prevents is doing C++ forward declaration. Is this done for a specific reason in Chibi, or just an oversight/nobody cared until me?
Specifically the difference is between
typedef struct {
...
} SPIConfig;
and
typedef struct SPIConfig {
...
} SPIConfig;
I'd be happy to submit patches, but wanted to ask first in case they have to remain in their current state.
Untagged structs in ChibiOS Topic is solved
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: Untagged structs in ChibiOS
Hi,
Just oversight, C++ for HAL was not a requirement thus not tested. Please feel free to submit patches and, eventually, report other anomalies.
Please avoid giving structure the same name of types, SPIConfig should become hal_spi_config, we use this convention already for RT.
Giovanni
Just oversight, C++ for HAL was not a requirement thus not tested. Please feel free to submit patches and, eventually, report other anomalies.
Please avoid giving structure the same name of types, SPIConfig should become hal_spi_config, we use this convention already for RT.
Giovanni
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: Untagged structs in ChibiOS
Hi,
This problem is being addressed in all drivers for consistency.
Giovanni
This problem is being addressed in all drivers for consistency.
Giovanni