| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
#include "Command.h" |
| 46 |
#include "Console.h" |
| 47 |
#include "ad7280a.h" |
| 48 |
#include "Communication.h" |
| 49 |
#include "TIME.h" |
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
const struct cmd_info cmdList[] = { |
| 56 |
[0] = { |
| 57 |
.name = "help?", |
| 58 |
.description = "Displays all available commands.", |
| 59 |
.acceptedValue = "", |
| 60 |
.example = "", |
| 61 |
}, |
| 62 |
[1] = { |
| 63 |
.name = "adcCode?", |
| 64 |
.description = "Displays the ADC code of one channel from selected \ |
| 65 |
device.", |
| 66 |
.acceptedValue = "Accepted values:\r\n\ |
| 67 |
\tdevice:\r\n\ |
| 68 |
\t0 - master\r\n\ |
| 69 |
\t1 - slave\r\n\ |
| 70 |
\tregister address:\r\n\ |
| 71 |
\t 0 - Cell Voltage 1\r\n\ |
| 72 |
\t 1 - Cell Voltage 2\r\n\ |
| 73 |
\t 2 - Cell Voltage 3\r\n\ |
| 74 |
\t 3 - Cell Voltage 4\r\n\ |
| 75 |
\t 4 - Cell Voltage 5\r\n\ |
| 76 |
\t 5 - Cell Voltage 6\r\n\ |
| 77 |
\t 6 - AUX ADC 1\r\n\ |
| 78 |
\t 7 - AUX ADC 2\r\n\ |
| 79 |
\t 8 - AUX ADC 3\r\n\ |
| 80 |
\t 9 - AUX ADC 4\r\n\ |
| 81 |
\t10 - AUX ADC 5\r\n\ |
| 82 |
\t11 - AUX ADC 6", |
| 83 |
.example = "To display the ADC code for Cell Voltage 4, master device,\ |
| 84 |
type: adcCode?0 3", |
| 85 |
}, |
| 86 |
[2] = { |
| 87 |
.name = "voltage?", |
| 88 |
.description = "Displays the input voltage of one channel from \ |
| 89 |
selected device.", |
| 90 |
.acceptedValue = "Accepted values:\r\n\ |
| 91 |
\tdevice:\r\n\ |
| 92 |
\t0 - master\r\n\ |
| 93 |
\t1 - slave\r\n \ |
| 94 |
\tregister address:\r\n\ |
| 95 |
\t 0 - Cell Voltage 1\r\n\ |
| 96 |
\t 1 - Cell Voltage 2\r\n\ |
| 97 |
\t 2 - Cell Voltage 3\r\n\ |
| 98 |
\t 3 - Cell Voltage 4\r\n\ |
| 99 |
\t 4 - Cell Voltage 5\r\n\ |
| 100 |
\t 5 - Cell Voltage 6\r\n\ |
| 101 |
\t 6 - AUX ADC 1\r\n\ |
| 102 |
\t 7 - AUX ADC 2\r\n\ |
| 103 |
\t 8 - AUX ADC 3\r\n\ |
| 104 |
\t 9 - AUX ADC 4\r\n\ |
| 105 |
\t10 - AUX ADC 5\r\n\ |
| 106 |
\t11 - AUX ADC 6", |
| 107 |
.example = "To display the input voltage for AUX ADC 5, slave device, \ |
| 108 |
type: voltage?1 10", |
| 109 |
}, |
| 110 |
[3] = { |
| 111 |
.name = "register?", |
| 112 |
.description = "Displays the content of one register from selected \ |
| 113 |
device.", |
| 114 |
.acceptedValue = "Accepted values:\r\n\ |
| 115 |
\tdevice:\r\n\ |
| 116 |
\t0 - master\r\n\ |
| 117 |
\t1 - slave\r\n \ |
| 118 |
\tregister address:\r\n\ |
| 119 |
\t13 - Control high byte\r\n\ |
| 120 |
\t14 - Control low byte\r\n\ |
| 121 |
\t15 - Cell Overvoltage\r\n\ |
| 122 |
\t16 - Cell Undervoltage\r\n\ |
| 123 |
\t ... (see AD7280A_Datasheet p.28)\r\n\ |
| 124 |
\t29 - CNVST Control", |
| 125 |
.example = "To display the content of Alert Register(address=19), \ |
| 126 |
master device, type: register?0 19", |
| 127 |
}, |
| 128 |
[4] = { |
| 129 |
.name = "register=", |
| 130 |
.description = "Sets the content of one register from selected \ |
| 131 |
device.", |
| 132 |
.acceptedValue = "Accepted values:\r\n\ |
| 133 |
\tdevice:\r\n\ |
| 134 |
\t0 - master\r\n\ |
| 135 |
\t1 - slave\r\n \ |
| 136 |
\tregister address:\r\n\ |
| 137 |
\t13 - Control high byte\r\n\ |
| 138 |
\t14 - Control low byte\r\n\ |
| 139 |
\t15 - Cell Overvoltage\r\n\ |
| 140 |
\t16 - Cell Undervoltage\r\n\ |
| 141 |
\t ... (see AD7280A_Datasheet p.28)\r\n\ |
| 142 |
\t29 - CNVST Control\r\n\ |
| 143 |
\tregister value:\r\n\ |
| 144 |
\t 0 .. 255 - value to be written inside the register.", |
| 145 |
.example = "To set the content of Cell Overvoltage Register(address=15), \ |
| 146 |
master device, to 100, type: register=0 15 100", |
| 147 |
}, |
| 148 |
[5] = { |
| 149 |
.name = "selfTestAD7280A!", |
| 150 |
.description = "Performs the self test for both AD7280A devices on the \ |
| 151 |
board (one master and one slave).", |
| 152 |
.acceptedValue = "", |
| 153 |
.example = "", |
| 154 |
}, |
| 155 |
[6] = { |
| 156 |
.name = "alertPinAD7280A?", |
| 157 |
.description = "Reads the status of Alert Pin from AD7280A.", |
| 158 |
.acceptedValue = "", |
| 159 |
.example = "", |
| 160 |
}, |
| 161 |
[7] = { |
| 162 |
.name = "enableAD8280=", |
| 163 |
.description = "Enables/disables the AD8280 device.", |
| 164 |
.acceptedValue = "Accepted values:\r\n\ |
| 165 |
\t0 - disable the AD8280 device\r\n\ |
| 166 |
\t1 - enable the AD8280 device", |
| 167 |
.example = "To enable AD8280 device, type: enableAD8280=1", |
| 168 |
}, |
| 169 |
[8] = { |
| 170 |
.name = "alarmPinOvAD8280?", |
| 171 |
.description = "Reads the status of Overvoltage Alarm Pin from AD8280.", |
| 172 |
.acceptedValue = "", |
| 173 |
.example = "", |
| 174 |
}, |
| 175 |
[9] = { |
| 176 |
.name = "alarmPinUvAD8280?", |
| 177 |
.description = "Reads the status of Undervoltage Alarm Pin from AD8280.", |
| 178 |
.acceptedValue = "", |
| 179 |
.example = "", |
| 180 |
}, |
| 181 |
[10] = { |
| 182 |
.name = "selfTestAD8280!", |
| 183 |
.description = "Performs the self test for both AD8280 devices on the \ |
| 184 |
board (one master and one slave).", |
| 185 |
.acceptedValue = "", |
| 186 |
.example = "", |
| 187 |
}, |
| 188 |
}; |
| 189 |
|
| 190 |
const char cmdNo = (sizeof(cmdList) / sizeof(struct cmd_info)); |
| 191 |
|
| 192 |
|
| 193 |
|
| 194 |
|
| 195 |
cmdFunction cmdFunctions[] = {GetHelp, GetAdcCode, GetVoltage, GetRegister, |
| 196 |
SetRegister, DoSelfTestAD7280A, GetAlertPinAD7280A, |
| 197 |
SetEnableAD8280, GetAlarmPinOvAD8280, |
| 198 |
GetAlarmPinUvAD8280, DoSelfTestAD8280}; |
| 199 |
|
| 200 |
|
| 201 |
|
| 202 |
|
| 203 |
|
| 204 |
|
| 205 |
void GetHelp(double* param, char paramNo) |
| 206 |
{ |
| 207 |
unsigned char displayCmd; |
| 208 |
|
| 209 |
CONSOLE_Print("Available commands:\r\n"); |
| 210 |
for(displayCmd = 0; displayCmd < cmdNo; displayCmd++) |
| 211 |
{ |
| 212 |
CONSOLE_Print("%s - %s %s\r\n", (char*)cmdList[displayCmd].name, |
| 213 |
(char*)cmdList[displayCmd].description, |
| 214 |
(char*)cmdList[displayCmd].acceptedValue); |
| 215 |
} |
| 216 |
} |
| 217 |
|
| 218 |
|
| 219 |
|
| 220 |
|
| 221 |
|
| 222 |
|
| 223 |
void DisplayCmdList() |
| 224 |
{ |
| 225 |
unsigned char displayCmd; |
| 226 |
|
| 227 |
for(displayCmd = 0; displayCmd < cmdNo; displayCmd++) |
| 228 |
{ |
| 229 |
CONSOLE_Print("%s - %s\r\n", (char*)cmdList[displayCmd].name, \ |
| 230 |
(char*)cmdList[displayCmd].description); |
| 231 |
} |
| 232 |
} |
| 233 |
|
| 234 |
|
| 235 |
|
| 236 |
|
| 237 |
|
| 238 |
|
| 239 |
void DisplayError(unsigned char funcNo) |
| 240 |
{ |
| 241 |
|
| 242 |
CONSOLE_Print("Invalid parameter!\r\n"); |
| 243 |
CONSOLE_Print("%s - %s %s\r\n", (char*)cmdList[funcNo].name, \ |
| 244 |
(char*)cmdList[funcNo].description, \ |
| 245 |
(char*)cmdList[funcNo].acceptedValue); |
| 246 |
CONSOLE_Print("Example: %s\r\n", (char*)cmdList[funcNo].example); |
| 247 |
} |
| 248 |
|
| 249 |
|
| 250 |
|
| 251 |
|
| 252 |
|
| 253 |
|
| 254 |
|
| 255 |
|
| 256 |
|
| 257 |
|
| 258 |
char DoDeviceInit(void) |
| 259 |
{ |
| 260 |
if(AD7280A_Init() == 0) |
| 261 |
{ |
| 262 |
CONSOLE_Print("Device OK\r\n"); |
| 263 |
DisplayCmdList(); |
| 264 |
return SUCCESS; |
| 265 |
} |
| 266 |
else |
| 267 |
{ |
| 268 |
CONSOLE_Print("Device Error\r\n"); |
| 269 |
return ERROR; |
| 270 |
} |
| 271 |
} |
| 272 |
|
| 273 |
|
| 274 |
|
| 275 |
|
| 276 |
|
| 277 |
|
| 278 |
|
| 279 |
|
| 280 |
|
| 281 |
|
| 282 |
|
| 283 |
|
| 284 |
|
| 285 |
|
| 286 |
|
| 287 |
|
| 288 |
|
| 289 |
|
| 290 |
|
| 291 |
void GetAdcCode(double* param, char paramNo) |
| 292 |
{ |
| 293 |
unsigned short adcCode = 0; |
| 294 |
unsigned char devAddr; |
| 295 |
unsigned char readReg; |
| 296 |
|
| 297 |
if (paramNo >= 2) |
| 298 |
{ |
| 299 |
if (param[0] < 0) |
| 300 |
{ |
| 301 |
param[0] = 0; |
| 302 |
} |
| 303 |
if (param[0] > 1) |
| 304 |
{ |
| 305 |
param[0] = 1; |
| 306 |
} |
| 307 |
if (param[1] < 0) |
| 308 |
{ |
| 309 |
param[1] = 0; |
| 310 |
} |
| 311 |
if (param[1] > 0xB) |
| 312 |
{ |
| 313 |
param[1] = 0xB; |
| 314 |
} |
| 315 |
|
| 316 |
devAddr = (unsigned char)param[0]; |
| 317 |
readReg = (unsigned char)param[1]; |
| 318 |
adcCode = AD7280A_Read_Conversion(devAddr, readReg); |
| 319 |
if (adcCode >= 0) |
| 320 |
{ |
| 321 |
|
| 322 |
CONSOLE_Print("ADC Code=%d for register address 0x%x, device %d.\r\n", |
| 323 |
adcCode, readReg, devAddr); |
| 324 |
} |
| 325 |
else |
| 326 |
{ |
| 327 |
CONSOLE_Print("An error occured during transmission.\r\n"); |
| 328 |
} |
| 329 |
} |
| 330 |
else |
| 331 |
{ |
| 332 |
|
| 333 |
DisplayError(1); |
| 334 |
} |
| 335 |
} |
| 336 |
|
| 337 |
|
| 338 |
|
| 339 |
|
| 340 |
|
| 341 |
|
| 342 |
|
| 343 |
|
| 344 |
|
| 345 |
|
| 346 |
|
| 347 |
|
| 348 |
|
| 349 |
|
| 350 |
|
| 351 |
|
| 352 |
|
| 353 |
|
| 354 |
|
| 355 |
void GetVoltage(double* param, char paramNo) |
| 356 |
{ |
| 357 |
unsigned short adcCode = 0; |
| 358 |
unsigned char devAddr; |
| 359 |
unsigned char readReg; |
| 360 |
float result = 0; |
| 361 |
|
| 362 |
if (paramNo >= 2) |
| 363 |
{ |
| 364 |
if (param[0] < 0) |
| 365 |
{ |
| 366 |
param[0] = 0; |
| 367 |
} |
| 368 |
if (param[0] > 1) |
| 369 |
{ |
| 370 |
param[0] = 1; |
| 371 |
} |
| 372 |
if (param[1] < 0) |
| 373 |
{ |
| 374 |
param[1] = 0; |
| 375 |
} |
| 376 |
if (param[1] > 0xB) |
| 377 |
{ |
| 378 |
param[1] = 0xB; |
| 379 |
} |
| 380 |
|
| 381 |
devAddr = (unsigned char)param[0]; |
| 382 |
readReg = (unsigned char)param[1]; |
| 383 |
adcCode = AD7280A_Read_Conversion(devAddr, readReg); |
| 384 |
if (adcCode >= 0) |
| 385 |
{ |
| 386 |
|
| 387 |
|
| 388 |
if (readReg <= 5) |
| 389 |
{ |
| 390 |
result = AD7280A_Convert_Data(0, adcCode); |
| 391 |
|
| 392 |
CONSOLE_Print("Voltage=%.3f[V] for Cell Voltage %d, device %d.\ |
| 393 |
\r\n", result, (readReg + 1), devAddr); |
| 394 |
} |
| 395 |
else |
| 396 |
{ |
| 397 |
result = AD7280A_Convert_Data(1, adcCode); |
| 398 |
|
| 399 |
CONSOLE_Print("Voltage=%.3f[V] for AUX ADC %d, device %d.\r\n", |
| 400 |
result, (readReg - 5), devAddr); |
| 401 |
} |
| 402 |
} |
| 403 |
else |
| 404 |
{ |
| 405 |
CONSOLE_Print("An error occured during transmission.\r\n"); |
| 406 |
} |
| 407 |
} |
| 408 |
else |
| 409 |
{ |
| 410 |
|
| 411 |
DisplayError(2); |
| 412 |
} |
| 413 |
} |
| 414 |
|
| 415 |
|
| 416 |
|
| 417 |
|
| 418 |
|
| 419 |
|
| 420 |
|
| 421 |
|
| 422 |
|
| 423 |
|
| 424 |
|
| 425 |
|
| 426 |
|
| 427 |
|
| 428 |
|
| 429 |
|
| 430 |
void GetRegister(double* param, char paramNo) |
| 431 |
{ |
| 432 |
unsigned short contentReg = 0; |
| 433 |
unsigned char devAddr; |
| 434 |
unsigned char readReg; |
| 435 |
|
| 436 |
if (paramNo >= 2) |
| 437 |
{ |
| 438 |
if (param[0] < 0) |
| 439 |
{ |
| 440 |
param[0] = 0; |
| 441 |
} |
| 442 |
if (param[0] > 1) |
| 443 |
{ |
| 444 |
param[0] = 1; |
| 445 |
} |
| 446 |
if (param[1] < 0x0D) |
| 447 |
{ |
| 448 |
param[1] = 0x0D; |
| 449 |
} |
| 450 |
if (param[1] > 0x1D) |
| 451 |
{ |
| 452 |
param[1] = 0x1D; |
| 453 |
} |
| 454 |
|
| 455 |
devAddr = (unsigned char)param[0]; |
| 456 |
readReg = (unsigned char)param[1]; |
| 457 |
contentReg = AD7280A_Read_Register(devAddr, readReg); |
| 458 |
if (contentReg >= 0) |
| 459 |
{ |
| 460 |
|
| 461 |
CONSOLE_Print("Register content=0x%x for register address 0x%x, device \ |
| 462 |
%d.\r\n", contentReg, readReg, devAddr); |
| 463 |
} |
| 464 |
else |
| 465 |
{ |
| 466 |
CONSOLE_Print("An error occured during transmission.\r\n"); |
| 467 |
} |
| 468 |
} |
| 469 |
else |
| 470 |
{ |
| 471 |
|
| 472 |
DisplayError(3); |
| 473 |
} |
| 474 |
} |
| 475 |
|
| 476 |
|
| 477 |
|
| 478 |
|
| 479 |
|
| 480 |
|
| 481 |
|
| 482 |
|
| 483 |
|
| 484 |
|
| 485 |
|
| 486 |
|
| 487 |
|
| 488 |
|
| 489 |
|
| 490 |
|
| 491 |
void SetRegister(double* param, char paramNo) |
| 492 |
{ |
| 493 |
unsigned char devAddr; |
| 494 |
unsigned char readReg; |
| 495 |
unsigned char regVal; |
| 496 |
|
| 497 |
if (paramNo >= 3) |
| 498 |
{ |
| 499 |
if (param[0] < 0) |
| 500 |
{ |
| 501 |
param[0] = 0; |
| 502 |
} |
| 503 |
if (param[0] > 1) |
| 504 |
{ |
| 505 |
param[0] = 1; |
| 506 |
} |
| 507 |
if (param[1] < 0x0D) |
| 508 |
{ |
| 509 |
param[1] = 0x0D; |
| 510 |
} |
| 511 |
if (param[1] > 0x1D) |
| 512 |
{ |
| 513 |
param[1] = 0x1D; |
| 514 |
} |
| 515 |
if (param[2] < 0) |
| 516 |
{ |
| 517 |
param[2] = 0; |
| 518 |
} |
| 519 |
if (param[2] > 0xFF) |
| 520 |
{ |
| 521 |
param[2] = 0xFF; |
| 522 |
} |
| 523 |
|
| 524 |
devAddr = (unsigned char)param[0]; |
| 525 |
readReg = (unsigned char)param[1]; |
| 526 |
regVal = (unsigned char)param[2]; |
| 527 |
AD7280A_Write_Register(devAddr, readReg, regVal); |
| 528 |
|
| 529 |
CONSOLE_Print("Register content=0x%x for register address 0x%x, device \ |
| 530 |
%d.\r\n", regVal, readReg, devAddr); |
| 531 |
} |
| 532 |
else |
| 533 |
{ |
| 534 |
|
| 535 |
DisplayError(4); |
| 536 |
} |
| 537 |
} |
| 538 |
|
| 539 |
|
| 540 |
|
| 541 |
|
| 542 |
|
| 543 |
|
| 544 |
|
| 545 |
|
| 546 |
|
| 547 |
void DoSelfTestAD7280A(double* param, char paramNo) |
| 548 |
{ |
| 549 |
float selfTestRegA = 0; |
| 550 |
float selfTestRegB = 0; |
| 551 |
|
| 552 |
AD7280A_Selftest_All(&selfTestRegA, &selfTestRegB); |
| 553 |
|
| 554 |
CONSOLE_Print("Self Test Master voltage=%.3f[V]\r\n",selfTestRegA); |
| 555 |
CONSOLE_Print("Self Test Slave voltage=%.3f[V]\r\n",selfTestRegB); |
| 556 |
} |
| 557 |
|
| 558 |
|
| 559 |
|
| 560 |
|
| 561 |
|
| 562 |
|
| 563 |
|
| 564 |
|
| 565 |
void GetAlertPinAD7280A(double* param, char paramNo) |
| 566 |
{ |
| 567 |
char alert = -1; |
| 568 |
|
| 569 |
alert = AD7280A_Alert_Pin(); |
| 570 |
|
| 571 |
CONSOLE_Print("Alert Pin=%d\r\n", alert); |
| 572 |
} |
| 573 |
|
| 574 |
|
| 575 |
|
| 576 |
|
| 577 |
|
| 578 |
|
| 579 |
|
| 580 |
|
| 581 |
void SetEnableAD8280(double* param, char paramNo) |
| 582 |
{ |
| 583 |
unsigned char enable; |
| 584 |
|
| 585 |
if (paramNo >= 1) |
| 586 |
{ |
| 587 |
if (param[0] < 0) |
| 588 |
{ |
| 589 |
param[0] = 0; |
| 590 |
} |
| 591 |
if (param[0] > 1) |
| 592 |
{ |
| 593 |
param[0] = 1; |
| 594 |
} |
| 595 |
|
| 596 |
enable = (unsigned char)param[0]; |
| 597 |
if (enable == 1) |
| 598 |
{ |
| 599 |
GPIO3_HIGH; |
| 600 |
} |
| 601 |
else |
| 602 |
{ |
| 603 |
if (enable == 0) |
| 604 |
{ |
| 605 |
GPIO3_LOW; |
| 606 |
} |
| 607 |
} |
| 608 |
|
| 609 |
CONSOLE_Print("AD8280 ENABLE Pin=%d\r\n", enable); |
| 610 |
} |
| 611 |
else |
| 612 |
{ |
| 613 |
|
| 614 |
DisplayError(7); |
| 615 |
} |
| 616 |
} |
| 617 |
|
| 618 |
|
| 619 |
|
| 620 |
|
| 621 |
|
| 622 |
|
| 623 |
|
| 624 |
|
| 625 |
void GetAlarmPinOvAD8280(double* param, char paramNo) |
| 626 |
{ |
| 627 |
char alarm = -1; |
| 628 |
|
| 629 |
alarm = (GPIO_GET_DATA(GPIO_BASEADDR) & GPIO_1_MASK) ? 1 : 0; |
| 630 |
|
| 631 |
CONSOLE_Print("Overvoltage Alarm Pin=%d\r\n", alarm); |
| 632 |
} |
| 633 |
|
| 634 |
|
| 635 |
|
| 636 |
|
| 637 |
|
| 638 |
|
| 639 |
|
| 640 |
|
| 641 |
void GetAlarmPinUvAD8280(double* param, char paramNo) |
| 642 |
{ |
| 643 |
char alarm = -1; |
| 644 |
|
| 645 |
alarm = (GPIO_GET_DATA(GPIO_BASEADDR) & GPIO_4_MASK) ? 1 : 0; |
| 646 |
|
| 647 |
CONSOLE_Print("Undervoltage Alarm Pin=%d\r\n", alarm); |
| 648 |
} |
| 649 |
|
| 650 |
|
| 651 |
|
| 652 |
|
| 653 |
|
| 654 |
|
| 655 |
|
| 656 |
|
| 657 |
|
| 658 |
void DoSelfTestAD8280(double* param, char paramNo) |
| 659 |
{ |
| 660 |
char alarmUV = -1; |
| 661 |
char alarmOV = -1; |
| 662 |
|
| 663 |
GPIO0_HIGH; |
| 664 |
|
| 665 |
TIME_DelayMs(2000); |
| 666 |
TIME_DelayMs(2000); |
| 667 |
GPIO0_LOW; |
| 668 |
|
| 669 |
alarmUV = (GPIO_GET_DATA(GPIO_BASEADDR) & GPIO_4_MASK) ? 1 : 0; |
| 670 |
alarmOV = (GPIO_GET_DATA(GPIO_BASEADDR) & GPIO_1_MASK) ? 1 : 0; |
| 671 |
|
| 672 |
|
| 673 |
if ((alarmUV == 0) && (alarmOV == 0)) |
| 674 |
{ |
| 675 |
CONSOLE_Print("AD8280 Self Test passed.\r\n"); |
| 676 |
} |
| 677 |
else |
| 678 |
{ |
| 679 |
CONSOLE_Print("AD8280 Self Test failed.\r\n"); |
| 680 |
} |
| 681 |
} |