forked from SZV10X_Software/SZV103_FM33A0xxEV_SiZhu

jinlicong
2024-05-30 a1810b89e66f184c62a0588ae7d57c91d0c376e8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/**
  ******************************************************************************
  * @file    fm33a0xxev_cdif.c
  * @author  FM33A0XXEV Application Team
  * @version V1.0.0
  * @date    16-April-2020
  * @brief   This file provides firmware functions to manage the following 
  *          functionalities of....:
  *
*/
 
/* Includes ------------------------------------------------------------------*/
 
#include "fm33a0xxev_cdif.h"
 
/** @addtogroup fm33a0xxev_StdPeriph_Driver
  * @{
  */
 
/** @defgroup CDIF 
  * @brief CDIF driver modules
  * @{
  */ 
 
 
/* ¿çµçÔ´Óò½Ó¿ÚʹÄÜ Ïà¹Øº¯Êý */
void CDIF_CR_INTF_EN_Setable(FunState NewState)
{
    if (NewState == ENABLE)
    {
        CDIF->CR = CDIF_CR_INTF_EN_ENABLE;
    }
    else
    {
        CDIF->CR = CDIF_CR_INTF_EN_DISABLE;
    }
}
 
FunState CDIF_CR_INTF_EN_Getable(void)
{
    if ((CDIF->CR & (CDIF_CR_INTF_EN_Msk)) == CDIF_CR_INTF_EN_ENABLE)
    {
        return ENABLE;
    }
    else
    {
        return DISABLE;
    }
}
 
/* ¿çµçÔ´ÓòʱÐò¿ØÖÆ£¬ÅäÖÃÏà¶ÔÓÚAPBCLKµÄ¶¨Ê±±ÈÀý Ïà¹Øº¯Êý */
void CDIF_PSCR_Write(uint32_t SetValue)
{
    CDIF->PSCR = (SetValue & CDIF_PSCR_PRSC_Msk);
}
 
uint32_t CDIF_PSCR_Read(void)
{
    return (CDIF->PSCR & CDIF_PSCR_PRSC_Msk);
}
 
 
void CDIF_Deinit(void)
{
    //CDIF->CR = 0x00000101;
    //CDIF->PSCR = 0x00000000;
}
 
/******END OF FILE****/