diff options
Diffstat (limited to 'bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/config.h')
| -rw-r--r-- | bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/config.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/config.h b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/config.h new file mode 100644 index 0000000..d4a74c5 --- /dev/null +++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/config.h @@ -0,0 +1,33 @@ +#include "cfglib.h" + +typedef enum +{ + CFG_IBAUD, + CFG_IDATA, + CFG_ISTOP, + CFG_IPORT, + CFG_INETPORT, + CFG_ITIMEOUT, + CFG_IEND +} cfg_int_t; + +typedef enum +{ + CFG_SPARITY, + CFG_SALLOW, + CFG_SDENY, + CFG_SNEWLINES, + CFG_SDEVICE, + CFG_SEND +} cfg_str_t; + +typedef struct +{ + cfg_item_i ints[CFG_IEND]; + cfg_item_s strs[CFG_SEND]; +} cfg_s; + +int cfg_init(cfg_s *cfg, int comm_port); +void cfg_cleanup(cfg_s *cfg); +int cfg_fromfile(cfg_s *cfg, char *filename); +void cfg_assign(cfg_s *dst, cfg_s *src); |
