查看: 2424|回复: 1

[已解决] PWM 不能正常工作(已解决)

[复制链接]

该用户从未签到

6

主题

17

帖子

0

新手上路

Rank: 1

积分
36
最后登录
1970-1-1
发表于 2013-7-23 17:07:55 | 显示全部楼层 |阅读模式
 
LDD_TDeviceData* PWM1_Init(LDD_TUserData *UserDataPtr)
{
  /* Allocate device structure */
  PWM1_TDeviceData *DeviceDataPrv;
  /* {MQXLite RTOS Adapter} Driver memory allocation: Dynamic allocation is simulated by a pointer to the static object */
  DeviceDataPrv = &DeviceDataPrv__DEFAULT_RTOS_ALLOC;
  DeviceDataPrv->UserDataPtr = UserDataPtr; /* Store the RTOS device structure */
  DeviceDataPrv->EnUser = TRUE;        /* Set the flag "device enabled" */
  DeviceDataPrv->RatioStore = 0x01U;   /* Ratio after initialization */
  DeviceDataPrv->LinkedDeviceDataPtr = TU1_Init((LDD_TUserData *)NULL);
  if (DeviceDataPrv->LinkedDeviceDataPtr == NULL) { /* Is initialization of TimerUnit unsuccessful? */
    /* Deallocation of the device structure */
    /* {MQXLite RTOS Adapter} Driver memory deallocation: Dynamic allocation is simulated, no deallocation code is generated */
    return NULL;                       /* If so, then the PWM initialization is also unsuccessful */
  }
  /* Registration of the device structure */
  PE_LDD_RegisterDeviceStructure(PE_LDD_COMPONENT_PWM1_ID,DeviceDataPrv);
  return ((LDD_TDeviceData *)DeviceDataPrv); /* Return pointer to the device data structure */
}

这个参数传什么呢?我传的是NULL;但是没现象
各位大神看哪里有问题,下面附件是我的工程
我知道答案 目前已有0人回答

Interface.rar

3.24 MB, 下载次数: 5, 下载积分: 威望 1

回复

使用道具 举报

该用户从未签到

6

主题

17

帖子

0

新手上路

Rank: 1

积分
36
最后登录
1970-1-1
 楼主| 发表于 2013-7-26 14:27:41 | 显示全部楼层

回复:PWM 不能正常工作(正解)

 
我自己回复吧!这个问题我已经解决了。传NULL是可以的。感觉专家软件是挺简单的,但是可控性很差得自己去修改。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 注册/登录

本版积分规则

关闭

站长推荐上一条 /3 下一条

Archiver|手机版|小黑屋|恩智浦技术社区

GMT+8, 2025-7-20 08:02 , Processed in 0.087672 second(s), 23 queries , MemCache On.

Powered by Discuz! X3.4

Copyright © 2001-2024, Tencent Cloud.

快速回复 返回顶部 返回列表