SHA2CC26X2.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
56 #ifndef ti_drivers_sha2_SHA2CC26XX__include
57 #define ti_drivers_sha2_SHA2CC26XX__include
58 
59 #ifdef __cplusplus
60 extern "C" {
61 #endif
62 
63 #include <stdint.h>
64 #include <stdbool.h>
65 
66 #include <ti/drivers/Power.h>
67 #include <ti/drivers/SHA2.h>
69 
70 #include <ti/devices/DeviceFamily.h>
71 #include DeviceFamily_constructPath(driverlib/crypto.h)
72 
73 #include <ti/drivers/dpl/HwiP.h>
74 #include <ti/drivers/dpl/SwiP.h>
75 #include <ti/drivers/dpl/SemaphoreP.h>
76 
83 typedef struct SHA2CC26X2_HWAttrs_ {
96  uint8_t intPriority;
102  uint32_t swiPriority;
104 
110 typedef struct SHA2CC26X2_Object_ {
111  bool isOpen;
112  int_fast16_t returnStatus;
118  SwiP_Struct callbackSwi;
120 
121 #ifdef __cplusplus
122 }
123 #endif
124 
125 #endif /* ti_drivers_sha2_SHA2CC26XX__include */
SHA2CC26XX Object.
Definition: SHA2CC26X2.h:110
The CryptoKey type is an opaque representation of a cryptographic key.
uint32_t swiPriority
SHA2 SWI priority. The higher the number, the higher the priority. The minimum is 0 and the maximum i...
Definition: SHA2CC26X2.h:102
void(* SHA2_CallbackFxn)(SHA2_Handle handle, int_fast16_t returnStatus, SHA2_Operation operation, SHA2_OperationType operationType)
The definition of a callback function used by the SHA2 driver when used in SHA2_RETURN_BEHAVIOR_CALLB...
Definition: SHA2.h:590
Power Manager interface.
SHA2CC26XX Hardware Attributes.
Definition: SHA2CC26X2.h:83
struct SHA2CC26X2_Object_ SHA2CC26X2_Object
SHA2CC26XX Object.
SHA2_OperationType operationType
Definition: SHA2CC26X2.h:117
SHA2_CallbackFxn callbackFxn
Definition: SHA2CC26X2.h:115
SHA2_Operation operation
Definition: SHA2CC26X2.h:116
bool isOpen
Definition: SHA2CC26X2.h:111
enum SHA2_ReturnBehavior_ SHA2_ReturnBehavior
The way in which SHA2 function calls return after performing an operation.
struct SHA2CC26X2_HWAttrs_ SHA2CC26X2_HWAttrs
SHA2CC26XX Hardware Attributes.
SHA2 driver header.
SwiP_Struct callbackSwi
Definition: SHA2CC26X2.h:118
Union containing pointers to all supported operation structs.
Definition: SHA2.h:535
enum SHA2_OperationType_ SHA2_OperationType
Enum for the operation types supported by the driver.
uint8_t intPriority
Crypto Peripheral&#39;s interrupt priority.
Definition: SHA2CC26X2.h:96
int_fast16_t returnStatus
Definition: SHA2CC26X2.h:112
SHA2_ReturnBehavior returnBehavior
Definition: SHA2CC26X2.h:113
uint32_t semaphoreTimeout
Definition: SHA2CC26X2.h:114
Copyright 2018, Texas Instruments Incorporated