【AutoSAR】【MCAL】Dio
创始人
2024-05-29 04:47:23

一、结构

在这里插入图片描述

二、功能介绍
DIO(数字输入输出)驱动模块主要是对端口(Port),通道(Channel)和通道组(ChannelGroup)进行读写操作。

通道(Channel):指引脚,他们一般都具有复用功能;
端口(Port):含有相同类复用功能的引脚组成一个端口(Port)
通道组:端口(Port)中的部分或全部通道(Channel)又可组成一个通道组(ChannelGroup)。
在这里插入图片描述
三、通道组
通道组是指在同一个口上的一组相邻的通道。下图为通道组的说明,以及对通道组进行操作的结果。
在这里插入图片描述
四、功能接口函数

Dio_LevelType Dio_ReadChannel(Dio_ChannelType ChannelId)
void Dio_WriteChannel(Dio_ChannelType ChannelId,Dio_LevelType Level)
Dio_PortLevelType Dio_ReadPort(Dio_PortType PortId)
void Dio_WritePort(Dio_PortType PortId,Dio_PortLevelType Level)
Dio_PortLevelType Dio_ReadChannelGroup(const Dio_ChannelGroupType* ChannelGroupIdPtr)
void Dio_WriteChannelGroup(const Dio_ChannelGroupType* ChannelGroupIdPtr,Dio_PortLevelType Level)
void Dio_GetVersionInfo(Std_VersionInfoType* VersionInfo)
Dio_LevelType Dio_FlipChannel(Dio_ChannelType ChannelId)
void Dio_MaskedWritePort(Dio_PortType PortId,Dio_PortLevelType Level,Dio_PortLevelType Mask)

Dio_LevelType Dio_ReadChannel(Dio_ChannelType ChannelId)
void Dio_WriteChannel(Dio_ChannelType ChannelId,Dio_LevelType Level)
Dio_PortLevelType Dio_ReadPort(Dio_PortType PortId)
void Dio_WritePort(Dio_PortType PortId,Dio_PortLevelType Level)
Dio_PortLevelType Dio_ReadChannelGroup(const Dio_ChannelGroupType* ChannelGroupIdPtr)
void Dio_WriteChannelGroup(const Dio_ChannelGroupType* ChannelGroupIdPtr,Dio_PortLevelType Level)
void Dio_GetVersionInfo(Std_VersionInfoType* VersionInfo)
Dio_LevelType Dio_FlipChannel(Dio_ChannelType ChannelId)
void Dio_MaskedWritePort(Dio_PortType PortId,Dio_PortLevelType Level,Dio_PortLevelType Mask)
五、EB配置
1、结构
在这里插入图片描述
2、配置项
在这里插入图片描述

相关内容

热门资讯

世界上最漂亮的人 世界上最漂亮... 此前在某网上,选出了全球265万颜值姣好的女性。从这些数量庞大的女性群体中,人们投票选出了心目中最美...
北京的名胜古迹 北京最著名的景... 北京从元代开始,逐渐走上帝国首都的道路,先是成为大辽朝五大首都之一的南京城,随着金灭辽,金代从海陵王...
苗族的传统节日 贵州苗族节日有... 【岜沙苗族芦笙节】岜沙,苗语叫“分送”,距从江县城7.5公里,是世界上最崇拜树木并以树为神的枪手部落...
猫咪吃了塑料袋怎么办 猫咪误食... 你知道吗?塑料袋放久了会长猫哦!要说猫咪对塑料袋的喜爱程度完完全全可以媲美纸箱家里只要一有塑料袋的响...