K60 - GPIO头文件分析
[cpp] view plaincopyprint?
1. /* ---------------------------------------------------------------------------- 2. -- PORT
3. ---------------------------------------------------------------------------- */ 4. 5. /**
6. * @addtogroup PORT_Peripheral PORT 7. * @{ 8. */ 9.
10. /** PORT - Peripheral register structure */ 11. typedef struct PORT_MemMap {
12. uint32_t PCR[32]; /**< Pin Control Register
n, array offset: 0x0, array step: 0x4 */
13. uint32_t GPCLR; /**< Global Pin Control L
ow Register, offset: 0x80 */
14. uint32_t GPCHR; /**< Global Pin Control H
igh Register, offset: 0x84 */ 15. uint8_t RESERVED_0[24];
16. uint32_t ISFR; /**< Interrupt Status Fla
g Register, offset: 0xA0 */ 17. uint8_t RESERVED_1[28];
18. uint32_t DFER; /**< Digital Filter Enabl
e Register, offset: 0xC0 */
19. uint32_t DFCR; /**< Digital Filter Clock
Register, offset: 0xC4 */
20. uint32_t DFWR; /**< Digital Filter Width
Register, offset: 0xC8 */ 21. } volatile *PORT_MemMapPtr; 22.
23. /* ----------------------------------------------------------------------------
24. -- PORT - Register accessor macros
25. ---------------------------------------------------------------------------- */ 26. 27. /**
28. * @addtogroup PORT_Register_Accessor_Macros PORT - Register accessor macros
29. * @{ 30. */ 31.
32.
33. /* PORT - Register accessors */
34. #define PORT_PCR_REG(base,index) ((base)->PCR[index]) 35. #define PORT_GPCLR_REG(base) ((base)->GPCLR) 36. #define PORT_GPCHR_REG(base) ((base)->GPCHR) 37. #define PORT_ISFR_REG(base) ((base)->ISFR) 38. #define PORT_DFER_REG(base) ((base)->DFER) 39. #define PORT_DFCR_REG(base) ((base)->DFCR) 40. #define PORT_DFWR_REG(base) ((base)->DFWR) 41. 42. /** 43. * @}
44. */ /* end of group PORT_Register_Accessor_Macros */ 45. 46.
47. /* ----------------------------------------------------------------------------
48. -- PORT Register Masks
49. ---------------------------------------------------------------------------- */ 50. 51. /**
52. * @addtogroup PORT_Register_Masks PORT Register Masks 53. * @{ 54. */ 55.
56. /* PCR Bit Fields */
57. #define PORT_PCR_PS_MASK 0x1u 58. #define PORT_PCR_PS_SHIFT 0 59. #define PORT_PCR_PE_MASK 0x2u 60. #define PORT_PCR_PE_SHIFT 1 61. #define PORT_PCR_SRE_MASK 0x4u 62. #define PORT_PCR_SRE_SHIFT 2 63. #define PORT_PCR_PFE_MASK 0x10u 64. #define PORT_PCR_PFE_SHIFT 4 65. #define PORT_PCR_ODE_MASK 0x20u 66. #define PORT_PCR_ODE_SHIFT 5 67. #define PORT_PCR_DSE_MASK 0x40u 68. #define PORT_PCR_DSE_SHIFT 6 69. #define PORT_PCR_MUX_MASK 0x700u 70. #define PORT_PCR_MUX_SHIFT 8
71. #define PORT_PCR_MUX(x) (((uint32_t)(((uint32_t)(x)
)< 72. #define PORT_PCR_LK_MASK 0x8000u 73. #define PORT_PCR_LK_SHIFT 15 74. #define PORT_PCR_IRQC_MASK 0xF0000u 75. #define PORT_PCR_IRQC_SHIFT 16 76. #define PORT_PCR_IRQC(x) (((uint32_t)(((uint32_t)(x) )< 77. #define PORT_PCR_ISF_MASK 0x1000000u 78. #define PORT_PCR_ISF_SHIFT 24 79. /* GPCLR Bit Fields */ 80. #define PORT_GPCLR_GPWD_MASK 0xFFFFu 81. #define PORT_GPCLR_GPWD_SHIFT 0 82. #define PORT_GPCLR_GPWD(x) (((uint32_t)(((uint32_t)(x) )< 83. #define PORT_GPCLR_GPWE_MASK 0xFFFF0000u 84. #define PORT_GPCLR_GPWE_SHIFT 16 85. #define PORT_GPCLR_GPWE(x) (((uint32_t)(((uint32_t)(x) )< 87. #define PORT_GPCHR_GPWD_MASK 0xFFFFu 88. #define PORT_GPCHR_GPWD_SHIFT 0 89. #define PORT_GPCHR_GPWD(x) (((uint32_t)(((uint32_t)(x) )< 90. #define PORT_GPCHR_GPWE_MASK 0xFFFF0000u 91. #define PORT_GPCHR_GPWE_SHIFT 16 92. #define PORT_GPCHR_GPWE(x) (((uint32_t)(((uint32_t)(x) )< 94. #define PORT_ISFR_ISF_MASK 0xFFFFFFFFu 95. #define PORT_ISFR_ISF_SHIFT 0 96. #define PORT_ISFR_ISF(x) (((uint32_t)(((uint32_t)(x) )< 98. #define PORT_DFER_DFE_MASK 0xFFFFFFFFu 99. #define PORT_DFER_DFE_SHIFT 0 100. #define PORT_DFER_DFE(x)
…… 此处隐藏:4169字,全部文档内容请下载后查看。喜欢就下载吧 ……
相关推荐:
- [基础教育]2016-2022年中国钢芯铝绞线市场现状调
- [基础教育]语文部编版初一语文下册练习题 句式变
- [基础教育]南京继续教育参考答案--深入学习贯彻习
- [基础教育]国旗下讲话稿——珍惜时间好读书
- [基础教育]北师大版六年级数学下册圆锥的体积教学
- [基础教育]人教版-音乐-四年级下册-四年级下册音
- [基础教育]乔布斯2019年斯坦福大学毕业典礼致辞.d
- [基础教育]2015年加油站安全知识竞赛试题及答案
- [基础教育]2020年教师年度考核个人工作总结
- [基础教育]2019年中考历史试题-2019年大庆市初中
- [基础教育]初三仁爱英语第一轮总复习教案
- [基础教育]SG-A094电气配管安装工程隐蔽验收记录
- [基础教育]冀教版小学数学三年级下册第六单元教材
- [基础教育]青岛版(五制)小学科学二年级下册16《制
- [基础教育]2018-2019年初中科学初一中考真卷测试
- [基础教育]幼儿园大班期末简短评语精选
- [基础教育]2018云南临沧公务员考试申论技巧:这样
- [基础教育]学校食堂经营管理方案
- [基础教育]新中国砥砺奋进的七十年原文
- [基础教育]真空泵的选型及常用计算公式
- 高职田径课程教学现状与对策
- 全髋关节置换术在老年股骨颈骨折患者中
- 青人社厅函〔2016〕576号(附件)工资
- cp101-07砂子检验作业指导书 - secret
- 微观经济学 第八章 博弈论 习题
- 2014高考真题(词语运用)汇编及答案
- 2018年人教版七年级语文下册《第三单元
- 苏教版数学四年级上册第一单元试题 - M
- 四川大学新闻与传播考研2000-2010年真
- 浙江万里学院英语专业四年制本科教学计
- 最新2018马年事业祝福语-范文word版(2
- 最全模具行业术语英文翻译
- 皮亚杰的发展心理学理论
- 64篇高考情景式默写 练习题及答案
- 仿写(学生稿)
- 《SQL Server数据库技术》试卷A
- 第七章作业答案
- 江苏省赣榆县海头高级中学高中语文必修
- 浙江省2001年10月自考正常人体解剖学答
- 2012英语重点短语




