Skip to content

Commit

Permalink
M467: Replace PlatformMutex with rtos::Mutex (#322)
Browse files Browse the repository at this point in the history
PlatformMutex becomes unsupported. rtos::Mutex now replaces it,
supporting both mbed-baremetal and mbed-os.
  • Loading branch information
ccli8 authored Aug 16, 2024
1 parent 8d2ede6 commit 047bbc3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions targets/TARGET_NUVOTON/TARGET_M460/crypto/crypto-misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "nu_timer.h"
#include "crypto-misc.h"
#include "platform/SingletonPtr.h"
#include "platform/PlatformMutex.h"
#include "rtos/Mutex.h"
#include "hal/trng_api.h"

#if defined(MBEDTLS_CONFIG_HW_SUPPORT)
Expand All @@ -43,19 +43,19 @@
*/

/* Mutex for crypto PRNG ACC management */
static SingletonPtr<PlatformMutex> crypto_prng_mutex;
static SingletonPtr<rtos::Mutex> crypto_prng_mutex;

/* Mutex for crypto AES ACC management */
static SingletonPtr<PlatformMutex> crypto_aes_mutex;
static SingletonPtr<rtos::Mutex> crypto_aes_mutex;

/* Mutex for crypto SHA ACC management */
static SingletonPtr<PlatformMutex> crypto_sha_mutex;
static SingletonPtr<rtos::Mutex> crypto_sha_mutex;

/* Mutex for crypto ECC ACC management */
static SingletonPtr<PlatformMutex> crypto_ecc_mutex;
static SingletonPtr<rtos::Mutex> crypto_ecc_mutex;

/* Mutex for crypto RSA ACC management */
static SingletonPtr<PlatformMutex> crypto_rsa_mutex;
static SingletonPtr<rtos::Mutex> crypto_rsa_mutex;

/* Crypto init counter. Crypto keeps active as it is non-zero. */
static uint16_t crypto_init_counter = 0U;
Expand Down

0 comments on commit 047bbc3

Please sign in to comment.