/**
******************************************************************************
* @file stm32f1xx_hal_i2c.c
* @author MCD Application Team
* @brief I2C HAL module driver.
* This file provides firmware functions to manage the following
* functionalities of the Inter Integrated Circuit (I2C) peripheral:
* + Initialization and de-initialization functions
* + IO operation functions
* + Peripheral State, Mode and Error functions
*
******************************************************************************
* @attention
*
* Copyright (c) 2016 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
@verbatim
==============================================================================
##### How to use this driver #####
==============================================================================
[..]
The I2C HAL driver can be used as follows:
(#) Declare a I2C_HandleTypeDef handle structure, for example:
I2C_HandleTypeDef hi2c;
(#)Initialize the I2C low level resources by implementing the HAL_I2C_MspInit() API:
(##) Enable the I2Cx interface clock
(##) I2C pins configuration
(+++) Enable the clock for the I2C GPIOs
(+++) Configure I2C pins as alternate function open-drain
(##) NVIC configuration if you need to use interrupt process
(+++) Configure the I2Cx interrupt priority
(+++) Enable the NVIC I2C IRQ Channel
(##) DMA Configuration if you need to use DMA process
(+++) Declare a DMA_HandleTypeDef handle structure for the transmit or receive channel
(+++) Enable the DMAx interface clock using
(+++) Configure the DMA handle parameters
(+++) Configure the DMA Tx or Rx channel
(+++) Associate the initialized DMA handle to the hi2c DMA Tx or Rx handle
(+++) Configure the priority and enable the NVIC for the transfer complete interrupt on
the DMA Tx or Rx channel
(#) Configure the Communication Speed, Duty cycle, Addressing mode, Own Address1,
Dual Addressing mode, Own Address2, General call and Nostretch mode in the hi2c Init structure.
(#) Initialize the I2C registers by calling the HAL_I2C_Init(), configures also the low level Hardware
(GPIO, CLOCK, NVIC...etc) by calling the customized HAL_I2C_MspInit() API.
(#) To check if target device is ready for communication, use the function HAL_I2C_IsDeviceReady()
(#) For I2C IO and IO MEM operations, three operation modes are available within this driver :
*** Polling mode IO operation ***
=================================
[..]
(+) Transmit in master mode an amount of data in blocking mode using HAL_I2C_Master_Transmit()
(+) Receive in master mode an amount of data in blocking mode using HAL_I2C_Master_Receive()
(+) Transmit in slave mode an amount of data in blocking mode using HAL_I2C_Slave_Transmit()
(+) Receive in slave mode an amount of data in blocking mode using HAL_I2C_Slave_Receive()
*** Polling mode IO MEM operation ***
=====================================
[..]
(+) Write an amount of data in blocking mode to a specific memory address using HAL_I2C_Mem_Write()
(+) Read an amount of data in blocking mode from a specific memory address using HAL_I2C_Mem_Read()
*** Interrupt mode IO operation ***
===================================
[..]
(+) Transmit in master mode an amount of data in non-blocking mode using HAL_I2C_Master_Transmit_IT()
(+) At transmission end of transfer, HAL_I2C_MasterTxCpltCallback() is executed and user can
add his own code by customization of function pointer HAL_I2C_MasterTxCpltCallback()
(+) Receive in master mode an amount of data in non-blocking mode using HAL_I2C_Master_Receive_IT()
(+) At reception end of transfer, HAL_I2C_MasterRxCpltCallback() is executed and user can
add his own code by customization of function pointer HAL_I2C_MasterRxCpltCallback()
(+) Transmit in slave mode an amount of data in non-blocking mode using HAL_I2C_Slave_Transmit_IT()
(+) At transmission end of transfer, HAL_I2C_SlaveTxCpltCallback() is executed and user can
add his own code by customization of function pointer HAL_I2C_SlaveTxCpltCallback()
(+) Receive in slave mode an amount of data in non-blocking mode using HAL_I2C_Slave_Receive_IT()
(+) At reception end of transfer, HAL_I2C_SlaveRxCpltCallback() is executed and user can
add his own code by customization of function pointer HAL_I2C_SlaveRxCpltCallback()
(+) In case of transfer Error, HAL_I2C_ErrorCallback() function is executed and user can
add his own code by customization of function pointer HAL_I2C_ErrorCallback()
(+) Abort a master I2C process communication with Interrupt using HAL_I2C_Master_Abort_IT()
(+) End of abort process, HAL_I2C_AbortCpltCallback() is executed and user can
add his own code by customization of function pointer HAL_I2C_AbortCpltCallback()
*** Interrupt mode or DMA mode IO sequential operation ***
==========================================================
[..]
(@) These interfaces allow to manage a sequential transfer with a repeated start condition
when a direction change during transfer
[..]
(+) A specific option field manage the different steps of a sequential transfer
(+) Option field values are defined through I2C_XferOptions_definition and are listed below:
(++) I2C_FIRST_AND_LAST_FRAME: No sequential usage, functional is same as associated interfaces in no sequential mode
(++) I2C_FIRST_FRAME: Sequential usage, this option allow to manage a sequence with start condition, address
and data to transfer without a final stop condition
(++) I2C_FIRST_AND_NEXT_FRAME: Sequential usage (Master only), this option allow to manage a sequence with start condition, address
and data to transfer without a final stop condition, an then permit a call the same master sequential interface
several times (like HAL_I2C_Master_Seq_Transmit_IT() then HAL_I2C_Master_Seq_Transmit_IT()
or HAL_I2C_Master_Seq_Transmit_DMA() then HAL_I2C_Master_Seq_Transmit_DMA())
(++) I2C_NEXT_FRAME: Sequential usage, this option allow to manage a sequence with a restart condition, address
and with new data to transfer if the direction change or manage only the new data to transfer
if no direction change and without a final stop condition in both cases
(++) I2C_LAST_FRAME: Sequential usage, this option allow to manage a sequance with a restart condition, address
and with new data to transfer if the direction change or manage only the new data to transfer
if no direction change and with a final stop condition in both cases
(++) I2C_LAST_FRAME_NO_STOP: Sequential usage (Master only), this option allow to manage a restart condition after several call of the same master sequential
interface several times (link with option I2C_FIRST_AND_NEXT_FRAME).
Usage can, transfer several bytes one by one using HAL_I2C_Master_Seq_Transmit_IT(option I2C_FIRST_AND_NEXT_FRAME then I2C_NEXT_FRAME)
or HAL_I2C_Master_Seq_Receive_IT(option I2C_FIRST_AND_NEXT_FRAME then I2C
没有合适的资源?快使用搜索试试~ 我知道了~
基于STM32与FreeRTOS的四轴机械臂项目源代码程序,可以实现蓝牙控制,摇杆控制,示教器控制机械臂
共1349个文件
h:444个
d:193个
o:193个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 3 下载量 2 浏览量
2024-06-29
17:21:57
上传
评论 1
收藏 41.93MB RAR 举报
温馨提示
基于STM32与FreeRTOS的四轴机械臂项目源代码程序,可以实现蓝牙控制,摇杆控制,示教器控制机械臂,可以结合我的博客复刻该四轴机械臂: https://blog.csdn.net/m0_74712453/article/details/136040784?spm=1001.2014.3001.5502 编程环境为:Keil5 + Cubemx STM32型号为:STM32F103C8T6 硬件清单在我的博客链接有说明
资源推荐
资源详情
资源评论
收起资源包目录
基于STM32与FreeRTOS的四轴机械臂项目源代码程序,可以实现蓝牙控制,摇杆控制,示教器控制机械臂 (1349个子文件)
Arm.axf 845KB
Arm.axf 839KB
arm1.axf 618KB
arm1.axf 592KB
arm1.axf 590KB
arm1.axf 569KB
arm1_sct.Bak 494B
arm1_sct.Bak 494B
Arm_sct.Bak 494B
Arm_sct.Bak 494B
stm32f1xx_hal_i2c.c 239KB
stm32f1xx_hal_i2c.c 239KB
stm32f1xx_hal_tim.c 238KB
stm32f1xx_hal_tim.c 238KB
stm32f1xx_hal_tim.c 238KB
stm32f1xx_hal_tim.c 238KB
stm32f1xx_hal_tim.c 238KB
stm32f1xx_hal_tim.c 238KB
tasks.c 162KB
tasks.c 162KB
stm32f1xx_hal_uart.c 132KB
stm32f1xx_hal_uart.c 132KB
stm32f1xx_hal_uart.c 132KB
stm32f1xx_hal_uart.c 132KB
stm32f1xx_hal_uart.c 132KB
stm32f1xx_hal_uart.c 132KB
queue.c 92KB
queue.c 92KB
stm32f1xx_hal_adc.c 89KB
stm32f1xx_hal_adc.c 89KB
stm32f1xx_hal_adc.c 89KB
stm32f1xx_hal_adc.c 89KB
stm32f1xx_hal_adc.c 89KB
stm32f1xx_hal_adc.c 89KB
stm32f1xx_hal_tim_ex.c 78KB
stm32f1xx_hal_tim_ex.c 78KB
stm32f1xx_hal_tim_ex.c 78KB
stm32f1xx_hal_tim_ex.c 78KB
stm32f1xx_hal_tim_ex.c 78KB
stm32f1xx_hal_tim_ex.c 78KB
stm32f1xx_hal_adc_ex.c 50KB
stm32f1xx_hal_adc_ex.c 50KB
stm32f1xx_hal_adc_ex.c 50KB
stm32f1xx_hal_adc_ex.c 50KB
stm32f1xx_hal_adc_ex.c 50KB
stm32f1xx_hal_adc_ex.c 50KB
cmsis_os.c 50KB
cmsis_os.c 50KB
stm32f1xx_hal_rcc.c 48KB
stm32f1xx_hal_rcc.c 48KB
stm32f1xx_hal_rcc.c 48KB
stm32f1xx_hal_rcc.c 48KB
stm32f1xx_hal_rcc.c 48KB
stm32f1xx_hal_rcc.c 48KB
stream_buffer.c 42KB
stream_buffer.c 42KB
timers.c 39KB
timers.c 39KB
stm32f1xx_hal_flash_ex.c 35KB
stm32f1xx_hal_flash_ex.c 35KB
stm32f1xx_hal_flash_ex.c 35KB
stm32f1xx_hal_flash_ex.c 35KB
stm32f1xx_hal_flash_ex.c 35KB
stm32f1xx_hal_flash_ex.c 35KB
stm32f1xx_hal_rcc_ex.c 29KB
stm32f1xx_hal_rcc_ex.c 29KB
stm32f1xx_hal_rcc_ex.c 29KB
stm32f1xx_hal_rcc_ex.c 29KB
stm32f1xx_hal_rcc_ex.c 29KB
stm32f1xx_hal_rcc_ex.c 29KB
stm32f1xx_hal_flash.c 28KB
stm32f1xx_hal_flash.c 28KB
stm32f1xx_hal_flash.c 28KB
stm32f1xx_hal_flash.c 28KB
stm32f1xx_hal_flash.c 28KB
stm32f1xx_hal_flash.c 28KB
stm32f1xx_hal_dma.c 27KB
stm32f1xx_hal_dma.c 27KB
stm32f1xx_hal_dma.c 27KB
stm32f1xx_hal_dma.c 27KB
stm32f1xx_hal_dma.c 27KB
stm32f1xx_hal_dma.c 27KB
port.c 26KB
port.c 26KB
event_groups.c 24KB
event_groups.c 24KB
stm32f1xx_hal_gpio.c 20KB
stm32f1xx_hal_gpio.c 20KB
stm32f1xx_hal_gpio.c 20KB
stm32f1xx_hal_gpio.c 20KB
stm32f1xx_hal_gpio.c 20KB
stm32f1xx_hal_gpio.c 20KB
stm32f1xx_hal_pwr.c 20KB
stm32f1xx_hal_pwr.c 20KB
stm32f1xx_hal_pwr.c 20KB
stm32f1xx_hal_pwr.c 20KB
stm32f1xx_hal_pwr.c 20KB
stm32f1xx_hal_pwr.c 20KB
stm32f1xx_hal.c 20KB
stm32f1xx_hal.c 20KB
共 1349 条
- 1
- 2
- 3
- 4
- 5
- 6
- 14
资源评论
- zruoyan2024-11-24资源很不错,内容和描述一致,值得借鉴,赶紧学起来!
- weixin_451410612024-09-01非常有用的资源,有一定的参考价值,受益匪浅,值得下载。
- huawuque122024-09-12发现一个宝藏资源,赶紧冲冲冲!支持大佬~
热爱嵌入式的小佳同学
- 粉丝: 1w+
- 资源: 2352
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- springboot项目志同道合交友网站.zip
- springboot项目在线考试系统.zip
- springboot项目在线互动学习网站设计.zip
- springboot项目制造装备物联及生产管理ERP系统.zip
- springboot项目智慧校园之家长子系统.zip
- springboot项目中国陕西民俗网.zip
- RISCV GD32VF103 中断向量模式以及非向量模式
- 基于Rust语言的快速异步与多路复用Redis驱动设计源码
- 基于Vue的教程:学生课业帮扶系统前端设计源码
- 基于JavaScript的在线中国象棋对战平台设计源码
- 基于Lua语言的ESP32嵌入式系统开源设计源码
- 基于Vue的云盘前端设计源码
- 自动驾驶控制-车辆三自由度动力学MPC跟踪双移线 matlab和simulink联合仿真,基于车辆三自由度动力学模型的mpc跟踪双移线
- 分布式驱动汽车稳定性控制 采用分层式直接横摆力矩控制,上层滑模控制,下层基于轮胎滑移率最优分配 滑模控制跟踪横摆角速度和质心侧偏角误差 七自由度整车模型输出实际质心侧偏角和横摆角速度,二自由度模
- 基于Vue.js框架的旅游舆情分析项目设计源码
- 基于TypeScript的轻量级JavaScript点阵库设计源码
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功