Skip to content

Commit

Permalink
Fix undefined type error and ESP32 RTOS timer function call (#277)
Browse files Browse the repository at this point in the history
* Fix mbedtls_mpi* undefined in atca_mbedtls_ecdsa_sign()
* Flip timer function name based on RTOS timer macro. Was backwards.
* Remove ref. to ATCA_USE_RTOS_TIMER. 

Co-authored-by: Rashed Talukder <>
  • Loading branch information
rashedtalukder committed Nov 12, 2021
1 parent d5fcc60 commit e320651
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
10 changes: 3 additions & 7 deletions lib/hal/hal_esp32_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,12 @@

extern void ets_delay_us(uint32_t);

void atca_delay_us(uint32_t delay)
void hal_delay_us(uint32_t delay)
{
ets_delay_us(delay);
}

#ifdef ATCA_USE_RTOS_TIMER
void atca_delay_ms_internal(uint32_t msec)
#else
void atca_delay_ms(uint32_t msec)
#endif
void hal_delay_ms(uint32_t msec)
{
ets_delay_us(msec * 1000);
}
}
1 change: 0 additions & 1 deletion lib/mbedtls/atca_mbedtls_wrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
#include "mbedtls/ecdh.h"
#include "mbedtls/ecp.h"
#include "mbedtls/entropy.h"
#include "mbedtls/bignum.h"
#include "mbedtls/x509_crt.h"


Expand Down
2 changes: 2 additions & 0 deletions lib/mbedtls/atca_mbedtls_wrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@

#include "atca_device.h"

#include "mbedtls/bignum.h"

#ifdef __cplusplus
extern "C" {
#endif
Expand Down

0 comments on commit e320651

Please sign in to comment.