DIO Driver (Dio)
AUTOSAR Classic I/O Drivers-Modul DIO Driver (Dio, Spezifikation: AUTOSAR_CP_SWS_DIODriver.pdf, AUTOSAR_SWS_DIODriver.pdf, AUTOSAR_SWS_DIO_Driver.pdf).
Funktionen — Übersicht
Dio_LevelType Dio_ReadChannel (Dio_ChannelType ChannelId);Returns the value of the specified DIO channel.void Dio_WriteChannel (Dio_ChannelType ChannelId, Dio_LevelType Level);Service to set a level of a channel.Dio_PortLevelType Dio_ReadPort (Dio_PortType PortId);Returns the level of all channels of that port.void Dio_WritePort (Dio_PortType PortId, Dio_PortLevelType Level);Service to set a value of the port.Dio_PortLevelType Dio_ReadChannelGroup (const Dio_ChannelGroupType* ChannelGroupIdPtr);This Service reads a subset of the adjoining bits of a port.void Dio_WriteChannelGroup (const Dio_ChannelGroupType* ChannelGroupIdPtr, Dio_PortLevelType Level);Service to set a subset of the adjoining bits of a port to a specified level.void Dio_GetVersionInfo (Std_VersionInfoType* VersionInfo);Service to get the version information of this module.Dio_LevelType Dio_FlipChannel (Dio_ChannelType ChannelId);Service to flip (change from 1 to 0 or from 0 to 1) the level of a channel and return the level of the channel after flip.void Dio_MaskedWritePort (Dio_PortType PortId, Dio_PortLevelType Level, Dio_PortLevelType Mask);Service to set the value of a given port with required mask.
Typen — Übersicht
struct Dio_ChannelTypeNumeric ID of a DIO channel.struct Dio_PortTypeNumeric ID of a DIO port.struct Dio_ChannelGroupTypeType for the definition of a channel group, which consists of several adjoining channels within a port.struct Dio_LevelTypeThese are the possible levels a DIO channel can have (input or output)struct Dio_PortLevelTypeIf the µC owns ports of different port widths (e.
Anforderungen — Übersicht
SWS_Dio_00074I f development error detection is enabled , the services Dio_ReadChannel , Dio_WriteChannel and Dio_Flip Channel shall check...SWS_Dio_00075I f development error detection is enabled , the functions Dio_ReadPort , Dio_WritePort and Dio_ Masked WritePort shall check...SWS_Dio_00114I f development error detection is enabled , the functions Dio_ReadChannelGroup and Dio_WriteChannelGroup shall check the...SWS_Dio_00131Module Header File Imported Type Std Std_ Types.SWS_Dio_00140Det _ Report Error Det.SWS_Dio_00177Invalid port requested.SWS_Dio_00178Invalid c hannel g roup requested.SWS_Dio_00188API service called with a NULL pointer.SWS_Dio_00189[SWS_Dio_00189] Upstream requirements: SRS_BSW_00323 ⌈If DET is enabled for the DIO Driver module, the function...SWS_Dio_00200The Dio_MaskedWritePort function shall simultaneously set the levels of the selected output channels.SWS_Dio_00201The Dio_MaskedWritePort function shall ensure that the functionality of the input channels of that port is not affected.SWS_Dio_00202The Dio_MaskedWritePort function shall set the specified value for the channels in the specified port if the corresponding bit...SWS_Dio_00203When the Dio_MaskedWritePort function is called, DIO Channels that are configured as input shall remain unchanged.SWS_Dio_00204When writing a port which is smaller than the Dio_PortLevelType using the Dio_MaskedWritePort function (see [SWS_Dio_00103]),...SWS_Dio_00205The DIO module shall reject configurations with partition mappings which are not supported by the implementation.SWS_Dio_00206The ECUC partitions referenced by DioPortEcucPartitionRef shall b e a subset of the ECUC partitions referenced by...SWS_Dio_00207The ECUC partitions referenced by DioChannelEcucPartitionRef shall be a subset of the ECUC partitions referenced by...SWS_Dio_00209If DioEcucPartitionRef references one or more ECUC partitions, DioPortEcucPartitionRef shall have a multiplicity of greater...SWS_Dio_00210If DioEcucPartitionRef references one or more ECUC part itions, DioChannelEcucPartitionRef shall have a multiplicity of...SWS_Dio_00211If DioPortEcucPartitionRef references one or more ECUC partitions, DioChannelGroupEcucPartitio nRef shall have a multiplicity...SWS_Dio_91001Type of error Related error code Error value Invalid channel requested DIO_ E_ PARAM_ INVALID_ CHANNEL_ ID 0x0A Invalid port...
Funktionen & Typen — Detailansicht
функция Dio_ReadChannel [SWS_Dio_00133] 📄 PDF
Dio_LevelType Dio_ReadChannel(Dio_ChannelType ChannelId);
Returns the value of the specified DIO channel.
функция Dio_WriteChannel [SWS_Dio_00134] 📄 PDF
void Dio_WriteChannel(Dio_ChannelType ChannelId, Dio_LevelType Level);
Service to set a level of a channel.
функция Dio_ReadPort [SWS_Dio_00135] 📄 PDF
Dio_PortLevelType Dio_ReadPort(Dio_PortType PortId);
Returns the level of all channels of that port.
функция Dio_WritePort [SWS_Dio_00136] 📄 PDF
void Dio_WritePort(Dio_PortType PortId, Dio_PortLevelType Level);
Service to set a value of the port.
функция Dio_ReadChannelGroup [SWS_Dio_00137] 📄 PDF
Dio_PortLevelType Dio_ReadChannelGroup(const Dio_ChannelGroupType* ChannelGroupIdPtr);
This Service reads a subset of the adjoining bits of a port.
функция Dio_WriteChannelGroup [SWS_Dio_00138] 📄 PDF
void Dio_WriteChannelGroup(const Dio_ChannelGroupType* ChannelGroupIdPtr, Dio_PortLevelType Level);
Service to set a subset of the adjoining bits of a port to a specified level.
функция Dio_GetVersionInfo [SWS_Dio_00139] 📄 PDF
void Dio_GetVersionInfo(Std_VersionInfoType* VersionInfo);
Service to get the version information of this module.
функция Dio_FlipChannel [SWS_Dio_00190] 📄 PDF
Dio_LevelType Dio_FlipChannel(Dio_ChannelType ChannelId);
Service to flip (change from 1 to 0 or from 0 to 1) the level of a channel and return the level of the channel after flip.
функция Dio_MaskedWritePort [SWS_Dio_00300] 📄 PDF
void Dio_MaskedWritePort(Dio_PortType PortId, Dio_PortLevelType Level, Dio_PortLevelType Mask);
Service to set the value of a given port with required mask.
тип Dio_ChannelType [SWS_Dio_00182] 📄 PDF
Numeric ID of a DIO channel.
тип Dio_PortType [SWS_Dio_00183] 📄 PDF
Numeric ID of a DIO port.
тип Dio_ChannelGroupType [SWS_Dio_00184] 📄 PDF
Type for the definition of a channel group, which consists of several adjoining channels within a port.
тип Dio_LevelType [SWS_Dio_00185] 📄 PDF
These are the possible levels a DIO channel can have (input or output)
тип Dio_PortLevelType [SWS_Dio_00186] 📄 PDF
If the µC owns ports of different port widths (e.g. 4, 8,16...Bit) Dio_ Port Level Type inherits the size of the larg est port.
requirement SWS_Dio_00074 [SWS_Dio_00074] 📄 PDF
I f development error detection is enabled , the services Dio_ReadChannel , Dio_WriteChannel and Dio_Flip Channel shall check the “Channel Id ” parameter to be valid within the current configuration. If the “Channel Id ” paramet er is invalid, the functions shall report the error code DIO_E_PARAM_INVALID_CHANNEL_ID to the DET.
requirement SWS_Dio_00075 [SWS_Dio_00075] 📄 PDF
I f development error detection is enabled , the functions Dio_ReadPort , Dio_WritePort and Dio_ Masked WritePort shall check the “Port Id ” parameter to be valid within the current configuration. If the “Port Id ” parameter is invalid, the functions shall report the error code DIO_E_PARAM_INVALID_PORT_ID to the DET.
requirement SWS_Dio_00114 [SWS_Dio_00114] 📄 PDF
I f development error detection is enabled , the functions Dio_ReadChannelGroup and Dio_WriteChannelGroup shall check the “ChannelGroupId Ptr ” parameter to be valid within the current configuration. If the “ChannelGroupId P tr ” parameter is invalid, the functions shall report the error code DIO_E_PARAM_INVALID_GROUP to the DET.
requirement SWS_Dio_00131 [SWS_Dio_00131] 📄 PDF
Module Header File Imported Type Std Std_ Types.h Std _ Return Type Std_ Types.h Std _ Version Info Type
requirement SWS_Dio_00140 [SWS_Dio_00140] 📄 PDF
Det _ Report Error Det.h Service to report development errors.
requirement SWS_Dio_00177 [SWS_Dio_00177] 📄 PDF
Invalid port requested. Related error code: DI O_E_PARAM_INVALID_PORT_ID Value: [hex]: 0x14
requirement SWS_Dio_00178 [SWS_Dio_00178] 📄 PDF
Invalid c hannel g roup requested. Related error code: DIO_E_PARAM_INVALID_GROUP Value: [hex]: 0x1F
requirement SWS_Dio_00188 [SWS_Dio_00188] 📄 PDF
API service called with a NULL pointer. Related error code: DIO_E_ PARAM_POINTER Value: [hex]: 0x20
requirement SWS_Dio_00189 [SWS_Dio_00189] 📄 PDF
[SWS_Dio_00189] Upstream requirements: SRS_BSW_00323 ⌈If DET is enabled for the DIO Driver module, the function Dio_GetVersionInfo shall raise DIO_E_PARAM_POINTER, if the argument is NULL pointer and return with- out any action.⌋
requirement SWS_Dio_00200 [SWS_Dio_00200] 📄 PDF
The Dio_MaskedWritePort function shall simultaneously set the levels of the selected output channels. Mask argument specifies which bits are selected: a bit value '0' means the corresponding channel is not selected, a bit value '1' means the corresponding channel is selected. Level argument s pecifies the physical levels: a bit value '0' sets the corresponding channel to physical STD_LOW , a bit value '1' sets the corresponding channel to physical STD_HIGH .
requirement SWS_Dio_00201 [SWS_Dio_00201] 📄 PDF
The Dio_MaskedWritePort function shall ensure that the functionality of the input channels of that port is not affected.
requirement SWS_Dio_00202 [SWS_Dio_00202] 📄 PDF
The Dio_MaskedWritePort function shall set the specified value for the channels in the specified port if the corresponding bit in Mask is '1'.
requirement SWS_Dio_00203 [SWS_Dio_00203] 📄 PDF
When the Dio_MaskedWritePort function is called, DIO Channels that are configured as input shall remain unchanged.
requirement SWS_Dio_00204 [SWS_Dio_00204] 📄 PDF
When writing a port which is smaller than the Dio_PortLevelType using the Dio_MaskedWritePort function (see [SWS_Dio_00103]), the function shall ignore the MSB.
requirement SWS_Dio_00205 [SWS_Dio_00205] 📄 PDF
The DIO module shall reject configurations with partition mappings which are not supported by the implementation .
requirement SWS_Dio_00206 [SWS_Dio_00206] 📄 PDF
The ECUC partitions referenced by DioPortEcucPartitionRef shall b e a subset of the ECUC partitions referenced by DioEcucPartitionRef.
requirement SWS_Dio_00207 [SWS_Dio_00207] 📄 PDF
The ECUC partitions referenced by DioChannelEcucPartitionRef shall be a subset of the ECUC partitions referenced by DioPortEcucPartitionRef.
requirement SWS_Dio_00209 [SWS_Dio_00209] 📄 PDF
If DioEcucPartitionRef references one or more ECUC partitions, DioPortEcucPartitionRef shall have a multiplicity of greater than zero and reference one or several of these ECUC partitions as well.
requirement SWS_Dio_00210 [SWS_Dio_00210] 📄 PDF
If DioEcucPartitionRef references one or more ECUC part itions, DioChannelEcucPartitionRef shall have a multiplicity of greater than zero and reference one or several of these ECUC partitions as well.
requirement SWS_Dio_00211 [SWS_Dio_00211] 📄 PDF
If DioPortEcucPartitionRef references one or more ECUC partitions, DioChannelGroupEcucPartitio nRef shall have a multiplicity of greater than zero and reference one or several of these ECUC partitions as well.
requirement SWS_Dio_91001 [SWS_Dio_91001] 📄 PDF
Type of error Related error code Error value Invalid channel requested DIO_ E_ PARAM_ INVALID_ CHANNEL_ ID 0x0A Invalid port requested DIO_ E_ PARAM_ INVALID_ PORT_ ID 0x14 Invalid channel group requested DIO_ E_ PARAM_ INVALID_ GROUP 0x1F API service called with a NULL pointer DIO_ E_ PARAM_ POINTER 0x20
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/CP_MOD_Dio- Status
- unspecified
- Version
AUTOSAR/AP/record/CP_MOD_Dio@rel:R20-11#8b052e78- Content hash
8b052e78- Source
- https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_DIODriver.pdf#nameddest=SWS_Dio_00133