Skip to content

Commit

Permalink
Merge branch '31-add-config-objects-manipulation-api' into 'develop'
Browse files Browse the repository at this point in the history
Resolve "Add config objects manipulation API"

Closes #31

See merge request internal/sw-design/libtropic!32
  • Loading branch information
pavelpolach321 committed Oct 1, 2024
2 parents f7d6558 + 15ab34f commit 71eb78a
Show file tree
Hide file tree
Showing 18 changed files with 2,400 additions and 1,081 deletions.
11 changes: 10 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@
|--------------------------------------------------------|---------------------------------------------------------|
|[TROPIC01](https://www.tropicsquare.com/TROPIC01) | First generation TROPIC01 |

# Usage
# Repository overview

Codebase consists of:
* `examples`: C code concepts to show how libtropic might be used on host system
* `hal`: Contains `crypto` and `port` interfaces. Files in these folders allows libtropic to be used with various cryptography libraries and on different hardware platforms. Both `crypto` and `port` folders are meant to be compiled within a main project (the one which consumes libtropic library). They provide a way for libtropic core to interact with host's cryptography primitives and hardware layer.
* `src`: Libtropic's core source files, facilitating data handling between host's application and TROPIC01 chip
* `tests`: Unit and integration tests
* `vendor`: External libraries and tools

# Library usage

## Dependencies

Expand Down
660 changes: 660 additions & 0 deletions examples/hw_wallet/hw_wallet.c

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions examples/hw_wallet/hw_wallet.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#ifndef HW_WALLET
#define HW_WALLET

#include <stdint.h>
#include <stdio.h>


#define LOG_OUT(f_, ...) printf(f_, ##__VA_ARGS__)
#define LOG_OUT_INFO(f_, ...) printf("\t[INFO] "f_, ##__VA_ARGS__)
#define LOG_OUT_VALUE(f_, ...) printf("\t\t\t\t\t"f_, ##__VA_ARGS__)
#define LOG_OUT_LINE(f_, ...) printf("\t-------------------------------------------------------------------------------------------------------------\r\n"f_, ##__VA_ARGS__)

#define LOG_OUT_SESSION(f_, ...) printf("\t\t- "f_, ##__VA_ARGS__)

#define LT_ASSERT(func, expected) \
ret = (func); \
if(func!=expected) \
{ \
printf("\t\t\tERROR\r\n"); return -1; \
} else {printf(" %s\r\n", "(ok)");};


int tropic01_hw_wallet_example(void);

#endif
Loading

0 comments on commit 71eb78a

Please sign in to comment.