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: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
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: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
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
Return to “Small Change Requests”
Who is online
Users browsing this forum: No registered users and 6 guests