STM32 CUBEMX HAL PS2数据读取并解析 硬件SPI

上传者: m0_62524451 | 上传时间: 2025-04-19 00:02:47 | 文件大小: 10.76MB | 文件类型: ZIP
PS2 由手柄与接收器两部分组成,手柄主要负责发送按键信息。接通电源并打开手柄开关时,手柄与接收器自动配对连接,在未配对成功的状态下,接收器绿灯闪烁,手柄上的灯也会闪烁,配对成功后,接收器上绿灯常亮,手柄上灯也常亮,这时可以按“MODE”键,选择手柄发送模式。 红灯模式:遥杆输出模拟值; 绿灯模式:遥杆对应上面四个按键,只有四个极限方向对应。接收器和主机(单片机)相连,实现主机与手柄之间的通讯。当主机想读手柄数据时,将会拉低 CS 线电平,并发出一个命令“0x01”;手柄会回复它的 ID“0x41=模拟绿灯,0x73=模拟红灯”;在手柄发送 ID 的同时,主机将传送 0x42,请求数据;随后手柄发送出 0x5A,告诉主机“数据来了”。数据格式及意义如图 ———————————————— 版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。 原文链接:https://blog.csdn.net/m0_62524451/artic

文件下载

资源详情

[{"title":"( 288 个子文件 10.76MB ) STM32 CUBEMX HAL PS2数据读取并解析 硬件SPI","children":[{"title":"TEXT-1.uvguix.28925 <span style='color:#111;'> 175.34KB </span>","children":null,"spread":false},{"title":"TEXT-1.axf <span style='color:#111;'> 541.76KB </span>","children":null,"spread":false},{"title":"TEXT-1_sct.Bak <span style='color:#111;'> 494B </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_tim.c <span style='color:#111;'> 237.95KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_spi.c <span style='color:#111;'> 124.56KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_tim_ex.c <span style='color:#111;'> 78.03KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_rcc.c <span style='color:#111;'> 47.61KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_flash_ex.c <span style='color:#111;'> 34.97KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_rcc_ex.c <span style='color:#111;'> 29.17KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_flash.c <span style='color:#111;'> 28.43KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_dma.c <span style='color:#111;'> 26.78KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_gpio.c <span style='color:#111;'> 20.40KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_pwr.c <span style='color:#111;'> 20.26KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal.c <span style='color:#111;'> 19.78KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_cortex.c <span style='color:#111;'> 18.25KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_exti.c <span style='color:#111;'> 14.70KB </span>","children":null,"spread":false},{"title":"system_stm32f1xx.c <span style='color:#111;'> 14.23KB </span>","children":null,"spread":false},{"title":"main.c <span style='color:#111;'> 7.74KB </span>","children":null,"spread":false},{"title":"stm32f1xx_it.c <span style='color:#111;'> 5.28KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_gpio_ex.c <span style='color:#111;'> 3.93KB </span>","children":null,"spread":false},{"title":"spi.c <span style='color:#111;'> 3.22KB </span>","children":null,"spread":false},{"title":"ps2.c <span style='color:#111;'> 2.93KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_msp.c <span style='color:#111;'> 2.27KB </span>","children":null,"spread":false},{"title":"gpio.c <span style='color:#111;'> 1.85KB </span>","children":null,"spread":false},{"title":"delay.c <span style='color:#111;'> 286B </span>","children":null,"spread":false},{"title":".clang-format <span style='color:#111;'> 772B </span>","children":null,"spread":false},{"title":"TEXT-1.code-workspace <span style='color:#111;'> 184B </span>","children":null,"spread":false},{"title":"tim.crf <span style='color:#111;'> 596.11KB </span>","children":null,"spread":false},{"title":"misc.crf <span style='color:#111;'> 588.01KB </span>","children":null,"spread":false},{"title":"sys.crf <span style='color:#111;'> 588.00KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_spi.crf <span style='color:#111;'> 586.23KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_dma.crf <span style='color:#111;'> 572.70KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_rcc.crf <span style='color:#111;'> 572.44KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_flash_ex.crf <span style='color:#111;'> 566.42KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_flash.crf <span style='color:#111;'> 565.22KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_gpio.crf <span style='color:#111;'> 564.36KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_exti.crf <span style='color:#111;'> 563.47KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_pwr.crf <span style='color:#111;'> 563.32KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_rcc_ex.crf <span style='color:#111;'> 563.24KB </span>","children":null,"spread":false},{"title":"main.crf <span style='color:#111;'> 562.26KB </span>","children":null,"spread":false},{"title":"ps2.crf <span style='color:#111;'> 562.13KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal.crf <span style='color:#111;'> 561.89KB </span>","children":null,"spread":false},{"title":"spi.crf <span style='color:#111;'> 561.46KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_cortex.crf <span style='color:#111;'> 561.37KB </span>","children":null,"spread":false},{"title":"gpio.crf <span style='color:#111;'> 560.92KB </span>","children":null,"spread":false},{"title":"stm32f1xx_it.crf <span style='color:#111;'> 560.86KB </span>","children":null,"spread":false},{"title":"system_stm32f1xx.crf <span style='color:#111;'> 560.81KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_msp.crf <span style='color:#111;'> 560.78KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_gpio_ex.crf <span style='color:#111;'> 560.58KB </span>","children":null,"spread":false},{"title":"delay.crf <span style='color:#111;'> 560.49KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_tim_ex.crf <span style='color:#111;'> 560.34KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_tim.crf <span style='color:#111;'> 560.34KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_flash_ex.d <span style='color:#111;'> 3.20KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_gpio_ex.d <span style='color:#111;'> 3.17KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_cortex.d <span style='color:#111;'> 3.15KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_rcc_ex.d <span style='color:#111;'> 3.15KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_tim_ex.d <span style='color:#111;'> 3.15KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_flash.d <span style='color:#111;'> 3.12KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_exti.d <span style='color:#111;'> 3.10KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_gpio.d <span style='color:#111;'> 3.10KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_tim.d <span style='color:#111;'> 3.07KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_pwr.d <span style='color:#111;'> 3.07KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_dma.d <span style='color:#111;'> 3.07KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_rcc.d <span style='color:#111;'> 3.07KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal.d <span style='color:#111;'> 2.97KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_msp.d <span style='color:#111;'> 2.53KB </span>","children":null,"spread":false},{"title":"stm32f1xx_it.d <span style='color:#111;'> 2.46KB </span>","children":null,"spread":false},{"title":"system_stm32f1xx.d <span style='color:#111;'> 2.44KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_flash_ex.d <span style='color:#111;'> 2.30KB </span>","children":null,"spread":false},{"title":"main.d <span style='color:#111;'> 2.29KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_gpio_ex.d <span style='color:#111;'> 2.27KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_rcc_ex.d <span style='color:#111;'> 2.25KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_cortex.d <span style='color:#111;'> 2.25KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_tim_ex.d <span style='color:#111;'> 2.25KB </span>","children":null,"spread":false},{"title":"gpio.d <span style='color:#111;'> 2.24KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_flash.d <span style='color:#111;'> 2.22KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_exti.d <span style='color:#111;'> 2.19KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_gpio.d <span style='color:#111;'> 2.19KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_msp.d <span style='color:#111;'> 2.19KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_tim.d <span style='color:#111;'> 2.16KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_pwr.d <span style='color:#111;'> 2.16KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_rcc.d <span style='color:#111;'> 2.16KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_spi.d <span style='color:#111;'> 2.16KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_dma.d <span style='color:#111;'> 2.16KB </span>","children":null,"spread":false},{"title":"system_stm32f1xx.d <span style='color:#111;'> 2.12KB </span>","children":null,"spread":false},{"title":"stm32f1xx_it.d <span style='color:#111;'> 2.10KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal.d <span style='color:#111;'> 2.05KB </span>","children":null,"spread":false},{"title":"tim.d <span style='color:#111;'> 1.96KB </span>","children":null,"spread":false},{"title":"main.d <span style='color:#111;'> 1.95KB </span>","children":null,"spread":false},{"title":"sys.d <span style='color:#111;'> 1.90KB </span>","children":null,"spread":false},{"title":"misc.d <span style='color:#111;'> 1.89KB </span>","children":null,"spread":false},{"title":"ps2.d <span style='color:#111;'> 1.88KB </span>","children":null,"spread":false},{"title":"gpio.d <span style='color:#111;'> 1.85KB </span>","children":null,"spread":false},{"title":"delay.d <span style='color:#111;'> 1.84KB </span>","children":null,"spread":false},{"title":"spi.d <span style='color:#111;'> 1.82KB </span>","children":null,"spread":false},{"title":"startup_stm32f103xe.d <span style='color:#111;'> 84B </span>","children":null,"spread":false},{"title":"startup_stm32f103xe.d <span style='color:#111;'> 53B </span>","children":null,"spread":false},{"title":"TEXT-1_STM32F103VE_1.0.0.dbgconf <span style='color:#111;'> 2.35KB </span>","children":null,"spread":false},{"title":"TEXT-1_TEXT-1.dep <span style='color:#111;'> 52.62KB </span>","children":null,"spread":false},{"title":"TEXT-1.ewd <span style='color:#111;'> 33.38KB </span>","children":null,"spread":false},{"title":"......","children":null,"spread":false},{"title":"<span style='color:steelblue;'>文件过多,未全部展示</span>","children":null,"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明