VitroIO SDK
Software development kit for Vitro Shard.
Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1#ifndef VITROIO_SDK_TYPES_H
2#define VITROIO_SDK_TYPES_H
3
4#define ATCA_ECC_CONFIG_SIZE (128)
5
11#include <mbed.h>
12
13namespace vitroio
14{
15
16namespace sdk
17{
22{
23 uint16_t id;
24
30 FirmwareId(uint16_t id);
31
37 FirmwareId(const uint8_t* buffer);
38
39 bool operator!=(const FirmwareId &v);
40
41 int toInt();
42};
46struct Version
47{
48 uint8_t major;
49 uint8_t minor;
50 uint8_t patch;
51 uint8_t rc;
52
61 Version(uint8_t amajor, uint8_t aminor, uint8_t apatch, uint8_t rc);
62
68 Version(const uint8_t* buffer);
69
70 bool operator>(const Version &v);
71
72 int toInt();
73};
74
79{
87 uint32_t offset;
88
92 uint32_t sectors;
93
100 FlashSpace(uint32_t aoffset, uint32_t asectors);
101};
102
103} // namespace sdk
104
105} // namespace vitroio
106
107extern const uint8_t test_ecc_configdata[ATCA_ECC_CONFIG_SIZE];
108
109#endif // VITROIO_SDK_TYPES_H
The namespace contains all of components of vitro-shard-sdk and components based on the sdk....
Definition: can_layer.h:9
Definition: types.h:22
FirmwareId(uint16_t id)
Constructor initializes the structure.
FirmwareId(const uint8_t *buffer)
Constructor initializes the structure.
uint16_t id
Definition: types.h:23
bool operator!=(const FirmwareId &v)
Structure representing space of flash memory.
Definition: types.h:79
uint32_t sectors
Specifies size of flash memory in sectors count.
Definition: types.h:92
uint32_t offset
Specifies offset of flash memory in bytes.
Definition: types.h:87
FlashSpace(uint32_t aoffset, uint32_t asectors)
Contructor initializes the structure.
Structure representing version in format major.minor.patch.
Definition: types.h:47
bool operator>(const Version &v)
Version(const uint8_t *buffer)
Constructor initializes the structure.
Version(uint8_t amajor, uint8_t aminor, uint8_t apatch, uint8_t rc)
Constructor initializes the structure.
uint8_t patch
Definition: types.h:50
uint8_t rc
Definition: types.h:51
uint8_t major
Definition: types.h:48
uint8_t minor
Definition: types.h:49
const uint8_t test_ecc_configdata[ATCA_ECC_CONFIG_SIZE]
#define ATCA_ECC_CONFIG_SIZE
size of configuration zone
Definition: types.h:4