summaryrefslogtreecommitdiff
path: root/bsp/nuvoton/libraries/ma35/StdDriver/inc/nu_ssmcc.h
blob: dddaed4a80195a869089a750666deb6cdf922b18 (plain)
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
70
71
72
73
/****************************************************************************//**
 * @file     nu_ssmcc.h
 * @brief    SSMCC driver header file
 *
 * SPDX-License-Identifier: Apache-2.0
 * @copyright (C) 2020 Nuvoton Technology Corp. All rights reserved.
 *****************************************************************************/
#ifndef __NU_SSMCC_H__
#define __NU_SSMCC_H__

#ifdef __cplusplus
extern "C"
{
#endif

/** @addtogroup Standard_Driver Standard Driver
  @{
*/

/** @addtogroup SSMCC_Driver SSMCC Driver
  @{
*/

/** @addtogroup SSMCC_EXPORTED_CONSTANTS SSMCC Exported Constants
  @{
*/
#define SSMCC_REGION_0      0UL     /*!< region 0                \hideinitializer */
#define SSMCC_REGION_1      1UL     /*!< region 1                \hideinitializer */
#define SSMCC_REGION_2      2UL     /*!< region 2                \hideinitializer */
#define SSMCC_REGION_3      3UL     /*!< region 3                \hideinitializer */
#define SSMCC_REGION_4      4UL     /*!< region 4                \hideinitializer */
#define SSMCC_REGION_5      5UL     /*!< region 5                \hideinitializer */
#define SSMCC_REGION_6      6UL     /*!< region 6                \hideinitializer */
#define SSMCC_REGION_7      7UL     /*!< region 7                \hideinitializer */
#define SSMCC_REGION_8      8UL     /*!< region 8                \hideinitializer */

#define SSMCC_SECURE_READ        0x40000000UL     /*!< set region to secure read                \hideinitializer */
#define SSMCC_SECURE_WRITE       0x80000000UL     /*!< set region to secure write               \hideinitializer */
#define SSMCC_NONSECURE_READ     0x00000001UL     /*!< set region to non-secure read            \hideinitializer */
#define SSMCC_NONSECURE_WRITE    0x00010000UL     /*!< set region to non-secure write           \hideinitializer */
#define SSMCC_M4NS_READ          0x00000002UL     /*!< set region to m4 non-secure read         \hideinitializer */
#define SSMCC_M4NS_WRITE         0x00020000UL     /*!< set region to m4 non-secure write        \hideinitializer */

typedef struct ssmcc_param
{
    uint32_t region_no;
    uint32_t base_address;
    uint32_t size;
    uint32_t attribute;
} SSMCC_PARAM_T;

/*@}*/ /* end of group SSMCC_EXPORTED_CONSTANTS */

/** @addtogroup SSMCC_EXPORTED_FUNCTIONS SSMCC Exported Functions
  @{
*/

void SSMCC_SetRegion0(uint32_t u32Attr);
void SSMCC_SetRegion(SSMCC_PARAM_T *psParam);


/*@}*/ /* end of group SSMCC_EXPORTED_FUNCTIONS */

/*@}*/ /* end of group SSMCC_Driver */

/*@}*/ /* end of group Standard_Driver */
#ifdef __cplusplus
}
#endif

#endif