hollyhock
Loading...
Searching...
No Matches
mcs.hpp
Go to the documentation of this file.
1
6#pragma once
7#include <stdint.h>
8
12const uint8_t VARTYPE_OBCD = 0x01;
13
17const uint8_t VARTYPE_CBCD = 0x02;
18
22const uint8_t VARTYPE_STR = 0x05;
23
27const uint8_t VARTYPE_LIST = 0x0A;
28
32const uint8_t VARTYPE_MAT = 0x0C;
33
37const uint8_t VARTYPE_PRGM = 0x47;
38
42const uint8_t VARTYPE_FUNC = 0x48;
43
47const uint8_t VARTYPE_GEO = 0x54;
48
52const int MCS_NO_VARIABLE = 0x30;
53
57const int MCS_NO_FOLDER = 0x40;
58
62const int MCS_FOLDER_EXISTS = 0x42;
63
67const int MCS_SIZE_NOT_PO2 = 0x61;
68
72const int MCS_NOT_LIST = 0x62;
73
77const int MCS_INDEX_OOB = 0x63;
78
86#define GET_BCD_DIGIT(n, i) (((n) >> ((i) * 4)) & 0xF)
87
93struct OBCD {
94 uint8_t mantissa[10];
95 uint16_t exponent;
96};
97
103struct CBCD {
104 struct OBCD re;
105 struct OBCD im;
106};
107
122extern "C"
123int MCS_CreateFolder(const char *folder, uint8_t *folderIndex);
124
137extern "C"
139 const char *folder, const char *name,
140 uint8_t *variableType, char **name2, void **data, uint32_t *size
141);
142
159extern "C"
161 const char *folder, const char *name,
162 uint32_t size, uint16_t length, uint8_t variableType
163);
164
180extern "C"
182 const char *folder, const char *name,
183 uint32_t size, int index, uint8_t variableType, void *data
184);
185
202extern "C"
204 const char *folder, const char *name,
205 uint8_t variableType, uint32_t size, void *data
206);
int MCS_List_Set(const char *folder, const char *name, uint32_t size, int index, uint8_t variableType, void *data)
const uint8_t VARTYPE_PRGM
Definition mcs.hpp:37
const uint8_t VARTYPE_GEO
Definition mcs.hpp:47
const int MCS_SIZE_NOT_PO2
Definition mcs.hpp:67
const int MCS_FOLDER_EXISTS
Definition mcs.hpp:62
int MCS_CreateFolder(const char *folder, uint8_t *folderIndex)
const uint8_t VARTYPE_MAT
Definition mcs.hpp:32
int MCS_GetVariable(const char *folder, const char *name, uint8_t *variableType, char **name2, void **data, uint32_t *size)
const uint8_t VARTYPE_OBCD
Definition mcs.hpp:12
const uint8_t VARTYPE_LIST
Definition mcs.hpp:27
const uint8_t VARTYPE_CBCD
Definition mcs.hpp:17
const uint8_t VARTYPE_STR
Definition mcs.hpp:22
const int MCS_NO_VARIABLE
Definition mcs.hpp:52
const int MCS_INDEX_OOB
Definition mcs.hpp:77
const int MCS_NO_FOLDER
Definition mcs.hpp:57
int MCS_List_Create(const char *folder, const char *name, uint32_t size, uint16_t length, uint8_t variableType)
const uint8_t VARTYPE_FUNC
Definition mcs.hpp:42
const int MCS_NOT_LIST
Definition mcs.hpp:72
int MCS_SetVariable(const char *folder, const char *name, uint8_t variableType, uint32_t size, void *data)
Definition mcs.hpp:103
Definition mcs.hpp:93