se051plugntrust 2.1.0.0
|
SE051 Plug n Trust Click example. More...
Macros | |
#define | PARSE_BUF_LEN 0xFF |
#define | DATA_LEN 16 |
#define | AES_DATA_SIZE 16 |
#define | AES_KEY_SIZE 16 |
Functions | |
void | application_init (void) |
void | application_task (void) |
int | main (void) |
SE051 Plug n Trust Click example.
This application is showcasing basic functionality of SE051 Plug&Trust click board. It gets identify data from device, selects card manager and applet. Then checks free memory, reads all objects and deletes not reserved ones. After that showcases a few of functionality:
The demo application is composed of two sections :
At the start it sets comunication interface to I2C and resets the chip, reads identifying data from device, and then selects card manager and applet. After that it reads free persistent memory, reads all objects and deletes objects that are not reserved by the Applet. Then it generates 2 byte of random data, and gets the version information from the Applet. That's followed up with creating binary object with 'MikroE' data inside. Then it checks if object is created and reads data back. After that, the object is deleted and it's checked if it still exists. Finally it creates 128AES key (16bytes), encrypts it and then decrypts data with that key, and in the end it deletes that key object.
It generates 16bytes of data, writes it in binary object and then reads it back and displays on the USB UART. Then creates AES key and encrypts that generated data with it, and then decrypts it. In the end it deletes both AES key object and binary object that's created at the start of the task.
#define AES_DATA_SIZE 16 |
#define AES_KEY_SIZE 16 |
#define DATA_LEN 16 |
#define PARSE_BUF_LEN 0xFF |
void application_init | ( | void | ) |
< Logger config object.
< Click config object.
Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG
void application_task | ( | void | ) |
int main | ( | void | ) |