往死里写
来源:互联网 发布:安卓7.0数据库编辑器 编辑:程序博客网 时间:2024/06/07 03:53
The SM1 activate Byte (Register 0x80E) was read before reading AL Event register.
1. Handle Mailbox Read event
2. Handle repeat toggle request
3. Handle Mailbox write event
*/
// the SyncManager change event(0x220:4) could be acknowledged by reading the SM1 control register without notification to the local application =>check if the syncManger 1 // is still enable
// SM 1 (Mailbox Read) event is set, when the mailbox was read from the master,
// to acknowledge the event the first byte of the mailbox has to be written,
// by writing the first byte the mailbox is locked, too
u8dummy = 0;
HW_EscWriteByte(u8dummy,u16EscAddrSendMbx);
// the Mailbox Read event in the variable ALEventReg shall be reset before calling MBX_MailboxReadInd, where a new mailbox datagram (if available) could be stored in the send mailbox
ALEventReg &= ~(MAILBOX_READ_EVENT);
MBX_MailboxReadInd();
// bMbxRepeatToggle holds the last state of the Repeat Bit (Bit 1)
判断是否有repeat request请求
/* Repeat Bit (Bit 1) has toggled, there is a repeat request, in MBX_MailboxRepeatReq the correct response will put in the send mailbox again */
在这里调用函数MBX_MailboxRepeatReq(); 函数
响应the repeat request after the send mailbox was updated by writing the Repeat Bit in the Repeat Ack Bit of the PDI Ctrl-Byte of SM1(Register 0x80F)
sm1Activate &= SM_SETTING_REPEAT_ACK;
HW_EscWriteByte(sm1Activate,(ESC_SM_PDICONTROL_OFFSET + SIZEOF_SM_REGISTER));
/*SM 0 (Mailbox Write) event is set, when the mailbox was written from the master, to acknowledge the event the first byte of the mailbox has to be read, which will be done in MBX_CheckAndCopyMailbox */
/*the Mailbox Write event in the variable ALEventReg shall be reset before calling MBX_CheckAnd CopyMailbox, where the received mailbox datagram will be processed*/
ALEventReg &= ~(MAILBOX_WRITE_EVENT);
MBX_CheckAndCopyMailbox();
- 往死里写
- 往死里写--邮箱处理
- 往死里写——MBX_Main()
- 往死里写——SDOS_SdoInfoInd
- 往死里写——mainloop函数
- 往死里写——Free_run Mode 程序实现
- 往死里写——从站mailbox实现
- 往死里写——SDO处理2-2
- 往死里写——ECAT_Main()状态机处理
- 往死里写——SDO处理过程2-1
- 物理白痴的我
- input 子系统分析
- 每日一题(27) - 旋转数组的最小数字
- Jboss AS 7结合EclipseLink 配置每个项目单独的日志文件
- WPF窗体动画显示和关闭
- 往死里写
- Svn和Maven持续集成需要注意的问题
- macports could not set effective gid to 0
- JavaScript学习笔记——对象基础
- navicat for mysql 10.1.7注册码
- Hadoop streaming 使用 C 语言动态链接库
- Proe4.0使用VB.net生成缩略图方法
- 排序算法之AS3
- JavaScript学习笔记——继承