6.4. DIO Module Migration
Migration Approach: Follow sequential migration for clear understanding of changes at each version. Each migration is organized by individual changes with description, old vs new comparison, and migration actions.
6.4.1. v01.01.00 (i.e release v26.00.00) from v01.01.00 (i.e release v01.04.01) Migration
6.4.1.1. Summary
Version v01.01.00 updates DIO port identifier macros to comply with AUTOSAR naming guidelines:
Port Identifier Macro Rename: Generated port identifier macros renamed from
GPIO_PORT_*toDIO_PORT_*for AUTOSAR naming compliance.
6.4.1.2. Change 1: Port Identifier Macro Rename
6.4.1.2.1. Description
The generated port identifier macros in Dio_Cfg.h previously used a GPIO_PORT_ prefix. These have been renamed to use the DIO_PORT_ prefix to comply with AUTOSAR naming conventions (SRS_BSW_00321) and avoid potential conflicts with other module definitions.
Any application code that directly references the GPIO_PORT_* macros must be updated.
6.4.1.2.2. Old vs New Port Identifiers
Port Identifier Macro Mapping:
v01.01.00 and older |
v01.01.00 |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Pattern: GPIO_PORT_{X} → DIO_PORT_{X} for all port identifiers.`
Code Example:
// v01.01.00 and older
Dio_WritePort(GPIO_PORT_A, 0xFFFFFFFFU);
// v01.01.00
Dio_WritePort(DIO_PORT_A, 0xFFFFFFFFU);
6.4.1.2.3. Migration Actions
Search Application Code: Find all references to
GPIO_PORT_AthroughGPIO_PORT_Hin your application code.Replace Macro Names: Update all references from
GPIO_PORT_*toDIO_PORT_*(e.g.,GPIO_PORT_A→DIO_PORT_A).Regenerate Configuration: Regenerate DIO configuration to get the updated
Dio_Cfg.hwith new macro names.Verify Compilation: Clean build and verify no compilation errors related to undefined
GPIO_PORT_*symbols.
Note
The DioConf_DioPort_* and DioConf_DioChannel_* symbolic name macros are unaffected by this change and do not require updates.