From b88977b03061dc64f0d356311d402344e9a5e9c2 Mon Sep 17 00:00:00 2001 From: bouni Date: Tue, 12 Aug 2014 14:41:14 +0200 Subject: [PATCH 01/13] added more debug output --- arduino/main.c | 2 +- arduino/mdb.c | 269 ++++++++++++++++++++++++++++++++----------------- 2 files changed, 179 insertions(+), 92 deletions(-) diff --git a/arduino/main.c b/arduino/main.c index 61cb19d..5229dad 100644 --- a/arduino/main.c +++ b/arduino/main.c @@ -27,7 +27,7 @@ int main(void) { - setup_usart(0,38400,8,'N',1); + setup_usart(0,115200,8,'N',1); setup_usart(1,9600,9,'N',1); sei(); diff --git a/arduino/mdb.c b/arduino/mdb.c index 6081b60..095e2e3 100644 --- a/arduino/mdb.c +++ b/arduino/mdb.c @@ -30,6 +30,8 @@ uint8_t mdb_active_cmd = MDB_IDLE; uint8_t reset_done = FALSE; +char debug_buffer[24]; + extern volatile uint8_t cmd_var[MAX_VAR]; vmcCfg_t vmc = {0,0,0,0}; @@ -94,34 +96,50 @@ void mdb_cmd_handler(void) { void mdb_reset(void) { // Wait for enough data in buffer to proceed reset - if(buffer_level(MDB_USART,RX) < 2) return; + if(buffer_level(MDB_USART,RX) < 2) return; #if DEBUG == 1 send_str_p(UPLINK_USART, PSTR("RESET\r\n")); #endif + + uint16_t checksum = recv_mdb(MDB_USART); + + #if DEBUG == 1 + send_str_p(UPLINK_USART, PSTR("Debug RX:")); + itoa(checksum, debug_buffer, 16); + send_str(UPLINK_USART, debug_buffer); + #endif // validate checksum - if(recv_mdb(MDB_USART) != MDB_RESET) { - mdb_active_cmd = MDB_IDLE; - mdb_poll_reply = MDB_REPLY_ACK; + if(checksum != MDB_RESET) { + mdb_active_cmd = MDB_IDLE; + mdb_poll_reply = MDB_REPLY_ACK; send_str_p(UPLINK_USART,PSTR("Error: invalid checksum for [RESET]\r\n")); - return; - } + return; + } - // Reset everything - vmc.feature_level = 0; - vmc.dispaly_cols = 0; - vmc.dispaly_rows = 0; - vmc.dispaly_info = 0; - price.max = 0; - price.min = 0; + // Reset everything + vmc.feature_level = 0; + vmc.dispaly_cols = 0; + vmc.dispaly_rows = 0; + vmc.dispaly_info = 0; + price.max = 0; + price.min = 0; // Send ACK send_mdb(MDB_USART, 0x100); + + #if DEBUG == 1 + send_str_p(UPLINK_USART, PSTR("Debug TX:")); + itoa(0x100, debug_buffer, 16); + send_str(UPLINK_USART, debug_buffer); + send_str_p(UPLINK_USART, PSTR("\r\n")); + #endif + reset_done = TRUE; mdb_state = MDB_INACTIVE; mdb_active_cmd = MDB_IDLE; - mdb_poll_reply = MDB_REPLY_JUST_RESET; + mdb_poll_reply = MDB_REPLY_JUST_RESET; } void mdb_setup(void) { @@ -132,77 +150,129 @@ void mdb_setup(void) { uint8_t index = 0; if(state < 2) { - // Wait for enough data in buffer - if(buffer_level(MDB_USART,RX) < 12) return; - + // Wait for enough data in buffer + if(buffer_level(MDB_USART,RX) < 12) return; + // fetch the data from buffer - for(index = 0; index < 6; index++) { + for(index = 0; index < 6; index++) { data[index] = (uint8_t) recv_mdb(MDB_USART); } - - // calculate checksum - checksum += data[0] + data[1] + data[2] + data[3] + data[4]; + + #if DEBUG == 1 + send_str_p(UPLINK_USART, PSTR("Debug RX:")); + for(index = 0; index < 6; index++) { + itoa(data[index], debug_buffer, 16); + send_str(UPLINK_USART, debug_buffer); + send_str_p(UPLINK_USART, PSTR(";")); + } + send_str_p(UPLINK_USART, PSTR("\r\n")); + #endif + + // calculate checksum + checksum += data[0] + data[1] + data[2] + data[3] + data[4]; checksum = checksum & 0xFF; // validate checksum - if(checksum != data[5]) { + if(checksum != data[5]) { state = 0; - mdb_active_cmd = MDB_IDLE; - mdb_poll_reply = MDB_REPLY_ACK; - checksum = MDB_SETUP; + mdb_active_cmd = MDB_IDLE; + mdb_poll_reply = MDB_REPLY_ACK; + checksum = MDB_SETUP; send_str_p(UPLINK_USART,PSTR("Error: invalid checksum [SETUP]\r\n")); - return; - } - state = data[0]; - } - - // Switch setup state - switch(state) { - + return; + } + state = data[0]; + } + + // Switch setup state + switch(state) { + // Stage 1 - config Data - case 0: - - #if DEBUG == 1 - send_str_p(UPLINK_USART, PSTR("SETUP STAGE 1\r\n")); - #endif + case 0: - // store VMC configuration data - vmc.feature_level = data[1]; - vmc.dispaly_cols = data[2]; - vmc.dispaly_rows = data[3]; - vmc.dispaly_info = data[4]; - - // calculate checksum for own configuration - checksum = ((cd.reader_cfg + - cd.feature_level + - (cd.country_code >> 8) + - (cd.country_code & 0xFF) + - cd.scale_factor + - cd.decimal_places + - cd.max_resp_time + - cd.misc_options) & 0xFF) | 0x100; - - // Send own config data - send_mdb(MDB_USART, cd.reader_cfg); - send_mdb(MDB_USART, cd.feature_level); - send_mdb(MDB_USART, (cd.country_code >> 8)); - send_mdb(MDB_USART, (cd.country_code & 0xFF)); - send_mdb(MDB_USART, cd.scale_factor); - send_mdb(MDB_USART, cd.decimal_places); - send_mdb(MDB_USART, cd.max_resp_time); - send_mdb(MDB_USART, cd.misc_options); - send_mdb(MDB_USART, checksum); - - state = 2; - - // reset checksum for next stage - checksum = MDB_SETUP; - return; + #if DEBUG == 1 + send_str_p(UPLINK_USART, PSTR("SETUP STAGE 1\r\n")); + #endif + + // store VMC configuration data + vmc.feature_level = data[1]; + vmc.dispaly_cols = data[2]; + vmc.dispaly_rows = data[3]; + vmc.dispaly_info = data[4]; + + // calculate checksum for own configuration + checksum = ((cd.reader_cfg + + cd.feature_level + + (cd.country_code >> 8) + + (cd.country_code & 0xFF) + + cd.scale_factor + + cd.decimal_places + + cd.max_resp_time + + cd.misc_options) & 0xFF) | 0x100; + + // Send own config data + send_mdb(MDB_USART, cd.reader_cfg); + send_mdb(MDB_USART, cd.feature_level); + send_mdb(MDB_USART, (cd.country_code >> 8)); + send_mdb(MDB_USART, (cd.country_code & 0xFF)); + send_mdb(MDB_USART, cd.scale_factor); + send_mdb(MDB_USART, cd.decimal_places); + send_mdb(MDB_USART, cd.max_resp_time); + send_mdb(MDB_USART, cd.misc_options); + send_mdb(MDB_USART, checksum); + + #if DEBUG == 1 + send_str_p(UPLINK_USART, PSTR("Debug TX:")); + + itoa(cd.reader_cfg, debug_buffer, 16); + send_str(UPLINK_USART, debug_buffer); + send_str_p(UPLINK_USART, PSTR(";")); + + itoa(cd.feature_level, debug_buffer, 16); + send_str(UPLINK_USART, debug_buffer); + send_str_p(UPLINK_USART, PSTR(";")); + + itoa((cd.country_code >> 8)), debug_buffer, 16); + send_str(UPLINK_USART, debug_buffer); + send_str_p(UPLINK_USART, PSTR(";")); + + itoa((cd.country_code & 0xFF), debug_buffer, 16); + send_str(UPLINK_USART, debug_buffer); + send_str_p(UPLINK_USART, PSTR(";")); + + itoa(cd.scale_factor, debug_buffer, 16); + send_str(UPLINK_USART, debug_buffer); + send_str_p(UPLINK_USART, PSTR(";")); + + itoa(cd.decimal_places, debug_buffer, 16); + send_str(UPLINK_USART, debug_buffer); + send_str_p(UPLINK_USART, PSTR(";")); + + itoa(cd.max_resp_time, debug_buffer, 16); + send_str(UPLINK_USART, debug_buffer); + send_str_p(UPLINK_USART, PSTR(";")); + + itoa(cd.misc_options, debug_buffer, 16); + send_str(UPLINK_USART, debug_buffer); + send_str_p(UPLINK_USART, PSTR(";")); + + itoa(checksum, debug_buffer, 16); + send_str(UPLINK_USART, debug_buffer); + send_str_p(UPLINK_USART, PSTR(";")); + + send_str_p(UPLINK_USART, PSTR("\r\n")); + #endif + + state = 2; + + // reset checksum for next stage + checksum = MDB_SETUP; + return; - break; + break; // Stage 2 - price data - case 1: + case 1: #if DEBUG == 1 send_str_p(UPLINK_USART, PSTR("SETUP STAGE 2\r\n")); @@ -212,8 +282,15 @@ void mdb_setup(void) { price.max = (data[1] << 8) | data[2]; price.min = (data[3] << 8) | data[4]; - // send ACK - send_mdb(MDB_USART, 0x100); + // send ACK + send_mdb(MDB_USART, 0x100); + + #if DEBUG == 1 + send_str_p(UPLINK_USART, PSTR("Debug TX:")); + itoa(0x100, debug_buffer, 16); + send_str(UPLINK_USART, debug_buffer); + send_str_p(UPLINK_USART, PSTR("\r\n")); + #endif // Set MDB State mdb_state = MDB_DISABLED; @@ -224,10 +301,11 @@ void mdb_setup(void) { mdb_active_cmd = MDB_IDLE; mdb_poll_reply = MDB_REPLY_ACK; return; - break; + break; // ACK from VMC for MateDealer cfg data - case 2: + case 2: + // Wait for enough data in buffer if(buffer_level(MDB_USART,RX) < 2) return; @@ -235,8 +313,15 @@ void mdb_setup(void) { send_str_p(UPLINK_USART, PSTR("SETUP WAIT FOR ACK\r\n")); #endif - // Check if VMC sent ACK - data[0] = recv_mdb(MDB_USART); + // Check if VMC sent ACK + data[0] = recv_mdb(MDB_USART); + + #if DEBUG == 1 + send_str_p(UPLINK_USART, PSTR("Debug RX:")); + itoa(data[0], debug_buffer, 16); + send_str(UPLINK_USART, debug_buffer); + send_str_p(UPLINK_USART, PSTR("\r\n")); + #endif /* * The following check if VMC answers with ACK to the Setup data we send is not as in the MDB Spec defined. @@ -245,28 +330,30 @@ void mdb_setup(void) { */ if(data[0] != 0x000 && data[0] != 0x001) { - state = 0; - mdb_active_cmd = MDB_IDLE; - mdb_poll_reply = MDB_REPLY_ACK; - send_str_p(UPLINK_USART,PSTR("Error: no ACK received on [SETUP]")); + state = 0; + mdb_active_cmd = MDB_IDLE; + mdb_poll_reply = MDB_REPLY_ACK; + send_str_p(UPLINK_USART,PSTR("Error: no ACK received on [SETUP]")); return; - } + } state = 0; - mdb_active_cmd = MDB_IDLE; - mdb_poll_reply = MDB_REPLY_ACK; - return; - break; + mdb_active_cmd = MDB_IDLE; + mdb_poll_reply = MDB_REPLY_ACK; + return; - // Unknown Subcommand from VMC - default: + break; + + // Unknown Subcommand from VMC + default: send_str_p(UPLINK_USART,PSTR("Error: unknown subcommand [SETUP]\r\n")); state = 0; mdb_active_cmd = MDB_IDLE; mdb_poll_reply = MDB_REPLY_ACK; return; break; - } + + } } void mdb_poll(void) { @@ -335,7 +422,7 @@ void mdb_poll(void) { break; case MDB_REPLY_DISPLAY_REQ: - // not yet implemented + // not yet implemented break; case MDB_REPLY_BEGIN_SESSION: From 911b22a00785eac946dd56a5a10c8a5f2d1fd7fc Mon Sep 17 00:00:00 2001 From: bouni Date: Wed, 13 Aug 2014 13:37:14 +0200 Subject: [PATCH 02/13] extended debug a little more --- arduino/mdb.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arduino/mdb.c b/arduino/mdb.c index 095e2e3..f963684 100644 --- a/arduino/mdb.c +++ b/arduino/mdb.c @@ -69,6 +69,12 @@ void mdb_cmd_handler(void) { mdb_active_cmd = MDB_IDLE; } } + #if DEBUG == 1 + send_str_p(UPLINK_USART, PSTR("Debug RX:")); + itoa(data, debug_buffer, 16); + send_str(UPLINK_USART, debug_buffer); + send_str_p(UPLINK_USART, PSTR("\r\n")); + #endif break; case MDB_RESET: @@ -108,6 +114,7 @@ void mdb_reset(void) { send_str_p(UPLINK_USART, PSTR("Debug RX:")); itoa(checksum, debug_buffer, 16); send_str(UPLINK_USART, debug_buffer); + send_str_p(UPLINK_USART, PSTR("\r\n")); #endif // validate checksum From e7028fe7079e3f6921cc488d53892304c3f4ec5f Mon Sep 17 00:00:00 2001 From: bouni Date: Wed, 13 Aug 2014 17:10:20 +0200 Subject: [PATCH 03/13] merged expansion part from kenya branch --- arduino/mdb.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++- arduino/mdb.h | 3 ++- 2 files changed, 62 insertions(+), 2 deletions(-) diff --git a/arduino/mdb.c b/arduino/mdb.c index f963684..d298468 100644 --- a/arduino/mdb.c +++ b/arduino/mdb.c @@ -62,7 +62,7 @@ void mdb_cmd_handler(void) { // read data from buffer uint16_t data = recv_mdb(MDB_USART); // if modebit is set and command is in command range for cashless device - if((data & 0x100) == 0x100 && MDB_RESET <= (data ^ 0x100) && (data ^ 0x100) <= MDB_READER) { + if((data & 0x100) == 0x100 && MDB_RESET <= (data ^ 0x100) && (data ^ 0x100) <= MDB_EXPANSION) { //Set command as active command mdb_active_cmd = (data ^ 0x100); if(!reset_done && mdb_active_cmd != MDB_RESET) { @@ -96,6 +96,14 @@ void mdb_cmd_handler(void) { case MDB_READER: mdb_reader(); break; + + case MDB_REVALUE: + // Not yet implemented + break; + + case MDB_EXPANSION: + mdb_expansion(); + break; } } @@ -916,4 +924,55 @@ void mdb_reader(void) { } } +void mdb_expansion(void) { + + static uint8_t data[32]; + + uint8_t checksum = MDB_EXPANSION; + + if(buffer_level(MDB_USART,RX) < 64) return; + + #if DEBUG == 1 + send_str_p(UPLINK_USART, PSTR("EXPANSION\r\n")); + #endif + + for(uint8_t i=0; i<31; i++) { + data[i] = (uint8_t) recv_mdb(MDB_USART); + if(i != 30) { + checksum += data[i]; + } + } + + #if DEBUG == 1 + send_str_p(UPLINK_USART, PSTR("Debug RX:")); + for(index = 0; index < 31; index++) { + itoa(data[index], debug_buffer, 16); + send_str(UPLINK_USART, debug_buffer); + send_str_p(UPLINK_USART, PSTR(";")); + } + send_str_p(UPLINK_USART, PSTR("\r\n")); + #endif + + // validate checksum + if(checksum != data[30]) { + mdb_active_cmd = MDB_IDLE; + mdb_poll_reply = MDB_REPLY_ACK; + checksum = MDB_EXPANSION; + send_str_p(UPLINK_USART,PSTR("Error: invalid checksum [EXPANSION]\r\n")); + return; + } + + // fool the VMC and reply its own config back ;-) + checksum = 0x09; + + for(uint8_t j=1; j<=30; j++) { + send_mdb(MDB_USART,data[j]); + checksum += data[j]; + } + + send_mdb(MDB_USART,checksum); + + mdb_active_cmd = MDB_IDLE; + mdb_poll_reply = MDB_REPLY_ACK; +} diff --git a/arduino/mdb.h b/arduino/mdb.h index d8c9bb4..5308ec5 100644 --- a/arduino/mdb.h +++ b/arduino/mdb.h @@ -37,7 +37,7 @@ enum MDB_STATES {MDB_INACTIVE,MDB_DISABLED,MDB_ENABLED,MDB_SESSION_IDLE,MDB_VEND //--------------------------------------------------------------------------- // MDB CMDS //--------------------------------------------------------------------------- -enum MDB_CMD {MDB_IDLE,MDB_RESET = 0x10,MDB_SETUP,MDB_POLL,MDB_VEND,MDB_READER}; +enum MDB_CMD {MDB_IDLE,MDB_RESET = 0x10,MDB_SETUP,MDB_POLL,MDB_VEND,MDB_READER,MDB_EXPANSION}; //--------------------------------------------------------------------------- // POLL REPLYS @@ -95,5 +95,6 @@ void mdb_setup(void); void mdb_poll(void); void mdb_vend(void); void mdb_reader(void); +void mdb_expansion(void); #endif // MDB_H From 5a5c660538340b61ce1735cd4528c7605099e14f Mon Sep 17 00:00:00 2001 From: bouni Date: Wed, 13 Aug 2014 18:13:56 +0200 Subject: [PATCH 04/13] fixed enum --- arduino/mdb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arduino/mdb.h b/arduino/mdb.h index 5308ec5..be55928 100644 --- a/arduino/mdb.h +++ b/arduino/mdb.h @@ -37,7 +37,7 @@ enum MDB_STATES {MDB_INACTIVE,MDB_DISABLED,MDB_ENABLED,MDB_SESSION_IDLE,MDB_VEND //--------------------------------------------------------------------------- // MDB CMDS //--------------------------------------------------------------------------- -enum MDB_CMD {MDB_IDLE,MDB_RESET = 0x10,MDB_SETUP,MDB_POLL,MDB_VEND,MDB_READER,MDB_EXPANSION}; +enum MDB_CMD {MDB_IDLE,MDB_RESET = 0x10,MDB_SETUP,MDB_POLL,MDB_VEND,MDB_READER,MDB_EXPANSION = 0x17}; //--------------------------------------------------------------------------- // POLL REPLYS From d1e619b233be37d590a73621f2b104f2a62350e0 Mon Sep 17 00:00:00 2001 From: bouni Date: Wed, 13 Aug 2014 20:16:18 +0200 Subject: [PATCH 05/13] another fix of the expansion part --- arduino/mdb.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/arduino/mdb.c b/arduino/mdb.c index d298468..e88bfe7 100644 --- a/arduino/mdb.c +++ b/arduino/mdb.c @@ -926,26 +926,24 @@ void mdb_reader(void) { void mdb_expansion(void) { - static uint8_t data[32]; + static uint8_t data[33]; uint8_t checksum = MDB_EXPANSION; - if(buffer_level(MDB_USART,RX) < 64) return; + if(buffer_level(MDB_USART,RX) < 66) return; #if DEBUG == 1 send_str_p(UPLINK_USART, PSTR("EXPANSION\r\n")); #endif - for(uint8_t i=0; i<31; i++) { + for(uint8_t i=0; i<=32; i++) { data[i] = (uint8_t) recv_mdb(MDB_USART); - if(i != 30) { - checksum += data[i]; - } + checksum += data[i]; } #if DEBUG == 1 send_str_p(UPLINK_USART, PSTR("Debug RX:")); - for(index = 0; index < 31; index++) { + for(index = 0; index <= 32; index++) { itoa(data[index], debug_buffer, 16); send_str(UPLINK_USART, debug_buffer); send_str_p(UPLINK_USART, PSTR(";")); @@ -954,7 +952,7 @@ void mdb_expansion(void) { #endif // validate checksum - if(checksum != data[30]) { + if(checksum != data[32]) { mdb_active_cmd = MDB_IDLE; mdb_poll_reply = MDB_REPLY_ACK; checksum = MDB_EXPANSION; @@ -965,7 +963,7 @@ void mdb_expansion(void) { // fool the VMC and reply its own config back ;-) checksum = 0x09; - for(uint8_t j=1; j<=30; j++) { + for(uint8_t j=1; j<=31; j++) { send_mdb(MDB_USART,data[j]); checksum += data[j]; } From c7b03b4516dbafa9aca67bac37efc86ae0970ec7 Mon Sep 17 00:00:00 2001 From: bouni Date: Wed, 13 Aug 2014 21:06:23 +0200 Subject: [PATCH 06/13] just a quick test --- arduino/mdb.c | 4 ++-- arduino/mdb.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arduino/mdb.c b/arduino/mdb.c index e88bfe7..eef9f3d 100644 --- a/arduino/mdb.c +++ b/arduino/mdb.c @@ -932,7 +932,7 @@ void mdb_expansion(void) { if(buffer_level(MDB_USART,RX) < 66) return; - #if DEBUG == 1 + #if DEBUG == 2 send_str_p(UPLINK_USART, PSTR("EXPANSION\r\n")); #endif @@ -941,7 +941,7 @@ void mdb_expansion(void) { checksum += data[i]; } - #if DEBUG == 1 + #if DEBUG == 2 send_str_p(UPLINK_USART, PSTR("Debug RX:")); for(index = 0; index <= 32; index++) { itoa(data[index], debug_buffer, 16); diff --git a/arduino/mdb.h b/arduino/mdb.h index be55928..eed39a8 100644 --- a/arduino/mdb.h +++ b/arduino/mdb.h @@ -25,7 +25,7 @@ #define FALSE 0 #endif -#define DEBUG 0 +#define DEBUG 2 #define MDB_USART 1 From 212b848fd3e1beb252901ca7c5156895d7a22011 Mon Sep 17 00:00:00 2001 From: bouni Date: Wed, 13 Aug 2014 21:08:33 +0200 Subject: [PATCH 07/13] fixed the fix --- arduino/mdb.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/arduino/mdb.c b/arduino/mdb.c index eef9f3d..132a8d2 100644 --- a/arduino/mdb.c +++ b/arduino/mdb.c @@ -112,7 +112,7 @@ void mdb_reset(void) { // Wait for enough data in buffer to proceed reset if(buffer_level(MDB_USART,RX) < 2) return; - #if DEBUG == 1 + #if DEBUG == 2 send_str_p(UPLINK_USART, PSTR("RESET\r\n")); #endif @@ -205,7 +205,7 @@ void mdb_setup(void) { // Stage 1 - config Data case 0: - #if DEBUG == 1 + #if DEBUG == 2 send_str_p(UPLINK_USART, PSTR("SETUP STAGE 1\r\n")); #endif @@ -289,7 +289,7 @@ void mdb_setup(void) { // Stage 2 - price data case 1: - #if DEBUG == 1 + #if DEBUG == 2 send_str_p(UPLINK_USART, PSTR("SETUP STAGE 2\r\n")); #endif @@ -324,7 +324,7 @@ void mdb_setup(void) { // Wait for enough data in buffer if(buffer_level(MDB_USART,RX) < 2) return; - #if DEBUG == 1 + #if DEBUG == 2 send_str_p(UPLINK_USART, PSTR("SETUP WAIT FOR ACK\r\n")); #endif @@ -380,7 +380,7 @@ void mdb_poll(void) { // Wait for enough data in buffer if(buffer_level(MDB_USART,RX) < 2) return; - #if DEBUG == 1 + #if DEBUG == 2 send_str_p(UPLINK_USART, PSTR("POLL\r\n")); #endif @@ -651,7 +651,7 @@ void mdb_vend(void) { // wait for enough data in buffer if(buffer_level(MDB_USART,RX) < 10) return; - #if DEBUG == 1 + #if DEBUG == 2 send_str_p(UPLINK_USART, PSTR("VEND REQUEST\r\n")); #endif @@ -691,7 +691,7 @@ void mdb_vend(void) { // wait for enough data in buffer if(buffer_level(MDB_USART,RX) < 2) return; - #if DEBUG == 1 + #if DEBUG == 2 send_str_p(UPLINK_USART, PSTR("VEND Cancel\r\n")); #endif @@ -728,7 +728,7 @@ void mdb_vend(void) { // wait for enough data in buffer if(buffer_level(MDB_USART,RX) < 6) return; - #if DEBUG == 1 + #if DEBUG == 2 send_str_p(UPLINK_USART, PSTR("VEND SUCCESS\r\n")); #endif @@ -768,7 +768,7 @@ void mdb_vend(void) { // wait for enough data in buffer if(buffer_level(MDB_USART,RX) < 2) return; - #if DEBUG == 1 + #if DEBUG == 2 send_str_p(UPLINK_USART, PSTR("VEND FAILURE\r\n")); #endif @@ -805,7 +805,7 @@ void mdb_vend(void) { // wait for enough data in buffer if(buffer_level(MDB_USART,RX) < 2) return; - #if DEBUG == 1 + #if DEBUG == 2 send_str_p(UPLINK_USART, PSTR("VEND SESSION COMPLETE\r\n")); #endif @@ -863,7 +863,7 @@ void mdb_reader(void) { return; } - #if DEBUG == 1 + #if DEBUG == 2 send_str_p(UPLINK_USART, PSTR("READER DISABLE\r\n")); #endif @@ -883,7 +883,7 @@ void mdb_reader(void) { return; } - #if DEBUG == 1 + #if DEBUG == 2 send_str_p(UPLINK_USART, PSTR("READER ENABLE\r\n")); #endif @@ -903,7 +903,7 @@ void mdb_reader(void) { return; } - #if DEBUG == 1 + #if DEBUG == 2 send_str_p(UPLINK_USART, PSTR("READER CANCEL\r\n")); #endif From 2b77c32bd8f3368a8b1a4e19ca408a67e3fd6c67 Mon Sep 17 00:00:00 2001 From: bouni Date: Wed, 13 Aug 2014 21:38:19 +0200 Subject: [PATCH 08/13] more debugging efforts --- arduino/mdb.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/arduino/mdb.c b/arduino/mdb.c index 132a8d2..629294a 100644 --- a/arduino/mdb.c +++ b/arduino/mdb.c @@ -926,33 +926,38 @@ void mdb_reader(void) { void mdb_expansion(void) { - static uint8_t data[33]; + static uint8_t data[34]; uint8_t checksum = MDB_EXPANSION; - if(buffer_level(MDB_USART,RX) < 66) return; + if(buffer_level(MDB_USART,RX) < 68) return; #if DEBUG == 2 send_str_p(UPLINK_USART, PSTR("EXPANSION\r\n")); #endif - for(uint8_t i=0; i<=32; i++) { + for(uint8_t i=0; i<=33; i++) { data[i] = (uint8_t) recv_mdb(MDB_USART); checksum += data[i]; } #if DEBUG == 2 send_str_p(UPLINK_USART, PSTR("Debug RX:")); - for(index = 0; index <= 32; index++) { + for(index = 0; index <= 33; index++) { itoa(data[index], debug_buffer, 16); send_str(UPLINK_USART, debug_buffer); send_str_p(UPLINK_USART, PSTR(";")); } send_str_p(UPLINK_USART, PSTR("\r\n")); + + send_str_p(UPLINK_USART, PSTR("EXPANSION checksum:")); + itoa(checksum, debug_buffer, 16); + send_str(UPLINK_USART, debug_buffer); + send_str_p(UPLINK_USART, PSTR("\r\n")); #endif // validate checksum - if(checksum != data[32]) { + if(checksum != data[34]) { mdb_active_cmd = MDB_IDLE; mdb_poll_reply = MDB_REPLY_ACK; checksum = MDB_EXPANSION; @@ -963,7 +968,7 @@ void mdb_expansion(void) { // fool the VMC and reply its own config back ;-) checksum = 0x09; - for(uint8_t j=1; j<=31; j++) { + for(uint8_t j=1; j<=33; j++) { send_mdb(MDB_USART,data[j]); checksum += data[j]; } From 06a548f9441de1dc5a0655e8006d3295194da772 Mon Sep 17 00:00:00 2001 From: bouni Date: Thu, 14 Aug 2014 06:43:37 +0200 Subject: [PATCH 09/13] expansion part completely rewritten --- arduino/mdb.c | 128 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 127 insertions(+), 1 deletion(-) diff --git a/arduino/mdb.c b/arduino/mdb.c index 629294a..1e17996 100644 --- a/arduino/mdb.c +++ b/arduino/mdb.c @@ -926,10 +926,135 @@ void mdb_reader(void) { void mdb_expansion(void) { + static uint8_t state = 0; static uint8_t data[34]; - uint8_t checksum = MDB_EXPANSION; + static uint8_t checksum = MDB_EXPANSION; + + switch(state) { + case 0: // Request ID + if(buffer_level(MDB_USART,RX) < 2) return; + + data[0] = (uint8_t) recv_mdb(MDB_USART); + checksum += data[0]; + + state++; + + break; + + case 1: // Manufacturer code + if(buffer_level(MDB_USART,RX) < 6) return; + + for(uint8_t i=1; i <=3; i++) { + data[i] = (uint8_t) recv_mdb(MDB_USART); + checksum =+ data[i]; + } + + state++; + + break; + + case 2: // Serial Number + if(buffer_level(MDB_USART,RX) < 24) return; + + for(uint8_t i=4; i <=15; i++) { + data[i] = (uint8_t) recv_mdb(MDB_USART); + checksum =+ data[i]; + } + + state++; + + break; + + case 3: // Model Number + if(buffer_level(MDB_USART,RX) < 24) return; + + for(uint8_t i=16; i <=27; i++) { + data[i] = (uint8_t) recv_mdb(MDB_USART); + checksum =+ data[i]; + } + + state++; + + break; + + case 4: // Software Version + if(buffer_level(MDB_USART,RX) < 4) return; + + for(uint8_t i=28; i <=29; i++) { + data[i] = (uint8_t) recv_mdb(MDB_USART); + checksum =+ data[i]; + } + + state++; + + break; + + case 5: // Checksum + if(buffer_level(MDB_USART,RX) < 2) return; + + data[30] = (uint8_t) recv_mdb(MDB_USART); + + // validate checksum + if(checksum != data[30]) { + mdb_active_cmd = MDB_IDLE; + mdb_poll_reply = MDB_REPLY_ACK; + checksum = MDB_EXPANSION; + state = 0; + send_str_p(UPLINK_USART,PSTR("Error: invalid checksum [EXPANSION]\r\n")); + return; + } + + state++; + + break; + + case 6: // Answer with the same data to fool the VMC + + checksum = 0; + + data[0] = 0x09; // Peripherial ID response + + for(uint8_t i=0; i <=29; i++) { + send_mdb(MDB_USART,data[i]); + checksum += data[i]; + } + + send_mdb(MDB_USART,checksum); + + state++; + + break; + + case 7: // Wait for ACK + + if(buffer_level(MDB_USART,RX) < 2) return; + + #if DEBUG == 2 + send_str_p(UPLINK_USART, PSTR("EXPANSION WAIT FOR ACK\r\n")); + #endif + + data[0] = recv_mdb(MDB_USART); + + if(data[0] != 0x100) { + mdb_active_cmd = MDB_IDLE; + mdb_poll_reply = MDB_REPLY_ACK; + checksum = MDB_EXPANSION; + state = 0; + send_str_p(UPLINK_USART,PSTR("Error: VMC sent no ACK [EXPANSION]\r\n")); + return; + } + + mdb_active_cmd = MDB_IDLE; + mdb_poll_reply = MDB_REPLY_ACK; + checksum = MDB_EXPANSION; + state = 0; + send_str_p(UPLINK_USART,PSTR("[EXPANSION] suceed!\r\n")); + + break; + } + /* if(buffer_level(MDB_USART,RX) < 68) return; #if DEBUG == 2 @@ -977,5 +1102,6 @@ void mdb_expansion(void) { mdb_active_cmd = MDB_IDLE; mdb_poll_reply = MDB_REPLY_ACK; + */ } From d35ab245c3b2872b46450a455dd5a7b19f3d5065 Mon Sep 17 00:00:00 2001 From: bouni Date: Thu, 14 Aug 2014 06:50:35 +0200 Subject: [PATCH 10/13] added debugging to new expansion --- arduino/mdb.c | 111 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 87 insertions(+), 24 deletions(-) diff --git a/arduino/mdb.c b/arduino/mdb.c index 1e17996..e692999 100644 --- a/arduino/mdb.c +++ b/arduino/mdb.c @@ -70,7 +70,7 @@ void mdb_cmd_handler(void) { } } #if DEBUG == 1 - send_str_p(UPLINK_USART, PSTR("Debug RX:")); + send_str_p(UPLINK_USART, PSTR("RX:")); itoa(data, debug_buffer, 16); send_str(UPLINK_USART, debug_buffer); send_str_p(UPLINK_USART, PSTR("\r\n")); @@ -112,14 +112,14 @@ void mdb_reset(void) { // Wait for enough data in buffer to proceed reset if(buffer_level(MDB_USART,RX) < 2) return; - #if DEBUG == 2 + #if DEBUG == 1 send_str_p(UPLINK_USART, PSTR("RESET\r\n")); #endif uint16_t checksum = recv_mdb(MDB_USART); #if DEBUG == 1 - send_str_p(UPLINK_USART, PSTR("Debug RX:")); + send_str_p(UPLINK_USART, PSTR("RX:")); itoa(checksum, debug_buffer, 16); send_str(UPLINK_USART, debug_buffer); send_str_p(UPLINK_USART, PSTR("\r\n")); @@ -145,7 +145,7 @@ void mdb_reset(void) { send_mdb(MDB_USART, 0x100); #if DEBUG == 1 - send_str_p(UPLINK_USART, PSTR("Debug TX:")); + send_str_p(UPLINK_USART, PSTR("TX:")); itoa(0x100, debug_buffer, 16); send_str(UPLINK_USART, debug_buffer); send_str_p(UPLINK_USART, PSTR("\r\n")); @@ -174,7 +174,7 @@ void mdb_setup(void) { } #if DEBUG == 1 - send_str_p(UPLINK_USART, PSTR("Debug RX:")); + send_str_p(UPLINK_USART, PSTR("RX:")); for(index = 0; index < 6; index++) { itoa(data[index], debug_buffer, 16); send_str(UPLINK_USART, debug_buffer); @@ -205,7 +205,7 @@ void mdb_setup(void) { // Stage 1 - config Data case 0: - #if DEBUG == 2 + #if DEBUG == 1 send_str_p(UPLINK_USART, PSTR("SETUP STAGE 1\r\n")); #endif @@ -237,7 +237,7 @@ void mdb_setup(void) { send_mdb(MDB_USART, checksum); #if DEBUG == 1 - send_str_p(UPLINK_USART, PSTR("Debug TX:")); + send_str_p(UPLINK_USART, PSTR("TX:")); itoa(cd.reader_cfg, debug_buffer, 16); send_str(UPLINK_USART, debug_buffer); @@ -289,7 +289,7 @@ void mdb_setup(void) { // Stage 2 - price data case 1: - #if DEBUG == 2 + #if DEBUG == 1 send_str_p(UPLINK_USART, PSTR("SETUP STAGE 2\r\n")); #endif @@ -301,7 +301,7 @@ void mdb_setup(void) { send_mdb(MDB_USART, 0x100); #if DEBUG == 1 - send_str_p(UPLINK_USART, PSTR("Debug TX:")); + send_str_p(UPLINK_USART, PSTR("TX:")); itoa(0x100, debug_buffer, 16); send_str(UPLINK_USART, debug_buffer); send_str_p(UPLINK_USART, PSTR("\r\n")); @@ -324,7 +324,7 @@ void mdb_setup(void) { // Wait for enough data in buffer if(buffer_level(MDB_USART,RX) < 2) return; - #if DEBUG == 2 + #if DEBUG == 1 send_str_p(UPLINK_USART, PSTR("SETUP WAIT FOR ACK\r\n")); #endif @@ -332,7 +332,7 @@ void mdb_setup(void) { data[0] = recv_mdb(MDB_USART); #if DEBUG == 1 - send_str_p(UPLINK_USART, PSTR("Debug RX:")); + send_str_p(UPLINK_USART, PSTR("RX:")); itoa(data[0], debug_buffer, 16); send_str(UPLINK_USART, debug_buffer); send_str_p(UPLINK_USART, PSTR("\r\n")); @@ -380,7 +380,7 @@ void mdb_poll(void) { // Wait for enough data in buffer if(buffer_level(MDB_USART,RX) < 2) return; - #if DEBUG == 2 + #if DEBUG == 1 send_str_p(UPLINK_USART, PSTR("POLL\r\n")); #endif @@ -651,7 +651,7 @@ void mdb_vend(void) { // wait for enough data in buffer if(buffer_level(MDB_USART,RX) < 10) return; - #if DEBUG == 2 + #if DEBUG == 1 send_str_p(UPLINK_USART, PSTR("VEND REQUEST\r\n")); #endif @@ -691,7 +691,7 @@ void mdb_vend(void) { // wait for enough data in buffer if(buffer_level(MDB_USART,RX) < 2) return; - #if DEBUG == 2 + #if DEBUG == 1 send_str_p(UPLINK_USART, PSTR("VEND Cancel\r\n")); #endif @@ -728,7 +728,7 @@ void mdb_vend(void) { // wait for enough data in buffer if(buffer_level(MDB_USART,RX) < 6) return; - #if DEBUG == 2 + #if DEBUG == 1 send_str_p(UPLINK_USART, PSTR("VEND SUCCESS\r\n")); #endif @@ -768,7 +768,7 @@ void mdb_vend(void) { // wait for enough data in buffer if(buffer_level(MDB_USART,RX) < 2) return; - #if DEBUG == 2 + #if DEBUG == 1 send_str_p(UPLINK_USART, PSTR("VEND FAILURE\r\n")); #endif @@ -805,7 +805,7 @@ void mdb_vend(void) { // wait for enough data in buffer if(buffer_level(MDB_USART,RX) < 2) return; - #if DEBUG == 2 + #if DEBUG == 1 send_str_p(UPLINK_USART, PSTR("VEND SESSION COMPLETE\r\n")); #endif @@ -863,7 +863,7 @@ void mdb_reader(void) { return; } - #if DEBUG == 2 + #if DEBUG == 1 send_str_p(UPLINK_USART, PSTR("READER DISABLE\r\n")); #endif @@ -883,7 +883,7 @@ void mdb_reader(void) { return; } - #if DEBUG == 2 + #if DEBUG == 1 send_str_p(UPLINK_USART, PSTR("READER ENABLE\r\n")); #endif @@ -903,7 +903,7 @@ void mdb_reader(void) { return; } - #if DEBUG == 2 + #if DEBUG == 1 send_str_p(UPLINK_USART, PSTR("READER CANCEL\r\n")); #endif @@ -937,6 +937,13 @@ void mdb_expansion(void) { data[0] = (uint8_t) recv_mdb(MDB_USART); checksum += data[0]; + + #if DEBUG == 1 + send_str_p(UPLINK_USART, PSTR("RX:")); + itoa(data[0], debug_buffer, 16); + send_str(UPLINK_USART, debug_buffer); + send_str_p(UPLINK_USART, PSTR("\r\n")); + #endif state++; @@ -948,6 +955,13 @@ void mdb_expansion(void) { for(uint8_t i=1; i <=3; i++) { data[i] = (uint8_t) recv_mdb(MDB_USART); checksum =+ data[i]; + + #if DEBUG == 1 + send_str_p(UPLINK_USART, PSTR("RX:")); + itoa(data[i], debug_buffer, 16); + send_str(UPLINK_USART, debug_buffer); + send_str_p(UPLINK_USART, PSTR("\r\n")); + #endif } state++; @@ -960,6 +974,13 @@ void mdb_expansion(void) { for(uint8_t i=4; i <=15; i++) { data[i] = (uint8_t) recv_mdb(MDB_USART); checksum =+ data[i]; + + #if DEBUG == 1 + send_str_p(UPLINK_USART, PSTR("RX:")); + itoa(data[i], debug_buffer, 16); + send_str(UPLINK_USART, debug_buffer); + send_str_p(UPLINK_USART, PSTR("\r\n")); + #endif } state++; @@ -972,6 +993,13 @@ void mdb_expansion(void) { for(uint8_t i=16; i <=27; i++) { data[i] = (uint8_t) recv_mdb(MDB_USART); checksum =+ data[i]; + + #if DEBUG == 1 + send_str_p(UPLINK_USART, PSTR("RX:")); + itoa(data[i], debug_buffer, 16); + send_str(UPLINK_USART, debug_buffer); + send_str_p(UPLINK_USART, PSTR("\r\n")); + #endif } state++; @@ -984,6 +1012,13 @@ void mdb_expansion(void) { for(uint8_t i=28; i <=29; i++) { data[i] = (uint8_t) recv_mdb(MDB_USART); checksum =+ data[i]; + + #if DEBUG == 1 + send_str_p(UPLINK_USART, PSTR("RX:")); + itoa(data[i], debug_buffer, 16); + send_str(UPLINK_USART, debug_buffer); + send_str_p(UPLINK_USART, PSTR("\r\n")); + #endif } state++; @@ -994,6 +1029,13 @@ void mdb_expansion(void) { if(buffer_level(MDB_USART,RX) < 2) return; data[30] = (uint8_t) recv_mdb(MDB_USART); + + #if DEBUG == 1 + send_str_p(UPLINK_USART, PSTR("RX:")); + itoa(data[30], debug_buffer, 16); + send_str(UPLINK_USART, debug_buffer); + send_str_p(UPLINK_USART, PSTR("\r\n")); + #endif // validate checksum if(checksum != data[30]) { @@ -1018,9 +1060,23 @@ void mdb_expansion(void) { for(uint8_t i=0; i <=29; i++) { send_mdb(MDB_USART,data[i]); checksum += data[i]; + + #if DEBUG == 1 + send_str_p(UPLINK_USART, PSTR("TX:")); + itoa(data[i], debug_buffer, 16); + send_str(UPLINK_USART, debug_buffer); + send_str_p(UPLINK_USART, PSTR("\r\n")); + #endif } send_mdb(MDB_USART,checksum); + + #if DEBUG == 1 + send_str_p(UPLINK_USART, PSTR("TX:")); + itoa(checksum, debug_buffer, 16); + send_str(UPLINK_USART, debug_buffer); + send_str_p(UPLINK_USART, PSTR("\r\n")); + #endif state++; @@ -1030,11 +1086,18 @@ void mdb_expansion(void) { if(buffer_level(MDB_USART,RX) < 2) return; - #if DEBUG == 2 + #if DEBUG == 1 send_str_p(UPLINK_USART, PSTR("EXPANSION WAIT FOR ACK\r\n")); #endif data[0] = recv_mdb(MDB_USART); + + #if DEBUG == 1 + send_str_p(UPLINK_USART, PSTR("RX:")); + itoa(data[0], debug_buffer, 16); + send_str(UPLINK_USART, debug_buffer); + send_str_p(UPLINK_USART, PSTR("\r\n")); + #endif if(data[0] != 0x100) { mdb_active_cmd = MDB_IDLE; @@ -1057,7 +1120,7 @@ void mdb_expansion(void) { /* if(buffer_level(MDB_USART,RX) < 68) return; - #if DEBUG == 2 + #if DEBUG == 1 send_str_p(UPLINK_USART, PSTR("EXPANSION\r\n")); #endif @@ -1066,8 +1129,8 @@ void mdb_expansion(void) { checksum += data[i]; } - #if DEBUG == 2 - send_str_p(UPLINK_USART, PSTR("Debug RX:")); + #if DEBUG == 1 + send_str_p(UPLINK_USART, PSTR("RX:")); for(index = 0; index <= 33; index++) { itoa(data[index], debug_buffer, 16); send_str(UPLINK_USART, debug_buffer); From c3a4dde216f45eb7b44ed60dcf1314bbdd05a9bb Mon Sep 17 00:00:00 2001 From: bouni Date: Thu, 14 Aug 2014 14:56:26 +0200 Subject: [PATCH 11/13] fixed minor bug --- arduino/mdb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arduino/mdb.h b/arduino/mdb.h index eed39a8..8dbf577 100644 --- a/arduino/mdb.h +++ b/arduino/mdb.h @@ -25,7 +25,7 @@ #define FALSE 0 #endif -#define DEBUG 2 +#define DEBUG 1 #define MDB_USART 1 From 801201c646cb76243f23d9cd8a2cf10947954fbd Mon Sep 17 00:00:00 2001 From: bouni Date: Thu, 21 Aug 2014 12:07:33 +0200 Subject: [PATCH 12/13] added another debug message --- arduino/mdb.c | 53 ++++----------------------------------------------- 1 file changed, 4 insertions(+), 49 deletions(-) diff --git a/arduino/mdb.c b/arduino/mdb.c index e692999..82a4895 100644 --- a/arduino/mdb.c +++ b/arduino/mdb.c @@ -934,6 +934,10 @@ void mdb_expansion(void) { switch(state) { case 0: // Request ID if(buffer_level(MDB_USART,RX) < 2) return; + + #if DEBUG == 1 + send_str_p(UPLINK_USART, PSTR("EXPANSION\r\n")); + #endif data[0] = (uint8_t) recv_mdb(MDB_USART); checksum += data[0]; @@ -1117,54 +1121,5 @@ void mdb_expansion(void) { break; } - /* - if(buffer_level(MDB_USART,RX) < 68) return; - - #if DEBUG == 1 - send_str_p(UPLINK_USART, PSTR("EXPANSION\r\n")); - #endif - - for(uint8_t i=0; i<=33; i++) { - data[i] = (uint8_t) recv_mdb(MDB_USART); - checksum += data[i]; - } - - #if DEBUG == 1 - send_str_p(UPLINK_USART, PSTR("RX:")); - for(index = 0; index <= 33; index++) { - itoa(data[index], debug_buffer, 16); - send_str(UPLINK_USART, debug_buffer); - send_str_p(UPLINK_USART, PSTR(";")); - } - send_str_p(UPLINK_USART, PSTR("\r\n")); - - send_str_p(UPLINK_USART, PSTR("EXPANSION checksum:")); - itoa(checksum, debug_buffer, 16); - send_str(UPLINK_USART, debug_buffer); - send_str_p(UPLINK_USART, PSTR("\r\n")); - #endif - - // validate checksum - if(checksum != data[34]) { - mdb_active_cmd = MDB_IDLE; - mdb_poll_reply = MDB_REPLY_ACK; - checksum = MDB_EXPANSION; - send_str_p(UPLINK_USART,PSTR("Error: invalid checksum [EXPANSION]\r\n")); - return; - } - - // fool the VMC and reply its own config back ;-) - checksum = 0x09; - - for(uint8_t j=1; j<=33; j++) { - send_mdb(MDB_USART,data[j]); - checksum += data[j]; - } - - send_mdb(MDB_USART,checksum); - - mdb_active_cmd = MDB_IDLE; - mdb_poll_reply = MDB_REPLY_ACK; - */ } From c91340ba7a065977d721828d76950691c6f1f3e5 Mon Sep 17 00:00:00 2001 From: bouni Date: Wed, 4 Jan 2017 20:17:16 +0100 Subject: [PATCH 13/13] removed all GPL Licence remarks from source files, code is licenced under the MIT licence as of now --- arduino/LICENSE | 2 ++ arduino/main.c | 1 - arduino/mdb.c | 1 - arduino/mdb.h | 1 - arduino/uplink.c | 1 - arduino/uplink.h | 1 - arduino/usart.c | 1 - arduino/usart.h | 2 +- 8 files changed, 3 insertions(+), 7 deletions(-) diff --git a/arduino/LICENSE b/arduino/LICENSE index 25371a6..5758381 100644 --- a/arduino/LICENSE +++ b/arduino/LICENSE @@ -1,3 +1,5 @@ +The MIT License + Copyright (c) 2012 Bouni Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/arduino/main.c b/arduino/main.c index 5229dad..8adbda7 100644 --- a/arduino/main.c +++ b/arduino/main.c @@ -6,7 +6,6 @@ * @author bouni * @email bouni@owee.de * - * @see The GNU Public License (GPL) */ #ifndef F_CPU diff --git a/arduino/mdb.c b/arduino/mdb.c index 82a4895..330b090 100644 --- a/arduino/mdb.c +++ b/arduino/mdb.c @@ -7,7 +7,6 @@ * @author bouni * @email bouni@owee.de * - * @see The GNU Public License (GPL) */ #ifndef F_CPU diff --git a/arduino/mdb.h b/arduino/mdb.h index 8dbf577..fdd206e 100644 --- a/arduino/mdb.h +++ b/arduino/mdb.h @@ -7,7 +7,6 @@ * @author bouni * @email bouni@owee.de * - * @see The GNU Public License (GPL) */ #ifndef MDB_H diff --git a/arduino/uplink.c b/arduino/uplink.c index 73c061b..c179ec8 100644 --- a/arduino/uplink.c +++ b/arduino/uplink.c @@ -6,7 +6,6 @@ * @author bouni * @email bouni@owee.de * - * @see The GNU Public License (GPL) */ #ifndef F_CPU diff --git a/arduino/uplink.h b/arduino/uplink.h index 1bfe0d5..731fb98 100644 --- a/arduino/uplink.h +++ b/arduino/uplink.h @@ -6,7 +6,6 @@ * @author bouni * @email bouni@owee.de * - * @see The GNU Public License (GPL) */ #ifndef UPLINK_H diff --git a/arduino/usart.c b/arduino/usart.c index d99504d..4d7cd2a 100644 --- a/arduino/usart.c +++ b/arduino/usart.c @@ -6,7 +6,6 @@ * @author bouni * @email bouni@owee.de * - * @see The GNU Public License (GPL) */ #include diff --git a/arduino/usart.h b/arduino/usart.h index 83a0c55..3993c22 100644 --- a/arduino/usart.h +++ b/arduino/usart.h @@ -6,8 +6,8 @@ * @author bouni * @email bouni@owee.de * - * @see The GNU Public License (GPL) */ + #ifndef USART_H #define USART_H