]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/T-HEAD_CB2201_CDK/csi/csi_driver/csky/common/sha/ck_sha_v1.h
Introduce a port for T-HEAD CK802. A simple demo for T-HEAD CB2201 is also included.
[freertos] / FreeRTOS / Demo / T-HEAD_CB2201_CDK / csi / csi_driver / csky / common / sha / ck_sha_v1.h
1 /*
2  * Copyright (C) 2017 C-SKY Microsystems Co., Ltd. All rights reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *   http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 /******************************************************************************
17  * @file     ck_sha.h
18  * @brief    header file for sha driver
19  * @version  V1.0
20  * @date     02. June 2017
21  ******************************************************************************/
22 #ifndef _CK_SHA_H_
23 #define _CK_SHA_H_
24
25 #include <stdio.h>
26 #include "drv_sha.h"
27 #include "soc.h"
28
29 #define SHA_INIT_OFFSET         3
30 #define SHA_INT_ENABLE_OFFSET   4
31 #define SHA_ENDIAN_OFFSET       5
32 #define SHA_CAL_OFFSET          6
33 typedef struct {
34     __IOM uint32_t SHA_CON;                     /* Offset: 0x000 (R/W)  Control register */
35     __IOM uint32_t SHA_MODE;                    /* Offset: 0x004 (R/W)  Mode register */
36     __IOM uint32_t SHA_INTSTATE;                /* Offset: 0x008 (R/W)  Instatus register */ 
37     __IOM uint32_t SHA_BASEADDR;                /* Offset: 0x00c (R/W)  Baseaddr register */
38     __IOM uint32_t SHA_DESTADDR;                /* Offset: 0x010 (R/W)  Dest addr register */
39     __IOM uint32_t SHA_COUNTER0;                /* Offset: 0x014 (R/W)  count0 register */
40     __IOM uint32_t SHA_COUNTER1;                /* Offset: 0x018 (R/W)  count1 register */
41     __IOM uint32_t SHA_COUNTER2;                /* Offset: 0x01c (R/W)  count2 register */
42     __IOM uint32_t SHA_COUNTER3;                /* Offset: 0x020 (R/W)  count3 register */
43     __IOM uint32_t SHA_H0L;                     /* Offset: 0x024 (R/W)  H0L register */
44     __IOM uint32_t SHA_H1L;                     /* Offset: 0x028 (R/W)  H1L register */
45     __IOM uint32_t SHA_H2L;                     /* Offset: 0x02c (R/W)  H2L register */
46     __IOM uint32_t SHA_H3L;                     /* Offset: 0x030 (R/W)  H3L register */
47     __IOM uint32_t SHA_H4L;                     /* Offset: 0x034 (R/W)  H4L register */
48     __IOM uint32_t SHA_H5L;                     /* Offset: 0x038 (R/W)  H5L register */
49     __IOM uint32_t SHA_H6L;                     /* Offset: 0x03c (R/W)  H6L register */
50     __IOM uint32_t SHA_H7L;                     /* Offset: 0x040 (R/W)  H7L register */
51     __IOM uint32_t SHA_H0H;                     /* Offset: 0x044 (R/W)  H0H register */
52     __IOM uint32_t SHA_H1H;                     /* Offset: 0x048 (R/W)  H1H register */
53     __IOM uint32_t SHA_H2H;                     /* Offset: 0x04c (R/W)  H2H register */
54     __IOM uint32_t SHA_H3H;                     /* Offset: 0x050 (R/W)  H3H register */
55     __IOM uint32_t SHA_H4H;                     /* Offset: 0x054 (R/W)  H4H register */
56     __IOM uint32_t SHA_H5H;                     /* Offset: 0x058 (R/W)  H5H register */
57     __IOM uint32_t SHA_H6H;                     /* Offset: 0x05c (R/W)  H6H register */
58     __IOM uint32_t SHA_H7H;                     /* Offset: 0x060 (R/W)  H7H register */
59 } ck_sha_reg_t;
60
61 #endif