Skip to content

Nuvoton: Fix crypto compile error with Mbed OS 2 #9191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions targets/TARGET_NUVOTON/TARGET_M480/crypto/crypto-misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@
#include "mbed_assert.h"
#include "mbed_critical.h"
#include "mbed_error.h"
#if MBED_CONF_RTOS_PRESENT
#include "cmsis_os2.h"
#include "mbed_rtos_storage.h"
#endif
#include <string.h>
#include <limits.h>
#include "nu_modutil.h"
#include "nu_bitutil.h"
#include "crypto-misc.h"
#include "SingletonPtr.h"
#include "Mutex.h"
#include "platform/SingletonPtr.h"
#include "platform/PlatformMutex.h"

/* Consideration for choosing proper synchronization mechanism
*
Expand All @@ -46,13 +47,13 @@
*/

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

/* Mutex for crypto DES AC management */
static SingletonPtr<rtos::Mutex> crypto_des_mutex;
static SingletonPtr<PlatformMutex> crypto_des_mutex;

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

/* Atomic flag for crypto SHA AC management */
static core_util_atomic_flag crypto_sha_atomic_flag = CORE_UTIL_ATOMIC_FLAG_INIT;
Expand Down
13 changes: 7 additions & 6 deletions targets/TARGET_NUVOTON/TARGET_NUC472/crypto/crypto-misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@
#include "mbed_assert.h"
#include "mbed_critical.h"
#include "mbed_error.h"
#if MBED_CONF_RTOS_PRESENT
#include "cmsis_os2.h"
#include "mbed_rtos_storage.h"
#endif
#include <string.h>
#include <limits.h>
#include "nu_modutil.h"
#include "nu_bitutil.h"
#include "crypto-misc.h"
#include "SingletonPtr.h"
#include "Mutex.h"
#include "platform/SingletonPtr.h"
#include "platform/PlatformMutex.h"

/* Consideration for choosing proper synchronization mechanism
*
Expand All @@ -44,12 +45,12 @@
* (2) No biting CPU
* Same reason as above.
*/

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

/* Mutex for crypto DES AC management */
static SingletonPtr<rtos::Mutex> crypto_des_mutex;
static SingletonPtr<PlatformMutex> crypto_des_mutex;

/* Atomic flag for crypto SHA AC management */
static core_util_atomic_flag crypto_sha_atomic_flag = CORE_UTIL_ATOMIC_FLAG_INIT;
Expand Down