[core] Update Arduino compatibility, fix MD5 library
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#if 0 // maybe simply using void* is easier? this is not C++ so it will link anyway
|
||||
// available built-in implementations
|
||||
#if LT_ARD_MD5_POLARSSL
|
||||
#include "MD5PolarSSLImpl.h"
|
||||
@@ -15,7 +14,6 @@
|
||||
#if LT_ARD_MD5_HOSTAPD
|
||||
#include "MD5HostapdImpl.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// common API
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
struct MD5Context {
|
||||
unsigned long buf[4];
|
||||
unsigned long bits[2];
|
||||
unsigned char in[64];
|
||||
};
|
||||
|
||||
typedef uint32_t u32;
|
||||
typedef uint8_t u8;
|
||||
|
||||
#include <crypto/md5_i.h>
|
||||
#define LT_MD5_CTX_T struct MD5Context
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -6,7 +6,12 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <mbedtls/md5.h>
|
||||
typedef struct {
|
||||
unsigned long total[2]; /*!< number of bytes processed */
|
||||
unsigned long state[4]; /*!< intermediate digest state */
|
||||
unsigned char buffer[64]; /*!< data block being processed */
|
||||
} mbedtls_md5_context;
|
||||
|
||||
#define LT_MD5_CTX_T mbedtls_md5_context
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -6,7 +6,12 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <polarssl/md5.h>
|
||||
typedef struct {
|
||||
unsigned long total[2]; /*!< number of bytes processed */
|
||||
unsigned long state[4]; /*!< intermediate digest state */
|
||||
unsigned char buffer[64]; /*!< data block being processed */
|
||||
} md5_context;
|
||||
|
||||
#define LT_MD5_CTX_T md5_context
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -36,6 +36,7 @@ using std::min;
|
||||
|
||||
// FreeRTOS kernel
|
||||
#include <FreeRTOS.h>
|
||||
#include <task.h>
|
||||
|
||||
// Define available serial ports
|
||||
#if defined(__cplusplus) && LT_ARD_HAS_SERIAL
|
||||
|
||||
Reference in New Issue
Block a user