hollyhock
|
Functions for retrieving and setting data in the MCS. More...
#include <stdint.h>
Go to the source code of this file.
Classes | |
struct | OBCD |
struct | CBCD |
Macros | |
#define | __UCONCAT(a, b) #a b |
#define | _UCONCAT(a, b) __UCONCAT(a, b) |
#define | UCONCAT(b) _UCONCAT(__USER_LABEL_PREFIX__, b) |
#define | cstr(x) __attribute__((null_terminated_string_arg(x))) |
#define | ro(...) __attribute__((access(read_only, __VA_ARGS__))) |
#define | rw(...) __attribute__((access(read_write, __VA_ARGS__))) |
#define | wo(...) __attribute__((access(write_only, __VA_ARGS__))) |
#define | wu __attribute__((warn_unused_result)) |
#define | inline inline __attribute__((always_inline)) |
#define | GET_BCD_DIGIT(n, i) (((n) >> ((i) * 4)) & 0xF) |
Enumerations | |
enum | MCS_VariableType { VARTYPE_OBCD = 0x01 , VARTYPE_CBCD = 0x02 , VARTYPE_STR = 0x05 , VARTYPE_LIST = 0x0A , VARTYPE_MAT = 0x0C , VARTYPE_PRGM = 0x47 , VARTYPE_FUNC = 0x48 , VARTYPE_GEO = 0x54 } |
enum | MCS_Error { MCS_OK = 0x00 , MCS_NO_VARIABLE = 0x30 , MCS_NO_FOLDER = 0x40 , MCS_FOLDER_EXISTS = 0x42 , MCS_SIZE_NOT_PO2 = 0x61 , MCS_NOT_LIST = 0x62 , MCS_INDEX_OOB = 0x63 } |
Functions | |
return | MCS_List_CreateU (folder, name, size, length,(uint8_t) variableType) |
Variables | |
enum MCS_Error(* | MCS_CreateFolder )(const char *folder, uint8_t *folderIndex) wu cstr(1) |
enum MCS_Error(* | MCS_GetVariableU )(const char *folder, const char *name, uint8_t *variableType, char **name2, void **data, uint32_t *size) __asm__(UCONCAT("MCS_GetVariable")) wu cstr(1) cstr(2) ro(1) ro(2) wo(3) wo(4) wo(5) |
static wu const char * | name |
static wu const char enum MCS_VariableType * | variableType |
static wu const char enum MCS_VariableType char ** | name2 |
static wu const char enum MCS_VariableType char void ** | data |
static wu const char enum MCS_VariableType char void uint32_t * | size |
enum MCS_Error(* | MCS_List_CreateU )(const char *folder, const char *name, uint32_t size, uint16_t length, uint8_t variableType) __asm__(UCONCAT("MCS_List_Create")) wu cstr(1) cstr(2) ro(1) ro(2) |
static wu const char uint32_t uint16_t | length |
static wu const char uint32_t uint16_t enum MCS_VariableType variableType MCS_Error(* | MCS_List_SetU )(const char *folder, const char *name, uint32_t size, unsigned int index, uint8_t variableType, void *data) __asm__(UCONCAT("MCS_List_Set")) wu cstr(1) cstr(2) ro(1) ro(2) ro(6 |
static wu const char uint32_t uint16_t enum MCS_VariableType variableType MCS_Error(*) static wu enum MCS_Erro | MCS_List_Set )(const char *folder, const char *name, uint32_t size, unsigned int index, enum MCS_VariableType variableType, void *data) |
enum MCS_Error(* | MCS_SetVariableU )(const char *folder, const char *name, uint8_t variableType, uint32_t size, void *data) __asm__(UCONCAT("MCS_SetVariable")) wu cstr(1) cstr(2) ro(1) ro(2) ro(5 |
enum MCS_Error(*) static wu enum MCS_Erro | MCS_SetVariable )(const char *folder, const char *name, enum MCS_VariableType variableType, uint32_t size, void *data) |
Functions for retrieving and setting data in the MCS.
#define GET_BCD_DIGIT | ( | n, | |
i | |||
) | (((n) >> ((i) * 4)) & 0xF) |
Retrieves the BCD digit at position i
(0 representing the least significant place) from a BCD encoded number n
.
n | The number to retrieve a digit from. |
i | The index of the digit to retrieve. |
enum MCS_Error |
enum MCS_VariableType |
Enumerator | |
---|---|
VARTYPE_OBCD | Variable type: OBCD ( |
VARTYPE_CBCD | Variable type: CBCD ( |
VARTYPE_STR | Variable type: null-terminated string. |
VARTYPE_LIST | Variable type: list. |
VARTYPE_MAT | Variable type: matrix. |
VARTYPE_PRGM | Variable type: program. |
VARTYPE_FUNC | Variable type: function. |
VARTYPE_GEO | Variable type: geometry data. |
|
extern |
Creates a folder in the MCS.
If the folder name is greater than the 8 character max, it is truncated to a valid length.
The folderIndex
parameter is still populated if the folder already exists. However, its purpose is currently unknown.
[in] | folder | The name of the folder to create. |
[out] | folderIndex | An unknown index for the folder. |
MCS_FOLDER_EXISTS
if the folder already exists. static wu const char uint32_t size |