/*
 * api_constants.c
 *
 *  Created on: Jul 2, 2010
 *      Author: zumbruch
 */

#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include <stdlib.h>
#include <util/delay.h>
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/sleep.h>
#include <avr/iocan128.h>
#include <avr/iocanxx.h>
#include <avr/eeprom.h>
#include <avr/wdt.h>
#include <avr/pgmspace.h>

#include "one_wire.h"
#include "one_wire_adc.h"
#include "one_wire_dualSwitch.h"
#include "one_wire_octalSwitch.h"
#include "one_wire_simpleSwitch.h"
#include "read_write_register.h"
#include "one_wire_temperature.h"
#include "one_wire_api_settings.h"

#include "adc.h"
#include "api.h"
#include "api_define.h"
#include "api_global.h"
#include "api_constants.h"
#include "api_debug.h"
#include "api_show.h"
#include "api_help.h"
#include "can.h"
#include "mem-check.h"

#ifdef API_CONSTANTS_H_

#warning TODO: combine responseKeyword and other responses error into one set of responses
static const char responseKeyword00[] PROGMEM = "RECV";

const char* responseKeywords[] PROGMEM = {
        responseKeyword00
};

/* those are the command keywords of the API*/
static const char commandKeyword00[] PROGMEM = "SEND";
static const char commandKeyword01[] PROGMEM = "SUBS";
static const char commandKeyword02[] PROGMEM = "USUB";
static const char commandKeyword03[] PROGMEM = "STAT";
static const char commandKeyword04[] PROGMEM = "RGWR";
static const char commandKeyword05[] PROGMEM = "RGRE";
static const char commandKeyword06[] PROGMEM = "RADC";
static const char commandKeyword07[] PROGMEM = "OWAD";
static const char commandKeyword08[] PROGMEM = "OWDS";
static const char commandKeyword09[] PROGMEM = "OWON";
static const char commandKeyword10[] PROGMEM = "OWLS";
static const char commandKeyword11[] PROGMEM = "OWSS";
static const char commandKeyword12[] PROGMEM = "RSET";
static const char commandKeyword13[] PROGMEM = "PING";
static const char commandKeyword14[] PROGMEM = "OWTP";
static const char commandKeyword15[] PROGMEM = "OWSP"; /*one-wire set active pins/bus mask*/
static const char commandKeyword16[] PROGMEM = "ADSP"; /*AVR's adcs set active pins/bus mask*/
static const char commandKeyword17[] PROGMEM = "RLSL"; /*relay set low  level*/
static const char commandKeyword18[] PROGMEM = "RLSH"; /*relay set high level*/
static const char commandKeyword19[] PROGMEM = "RLSI"; /*relay set ADC pin(s) to monitor "in" */
static const char commandKeyword20[] PROGMEM = "RLSO"; /*relay set output pin(s) to switch "out" */
static const char commandKeyword21[] PROGMEM = "DBGL"; /*set debug level*/
static const char commandKeyword22[] PROGMEM = "DBGM"; /*set debug system mask*/
static const char commandKeyword23[] PROGMEM = "JTAG"; /*toggle/set JTAG availability*/
static const char commandKeyword24[] PROGMEM = "HELP"; /*output some help*/
static const char commandKeyword25[] PROGMEM = "OWTR"; /*trigger one-wire device(s) for action, if possible*/
static const char commandKeyword26[] PROGMEM = "OWRP"; /*one-wire read active pins/bus mask*/
static const char commandKeyword27[] PROGMEM = "ADRP"; /*AVR's adcs read active pins/bus mask*/
static const char commandKeyword28[] PROGMEM = "DEBG"; /*set/get debug level and mask*/
static const char commandKeyword29[] PROGMEM = "PARA"; /*check parasitic power supply mode*/
static const char commandKeyword30[] PROGMEM = "SHOW"; /*show (internal) settings*/
static const char commandKeyword31[] PROGMEM = "OWMR"; /*one wire basics: match rom*/
static const char commandKeyword32[] PROGMEM = "OWPC"; /*one wire basics: presence check*/
static const char commandKeyword33[] PROGMEM = "OWRb"; /*one wire basics: receive bit, wait for it*/
static const char commandKeyword34[] PROGMEM = "OWRB"; /*one wire basics: receive byte*/
static const char commandKeyword35[] PROGMEM = "OWSC"; /*one wire basics: send command*/
static const char commandKeyword36[] PROGMEM = "OWSB"; /*one wire basics: send byte*/
static const char commandKeyword37[] PROGMEM = "OWSA"; /*one wire API settings: set/get 1-wire specific API settings*/
static const char commandKeyword38[] PROGMEM = "WDOG"; /*set/get watch dog status*/
static const char commandKeyword39[] PROGMEM = "EXIT"; /*exit*/
static const char commandKeyword40[] PROGMEM = "CMD0"; /* command (dummy name) */
static const char commandKeyword41[] PROGMEM = "CMD1"; /* command (dummy name) */
static const char commandKeyword42[] PROGMEM = "CMD2"; /* command (dummy name) */
static const char commandKeyword43[] PROGMEM = "CMD3"; /* command (dummy name) */
static const char commandKeyword44[] PROGMEM = "CMD4"; /* command (dummy name) */
static const char commandKeyword45[] PROGMEM = "CMD5"; /* command (dummy name) */
static const char commandKeyword46[] PROGMEM = "CMD6"; /* command (dummy name) */
static const char commandKeyword47[] PROGMEM = "CMD7"; /* command (dummy name) */
static const char commandKeyword48[] PROGMEM = "CMD8"; /* command (dummy name) */
static const char commandKeyword49[] PROGMEM = "CMD9"; /* command (dummy name) */


/* this is the corresponding command key array, beware of the same order*/
const char* commandKeywords[] PROGMEM = {
		commandKeyword00,
		commandKeyword01,
		commandKeyword02,
		commandKeyword03,
		commandKeyword04,
		commandKeyword05,
		commandKeyword06,
		commandKeyword07,
		commandKeyword08,
		commandKeyword09,
		commandKeyword10,
		commandKeyword11,
		commandKeyword12,
		commandKeyword13,
		commandKeyword14,
		commandKeyword15,
		commandKeyword16,
		commandKeyword17,
		commandKeyword18,
		commandKeyword19,
		commandKeyword20,
		commandKeyword21,
		commandKeyword22,
		commandKeyword23,
		commandKeyword24,
		commandKeyword25,
		commandKeyword26,
		commandKeyword27,
		commandKeyword28,
		commandKeyword29,
		commandKeyword30,
		commandKeyword31,
		commandKeyword32,
		commandKeyword33,
		commandKeyword34,
		commandKeyword35,
		commandKeyword36,
		commandKeyword37,
		commandKeyword38,
		commandKeyword39,
		commandKeyword40,
		commandKeyword41,
		commandKeyword42,
		commandKeyword43,
		commandKeyword44,
		commandKeyword45,
		commandKeyword46,
		commandKeyword47,
		commandKeyword48,
		commandKeyword49

};

/* those are the command keywords of the API*/
static const char commandShortDescription00[] PROGMEM = "CAN-ID ID-Range [RTR <nBytes> D0 .. D7]";
static const char commandShortDescription01[] PROGMEM = "CAN-ID ID-Range";
static const char commandShortDescription02[] PROGMEM = "CAN-ID ID-Range";
static const char commandShortDescription03[] PROGMEM = "[ID]";
static const char commandShortDescription04[] PROGMEM = "Register Value";
static const char commandShortDescription05[] PROGMEM = "Register";
static const char commandShortDescription06[] PROGMEM = "[<ADC Channel>]";
static const char commandShortDescription07[] PROGMEM = "[ID [flag_conv [flag_init]]]";
static const char commandShortDescription08[] PROGMEM = "[ID]";
static const char commandShortDescription09[] PROGMEM = "[ID]";
static const char commandShortDescription10[] PROGMEM = "[<Family Code>]";
static const char commandShortDescription11[] PROGMEM = "[ID]";
static const char commandShortDescription12[] PROGMEM = "";
static const char commandShortDescription13[] PROGMEM = "";
static const char commandShortDescription14[] PROGMEM = "[ID [flag_conv [flag_init]] | <command_keyword> [arguments]]";
static const char commandShortDescription15[] PROGMEM = "<bus mask>"; /*one-wire set/get active pins/bus mask*/
static const char commandShortDescription16[] PROGMEM = "<bus mask>"; /*AVR's adcs set active pins/bus mask*/
static const char commandShortDescription17[] PROGMEM = "<bus> [val]"; /*relay set low  level*/
static const char commandShortDescription18[] PROGMEM = "<bus> [val]"; /*relay set high level*/
static const char commandShortDescription19[] PROGMEM = "<bus> [pins]"; /*relay set ADC pin(s) to monitor "in" */
static const char commandShortDescription20[] PROGMEM = "<bus> [pins]"; /*relay set output pin(s) to switch "out" */
static const char commandShortDescription21[] PROGMEM = "[level]"; /*set debug level*/
static const char commandShortDescription22[] PROGMEM = "[mask]"; /*set debug system mask*/
static const char commandShortDescription23[] PROGMEM = ""; /*toggle/set JTAG availability*/
static const char commandShortDescription24[] PROGMEM = "[CMND]"; /*output some help*/
static const char commandShortDescription25[] PROGMEM = "[ID] ..."; /*trigger one-wire device(s) for action, if possible*/
static const char commandShortDescription26[] PROGMEM = ""; /*one-wire read active pins/bus mask*/
static const char commandShortDescription27[] PROGMEM = ""; /*AVR's adcs read active pins/bus mask*/
static const char commandShortDescription28[] PROGMEM = "[level [mask]]"; /*set/get debug level and mask*/
static const char commandShortDescription29[] PROGMEM = "parasitic device test [???]"; /*not yet figured out*/
static const char commandShortDescription30[] PROGMEM = "[key_word]"; /*show (internal) settings*/
static const char commandShortDescription31[] PROGMEM = "ID <pin_mask>"; /*one wire basics: match rom*/
static const char commandShortDescription32[] PROGMEM = "[<pin_mask>]"; /*one wire basics: presence check*/
static const char commandShortDescription33[] PROGMEM = "<pin_mask> <delay> <timeout: N (times delay)> "; /*one wire basics: receive bit, wait for it*/
static const char commandShortDescription34[] PROGMEM = "[<pin_mask>]"; /*one wire basics: receive byte*/
static const char commandShortDescription35[] PROGMEM = "<command_key_word> [<pin_mask> [arguments ...]] "; /*one wire basics: send command*/
static const char commandShortDescription36[] PROGMEM = "<byte> [<pin_mask>]"; /*one wire basics: send byte*/
static const char commandShortDescription37[] PROGMEM = "<command_key_word> [arguments] "; /*one wire API settings: set/get 1-wire specific API settings*/
static const char commandShortDescription38[] PROGMEM = "[???]"; /* watch dog, not yet figured out*/
static const char commandShortDescription39[] PROGMEM = ""; /* exit */
static const char commandShortDescription40[] PROGMEM = "[???]"; /* dummy command */
static const char commandShortDescription41[] PROGMEM = "[???]"; /* dummy command */
static const char commandShortDescription42[] PROGMEM = "[???]"; /* dummy command */
static const char commandShortDescription43[] PROGMEM = "[???]"; /* dummy command */
static const char commandShortDescription44[] PROGMEM = "[???]"; /* dummy command */
static const char commandShortDescription45[] PROGMEM = "[???]"; /* dummy command */
static const char commandShortDescription46[] PROGMEM = "[???]"; /* dummy command */
static const char commandShortDescription47[] PROGMEM = "[???]"; /* dummy command */
static const char commandShortDescription48[] PROGMEM = "[???]"; /* dummy command */
static const char commandShortDescription49[] PROGMEM = "[???]"; /* dummy command */


/* this is the corresponding command key array, beware of the same order*/
const char* commandShortDescriptions[] PROGMEM= {
		commandShortDescription00,
		commandShortDescription01,
		commandShortDescription02,
		commandShortDescription03,
		commandShortDescription04,
		commandShortDescription05,
		commandShortDescription06,
		commandShortDescription07,
		commandShortDescription08,
		commandShortDescription09,
		commandShortDescription10,
		commandShortDescription11,
		commandShortDescription12,
		commandShortDescription13,
		commandShortDescription14,
		commandShortDescription15,
		commandShortDescription16,
		commandShortDescription17,
		commandShortDescription18,
		commandShortDescription19,
		commandShortDescription20,
		commandShortDescription21,
		commandShortDescription22,
		commandShortDescription23,
		commandShortDescription24,
		commandShortDescription25,
		commandShortDescription26,
		commandShortDescription27,
		commandShortDescription28,
		commandShortDescription29,
		commandShortDescription30,
		commandShortDescription31,
		commandShortDescription32,
		commandShortDescription33,
		commandShortDescription34,
		commandShortDescription35,
		commandShortDescription36,
		commandShortDescription37,
		commandShortDescription38,
		commandShortDescription39,
		commandShortDescription40,
		commandShortDescription41,
		commandShortDescription42,
		commandShortDescription43,
		commandShortDescription44,
		commandShortDescription45,
		commandShortDescription46,
		commandShortDescription47,
		commandShortDescription48,
		commandShortDescription49
};

/* those are the command keywords of the API*/
static const char commandImplementation00[] PROGMEM = "";
static const char commandImplementation01[] PROGMEM = "";
static const char commandImplementation02[] PROGMEM = "";
static const char commandImplementation03[] PROGMEM = "--- not implemented";
static const char commandImplementation04[] PROGMEM = "";
static const char commandImplementation05[] PROGMEM = "";
static const char commandImplementation06[] PROGMEM = "";
static const char commandImplementation07[] PROGMEM = "";
static const char commandImplementation08[] PROGMEM = "--- [ID] not implemented";
static const char commandImplementation09[] PROGMEM = "--- [ID] not implemented";
static const char commandImplementation10[] PROGMEM = "";
static const char commandImplementation11[] PROGMEM = "--- [ID] not implemented";
static const char commandImplementation12[] PROGMEM = "";
static const char commandImplementation13[] PROGMEM = "";
static const char commandImplementation14[] PROGMEM = "";
static const char commandImplementation15[] PROGMEM = ""; /*one-wire set/get active pins/bus mask*/
static const char commandImplementation16[] PROGMEM = "--- not implemented"; /*AVR's adcs set active pins/bus mask*/
static const char commandImplementation17[] PROGMEM = "--- not implemented"; /*relay set low  level*/
static const char commandImplementation18[] PROGMEM = "--- not implemented"; /*relay set high level*/
static const char commandImplementation19[] PROGMEM = "--- not implemented"; /*relay set ADC pin(s) to monitor "in" */
static const char commandImplementation20[] PROGMEM = "--- not implemented"; /*relay set output pin(s) to switch "out" */
static const char commandImplementation21[] PROGMEM = ""; /*set debug level*/
static const char commandImplementation22[] PROGMEM = ""; /*set debug system mask*/
static const char commandImplementation23[] PROGMEM = "--- not implemented"; /*toggle/set JTAG availability*/
static const char commandImplementation24[] PROGMEM = ""; /*output some help*/
static const char commandImplementation25[] PROGMEM = "--- not implemented"; /*trigger one-wire device(s) for action, if possible*/
static const char commandImplementation26[] PROGMEM = ""; /*one-wire read active pins/bus mask*/
static const char commandImplementation27[] PROGMEM = "--- not implemented"; /*AVR's adcs read active pins/bus mask*/
static const char commandImplementation28[] PROGMEM = ""; /*set/get debug level and mask*/
static const char commandImplementation29[] PROGMEM = "";
static const char commandImplementation30[] PROGMEM = "";
static const char commandImplementation31[] PROGMEM = "--- not implemented"; /*one wire basics: match rom*/
static const char commandImplementation32[] PROGMEM = "--- not implemented"; /*one wire basics: presence check*/
static const char commandImplementation33[] PROGMEM = "--- not implemented"; /*one wire basics: receive bit, wait for it*/
static const char commandImplementation34[] PROGMEM = "--- not implemented"; /*one wire basics: receive byte*/
static const char commandImplementation35[] PROGMEM = "--- not implemented"; /*one wire basics: send command*/
static const char commandImplementation36[] PROGMEM = "--- not implemented"; /*one wire basics: send byte*/
static const char commandImplementation37[] PROGMEM = "--- not implemented"; /*one wire API settings: set/get 1-wire specific API settings*/
static const char commandImplementation38[] PROGMEM = "--- not implemented"; /*wdog*/
static const char commandImplementation39[] PROGMEM = "--- not implemented"; /*exit*/
static const char commandImplementation40[] PROGMEM = "--- not implemented"; /*dummy command*/
static const char commandImplementation41[] PROGMEM = "--- not implemented"; /*dummy command*/
static const char commandImplementation42[] PROGMEM = "--- not implemented"; /*dummy command*/
static const char commandImplementation43[] PROGMEM = "--- not implemented"; /*dummy command*/
static const char commandImplementation44[] PROGMEM = "--- not implemented"; /*dummy command*/
static const char commandImplementation45[] PROGMEM = "--- not implemented"; /*dummy command*/
static const char commandImplementation46[] PROGMEM = "--- not implemented"; /*dummy command*/
static const char commandImplementation47[] PROGMEM = "--- not implemented"; /*dummy command*/
static const char commandImplementation48[] PROGMEM = "--- not implemented"; /*dummy command*/
static const char commandImplementation49[] PROGMEM = "--- not implemented"; /*dummy command*/

/* this is the corresponding command key array, beware of the same order*/
const char* commandImplementations[] PROGMEM= {
		commandImplementation00,
		commandImplementation01,
		commandImplementation02,
		commandImplementation03,
		commandImplementation04,
		commandImplementation05,
		commandImplementation06,
		commandImplementation07,
		commandImplementation08,
		commandImplementation09,
		commandImplementation10,
		commandImplementation11,
		commandImplementation12,
		commandImplementation13,
		commandImplementation14,
		commandImplementation15,
		commandImplementation16,
		commandImplementation17,
		commandImplementation18,
		commandImplementation19,
		commandImplementation20,
		commandImplementation21,
		commandImplementation22,
		commandImplementation23,
		commandImplementation24,
		commandImplementation25,
		commandImplementation26,
		commandImplementation27,
		commandImplementation28,
		commandImplementation29,
		commandImplementation30,
		commandImplementation31,
		commandImplementation32,
		commandImplementation33,
		commandImplementation34,
		commandImplementation35,
		commandImplementation36,
		commandImplementation37,
		commandImplementation38,
		commandImplementation39,
		commandImplementation40,
		commandImplementation41,
		commandImplementation42,
		commandImplementation43,
		commandImplementation44,
		commandImplementation45,
		commandImplementation46,
		commandImplementation47,
		commandImplementation48,
		commandImplementation49
};


/* pointer of array for defined serial error number*/
static const char se00[] PROGMEM = "no valid command name";
static const char se01[] PROGMEM = "ID is too long";
static const char se02[] PROGMEM = "mask is too long";
static const char se03[] PROGMEM = "rtr is too long";
static const char se04[] PROGMEM = "length is  too long";
static const char se05[] PROGMEM = "data 0 is too long";
static const char se06[] PROGMEM = "data 1 is too long";
static const char se07[] PROGMEM = "data 2 is too long";
static const char se08[] PROGMEM = "data 3 is too long";
static const char se09[] PROGMEM = "data 4 is too long";
static const char se10[] PROGMEM = "data 5 is too long";
static const char se11[] PROGMEM = "data 6 is too long";
static const char se12[] PROGMEM = "data 7 is too long";
static const char se13[] PROGMEM = "command is too long";
static const char se14[] PROGMEM = "argument has invalid type";
static const char se15[] PROGMEM = "ID has invalid type";
static const char se16[] PROGMEM = "mask has invalid type";
static const char se17[] PROGMEM = "rtr has invalid type";
static const char se18[] PROGMEM = "length has invalid type";
static const char se19[] PROGMEM = "data 0 has invalid type";
static const char se20[] PROGMEM = "data 1 has invalid type";
static const char se21[] PROGMEM = "data 2 has invalid type";
static const char se22[] PROGMEM = "data 3 has invalid type";
static const char se23[] PROGMEM = "data 4 has invalid type";
static const char se24[] PROGMEM = "data 5 has invalid type";
static const char se25[] PROGMEM = "data 6 has invalid type";
static const char se26[] PROGMEM = "data 7 has invalid type";
static const char se27[] PROGMEM = "undefined error type";
static const char se28[] PROGMEM = "first value is too long";
static const char se29[] PROGMEM = "second value is too long";
static const char se30[] PROGMEM = "arguments have invalid type";
static const char se31[] PROGMEM = "argument(s) exceed(s) allowed boundary";
static const char se32[] PROGMEM = "too many arguments";

const char *serial_error[] PROGMEM = { se00, se01, se02, se03, se04, se05, se06, se07, se08, se09, se10, se11, se12, se13, se14, se15, se16, se17, se18, se19, se20,
		se21, se22, se23, se24, se25, se26, se27, se28, se29, se30, se31, se32 };


/* array for defined serial error number*/
const uint8_t serial_error_number[] = { 11, 12, 13, 14, 15, 16, 17, 18, 19, 110,
		111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
		121, 122, 123, 124, 125, 126, 127, 128, 129, 130,
		131};

/* pointer of array for defined can error number*/

static const char ce00[] PROGMEM = "Can_Bus is off";
static const char ce01[] PROGMEM = "Can_Bus is passive";
static const char ce02[] PROGMEM = "Can_Bus is on";
static const char ce03[] PROGMEM = "Bit Error";
static const char ce04[] PROGMEM = "Stuff Error";
static const char ce05[] PROGMEM = "CRC Error";
static const char ce06[] PROGMEM = "Form Error";
static const char ce07[] PROGMEM = "Acknowledgment Error";
static const char ce08[] PROGMEM = "CAN was not successfully initialized";
static const char ce09[] PROGMEM = "timeout for CAN communication";

const char *can_error[] PROGMEM = { ce00, ce01, ce02, ce03, ce04, ce05, ce06, ce07, ce08, ce09 };

/* array for defined can error number*/
const uint8_t can_error_number[] = { 21, 22, 23, 24, 25, 26, 27, 28, 29, 210 };
/* pointer of array for defined mailbox error */

static const char me00[] PROGMEM = "all mailboxes already in use";
static const char me01[] PROGMEM = "message ID not found";
static const char me02[] PROGMEM = "this message already exists";

const char *mob_error[] PROGMEM = { me00, me01, me02 };

/* array for defined mailbox error number*/
const uint8_t mob_error_number[] = { 31, 32, 33 };

/* pointer of array for defined general error number*/

static const char ge00[] PROGMEM = "init for timer0 failed";
static const char ge01[] PROGMEM = "init for timer0A failed";
static const char ge02[] PROGMEM = "family code not found";
static const char ge03[] PROGMEM = "all message were read";
static const char ge04[] PROGMEM = "no device is connected to the bus";
static const char ge05[] PROGMEM = "undefined bus";
static const char ge06[] PROGMEM = "channel undefined";
static const char ge07[] PROGMEM = "value has invalid type";
static const char ge08[] PROGMEM = "address has invalid type";
static const char ge09[] PROGMEM = "undefined family code";
static const char ge10[] PROGMEM = "invalid argument";

const char *general_error[] PROGMEM = { ge00, ge01, ge02, ge03, ge04, ge05, ge06, ge07, ge08, ge09, ge10 };

/* array for defined general error number*/
const uint16_t general_error_number[] = { 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 410 };

/* pointer of array for defined general error number*/
static const char errorType00[] PROGMEM = "ERRG"; /*general*/
static const char errorType01[] PROGMEM = "ERRA"; /*api*/
static const char errorType02[] PROGMEM = "ERRC"; /*can protocol*/
static const char errorType03[] PROGMEM = "ERRM"; /*can hardware*/
static const char errorType04[] PROGMEM = "ERRU"; /*undefined*/

/* this is the corresponding error Type array, beware of the same order*/
const char *errorTypes[] PROGMEM = {
		errorType00,
		errorType01,
		errorType02,
		errorType03,
		errorType04
};

static const char debugLevelName00[] PROGMEM = "          noDebug";
static const char debugLevelName01[] PROGMEM = "     verboseDebug";
static const char debugLevelName02[] PROGMEM = "       eventDebug";
static const char debugLevelName03[] PROGMEM = "eventDebugVerbose";
static const char debugLevelName04[] PROGMEM = "    periodicDebug";

const char *debugLevelNames[] PROGMEM = {
         debugLevelName00,
         debugLevelName01,
         debugLevelName02,
         debugLevelName03,
         debugLevelName04
};

static const char debugSystemName00[] PROGMEM = "             Main";
static const char debugSystemName01[] PROGMEM = "             UART";
static const char debugSystemName02[] PROGMEM = "              CAN";
static const char debugSystemName03[] PROGMEM = "           TIMER0";
static const char debugSystemName04[] PROGMEM = "           TIMER1";
static const char debugSystemName05[] PROGMEM = "          TIMER0A";
static const char debugSystemName06[] PROGMEM = " TIMER0AScheduler";
static const char debugSystemName07[] PROGMEM = "       GETVOLTAGE";
static const char debugSystemName08[] PROGMEM = "            RELAY";
static const char debugSystemName09[] PROGMEM = "       CommandKey";
static const char debugSystemName10[] PROGMEM = "              OWI";
static const char debugSystemName11[] PROGMEM = "  OWITemperatures";
static const char debugSystemName12[] PROGMEM = "          Decrypt";
static const char debugSystemName13[] PROGMEM = "            DEBUG";
static const char debugSystemName14[] PROGMEM = "           OWIADC";
static const char debugSystemName15[] PROGMEM = "OWIDoubleSwitches";
static const char debugSystemName16[] PROGMEM = "OWISingelSwitches";
static const char debugSystemName17[] PROGMEM = "             SHOW";
static const char debugSystemName18[] PROGMEM = "   OWIApiSettings";

const char *debugSystemNames[] PROGMEM =
{
   debugSystemName00,
   debugSystemName01,
   debugSystemName02,
   debugSystemName03,
   debugSystemName04,
   debugSystemName05,
   debugSystemName06,
   debugSystemName07,
   debugSystemName08,
   debugSystemName09,
   debugSystemName10,
   debugSystemName11,
   debugSystemName12,
   debugSystemName13,
   debugSystemName14,
   debugSystemName15,
   debugSystemName16,
   debugSystemName17,
   debugSystemName18
};
#endif
