ECDSACC26X2.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2018, 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  */
87 #ifndef ti_drivers_ecdsa_ECDSACC26X2__include
88 #define ti_drivers_ecdsa_ECDSACC26X2__include
89 
90 #ifdef __cplusplus
91 extern "C" {
92 #endif
93 
94 #include <stdint.h>
95 #include <stdbool.h>
96 
97 #include <ti/drivers/Power.h>
98 #include <ti/drivers/ECDSA.h>
101 
102 #include <ti/drivers/dpl/HwiP.h>
103 #include <ti/drivers/dpl/SwiP.h>
104 #include <ti/drivers/dpl/SemaphoreP.h>
105 
106 /* Exit the SWI and wait until an HWI call posts the SWI again */
107 #define ECDSACC26X2_STATUS_FSM_RUN_PKA_OP ECDSA_STATUS_RESERVED - 0
108 /* Execute the next FSM state immediately without waiting for the next HWI */
109 #define ECDSACC26X2_STATUS_FSM_RUN_FSM ECDSA_STATUS_RESERVED - 1
110 
120 typedef enum ECDSACC26X2_FsmState_ {
122 
138 
160 
162 
171 typedef int_fast16_t (*ECDSACC26X2_stateMachineFxn) (ECDSA_Handle handle);
172 
179 typedef struct ECDSACC26X2_HWAttrs_ {
192  uint8_t intPriority;
194 
200 typedef struct ECDSACC26X2_Object_ {
201  bool isOpen;
204  int_fast16_t operationStatus;
210  ECDSACC26X2_FsmState fsmState;
212  uint32_t resultAddress;
213  uint32_t *scratchNumber1;
214  uint32_t *scratchNumber2;
216 
217 #ifdef __cplusplus
218 }
219 #endif
220 
221 #endif /* ti_drivers_ecdsa_ECDSACC26X2__include */
TI Driver for Elliptic Curve Digital Signature Algorithm.
ECDSA_ReturnBehavior
The way in which ECDSA function calls return after performing an encryption + authentication or decry...
Definition: ECDSA.h:473
ECDSA_CallbackFxn callbackFxn
Definition: ECDSACC26X2.h:207
The CryptoKey type is an opaque representation of a cryptographic key.
struct ECDSACC26X2_HWAttrs_ ECDSACC26X2_HWAttrs
ECDSACC26X2 Hardware Attributes.
Definition: ECDSACC26X2.h:125
ECDSA_Operation operation
Definition: ECDSACC26X2.h:205
Definition: ECDSACC26X2.h:128
Definition: ECDSACC26X2.h:159
Definition: ECDSACC26X2.h:123
Definition: ECDSACC26X2.h:157
ECDSA_ReturnBehavior returnBehavior
Definition: ECDSACC26X2.h:209
uint32_t resultAddress
Definition: ECDSACC26X2.h:212
uint32_t semaphoreTimeout
Definition: ECDSACC26X2.h:211
void(* ECDSA_CallbackFxn)(ECDSA_Handle handle, int_fast16_t returnStatus, ECDSA_Operation operation, ECDSA_OperationType operationType)
The definition of a callback function used by the ECDSA driver when used in ECDSA_RETURN_BEHAVIOR_CAL...
Definition: ECDSA.h:593
uint32_t * scratchNumber1
Definition: ECDSACC26X2.h:213
ECDSA_OperationType operationType
Definition: ECDSACC26X2.h:206
struct ECDSACC26X2_Object_ ECDSACC26X2_Object
ECDSACC26X2 Object.
Power Manager.
ECDSACC26X2_FsmState fsmState
Definition: ECDSACC26X2.h:210
Definition: ECDSACC26X2.h:132
Definition: ECDSACC26X2.h:121
Definition: ECDSACC26X2.h:151
Definition: ECDSACC26X2.h:124
ECDSA Global configuration.
Definition: ECDSA.h:501
Definition: ECDSACC26X2.h:142
Definition: ECDSACC26X2.h:139
Definition: ECDSACC26X2.h:134
Definition: ECDSACC26X2.h:127
Definition: ECDSACC26X2.h:149
Definition: ECDSACC26X2.h:136
Definition: ECDSACC26X2.h:126
uint8_t intPriority
PKA Peripheral&#39;s interrupt priority.
Definition: ECDSACC26X2.h:192
Definition: ECDSACC26X2.h:141
Definition: ECDSACC26X2.h:158
ECDSA_OperationType
Enum for the operation types supported by the driver.
Definition: ECDSA.h:570
int_fast16_t(* ECDSACC26X2_stateMachineFxn)(ECDSA_Handle handle)
ECDSACC26X2 state machine function prototype.
Definition: ECDSACC26X2.h:171
enum ECDSACC26X2_FsmState_ ECDSACC26X2_FsmState
ECDSACC26X2 Sign and Verify states.
Union containing pointers to all supported operation structs.
Definition: ECDSA.h:562
Definition: ECDSACC26X2.h:154
ECDSACC26X2_stateMachineFxn fsmFxn
Definition: ECDSACC26X2.h:208
bool isOpen
Definition: ECDSACC26X2.h:201
uint32_t * scratchNumber2
Definition: ECDSACC26X2.h:214
Definition: ECDSACC26X2.h:148
Definition: ECDSACC26X2.h:140
ECDSACC26X2_FsmState_
ECDSACC26X2 Sign and Verify states.
Definition: ECDSACC26X2.h:120
Definition: ECDSACC26X2.h:150
bool operationInProgress
Definition: ECDSACC26X2.h:202
Definition: ECDSACC26X2.h:143
Definition: ECDSACC26X2.h:153
Definition: ECDSACC26X2.h:155
ECDSACC26X2 Hardware Attributes.
Definition: ECDSACC26X2.h:179
int_fast16_t operationStatus
Definition: ECDSACC26X2.h:204
Definition: ECDSACC26X2.h:147
Definition: ECDSACC26X2.h:133
ECDSACC26X2 Object.
Definition: ECDSACC26X2.h:200
bool operationCanceled
Definition: ECDSACC26X2.h:203
Definition: ECDSACC26X2.h:137
© Copyright 1995-2019, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale