Skip to content

Commit 5b9c973

Browse files
committed
Merged sha204 from dev, in order to detect sha204 in MySensors Micro board (Testmode)
1 parent 79ab745 commit 5b9c973

File tree

3 files changed

+1188
-0
lines changed

3 files changed

+1188
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// ----------------------------------------------------------------------------
2+
// ATMEL Microcontroller Software Support - Colorado Springs, CO -
3+
// ----------------------------------------------------------------------------
4+
// DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
5+
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
6+
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
7+
// DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
8+
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
10+
// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
11+
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
12+
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
13+
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14+
// ----------------------------------------------------------------------------
15+
16+
/** \file
17+
* \brief SHA204 Library Return Code Definitions
18+
* \author Atmel Crypto Products
19+
* \date September 27, 2010
20+
*/
21+
22+
#ifndef SHA204_LIB_RETURN_CODES_H
23+
# define SHA204_LIB_RETURN_CODES_H
24+
25+
#include <stddef.h> // data type definitions
26+
27+
/** \todo Use same values for same meanings for SHA204 and AES132.
28+
* */
29+
30+
#define SHA204_SUCCESS ((uint8_t) 0x00) //!< Function succeeded.
31+
#define SHA204_PARSE_ERROR ((uint8_t) 0xD2) //!< response status byte indicates parsing error
32+
#define SHA204_CMD_FAIL ((uint8_t) 0xD3) //!< response status byte indicates command execution error
33+
#define SHA204_STATUS_CRC ((uint8_t) 0xD4) //!< response status byte indicates CRC error
34+
#define SHA204_STATUS_UNKNOWN ((uint8_t) 0xD5) //!< response status byte is unknown
35+
#define SHA204_FUNC_FAIL ((uint8_t) 0xE0) //!< Function could not execute due to incorrect condition / state.
36+
#define SHA204_GEN_FAIL ((uint8_t) 0xE1) //!< unspecified error
37+
#define SHA204_BAD_PARAM ((uint8_t) 0xE2) //!< bad argument (out of range, null pointer, etc.)
38+
#define SHA204_INVALID_ID ((uint8_t) 0xE3) //!< invalid device id, id not set
39+
#define SHA204_INVALID_SIZE ((uint8_t) 0xE4) //!< Count value is out of range or greater than buffer size.
40+
#define SHA204_BAD_CRC ((uint8_t) 0xE5) //!< incorrect CRC received
41+
#define SHA204_RX_FAIL ((uint8_t) 0xE6) //!< Timed out while waiting for response. Number of bytes received is > 0.
42+
#define SHA204_RX_NO_RESPONSE ((uint8_t) 0xE7) //!< Not an error while the Command layer is polling for a command response.
43+
#define SHA204_RESYNC_WITH_WAKEUP ((uint8_t) 0xE8) //!< re-synchronization succeeded, but only after generating a Wake-up
44+
45+
#define SHA204_COMM_FAIL ((uint8_t) 0xF0) //!< Communication with device failed. Same as in hardware dependent modules.
46+
#define SHA204_TIMEOUT ((uint8_t) 0xF1) //!< Timed out while waiting for response. Number of bytes received is 0.
47+
48+
#endif

0 commit comments

Comments
 (0)