打印

HAL库BDMA多组通道统一命名

[复制链接]
200|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
Spikess|  楼主 | 2018-8-10 08:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
定义方式
typedef struct
{
  __IO uint32_t CCR; /*!< DMA channel x configuration register  Addr offset: 0x08 + 0x14 * x,x = 0 to 7 */
  __IO uint32_t CNDTR;/*!< DMA channel x number of data register Addr offset: 0x0C + 0x14 * x,x = 0 to 7 */
  __IO uint32_t CPAR; /*!< DMA channel x peripheral address register Addr offset: 0x10 + 0x14 * x, x = 0 to 7*/
  __IO uint32_t CMAR; /*!< DMA channel x memory address register, Addr offset: 0x14 + 0x14 * x, x = 0 to 7 */
} BDMA_Channel_TypeDef;

地址
#define BDMA_Channel0  ((BDMA_Channel_TypeDef *) BDMA_Channel0_BASE)
#define BDMA_Channel1  ((BDMA_Channel_TypeDef *) BDMA_Channel1_BASE)
#define BDMA_Channel2  ((BDMA_Channel_TypeDef *) BDMA_Channel2_BASE)
#define BDMA_Channel3  ((BDMA_Channel_TypeDef *) BDMA_Channel3_BASE)
#define BDMA_Channel4  ((BDMA_Channel_TypeDef *) BDMA_Channel4_BASE)
#define BDMA_Channel5  ((BDMA_Channel_TypeDef *) BDMA_Channel5_BASE)
#define BDMA_Channel6  ((BDMA_Channel_TypeDef *) BDMA_Channel6_BASE)
#define BDMA_Channel7  ((BDMA_Channel_TypeDef *) BDMA_Channel7_BASE)

使用特权

评论回复

相关下载

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

417

主题

421

帖子

0

粉丝