-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkitra_input.h
557 lines (492 loc) · 15 KB
/
kitra_input.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
#ifndef KITRA_INPUT_H
#define KITRA_INPUT_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include "kitra_packet_generator.h"
#define CHECKSUM_ENABLED 1
typedef enum{
PARSE_OK,
PARSE_BAD_CHECKSUM,
PARSE_BAD_SIZE,
PARSE_UNDEFINED_CMD,
PARSE_ERROR
}eparse_result;
typedef enum{
K_INPUT_CHANGE_BAUD_RATE = 511,
K_INPUT_GET_FIRMWARE_VERSION = 512,
K_INPUT_START_FW_UPDATE = 513,
K_INPUT_GET_KITRA_STATUS = 515,
K_INPUT_KITRA_RESET = 516,
K_INPUT_KITRA_SLEEP = 517,
K_INPUT_DI_ENABLE_DISABLE = 521,
K_INPUT_DI_READ_STATE = 522,
K_INPUT_DI_CONFIGURE_ACTIVATION = 523,
K_INPUT_ADC_ENABLE_DISABLE = 531,
K_INPUT_ADC_CHANGE_MODE = 532,
K_INPUT_ADC_CHANGE_CONFIGURATION = 533,
K_INPUT_ADC_READ_LAST_SAMPLE = 534,
K_INPUT_ADC_SET_NOTIFICATION = 535,
K_INPUT_DO_ENABLE_DISABLE = 541,
K_INPUT_DO_CHANGE_STATE = 542,
K_INPUT_DO_INIT_PWM = 543,
K_INPUT_DO_CHANGE_MODE_PWM = 544,
K_INPUT_CAP_ENABLE_DISABLE = 551,
K_INPUT_CAP_READ_STATE = 552,
K_INPUT_CAP_CONFIGURE_NOTIFICATIONS = 553,
K_INPUT_CAP_CONFIGURE = 554,
K_INPUT_HAPTIC_ENABLE_DISABLE = 561,
K_INPUT_HAPTIC_CONFIGURATION = 562,
K_INPUT_HAPTIC_CHANGE_MODE = 563,
K_INPUT_LUX_ENABLE_DISABLE = 571,
K_INPUT_LUX_READ_LUX = 572,
K_INPUT_LUX_READ_PROX = 573,
K_INPUT_LUX_SENSOR_CONFIGURATION = 574,
K_INPUT_LUX_SENSOR_NOTIFICATIONS = 575,
K_INPUT_LUX_SENSOR_MANAGED_NOTIFICATIONS = 576,
K_INPUT_LDRGB_ENABLE_DISABLE = 581,
K_INPUT_LDRGB_SET = 582,
K_INPUT_LDRGB_SET_MANAGED = 583,
K_INPUT_LDRGB_CHANGE_MODE = 584,
K_INPUT_POS_ENABLE_DISABLE = 591,
K_INPUT_POS_READ_RAW = 592,
K_INPUT_POS_READ_EULER_ANGLES = 593,
K_INPUT_POS_CONFIGURATION = 594,
K_INPUT_POS_READ_CALIBRATION_STATE = 595,
K_INPUT_POS_READ_STEP_COUNTER = 596,
K_INPUT_ENV_ENABLE_DISABLE = 5101,
K_INPUT_ENV_READ_VALUE = 5102,
K_INPUT_ENV_ENABLE_NOTIFICATION = 5103,
K_INPUT_MIC_ENABLE_DISABLE = 5111,
K_INPUT_MIC_GET_LOCALIZATION_ANGLE = 5112,
K_INPUT_LED_NEOPIXEL_ENABLE_DISABLE = 5121,
K_INPUT_LED_NEOPIXEL_SET = 5122,
K_INPUT_LED_NEOPIXEL_CHANGE_MODE = 5123,
K_INPUT_BUZZ_ENABLE_DISABLE = 5141,
K_INPUT_BUZZ_CHANGE_STATE = 5142,
K_INPUT_I2C_READ = 5151,
K_INPUT_I2C_WRITE = 5152,
}einput_cmd;
//SYSTEM
typedef struct{
uint32_t id;
uint32_t baud_rate;
}k_input_change_baud_rate;
#define K_INPUT_CHANGE_BAUD_RATE_N_PARAMS 2
static const char* K_INPUT_CHANGE_BAUD_RATE_PARAMS= "%d,%d";
typedef struct{
uint32_t id;
}k_input_get_firmware_version;
#define K_INPUT_GET_FIRMWARE_VERSION_N_PARAMS 1
static const char* K_INPUT_GET_FIRMWARE_VERSION_PARAMS = "%d";
typedef struct{
uint32_t id;
}k_input_get_kitra_status;
#define K_INPUT_GET_KITRA_STATUS_N_PARAMS 1
static const char* K_INPUT_GET_KITRA_STATUS_PARAMS = "%d";
typedef struct{
uint32_t id;
uint8_t option;
}k_input_kitra_reset;
#define K_INPUT_KITRA_RESET_N_PARAMS 2
static const char* K_INPUT_KITRA_RESET_PARAMS = "%d,%hhd";
typedef struct{
uint32_t id;
uint8_t option;
}k_input_kitra_sleep;
#define K_INPUT_KITRA_SLEEP_N_PARAMS 2
static const char* K_INPUT_KITRA_SLEEP_PARAMS = "%d,%hhd";
//INPUT
typedef struct{
uint32_t id;
uint8_t pin;
uint8_t enabled;
uint8_t pull;
}k_input_di_enable_disable;
#define K_INPUT_DI_ENABLE_DISABLE_N_PARAMS 4
static const char* K_INPUT_DI_ENABLE_DISABLE_PARAMS = "%d,%hhd,%hhd,%hhd";
typedef struct{
uint32_t id;
uint8_t pin;
}k_input_di_read_state;
#define K_INPUT_DI_READ_STATE_N_PARAMS 2
static const char* K_INPUT_DI_READ_STATE_PARAMS = "%d,%hhd";
typedef struct{
uint32_t id;
uint8_t pin;
uint8_t enabled;
uint8_t active_state;
uint32_t sampling_time;
uint16_t filter_activation;
}k_input_di_configure_activation;
#define K_INPUT_DI_CONFIGURE_ACTIVATION_N_PARAMS 6
static const char* K_INPUT_DI_CONFIGURE_ACTIVATION_PARAMS = "%d,%hhd,%hhd,%hhd,%d,%hd";
//ADC
typedef struct{
uint32_t id;
uint8_t pin;
uint8_t enabled;
}k_input_adc_enable_disable;
#define K_INPUT_ADC_ENABLE_DISABLE_N_PARAMS 3
static const char* K_INPUT_ADC_ENABLE_DISABLE_PARAMS = "%d,%hhd,%hhd";
typedef struct{
uint32_t id;
uint8_t pin;
uint8_t mode;
}k_input_change_mode;
#define K_INPUT_ADC_CHANGE_MODE_N_PARAMS 3
static const char* K_INPUT_ADC_CHANGE_MODE_PARAMS = "%d,%hhd,%hhd";
typedef struct{
uint32_t id;
uint8_t pin;
uint32_t sampling_time;
uint16_t average;
}k_input_change_configuration;
#define K_INPUT_ADC_CHANGE_CONFIGURATION_N_PARAMS 5
static const char* K_INPUT_ADC_CHANGE_CONFIGURATION_PARAMS = "%d,%hhd,%d,%hd,%hd";
typedef struct{
uint32_t id;
uint8_t pin;
}k_input_adc_read_last_sample;
#define K_INPUT_ADC_READ_LAST_SAMPLE_N_PARAMS 2
static const char* K_INPUT_ADC_READ_LAST_SAMPLE_PARAMS = "%d,%hhd";
typedef struct{
uint32_t id;
uint8_t pin;
uint8_t notification_enabled;
uint16_t thresdhold_level;
uint8_t threshold_notification_enabled;
}k_input_adc_set_notification;
#define K_INPUT_ADC_SET_NOTIFICATION_N_PARAMS 5
static const char* K_INPUT_ADC_SET_NOTIFICATION_PARAMS = "%d,%hhd,%hhd,%hd,%hhd";
//OUTPUT/PWM
typedef struct{
uint32_t id;
uint8_t pin;
uint8_t enabled;
uint8_t mode;
}k_input_do_enable_disable;
#define K_INPUT_DO_ENABLE_DISABLE_N_PARAMS 4
static const char* K_INPUT_DO_ENABLE_DISABLE_PARAMS = "%d,%hhd,%hhd,%hhd";
typedef struct{
uint32_t id;
uint8_t pin;
uint8_t state;
}k_input_do_change_state;
#define K_INPUT_DO_CHANGE_STATE_N_PARAMS 3
static const char* K_INPUT_DO_CHANGE_STATE_PARAMS = "%d,%hhd,%hhd";
typedef struct{
uint32_t id;
uint8_t pin;
uint32_t frequency;
uint8_t percentage;
uint8_t autostart;
}k_input_do_init_pwm;
#define K_INPUT_DO_INIT_PWM_N_PARAMS 5
static const char* K_INPUT_DO_INIT_PWM_PARAMS = "%d,%hhd,%d,%hhd,%hhd";
typedef struct{
uint32_t id;
uint8_t pin;
uint8_t mode;
}k_input_do_change_mode_pwm;
#define K_INPUT_DO_CHANGE_MODE_PWM_N_PARAMS 3
static const char* K_INPUT_DO_CHANGE_MODE_PWM_PARAMS = "%d,%hhd,%hhd";
//CAPACITIVE TOUCH
typedef struct{
uint32_t id;
uint8_t pin;
uint8_t enabled;
uint8_t sensitivity;
}k_input_cap_enable_disable;
#define K_INPUT_CAP_ENABLE_DISABLE_N_PARAMS 4
static const char* K_INPUT_CAP_ENABLE_DISABLE_PARAMS = "%d,%hhd,%hhd,%hhd";
typedef struct{
uint32_t id;
uint8_t pin;
}k_input_cap_read_state;
#define K_INPUT_CAP_READ_STATE_N_PARAMS 2
static const char* K_INPUT_CAP_READ_STATE_PARAMS = "%d,%hhd";
typedef struct{
uint32_t id;
uint8_t pin;
uint8_t notification_touch_enabled;
uint8_t notification_press_enabled;
uint8_t notification_release_enabled;
uint16_t threshold_level_press;
}k_input_cap_configure_notifications;
#define K_INPUT_CAP_CONFIGURE_NOTIFICATIONS_N_PARAMS 6
static const char* K_INPUT_CAP_CONFIGURE_NOTIFICATIONS_PARAMS = "%d,%hhd,%hhd,%hhd,%hhd,%hd";
typedef struct{
uint32_t id;
uint32_t frequency;
}k_input_cap_configure;
#define K_INPUT_CAP_CONFIGURE_N_PARAMS 2
static const char* K_INPUT_CAP_CONFIGURE_PARAMS = "%d,%d";
//LRA HAPTIC
typedef struct{
uint32_t id;
uint8_t pin;
uint8_t enabled;
}k_input_haptic_enable_disable;
#define K_INPUT_HAPTIC_ENABLE_DISABLE_N_PARAMS 3
static const char* K_INPUT_HAPTIC_ENABLE_DISABLE_PARAMS = "%d,%hhd,%hhd";
typedef struct{
uint32_t id;
uint8_t pin;
uint8_t managed;
uint8_t percentage;
uint8_t effect;
uint8_t autostart;
}k_input_haptic_configuration;
#define K_INPUT_HAPTIC_CONFIGURATION_N_PARAMS 6
static const char* K_INPUT_HAPTIC_CONFIGURATION_PARAMS = "%d,%hhd,%hhd,%hhd,%hhd,%hhd";
typedef struct{
uint32_t id;
uint8_t pin;
uint8_t mode;
}k_input_haptic_change_mode;
#define K_INPUT_HAPTIC_CHANGE_MODE_N_PARAMS 3
static const char* K_INPUT_HAPTIC_CHANGE_MODE_PARAMS = "%d,%hhd,%hhd";
//PROXIMITY & LUX
typedef struct{
uint32_t id;
uint8_t pin;
uint8_t enabled;
}k_input_lux_enable_disable;
#define K_INPUT_LUX_ENABLE_DISABLE_N_PARAMS 3
static const char* K_INPUT_LUX_ENABLE_DISABLE_PARAMS = "%d,%hhd,%hhd";
typedef struct{
uint32_t id;
uint8_t pin;
}k_input_lux_read_lux;
#define K_INPUT_LUX_READ_LUX_N_PARAMS 2
static const char* K_INPUT_LUX_READ_LUX_PARAMS = "%d,%hhd";
typedef struct{
uint32_t id;
uint8_t pin;
}k_input_lux_read_prox;
#define K_INPUT_LUX_READ_PROX_N_PARAMS 2
static const char* K_INPUT_LUX_READ_PROX_PARAMS = "%d,%hhd";
typedef struct{
uint32_t id;
uint8_t pin;
uint8_t disable_lux;
uint8_t disable_prox;
uint8_t extended_range;
}k_input_lux_sensor_configuration;
#define K_INPUT_LUX_SENSOR_CONFIGURATION_N_PARAMS 5
static const char* K_INPUT_LUX_SENSOR_CONFIGURATION_PARAMS = "%d,%hhd,%hhd,%hhd,%hhd";
typedef struct{
uint32_t id;
uint8_t pin;
uint8_t sample_notification_enabled;
uint32_t notification_rate;
uint32_t threshold_level_prox;
float threshold_level_lux;
uint8_t threshold_notification_prox_enabled;
uint8_t threshold_notification_lux_enabled;
}k_input_lux_sensor_notifications;
#define K_INPUT_LUX_SENSOR_NOTIFICATIONS_N_PARAMS 8
static const char* K_INPUT_LUX_SENSOR_NOTIFICATIONS_PARAMS = "%d,%hhd,%hhd,%d,%d,%f,%hhd,%hhd";
typedef struct{
uint32_t id;
uint8_t enabled;
}k_input_lux_sensor_managed_notifications;
#define K_INPUT_LUX_SENSOR_MANAGED_NOTIFICATIONS_N_PARAMS 2
static const char* K_INPUT_LUX_SENSOR_MANAGED_NOTIFICATIONS_PARAMS = "%d,%hhd";
//LED RGB
typedef struct{
uint32_t id;
uint8_t pin;
uint8_t enabled;
}k_input_ldrgb_enable_disable;
#define K_INPUT_LDRGB_ENABLE_DISABLE_N_PARAMS 3
static const char* K_INPUT_LDRGB_ENABLE_DISABLE_PARAMS = "%d,%hhd,%hhd";
typedef struct{
uint32_t id;
uint8_t pin;
uint32_t color;
uint8_t intensity;
uint8_t autostart;
}k_input_ldrgb_set;
#define K_INPUT_LDRGB_SET_N_PARAMS 5
static const char* K_INPUT_LDRGB_SET_PARAMS = "%d,%hhd,%X,%hhd,%hhd";
typedef struct{
uint32_t id;
uint8_t pin;
uint8_t effect;
uint32_t color_override;
uint8_t intensity_override;
uint32_t duration;
uint8_t loop;
uint32_t loop_delay;
uint8_t autostart;
}k_input_ldrgb_set_managed;
#define K_INPUT_LDRGB_SET_MANAGED_N_PARAMS 9
static const char* K_INPUT_LDRGB_SET_MANAGED_PARAMS = "%d,%hhd,%hhd,%X,%hhd,%d,%hhd,%d,%hhd";
typedef struct{
uint32_t id;
uint8_t pin;
uint8_t mode;
}k_input_ldrgb_change_mode;
#define K_INPUT_LDRGB_CHANGE_MODE_N_PARAMS 3
static const char* K_INPUT_LDRGB_CHANGE_MODE_PARAMS = "%d,%hhd,%hhd";
//POSITION SENSOR (ACCELLEROMETER/GYRO/MAGNET)
typedef struct{
uint32_t id;
uint8_t enabled;
}k_input_pos_enable_disable;
#define K_INPUT_POS_ENABLE_DISABLE_N_PARAMS 2
static const char* K_INPUT_POS_ENABLE_DISABLE_PARAMS = "%d,%hhd";
typedef struct{
uint32_t id;
uint16_t filter_mask;
}k_input_pos_read_raw;
#define K_INPUT_POS_READ_RAW_N_PARAMS 2
static const char* K_INPUT_POS_READ_RAW_PARAMS = "%d,%hX";
typedef struct{
uint32_t id;
}k_input_pos_read_euler_angles;
#define K_INPUT_POS_READ_EULER_ANGLES_N_PARAMS 1
static const char* K_INPUT_POS_READ_EULER_ANGLES_PARAMS = "%d";
typedef struct{
uint32_t id;
uint8_t enable_raw_notification;
uint16_t filter_mask_raw;
uint8_t enable_euler_notification;
uint32_t sampling_frequency;
uint16_t notification_mask;
uint16_t full_scale;
}k_input_pos_configuration;
#define K_INPUT_POS_CONFIGURATION_N_PARAMS 7
static const char* K_INPUT_POS_CONFIGURATION_PARAMS = "%d,%hhd,%hX,%hhd,%d,%hd,%hX";
typedef struct{
uint32_t id;
}k_input_pos_read_calibration_state;
#define K_INPUT_POS_READ_CALIBRATION_STATE_N_PARAMS 1
static const char* K_INPUT_POS_READ_CALIBRATION_STATE_PARAMS = "%d";
typedef struct{
uint32_t id;
}k_input_pos_read_step_counter;
#define K_INPUT_POS_READ_STEP_COUNTER_N_PARAMS 1
static const char* K_INPUT_POS_READ_STEP_COUNTER_PARAMS = "%d";
//ENVIROMENT SENSORS
typedef struct{
uint32_t id;
uint8_t enabled;
uint8_t filter_mask;
}k_input_env_enable_disable;
#define K_INPUT_ENV_ENABLE_DISABLE_N_PARAMS 3
static const char* K_INPUT_ENV_ENABLE_DISABLE_PARAMS = "%d,%hhd,%hhX";
typedef struct{
uint32_t id;
uint8_t filter_mask;
}k_input_env_read_value;
#define K_INPUT_ENV_READ_VALUE_N_PARAMS 2
static const char* K_INPUT_ENV_READ_VALUE_PARAMS = "%d,%hhd";
typedef struct{
uint32_t id;
uint8_t enabled;
uint8_t sensor;
uint8_t threshold_up_enabled;
uint8_t threshold_down_enabled;
float threshold_value;
uint32_t notification_freq;
}k_input_env_enable_notification;
#define K_INPUT_ENV_ENABLE_NOTIFICATION_N_PARAMS 7
static const char* K_INPUT_ENV_ENABLE_NOTIFICATION_PARAMS = "%d,%hhd,%hhd,%hhd,%hhd,%f,%d";
//MIC
typedef struct{
uint32_t id;
uint8_t mode;
uint8_t mic_out_sel_1_2;
uint8_t notification_enabled;
uint32_t notification_freq;
uint8_t bf_alg_type;
uint8_t bf_gain;
}k_input_mic_enable_disable;
#define K_INPUT_MIC_ENABLE_DISABLE_N_PARAMS 7
static const char* K_INPUT_MIC_ENABLE_DISABLE_PARAMS = "%d,%hhd,%hhX,%hhd,%d,%hhd,%hhd";
typedef struct{
uint32_t id;
}k_input_mic_get_localization_angle;
#define K_INPUT_MIC_GET_LOCALIZATION_ANGLE_N_PARAMS 1
static const char* K_INPUT_MIC_GET_LOCALIZATION_ANGLE_PARAMS = "%d";
//LED NEOPIXEL
typedef struct{
uint32_t id;
uint8_t enabled;
uint16_t nleds;
}k_input_led_neopixel_enable_disable;
#define K_INPUT_LED_NEOPIXEL_ENABLE_DISABLE_N_PARAMS 3
static const char* K_INPUT_LED_NEOPIXEL_ENABLE_DISABLE_PARAMS = "%d,%hhd,%hd";
typedef struct{
uint32_t id;
uint16_t pin;
uint32_t color;
uint8_t intensity;
uint8_t autostart;
}k_input_led_neopixel_set;
#define K_INPUT_LED_NEOPIXEL_SET_N_PARAMS 5
static const char* K_INPUT_LED_NEOPIXEL_SET_PARAMS = "%d,%hd,%X,%hhd,%hhd";
typedef struct{
uint32_t id;
uint8_t mode;
}k_input_led_neopixel_change_mode;
#define K_INPUT_LED_NEOPIXEL_CHANGE_MODE_N_PARAMS 2
static const char* K_INPUT_LED_NEOPIXEL_CHANGE_MODE_PARAMS = "%d,%hhd";
//BUZZER
typedef struct{
uint32_t id;
uint8_t enabled;
}k_input_buzz_enable_disable;
#define K_INPUT_BUZZ_ENABLE_DISABLE_N_PARAMS 2
static const char* K_INPUT_BUZZ_ENABLE_DISABLE_PARAMS = "%d,%hhd";
typedef struct{
uint32_t id;
uint32_t frequency;
uint8_t duty_cycle;
uint32_t toggle_ms;
}k_input_buzz_change_state;
#define K_INPUT_BUZZ_CHANGE_STATE_N_PARAMS 4
static const char* K_INPUT_BUZZ_CHANGE_STATE_PARAMS = "%d,%d,%hhd,%d";
typedef struct{
uint32_t id;
}k_input_start_fw_update;
#define K_INPUT_START_FW_UPDATE_N_PARAMS 1
static const char* K_INPUT_START_FW_UPDATE_PARAMS = "%d";
typedef struct{
uint32_t id;
uint8_t device_address;
uint8_t data_address_low;
uint8_t data_address_high;
uint8_t size;
}k_input_read_i2c;
#define K_INPUT_I2C_READ_N_PARAMS 5
static const char* K_INPUT_I2C_READ_PARAMS = "%d,%hhX,%hhX,%hhX,%hhd";
typedef struct{
uint32_t id;
uint8_t device_address;
uint8_t data_address_low;
uint8_t data_address_high;
uint8_t data[4];
}k_input_write_i2c;
#define K_INPUT_I2C_WRITE_N_PARAMS 8
static const char* K_INPUT_I2C_WRITE_PARAMS = "%d,%hhX,%hhX,%hhX,%hhX,%hhX,%hhX,%hhX";
#if ADD_MARZIO_CODE == 1
typedef struct{
uint32_t id;
}k_input_pos_peak_detector;
#define K_INPUT_POS_PEAK_DETECTOR_N_PARAMS 1
static const char* K_INPUT_POS_PEAK_DETECTOR_PARAMS = "%d";
#endif
eparse_result k_parse_packet(char* packet,void* k_obj, uint32_t* packet_size, uint32_t* optional_mask);
eparse_result k_parse_packet_dynamic(char* packet,void* k_obj, uint32_t* packet_size, uint32_t* optional_mask);
eparse_result k_parse_packet_safe(const char* _packet,void* k_obj, uint32_t* packet_size, uint32_t* optional_mask);
#ifdef __cplusplus
}
#endif
#endif