|
9 | 9 | #include "cryptoauthlib/lib/atcacert/atcacert.h" |
10 | 10 | #include "cryptoauthlib/lib/cryptoauthlib.h" |
11 | 11 |
|
12 | | -enum EccDataType { |
| 12 | +enum ecc_data_types { |
13 | 13 | EMPTY = 0, |
14 | 14 | AWS_THINGNAME = 1, |
15 | 15 | AWS_ENDPOINT = 2, |
@@ -71,10 +71,40 @@ class ECC608Class { |
71 | 71 | * will be returned. |
72 | 72 | */ |
73 | 73 | ATCA_STATUS |
74 | | - readProvisionItem(const enum EccDataType type, |
| 74 | + readProvisionItem(const enum ecc_data_types type, |
75 | 75 | uint8_t* buffer, |
76 | 76 | size_t* size); |
77 | 77 |
|
| 78 | + /** |
| 79 | + * @brief Retrieves the AWS thing name from the ECC608. |
| 80 | + * |
| 81 | + * @param thing_name [out] Buffer to store thing name in. |
| 82 | + * @param size [in, out] Pointer to length of buffer. Set to the length of |
| 83 | + * the thing name on return. |
| 84 | + * |
| 85 | + * @return ATCA_STATUS error code. If the thing name is not found |
| 86 | + * ATCA_INVALID_ID will be returned. |
| 87 | + */ |
| 88 | + __attribute__((deprecated( |
| 89 | + "getThingName is deprecated, please use readProvisionItem " |
| 90 | + "with AWS_THINGNAME passed as the type instead"))) ATCA_STATUS |
| 91 | + getThingName(uint8_t* thing_name, uint8_t* size); |
| 92 | + |
| 93 | + /** |
| 94 | + * @brief Retrives the AWS endpoint from the ECC608. |
| 95 | + * |
| 96 | + * @param endpoint [out] Buffer to store endpoint in. |
| 97 | + * @param size [in, out] Pointer to length of buffer. Set to the length of |
| 98 | + * the endpoint on return. |
| 99 | + * |
| 100 | + * @return ATCA_STATUS error code. If the thing name is not found |
| 101 | + * ATCA_INVALID_ID will be returned. |
| 102 | + */ |
| 103 | + __attribute__(( |
| 104 | + deprecated("getEndpoint is deprecated, please use readProvisionItem " |
| 105 | + "with AWS_ENDPOINT passed as the type instead"))) ATCA_STATUS |
| 106 | + getEndpoint(uint8_t* endpoint, uint8_t* size); |
| 107 | + |
78 | 108 | /** |
79 | 109 | * @brief Get the size of the root certificate (not base64 encoded. The size |
80 | 110 | * is in raw bytes). |
|
0 commit comments