/**
******************************************************************************
* @file stm32h7xx_hal_fdcan.c
* @author MCD Application Team
* @version V1.2.0
* @date 29-December-2017
* @brief FDCAN HAL module driver.
* This file provides firmware functions to manage the following
* functionalities of the Flexible DataRate Controller Area Network
* (FDCAN) peripheral:
* + Initialization and de-initialization functions
* + IO operation functions
* + Peripheral Configuration and Control functions
* + Peripheral State and Error functions
*
@verbatim
==============================================================================
##### How to use this driver #####
==============================================================================
[..]
(#) Initialize the FDCAN peripheral using HAL_FDCAN_Init function.
(#) If needed , configure the reception filters and optional features using
the following configuration functions:
(++) HAL_FDCAN_ConfigClockCalibration
(++) HAL_FDCAN_ConfigFilter
(++) HAL_FDCAN_ConfigGlobalFilter
(++) HAL_FDCAN_ConfigExtendedIdMask
(++) HAL_FDCAN_ConfigRxFifoOverwrite
(++) HAL_FDCAN_ConfigFifoWatermark
(++) HAL_FDCAN_ConfigRamWatchdog
(++) HAL_FDCAN_ConfigTimestampCounter
(++) HAL_FDCAN_EnableTimestampCounter
(++) HAL_FDCAN_DisableTimestampCounter
(++) HAL_FDCAN_ConfigTimeoutCounter
(++) HAL_FDCAN_EnableTimeoutCounter
(++) HAL_FDCAN_DisableTimeoutCounter
(++) HAL_FDCAN_ConfigTxDelayCompensation
(++) HAL_FDCAN_EnableTxDelayCompensation
(++) HAL_FDCAN_DisableTxDelayCompensation
(++) HAL_FDCAN_TT_ConfigOperation
(++) HAL_FDCAN_TT_ConfigReferenceMessage
(++) HAL_FDCAN_TT_ConfigTrigger
(#) Start the FDCAN module using HAL_FDCAN_Start function. At this level
the node is active on the bus: it can send and receive messages.
(#) The following Tx control functions can only be called when the FDCAN
module is started:
(++) HAL_FDCAN_AddMessageToTxFifoQ
(++) HAL_FDCAN_EnableTxBufferRequest
(++) HAL_FDCAN_AbortTxRequest
(#) When a message is received into the FDCAN message RAM, it can be
retrieved using the HAL_FDCAN_GetRxMessage function.
(#) Calling the HAL_FDCAN_Stop function stops the FDCAN module by entering
it to initialization mode and re-enabling access to configuration
registers through the configuration functions listed here above.
(#) All other control functions can be called any time after initialization
phase, no matter if the FDCAN module is started or stoped.
*** Polling mode operation ***
==============================
[..]
(#) Reception and transmission states can be monitored via the following
functions:
(++) HAL_FDCAN_IsRxBufferMessageAvailable
(++) HAL_FDCAN_IsTxBufferMessagePending
(++) HAL_FDCAN_GetRxFifoFillLevel
(++) HAL_FDCAN_GetTxFifoFreeLevel
*** Interrupt mode operation ***
================================
[..]
(#) There are two interrupt lines: line 0 and 1.
By default, all interrupts are assigned to line 0. Interrupt lines
can be configured using HAL_FDCAN_ConfigInterruptLines function.
(#) Notifications are activated using HAL_FDCAN_ActivateNotification
function. Then, the process can be controlled through one of the
available user callbacks: HAL_FDCAN_xxxCallback.
@endverbatim
******************************************************************************
* @attention
*
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "fdcan.h"
/** @addtogroup STM32H7xx_HAL_Driver
* @{
*/
/** @defgroup FDCAN FDCAN
* @brief FDCAN HAL module driver
* @{
*/
#ifdef HAL_FDCAN_MODULE_ENABLED
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/** @addtogroup FDCAN_Private_Constants
* @{
*/
#define FDCAN_TIMEOUT_VALUE 10
#define FDCAN_TX_EVENT_FIFO_MASK (FDCAN_IR_TEFL | FDCAN_IR_TEFF | FDCAN_IR_TEFW | FDCAN_IR_TEFN)
#define FDCAN_RX_FIFO0_MASK (FDCAN_IR_RF0L | FDCAN_IR_RF0F | FDCAN_IR_RF0W | FDCAN_IR_RF0N)
#define FDCAN_RX_FIFO1_MASK (FDCAN_IR_RF1L | FDCAN_IR_RF1F | FDCAN_IR_RF1W | FDCAN_IR_RF1N)
#define FDCAN_ERROR_MASK (FDCAN_IR_ELO | FDCAN_IR_EP | FDCAN_IR_EW | FDCAN_IR_BO | \
FDCAN_IR_WDI | FDCAN_IR_PEA | FDCAN_IR_PED | FDCAN_IR_ARA)
#define FDCAN_TT_SCHEDULE_SYNC_MASK (FDCAN_TTIR_SBC | FDCAN_TTIR_SMC | FDCAN_TTIR_CSM | FDCAN_TTIR_SOG)
#define FDCAN_TT_TIME_MARK_MASK (FDCAN_TTIR_RTMI | FDCAN_TTIR_TTMI)
#define FDCAN_TT_GLOBAL_TIME_MASK (FDCAN_TTIR_GTW | FDCAN_TTIR_GTD)
#define FDCAN_TT_DISTURBING_ERROR_MASK (FDCAN_TTIR_GTE | FDCAN_TTIR_TXU | FDCAN_TTIR_TXO | \
FDCAN_TTIR_SE1 | FDCAN_TTIR_SE2 | FDCAN_TTIR_ELC)
#define FDCAN_TT_FATAL_ERROR_MASK (FDCAN_TTIR_IWT | FDCAN_TTIR_WT | FDCAN_TTIR_AW | FDCAN_TTIR_CER)
#define FDCAN_ELEMENT_MASK_STDID ((uint32_t)0x1FFC0000U) /* Standard Identifier */
#define FDCAN_ELEMENT_MASK_EXTID ((uint32_t)0x1FFFFFFFU) /* Extended Identifier */
#define FDCAN_ELEMENT_MASK_RTR ((uint32_t)0x20000000U) /* Remote Transmission Request */
#define FDCAN_ELEMENT_MASK_XTD ((uint32_t)0x40000000U) /* Extended Identifier */
#define FDCAN_ELEMENT_MASK_ESI ((uint32_t)0x80000000U) /* Error State Indicator */
#define FDCAN_ELEMENT_MASK_TS ((uint32_t)0x0000FFFFU) /* Timestamp */
#define FDCAN_ELEMENT_MASK_DLC ((uint32_t)0x000F0000U) /* Data Length Code */
#define FDCAN_ELEMENT_MASK_BRS ((uint32_t)0
没有合适的资源?快使用搜索试试~ 我知道了~
STM32H743驱动TFT LCD电容触摸屏(4.3寸,480X272分辨率)【支持STM32H7系列单片机_寄存器库驱动】
共88个文件
h:45个
c:38个
uvoptx:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 110 浏览量
2023-07-31
13:17:14
上传
评论
收藏 566KB ZIP 举报
温馨提示
STM32驱动LTDC LCD(RGB屏)和TFT LCD电容触摸屏,4.3寸,480X272分辨率。 驱动代码可直接编译运行~
资源推荐
资源详情
资源评论
收起资源包目录
STM32H743驱动TFT LCD电容触摸屏(4.3寸,480X272分辨率)【支持STM32H7系列单片机_寄存器库驱动】.zip (88个子文件)
STM32H743驱动TFT LCD电容触摸屏(4.3寸,480X272分辨率)【支持STM32H7系列单片机_寄存器库驱动】
OBJ
TEST.hex 141KB
USMART
usmart_str.h 3KB
usmart.c 15KB
usmart_config.c 1KB
usmart_str.c 12KB
usmart.h 6KB
SYSTEM
delay
delay.h 836B
delay.c 7KB
usart
usart.h 1KB
usart.c 4KB
sys
stm32h743xx.h 2.13MB
system_stm32h7xx.h 4KB
cmsis_armcc.h 25KB
sys.h 4KB
sys.c 12KB
core_cm7.h 141KB
stm32h7xx.h 6KB
cmsis_compiler.h 6KB
USER
test.c 5KB
startup_stm32h743xx.s 45KB
TEST.uvprojx 18KB
DebugConfig
TEST.uvoptx 15KB
EventRecorderStub.scvd 339B
HARDWARE
LED
led.h 739B
led.c 788B
RS485
rs485.c 3KB
rs485.h 969B
AP3216C
ap3216c.h 764B
ap3216c.c 3KB
OLED
oled.c 8KB
oled.h 2KB
oledfont.h 34KB
DAC
dac.c 1KB
dac.h 668B
QSPI
qspi.h 854B
qspi.c 6KB
WKUP
wkup.h 775B
wkup.c 2KB
PCF8574
pcf8574.h 1KB
pcf8574.c 2KB
TIMER
timer.c 6KB
timer.h 1KB
LCD
lcd.h 6KB
lcd.c 59KB
ltdc.h 3KB
font.h 65KB
ltdc.c 19KB
SDRAM
sdram.c 7KB
sdram.h 1KB
WDG
wdg.h 860B
wdg.c 2KB
ADC
adc.c 6KB
adc.h 1KB
FDCAN
stm32h7xx_hal_fdcan.h 131KB
stm32h7xx_hal_def.h 8KB
stm32h7xx_hal_fdcan.c 166KB
fdcan.h 1KB
fdcan.c 7KB
KEY
key.c 2KB
key.h 964B
RTC
rtc.h 2KB
rtc.c 9KB
TOUCH
ft5206.h 2KB
touch.c 15KB
gt9147.c 8KB
gt9271.c 7KB
ctiic.c 3KB
ctiic.h 1KB
gt9271.h 2KB
gt9147.h 2KB
touch.h 3KB
ft5206.c 8KB
24CXX
myiic.c 3KB
24cxx.h 1KB
24cxx.c 4KB
myiic.h 1KB
TPAD
tpad.h 910B
tpad.c 4KB
EXTI
exti.c 2KB
exti.h 647B
RNG
rng.c 1KB
rng.h 733B
W25QXX
w25qxx.h 3KB
w25qxx.c 11KB
MPU
mpu.h 2KB
mpu.c 4KB
DMA
dma.c 3KB
dma.h 786B
共 88 条
- 1
资源评论
不脱发的程序猿
- 粉丝: 24w+
- 资源: 5779
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功