8 #ifndef K_FIRESYNC_FIRESYNC_DEF_H
9 #define K_FIRESYNC_FIRESYNC_DEF_H
13 #if defined (K_FS_EMIT)
14 # define kFsFx(TYPE) kExportFx(TYPE)
15 # define kFsDx(TYPE) kExportDx(TYPE)
17 # define kFsFx(TYPE) kImportFx(TYPE)
18 # define kFsDx(TYPE) kImportDx(TYPE)
44 #define kETHERNET_LINK_NONE (0x0000)
45 #define kETHERNET_LINK_10_HALF (0x0001)
46 #define kETHERNET_LINK_10_FULL (0x0002)
47 #define kETHERNET_LINK_100_HALF (0x0004)
48 #define kETHERNET_LINK_100_FULL (0x0008)
49 #define kETHERNET_LINK_1000_HALF (0x0010)
50 #define kETHERNET_LINK_1000_FULL (0x0020)
51 #define kETHERNET_LINK_AUTO (0x8000)
63 kFsFx(kStatus) kEthernetLink_Format(kEthernetLink speed, kChar* text, kSize capacity);
83 #define kFS_UPG_LOG_LEVEL_INFO (0)
84 #define kFS_UPG_LOG_LEVEL_WARN (1)
85 #define kFS_UPG_LOG_LEVEL_ERROR (2)
96 kUpgLogLevel logLevel;
108 #define kNETWORK_SPEED_NULL (0x0000)
109 #define kNETWORK_SPEED_AUTO (0x0001)
110 #define kNETWORK_SPEED_10 (0x0002)
111 #define kNETWORK_SPEED_100 (0x0004)
112 #define kNETWORK_SPEED_1000 (0x0008)
124 kFsFx(kStatus) kNetworkSpeed_Format(kNetworkSpeed speed, kChar* text, kSize capacity);
135 #define kIP_NEGOTIATION_STATIC (0)
136 #define kIP_NEGOTIATION_DHCP (1)
230 #define kVISUALIZER_MESH (0)
231 #define kVISUALIZER_PROPERTY_TABLE (1)
232 #define kVISUALIZER_TEXT (2)
233 #define kVISUALIZER_2D (3)
242 typedef k32s kAlignment;
245 #define kALIGNMENT_CENTRE (0x00)
246 #define kALIGNMENT_LEFT (0x01)
247 #define kALIGNMENT_RIGHT (0x02)
248 #define kALIGNMENT_TOP (0x04)
249 #define kALIGNMENT_BOTTOM (0x08)
250 #define kALIGNMENT_TOP_LEFT (kALIGNMENT_TOP | kALIGNMENT_LEFT)
251 #define kALIGNMENT_TOP_RIGHT (kALIGNMENT_TOP | kALIGNMENT_RIGHT)
252 #define kALIGNMENT_BOTTOM_LEFT (kALIGNMENT_BOTTOM | kALIGNMENT_LEFT)
253 #define kALIGNMENT_BOTTOM_RIGHT (kALIGNMENT_BOTTOM | kALIGNMENT_RIGHT)
262 typedef k32s kFontStyle;
265 #define kFONT_STYLE_NORMAL (0x00)
266 #define kFONT_STYLE_BOLD (0x01)
267 #define kFONT_STYLE_ITALIC (0x02)
268 #define kFONT_STYLE_UNDERLINE (0x04)
277 typedef k32s kFontFamily;
280 #define kFONT_FAMILY_SERIF (0)
281 #define kFONT_FAMILY_SANS_SERIF (1)
282 #define kFONT_FAMILY_MONOSPACE (2)
291 typedef k32s kMarkerShape;
294 #define kMARKER_SHAPE_CROSS (0)
295 #define kMARKER_SHAPE_PLUS (1)
296 #define kMARKER_SHAPE_CIRCLE (2)
297 #define kMARKER_SHAPE_SQUARE (3)
298 #define kMARKER_SHAPE_TRIANGLE (4)
299 #define kMARKER_SHAPE_DIAMOND (5)
308 typedef k32s kDemosaicStyle;
310 #define kDEMOSAIC_STYLE_REDUCE (0)
311 #define kDEMOSAIC_STYLE_BILINEAR (1)
312 #define kDEMOSAIC_STYLE_GRADIENT (2)
323 #define kAXIS_X (0x1)
324 #define kAXIS_Y (0x2)
325 #define kAXIS_Z (0x4)
338 #define kCOMPRESSED_PHASE_STREAM_ID_PHASE_DELTA (0)
339 #define kCOMPRESSED_PHASE_STREAM_ID_PHASE_FAIL_2 (1)
340 #define kCOMPRESSED_PHASE_STREAM_ID_PHASE_NULL (2)
341 #define kCOMPRESSED_PHASE_STREAM_ID_PHASE_FAIL_1 (3)
342 #define kCOMPRESSED_PHASE_STREAM_ID_INTENSITY_DELTA (4)
343 #define kCOMPRESSED_PHASE_STREAM_ID_INTENSITY_FAIL_2 (5)
344 #define kCOMPRESSED_PHASE_STREAM_ID_INTENSITY_NULL (6)
345 #define kCOMPRESSED_PHASE_STREAM_ID_INTENSITY_FAIL_1 (7)
355 kInlineFx(kBool) kCompressedPhaseStreamId_IsDelta(kCompressedPhaseStreamId streamId)
428 #define kCOMPRESSED_PHASE_ENCODING_4B_DELTA (1)
429 #define kCOMPRESSED_PHASE_ENCODING_6B_DELTA (2)
430 #define kCOMPRESSED_PHASE_ENCODING_8B_DELTA (3)
431 #define kCOMPRESSED_PHASE_ENCODING_10B_DELTA (4)
432 #define kCOMPRESSED_PHASE_ENCODING_12B_FAIL_1 (5)
433 #define kCOMPRESSED_PHASE_ENCODING_8B_FAIL_2 (6)
434 #define kCOMPRESSED_PHASE_ENCODING_24B_FAIL_2 (7)
435 #define kCOMPRESSED_PHASE_ENCODING_8B_NULL (8)
447 kFsFx(k32u) kCompressedPhaseEncoding_IndexBitDepth(kCompressedPhaseEncoding encoding);
537 #define kField_ToMask_(MSB, LSB) \
538 (((((MSB) - (MSB) + 1) << ((MSB) - (LSB) + 1)) - 1) << (LSB))
548 #define kField_Create_(MASK, SHIFT, FLD_VAL) \
549 (((FLD_VAL) << SHIFT) & (MASK))
558 #define kField_CreateNamed_(FIELD_NAME, FLD_VAL) \
559 kField_Create_(FIELD_NAME##_MASK, FIELD_NAME##_SHIFT, FLD_VAL)
572 #define kField_CreateRange_(MSB, LSB, FLD_VAL) \
573 kField_Create_(kField_ToMask_(MSB, LSB), LSB, FLD_VAL)
585 #define kField_CreateNamedRange_(FIELD_NAME, FLD_VAL) \
586 kField_CreateRange_(FIELD_NAME##_MSB, FIELD_NAME##_LSB, FLD_VAL)
596 #define kField_Extract_(REG_VAL, MASK, SHIFT) \
597 (((REG_VAL) & (MASK)) >> (SHIFT))
606 #define kField_ExtractNamed_(REG_VAL, FIELD_NAME) \
607 (((REG_VAL) & (FIELD_NAME##_MASK)) >> (FIELD_NAME##_SHIFT))
620 #define kField_ExtractRange_(REG_VAL, MSB, LSB) \
621 kField_Extract_(REG_VAL, kField_ToMask_(MSB, LSB), LSB)
633 #define kField_ExtractNamedRange_(REG_VAL, FIELD_NAME) \
634 kField_ExtractRange_(REG_VAL, FIELD_NAME##_MSB, FIELD_NAME##_LSB)
644 #define kField_Insert_(REG_REF, MASK, SHIFT, FLD_VAL) \
645 (*(REG_REF) = (*(REG_REF) & ~(MASK)) | kField_Create_(MASK, SHIFT, FLD_VAL))
654 #define kField_InsertNamed_(REG_REF, FIELD_NAME, FLD_VAL) \
655 kField_Insert_(REG_REF, FIELD_NAME##_MASK, FIELD_NAME##_SHIFT, FLD_VAL)
668 #define kField_InsertRange_(REG_REF, MSB, LSB, FLD_VAL) \
669 kField_Insert_(REG_REF, kField_ToMask_(MSB, LSB), LSB, FLD_VAL)
681 #define kField_InsertNamedRange_(REG_REF, FIELD_NAME, FLD_VAL) \
682 kField_InsertRange_(REG_REF, FIELD_NAME##_MSB, FIELD_NAME##_LSB, FLD_VAL)
693 #define kField_Diff_(REG_VAL_A, REG_VAL_B, MASK, SHIFT) \
694 ((kField_Extract_(REG_VAL_A, MASK, SHIFT) - kField_Extract_(REG_VAL_B, MASK, SHIFT)) \
695 & ((MASK) >> (SHIFT)))
706 #define kField_DiffNamed_(REG_VAL_A, REG_VAL_B, FIELD_NAME) \
707 kField_Diff_(REG_VAL_A, REG_VAL_B, FIELD_NAME##_MASK, FIELD_NAME##_SHIFT)
721 #define kField_DiffRange_(REG_VAL_A, REG_VAL_B, MSB, LSB) \
722 kField_Diff_(REG_VAL_A, REG_VAL_B, kField_ToMask_(MSB, LSB), LSB)
736 #define kField_DiffNamedRange_(REG_VAL_A, REG_VAL_B, FIELD_NAME) \
737 kField_DiffRange_(REG_VAL_A, REG_VAL_B, FIELD_NAME##_MSB, FIELD_NAME##_LSB)
748 #define kNanoToMicro_(V) ((V) / 1000)
756 #define kMicroToNano_(V) ((V) * 1000)
760 #define kIO_TEST_IO_I2C_ID_EXT_AD7415 (0x49)
761 #define kIO_TEST_AD7415_SCALE_FACTOR (250);
764 #include <kFireSync/kFsDef.x.h>
k16u data
Data value.
Definition: kFsDef.h:206
kStatus kCompressedPhaseEncoding_FindDeltaEncoding(kCompressedPhaseEncoding *encoding, k32u bitDepth)
Looks up the delta encoding identifier for the specified bit depth.
#define kCOMPRESSED_PHASE_STREAM_ID_INTENSITY_FAIL_2
Intensity "fail 2nd" index/value pairs.
Definition: kFsDef.h:343
k32s second
Second value.
Definition: kFsDef.h:32
k32s kCompressedPhaseEncoding_ValueMax(kCompressedPhaseEncoding encoding)
Reports the maximum value associated with the encoding.
k32s kCompressedPhaseEncoding_ValueSigned(kCompressedPhaseEncoding encoding)
Reports whether the value field associated with the encoding is signed.
k32u kIpConfig_SubnetPrefixToMask(k32u prefix)
Converts a numeric subnet prefix length to an IPv4 subnet mask.
k32u address
Address value.
Definition: kFsDef.h:217
Represents IP auto configuration options.
Represents an Ethernet link speed.
k16u address
Address value.
Definition: kFsDef.h:191
k16u endBit
End bit.
Definition: kFsDef.h:193
k32u kIpConfig_SubnetMaskToPrefix(k32u mask)
Converts an IPv4 subnet mask to a numeric subnet prefix length.
kIpAddress address
IP address.
Definition: kFsDef.h:159
k16u address
Address value.
Definition: kFsDef.h:205
kBool kCompressedPhaseStreamId_IsFail(kCompressedPhaseStreamId streamId)
Reports whether the specified stream identifier represents a "fail" stream.
Definition: kFsDef.h:374
kIpNegotiation ipNegotiation
IP auto configuration setting.
Definition: kFsDef.h:162
Represents address configuration for an Internet Protocol adapter.
Definition: kFsDef.h:157
Coordinate axis dimension.
Represents 16-bit address/data register pair.
Definition: kFsDef.h:203
#define kCOMPRESSED_PHASE_STREAM_ID_PHASE_FAIL_1
Phase "fail 1st" index/value pairs.
Definition: kFsDef.h:341
#define kCOMPRESSED_PHASE_STREAM_ID_INTENSITY_NULL
Intensity null index/count pairs.
Definition: kFsDef.h:344
Represents an upgrade log message.
Definition: kFsDef.h:93
k32u prefixLength
Subnet prefix length.
Definition: kFsDef.h:160
kBool kCompressedPhaseStreamId_IsNull(kCompressedPhaseStreamId streamId)
Reports whether the specified stream identifier represents a null stream.
Definition: kFsDef.h:395
Represents Upgrade Log Level.
#define kCOMPRESSED_PHASE_STREAM_ID_INTENSITY_DELTA
Intensity delta values.
Definition: kFsDef.h:342
Represents 32-bit address/data register pair.
Definition: kFsDef.h:215
Represents address/bits data register pair.
Definition: kFsDef.h:189
k16u data
Data value.
Definition: kFsDef.h:194
#define kCOMPRESSED_PHASE_STREAM_ID_PHASE_FAIL_2
Phase "fail 2nd" index/value pairs.
Definition: kFsDef.h:339
kIpAddress gateway
Default gateway address.
Definition: kFsDef.h:161
kStatus kIpNegotiation_Format(kIpNegotiation ipNegotiation, kChar *text, kSize capacity)
Formats a kIpNegotiation value to a string buffer.
k32s kCompressedPhaseEncoding_IndexMax(kCompressedPhaseEncoding encoding)
Reports the maximum index associated with the encoding (if applicable).
Represents an encoding style for a kCompressedPhase stream.
k32u data
Data value.
Definition: kFsDef.h:218
#define kCOMPRESSED_PHASE_STREAM_ID_PHASE_DELTA
Phase delta values.
Definition: kFsDef.h:338
k16u startBit
Start bit.
Definition: kFsDef.h:192
#define kCOMPRESSED_PHASE_STREAM_ID_INTENSITY_FAIL_1
Intensity "fail 1st" index/value pairs (note: unused at time of writing).
Definition: kFsDef.h:345
k32s first
First value.
Definition: kFsDef.h:31
k32s kCompressedPhaseEncoding_ValueMin(kCompressedPhaseEncoding encoding)
Reports the minimum value associated with the encoding.
k64u kEthernetLink_Capacity(kEthernetLink speed)
Based on the link speed, reports the maximum send/receive throughput (bytes/second).
k32u kCompressedPhaseEncoding_ValueBitDepth(kCompressedPhaseEncoding encoding)
Reports the bit depth of the value field associated with the encoding (if applicable).
kBool kCompressedPhaseStreamId_IsPhase(kCompressedPhaseStreamId streamId)
Reports whether the specified stream identifier represents a phase stream.
Definition: kFsDef.h:414
#define kCOMPRESSED_PHASE_STREAM_ID_PHASE_NULL
Phase null index/count pairs.
Definition: kFsDef.h:340
Represents an enumeration of data visualization types.
Represents a pair of 32-bit values.
Definition: kFsDef.h:29
Represents a network speed.
Stream type identifier for a kCompressedPhase stream.