forked from ARMmbed/mbed-os-example-psa
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
33 lines (24 loc) · 671 Bytes
/
main.cpp
File metadata and controls
33 lines (24 loc) · 671 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* mbed Microcontroller Library
* Copyright (c) 2020 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*/
#include "mbed.h"
#include "platform/mbed_thread.h"
#include "psa/client.h"
#define BLINKING_RATE_MS 1000
int main(void)
{
uint32_t count = 0;
DigitalOut led(LED1);
printf("PSA Framework Version : %ld\r\n", psa_framework_version());
while (true)
{
led = !led;
thread_sleep_for(BLINKING_RATE_MS);
// Print only after (BLINKING_RATE_MS * 10) milliseconds.
if ((count++ % 10) == 0)
{
printf("Executing from NS Core... LED Blink rate : %d ms\r\n", BLINKING_RATE_MS);
}
}
}