# My Digital Signal Controller Library # The objective of MyDSC library is to implement controllers with help digital signal processors, digital signal controllers or mixed signals processors.

Dependents:   mydsc_sampling_example mydsc_sampling_example mydsc-serial-example mydsc-nonblocking-example

Revision:
1:2c47778e8a67
Child:
2:1f276b0dd807
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/mydsc_kvp.h	Fri Feb 28 20:06:30 2020 +0000
@@ -0,0 +1,39 @@
+/** @file: mydsc_kvp.h
+    @author Gastón H. Salazar-Silva <gaston_salazar@yahoo.com>
+**/
+
+#ifndef MYDSC_kvp_H
+#define MYDSC_kvp_H
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum mydsc_kvp_errno_t {
+    MYDSC_KVP_SUCCESS       = 0,
+    MYDSC_KVP_NO_SET        = -1,
+    MYDSC_KVP_NO_KEY        = -2,
+    MYDSC_KVP_WRONG_VALUE   = -3                
+};
+
+typedef struct mydsc_kvp_struct {
+    char *key;
+    char* (*get_function)(void);
+    int (*set_function)(char*);
+    struct mydsc_kvp_struct *next_kvp;
+} mydsc_kvp_t;
+
+int mydsc_kvp_init(mydsc_kvp_t* pkv);
+char* mydsc_kvp_get_value(mydsc_kvp_t* pkv, char* key);
+int mydsc_kvp_set_value(mydsc_kvp_t* pkv, char* key, char* value);
+int mydsc_kvp_append(mydsc_kvp_t* pkv, char* key,
+                    char* (*get_function)(void),
+                    int (*set_function)(char*));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // MYDSC_RING_BUFFER_H