| 137 | } |
| 138 | |
| 139 | INT8U Can232::exec() { |
| 140 | lw232LastErr = parseAndRunCommand(); |
| 141 | switch (lw232LastErr) { |
| 142 | case LW232_OK: |
| 143 | Serial.write(LW232_RET_ASCII_OK); |
| 144 | break; |
| 145 | case LW232_OK_SMALL: |
| 146 | Serial.write(LW232_RET_ASCII_OK_SMALL); |
| 147 | Serial.write(LW232_RET_ASCII_OK); |
| 148 | break; |
| 149 | case LW232_OK_BIG: |
| 150 | Serial.write(LW232_RET_ASCII_OK_BIG); |
| 151 | Serial.write(LW232_RET_ASCII_OK); |
| 152 | break; |
| 153 | case LW232_ERR_NOT_IMPLEMENTED: |
| 154 | // Choose behavior: will it fail or not when not implemented command comes in. Some can monitors might be affected by this selection. |
| 155 | Serial.write(LW232_RET_ASCII_ERROR); |
| 156 | //Serial.write(LW232_RET_ASCII_OK); |
| 157 | break; |
| 158 | default: |
| 159 | Serial.write(LW232_RET_ASCII_ERROR); |
| 160 | } |
| 161 | return 0; |
| 162 | } |
| 163 | |
| 164 | INT8U Can232::parseAndRunCommand() { |
| 165 | INT8U ret = LW232_OK; |
nothing calls this directly
no outgoing calls
no test coverage detected