fix build error

This commit is contained in:
hathach committed 2018-01-11 17:40:08 +07:00
1 parent 3b37b42bcd
commit b2934caba7
2 files changed
+16 -1

No files matched your search

+7 -1
View File
@@ -25,6 +25,7 @@
//#include "homekit/pairing.h"
#include "common_inc.h"
#include "rtos.h"
#define E(V) (((V) << 24) | ((V) >> 24) | (((V) >> 8) & 0x0000FF00) | (((V) << 8) & 0x00FF0000))
static const uint32_t srp_N[] =
@@ -86,7 +87,10 @@ void srp_init(void)
// The MPI library uses a ridiculous amount of memory. We use the stack allocator
// so we don't tie this memory up except when we absolutely need to.
uint8_t memory[11 * 1024];
// uint8_t memory[11 * 1024];
uint8_t* memory = (uint8_t*) rtos_malloc(11*1024);
VERIFY(memory, );
memory_buffer_alloc_init(memory, sizeof(memory));
// Generate salt
@@ -163,6 +167,8 @@ void srp_init(void)
mpi_free(&x);
memory_buffer_alloc_free();
rtos_free(memory);
}
void srp_start(void)
@@ -26,6 +26,11 @@ typedef struct
uint8_t serverM1:1;
} srp_keys_t;
#ifdef __cplusplus
extern "C"
{
#endif
extern srp_keys_t srp;
typedef void (*moretime_t)(void);
@@ -39,4 +44,8 @@ extern uint8_t* srp_getB(void);
extern uint8_t* srp_getM2(void);
extern uint8_t* srp_getK(void);
#ifdef __cplusplus
}
#endif
#endif /* HOMEKIT_SRP_SRP_H_ */